|
|
@@ -123,7 +123,7 @@ class GhsController extends Controller
|
|
|
}
|
|
|
$total = '0.00';
|
|
|
foreach ($orderList as $order) {
|
|
|
- $remain = $order->remainDebtPrice ?? $order->actPrice ?? '0';
|
|
|
+ $remain = $order->remainDebtPrice ?? 0;
|
|
|
$total = bcadd($total, bcadd((string)$remain, '0', 2), 2);
|
|
|
}
|
|
|
return $total;
|
|
|
@@ -148,9 +148,6 @@ class GhsController extends Controller
|
|
|
if (is_object($order) && method_exists($order, 'hasAttribute') && $order->hasAttribute('remainDebtPrice')) {
|
|
|
$remain = $order->remainDebtPrice ?? '0';
|
|
|
}
|
|
|
- if (bccomp((string)$remain, '0', 2) <= 0) {
|
|
|
- $remain = $order->actPrice ?? '0';
|
|
|
- }
|
|
|
$total = bcadd($total, bcadd((string)$remain, '0', 2), 2);
|
|
|
}
|
|
|
return $total;
|