Merge branch '20260511-long'
This commit is contained in:
@@ -324,7 +324,16 @@ class PrescriptionOrderLogic
|
||||
if ($payOrderIds === []) {
|
||||
return '未关联支付单,关联支付单总金额须大于等于定金门槛 ¥' . $min;
|
||||
}
|
||||
|
||||
|
||||
// 豁免权:关联的支付单中有豁免单则跳过金额校验
|
||||
$hasExempt = Order::whereIn('id', $payOrderIds)
|
||||
->whereNull('delete_time')
|
||||
->where('is_exempt', 1)
|
||||
->count();
|
||||
if ($hasExempt > 0) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// 检查关联支付单的总金额
|
||||
$rows = Order::whereIn('id', $payOrderIds)->whereNull('delete_time')->column('amount', 'id');
|
||||
$totalAmount = 0.0;
|
||||
@@ -504,7 +513,7 @@ class PrescriptionOrderLogic
|
||||
return [];
|
||||
}
|
||||
$rows = Order::whereIn('id', $ids)->whereNull('delete_time')
|
||||
->field(['id', 'order_no', 'order_type', 'amount', 'status', 'create_time', 'creator_id', 'remark'])
|
||||
->field(['id', 'order_no', 'order_type', 'amount', 'status', 'create_time', 'creator_id', 'remark', 'is_exempt'])
|
||||
->order('id', 'asc')
|
||||
->select()
|
||||
->toArray();
|
||||
|
||||
Reference in New Issue
Block a user