shish 3 лет назад
Родитель
Сommit
28056f9c9e
1 измененных файлов с 8 добавлено и 6 удалено
  1. 8 6
      app-ghs/controllers/OrderController.php

+ 8 - 6
app-ghs/controllers/OrderController.php

@@ -1038,12 +1038,14 @@ class OrderController extends BaseController
                 $cg = PurchaseClass::getById($cgId, true);
                 $cgShopId = $cg->shopId ?? 0;
                 $cgShop = ShopClass::getById($cgShopId, true);
-                if (!empty($cgShop)) {
-                    //采购成功通知客户
-                    $cgNoticeRespond = \bizHd\notice\classes\NoticeClass::cgSuccessMiniNotice($cgShop, $cg);
-                    if (isset($cgNoticeRespond['hasNotice']) && $cgNoticeRespond['hasNotice'] == 1) {
-                        $order->hasNoticeCustom = 1;
-                        $order->save();
+                if ($order->status != 1 && $order->status != 5) {
+                    if (!empty($cgShop)) {
+                        //采购成功通知客户
+                        $cgNoticeRespond = \bizHd\notice\classes\NoticeClass::cgSuccessMiniNotice($cgShop, $cg);
+                        if (isset($cgNoticeRespond['hasNotice']) && $cgNoticeRespond['hasNotice'] == 1) {
+                            $order->hasNoticeCustom = 1;
+                            $order->save();
+                        }
                     }
                 }