|
|
@@ -59,6 +59,7 @@ class RefundOrderService extends BaseService
|
|
|
$customId = $order->customId ?? 0;
|
|
|
$clearList = PurchaseClearClass::getAllByCondition(['customId' => $customId, 'status' => 1], null, '*', null, true);
|
|
|
$orderIds = [];
|
|
|
+ $currentClearId = 0;
|
|
|
if (!empty($clearList)) {
|
|
|
foreach ($clearList as $clear) {
|
|
|
$saleStr = $clear->saleIds ?? '';
|
|
|
@@ -70,11 +71,12 @@ class RefundOrderService extends BaseService
|
|
|
if (!empty($saleStr)) {
|
|
|
$current = explode(',', $saleStr);
|
|
|
$orderIds = array_merge($orderIds, $current);
|
|
|
+ $currentClearId = $clear->id;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
if (!empty($orderIds) && in_array($currentOrderId, $orderIds)) {
|
|
|
- util::success(['clearId' => $currentOrderId, 'error' => 'hasUnClearOrder']);
|
|
|
+ util::success(['clearId' => $currentClearId, 'error' => 'hasUnClearOrder']);
|
|
|
}
|
|
|
}
|
|
|
|