shish 4 лет назад
Родитель
Сommit
85096e5fdc
1 измененных файлов с 1 добавлено и 1 удалено
  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;