|
|
@@ -244,6 +244,12 @@ class RefundOrderClass extends BaseClass
|
|
|
$order->refund = OrderClass::REFUND_YES;
|
|
|
$order->save();
|
|
|
|
|
|
+ $customId = $order->customId;
|
|
|
+ $custom = CustomClass::getLockById($customId);
|
|
|
+ if (empty($custom)) {
|
|
|
+ util::fail('没有找到客户');
|
|
|
+ }
|
|
|
+
|
|
|
if ($onlinePay == dict::getDict('onlinePay', 'yes')) {
|
|
|
//退款流程
|
|
|
if ($payWay == dict::getDict('payWay', 'wxPay') || $payWay == dict::getDict('payWay', 'alipay')) {
|
|
|
@@ -307,13 +313,6 @@ class RefundOrderClass extends BaseClass
|
|
|
$order->remainDebtPrice = $currentRemainDebt;
|
|
|
$order->save();
|
|
|
|
|
|
- //门店客户欠款减少
|
|
|
- $customId = $order->customId;
|
|
|
- $custom = CustomClass::getLockById($customId);
|
|
|
- if (empty($custom)) {
|
|
|
- util::fail('没有找到客户');
|
|
|
- }
|
|
|
-
|
|
|
//客户欠款金额减少
|
|
|
CustomClass::refundDebtAmountReduce($custom, $refund, $order);
|
|
|
|