Commit 6e5a131f by NitefullWind

1. 结算增加支付方式。

parent b0654efa
...@@ -42,8 +42,10 @@ void TaskFinal::packageServerReq() ...@@ -42,8 +42,10 @@ void TaskFinal::packageServerReq()
} else if(type == "20003") { // 代金券 } else if(type == "20003") { // 代金券
coupons.append(pay_ob[PosProps.Coupon_code].toString()); coupons.append(pay_ob[PosProps.Coupon_code].toString());
couponAmount += pay_ob[PosProps.Pay_amount].toInt(); couponAmount += pay_ob[PosProps.Pay_amount].toInt();
} else if(type == "20005") { // 现金
cashAmount += pay_ob[PosProps.Pay_amount].toInt();
} else if(type == "10001" || type == "10004") { } else if(type == "10001" || type == "10004") {
thirdAmount = pay_ob[PosProps.Pay_amount].toInt(); thirdAmount += pay_ob[PosProps.Pay_amount].toInt();
trans["third_pay_trans_id"] = pay_ob[PosProps.Pay_transId]; trans["third_pay_trans_id"] = pay_ob[PosProps.Pay_transId];
if (type == "10001") { // 支付宝 if (type == "10001") { // 支付宝
...@@ -51,11 +53,17 @@ void TaskFinal::packageServerReq() ...@@ -51,11 +53,17 @@ void TaskFinal::packageServerReq()
} else if(type == "10004") { // 微信 } else if(type == "10004") { // 微信
trans["third_pay_type"] = 2; trans["third_pay_type"] = 2;
} }
} else if(type == "10011") { // 银行卡
thirdAmount += pay_ob[PosProps.Pay_amount].toInt();
trans["third_pay_type"] = 3;
trans["third_pay_trans_id"] = pay_ob[PosProps.Pay_transId];
} else { // 其他
thirdAmount += pay_ob[PosProps.Pay_amount].toInt();
trans["third_pay_type"] = 4;
trans["third_pay_trans_id"] = pay_ob[PosProps.Pay_transId];
} }
} }
trans[ServerProps(PosProps.Coupons)] = coupons; trans[ServerProps(PosProps.Coupons)] = coupons;
cashAmount = getPosJsonValue(PosProps.PaidAmount).toInt() - codeAmount -scoreAmount - couponAmount - thirdAmount;
trans[ServerProps(PosProps.CodeAmount)] = codeAmount; trans[ServerProps(PosProps.CodeAmount)] = codeAmount;
trans[ServerProps(PosProps.ScoreAmount)] = scoreAmount; trans[ServerProps(PosProps.ScoreAmount)] = scoreAmount;
trans[ServerProps(PosProps.CashAmount)] = cashAmount; trans[ServerProps(PosProps.CashAmount)] = cashAmount;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment