|
|
@@ -2261,12 +2261,6 @@ class OrderClass extends BaseClass
|
|
|
$customId = $order->customId ?? 0;
|
|
|
$custom = CustomClass::getById($customId, true);
|
|
|
$debtAmount = $custom->debtAmount ?? 0;
|
|
|
- $balance = $custom->balance ?? 0;
|
|
|
- $balanceContent = '';
|
|
|
- if ($balance > 0) {
|
|
|
- $balanceContent = '<span style="margin-right:15px;">余额:' . $balance . '</span>';
|
|
|
- }
|
|
|
-
|
|
|
$mainId = $order->mainId ?? 0;
|
|
|
|
|
|
$dir = Yii::getAlias('@app/web/html/' . $mainId . '/');
|
|
|
@@ -2342,9 +2336,16 @@ class OrderClass extends BaseClass
|
|
|
}
|
|
|
|
|
|
$balance = $custom->balance ?? 0;
|
|
|
+
|
|
|
+ $balanceContent = '';
|
|
|
+ if ($balance > 0 && $balance > $debtAmount) {
|
|
|
+ $balanceContent = '<span style="margin-right:15px;">余额:' . $balance . '</span>';
|
|
|
+ }
|
|
|
+
|
|
|
if ($debtAmount >= $balance) {
|
|
|
$debtAmount = bcsub($debtAmount, $balance, 2);
|
|
|
}
|
|
|
+
|
|
|
if ($beforeDebtPrice >= $balance) {
|
|
|
$beforeDebtPrice = bcsub($beforeDebtPrice, $balance, 2);
|
|
|
}
|