|
|
@@ -88,29 +88,29 @@ class TestController extends PublicController
|
|
|
} else {
|
|
|
//非美团!!!
|
|
|
|
|
|
-// if ($debtPrice > 0) {
|
|
|
-//
|
|
|
-// if ($remainDebtPrice > 0) {
|
|
|
-// $incomeList['debt']['amount'] = bcadd($incomeList['debt']['amount'], $remainDebtPrice, 2);
|
|
|
-// $incomeList['debt']['num'] = bcadd($incomeList['debt']['num'], 1);
|
|
|
-// $incomeList['debt']['category']['ls']['amount'] = bcadd($incomeList['debt']['category']['ls']['amount'], $remainDebtPrice, 2);
|
|
|
-// $incomeList['debt']['category']['ls']['num'] = bcadd($incomeList['debt']['category']['ls']['num'], 1);
|
|
|
-// }
|
|
|
-//
|
|
|
-// $clearDebt = bcsub($debtPrice, $remainDebtPrice, 2);
|
|
|
-// if ($clearDebt > 0) {
|
|
|
-// $incomeList['debtClear']['amount'] = bcadd($incomeList['debtClear']['amount'], $clearDebt, 2);
|
|
|
-// $incomeList['debtClear']['num'] = bcadd($incomeList['debtClear']['num'], 1);
|
|
|
-// $incomeList['debtClear']['category']['ls']['amount'] = bcadd($incomeList['debtClear']['category']['ls']['amount'], $clearDebt, 2);
|
|
|
-// $incomeList['debtClear']['category']['ls']['num'] = bcadd($incomeList['debtClear']['category']['ls']['num'], 1);
|
|
|
-// }
|
|
|
-//
|
|
|
-// $currentAmount = bcsub($mainPay, $debtPrice, 2);
|
|
|
-//
|
|
|
-// } else {
|
|
|
-// $currentAmount = $mainPay;
|
|
|
-// }
|
|
|
- $currentAmount = $mainPay;
|
|
|
+ if ($debtPrice > 0) {
|
|
|
+
|
|
|
+ if ($remainDebtPrice > 0) {
|
|
|
+ $incomeList['debt']['amount'] = bcadd($incomeList['debt']['amount'], $remainDebtPrice, 2);
|
|
|
+ $incomeList['debt']['num'] = bcadd($incomeList['debt']['num'], 1);
|
|
|
+ $incomeList['debt']['category']['ls']['amount'] = bcadd($incomeList['debt']['category']['ls']['amount'], $remainDebtPrice, 2);
|
|
|
+ $incomeList['debt']['category']['ls']['num'] = bcadd($incomeList['debt']['category']['ls']['num'], 1);
|
|
|
+ }
|
|
|
+
|
|
|
+ $clearDebt = bcsub($debtPrice, $remainDebtPrice, 2);
|
|
|
+ if ($clearDebt > 0) {
|
|
|
+ $incomeList['debtClear']['amount'] = bcadd($incomeList['debtClear']['amount'], $clearDebt, 2);
|
|
|
+ $incomeList['debtClear']['num'] = bcadd($incomeList['debtClear']['num'], 1);
|
|
|
+ $incomeList['debtClear']['category']['ls']['amount'] = bcadd($incomeList['debtClear']['category']['ls']['amount'], $clearDebt, 2);
|
|
|
+ $incomeList['debtClear']['category']['ls']['num'] = bcadd($incomeList['debtClear']['category']['ls']['num'], 1);
|
|
|
+ }
|
|
|
+
|
|
|
+ $currentAmount = bcsub($mainPay, $debtPrice, 2);
|
|
|
+
|
|
|
+ } else {
|
|
|
+ $currentAmount = $mainPay;
|
|
|
+ }
|
|
|
+
|
|
|
if ($currentAmount > 0) {
|
|
|
//使用非在线支付
|
|
|
switch ($payWay) {
|