Commit 244cf599 by NitefullWind

1. 结算接口中同一种支付方式可能出现正负值,负值是找零。

parent 4da0b670
......@@ -29,11 +29,11 @@ void TaskFinal::packageServerReq()
QJsonObject pay_ob = pay_v.toObject();
QString type = pay_ob[PosProps.Pay_id].toString();
if(type == "01") {
cashAmount = pay_ob[PosProps.Paid_total_amount].toInt();
cashAmount += pay_ob[PosProps.Paid_total_amount].toInt();
} else if(type == "20") {
codeAmount = pay_ob[PosProps.Paid_total_amount].toInt();
codeAmount += pay_ob[PosProps.Paid_total_amount].toInt();
} else if(type == "20002") { // 积分,暂无
scoreAmount = pay_ob[PosProps.Paid_total_amount].toInt();
scoreAmount += pay_ob[PosProps.Paid_total_amount].toInt();
} else if(type == "21") { // 代金券
coupons.append(pay_ob[PosProps.Coupon_code].toString());
} else if(type == "10" || type == "11" || type == "12") {
......@@ -49,7 +49,7 @@ void TaskFinal::packageServerReq()
}
} else {
qDebug() << QString("未知的Pay Type: %1").arg(type);
thirdAmount = pay_ob[PosProps.Paid_total_amount].toInt();
thirdAmount += pay_ob[PosProps.Paid_total_amount].toInt();
}
}
trans[ServerProps(PosProps.Coupons)] = coupons;
......
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