shish před 4 roky
rodič
revize
85096e5fdc
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. 1 1
      app-ghs/controllers/OrderController.php

+ 1 - 1
app-ghs/controllers/OrderController.php

@@ -628,7 +628,7 @@ class OrderController extends BaseController
             util::fail('请选客户哦');
         }
         CustomClass::valid($custom, $this->shopId);
-        if (!empty($custom->mainId) && $custom->mainId == $custom->ownMainId) {
+        if (isset($custom['mainId']) && !empty($custom['mainId']) && $custom['mainId'] == $custom['ownMainId']) {
             util::fail('不能给自己的零售店开单');
         }
         $post['ghsId'] = $custom['ghsId'] ?? 0;