修复保存单据失败的bug
This commit is contained in:
@@ -1998,16 +1998,21 @@
|
||||
OrganId = $('#OrganId').combobox('getValue');
|
||||
}
|
||||
var accountMoneyList = $("#AccountId").attr("data-accountmoneyarr"); //账户金额列表-多账户
|
||||
var accountMoneyArr;
|
||||
if(accountMoneyList) {
|
||||
accountMoneyList = accountMoneyList.replace("[","").replace("]","").toString();
|
||||
var reg=new RegExp("\"","g"); //创建正则RegExp对象
|
||||
accountMoneyList = accountMoneyList.replace(reg,""); //替换所有的双引号
|
||||
var accountMoneyArr = accountMoneyList.split(","); //转为数组
|
||||
accountMoneyArr = accountMoneyList.split(","); //转为数组
|
||||
}
|
||||
if(listSubType === "采购"||listSubType === "零售退货"||listSubType === "销售退货"){
|
||||
//付款为负数
|
||||
ChangeAmount = 0 - ChangeAmount;
|
||||
TotalPrice = 0 - TotalPrice;
|
||||
if(accountMoneyArr) {
|
||||
accountMoneyArr = changeListFmtMinus(accountMoneyArr); //将数组单个金额中的数值转为负数
|
||||
}
|
||||
}
|
||||
//零售时候,可以从会员预付款中扣款
|
||||
var thisPayType = "现付";
|
||||
if(listSubType === "零售") {
|
||||
@@ -2054,7 +2059,7 @@
|
||||
PayType: thisPayType, //现付/预付款
|
||||
Remark: $.trim($("#Remark").val()),
|
||||
AccountIdList: $("#AccountId").attr("data-accountarr"), //账户列表-多账户
|
||||
AccountMoneyList: JSON.stringify(accountMoneyArr), //账户金额列表-多账户
|
||||
AccountMoneyList: accountMoneyArr ? JSON.stringify(accountMoneyArr):"", //账户金额列表-多账户
|
||||
Discount: $.trim($("#Discount").val()),
|
||||
DiscountMoney: $.trim($("#DiscountMoney").val()),
|
||||
DiscountLastMoney: $.trim($("#DiscountLastMoney").val()),
|
||||
|
||||
Reference in New Issue
Block a user