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