更新
This commit is contained in:
@@ -638,7 +638,9 @@ class PrescriptionOrderLists extends BaseAdminDataLists implements ListsSearchIn
|
||||
$allOids = array_values(array_unique($allOids));
|
||||
$amountByOid = [];
|
||||
if ($allOids !== []) {
|
||||
$amountByOid = Order::whereIn('id', $allOids)->whereNull('delete_time')->column('amount', 'id');
|
||||
// 与详情已付总额一致:退款记录可展示,但不再计入实付。
|
||||
$amountByOid = Order::whereIn('id', $allOids)->whereNull('delete_time')
|
||||
->whereIn('status', [2, 5])->column('amount', 'id');
|
||||
}
|
||||
foreach ($poIds as $pid) {
|
||||
$s = 0.0;
|
||||
@@ -1161,6 +1163,7 @@ class PrescriptionOrderLists extends BaseAdminDataLists implements ListsSearchIn
|
||||
->join('order o', 'l.pay_order_id = o.id')
|
||||
->whereIn('l.prescription_order_id', $poIds)
|
||||
->whereNull('o.delete_time')
|
||||
->whereIn('o.status', [2, 5])
|
||||
->sum('o.amount');
|
||||
|
||||
return round($sum, 2);
|
||||
|
||||
Reference in New Issue
Block a user