shish 2 лет назад
Родитель
Сommit
432c8dcb29
1 измененных файлов с 12 добавлено и 0 удалено
  1. 12 0
      biz-ghs/order/classes/PurchaseOrderClass.php

+ 12 - 0
biz-ghs/order/classes/PurchaseOrderClass.php

@@ -165,6 +165,7 @@ class PurchaseOrderClass extends BaseClass
         $itemList = PurchaseOrderItemClass::getAllByCondition(['orderSn' => $orderSn], null, '*');
 
         $shopId = $orderInfo->shopId ?? 0;
+        $mainId = $orderInfo->mainId ?? 0;
         $shop = ShopClass::getById($shopId, true);
         $telephone = $shop->telephone ?? '';
         $sjId = $shop->sjId ?? 0;
@@ -173,6 +174,17 @@ class PurchaseOrderClass extends BaseClass
         $shopName = $shop->shopName ?? '';
         $currentName = $shopName == '首店' ? $sjName : $sjName . ' ' . $shopName;
 
+        if (getenv('YII_ENV') == 'production') {
+            //小向的采购不允许打小票
+            if (in_array($mainId, [23390])) {
+                return true;
+            }
+        } else {
+            if (in_array($mainId, [644])) {
+                return true;
+            }
+        }
+
         $content = "<CB>" . $currentName . "</CB>";
         $content .= "<CB>采购单</CB>";
         $content .= '--------------------------------<BR>';