Răsfoiți Sursa

Merge branch 'master' into dev

shish 1 zi în urmă
părinte
comite
cffeb5dbe9
1 a modificat fișierele cu 11 adăugiri și 2 ștergeri
  1. 11 2
      biz-ghs/order/classes/PurchaseOrderClass.php

+ 11 - 2
biz-ghs/order/classes/PurchaseOrderClass.php

@@ -899,8 +899,17 @@ class PurchaseOrderClass extends BaseClass
             $content .= '退款金额:' . floatval($orderInfo['tkPrice']) . '元<BR>';
             $content .= '退款金额:' . floatval($orderInfo['tkPrice']) . '元<BR>';
         }
         }
         $content .= '<B>订单金额:' . floatval($orderInfo['realPrice']) . '</B><BR>';
         $content .= '<B>订单金额:' . floatval($orderInfo['realPrice']) . '</B><BR>';
-        if (isset($orderInfo['debt']) && $orderInfo['debt'] == 1) {
-            $content .= '实付金额:0元<BR>';
+        if ($orderInfo['debtPrice'] > 0) {
+            $remainDebt = bcadd((string)($orderInfo['remainDebtPrice'] ?? '0'), '0', 2);
+            $totalRefund = bcadd((string)($orderInfo['tkPrice'] ?? '0'), (string)($orderInfo['nextDayTkPrice'] ?? '0'), 2);
+            if($totalRefund > 0) {
+                $content .= '累计退款:' . floatval($totalRefund) . '元<BR>';
+            }
+            if($remainDebt > 0) {
+                $content .= '<B>剩余待结:' . floatval($remainDebt) . '元</B><BR>';   
+            }else{
+                $content .= '<B>剩余待结:0元 已结清!</B><BR>';
+            }
         } else {
         } else {
             $content .= '实付金额:' . floatval($orderInfo['realPrice']) . '元<BR>';
             $content .= '实付金额:' . floatval($orderInfo['realPrice']) . '元<BR>';
         }
         }