shish 2 lat temu
rodzic
commit
c4c80167d9

+ 4 - 2
app-hd/controllers/NoticeController.php

@@ -85,11 +85,12 @@ class NoticeController extends PublicController
                     if (!empty($order)) {
                         //订单生成时唤起在线打印
                         if (isset($order->needPrint) && $order->needPrint == dict::getDict('needPrint', 'need')) {
+                            //有几个地方要同步去修改
                             if (getenv('YII_ENV') == 'production') {
                                 //源花汇不自动打开小票
                                 $mallOrderNoPrint = [10536];
                             } else {
-                                $mallOrderNoPrint = [];
+                                $mallOrderNoPrint = [644];
                             }
                             if (in_array($order->mainId, $mallOrderNoPrint)) {
 
@@ -303,11 +304,12 @@ class NoticeController extends PublicController
                         if (!empty($order)) {
                             //订单生成时唤起在线打印
                             if (isset($order->needPrint) && $order->needPrint == dict::getDict('needPrint', 'need')) {
+                                //有几个地方要同步去修改
                                 if (getenv('YII_ENV') == 'production') {
                                     //源花汇不自动打开小票
                                     $mallOrderNoPrint = [10536];
                                 } else {
-                                    $mallOrderNoPrint = [];
+                                    $mallOrderNoPrint = [644];
                                 }
                                 if (in_array($order->mainId, $mallOrderNoPrint)) {
 

+ 15 - 3
app-hd/controllers/PurchaseController.php

@@ -491,9 +491,21 @@ class PurchaseController extends BaseController
                 }
                 //订单生成时唤起在线打印
                 if (isset($order->needPrint) && $order->needPrint == dict::getDict('needPrint', 'need')) {
-                    OrderClass::onlinePrint($order);
-                    $order->printNum += 1;
-                    $order->save();
+                    //有几个地方要同步去修改
+                    if (getenv('YII_ENV') == 'production') {
+                        //源花汇不自动打开小票
+                        $mallOrderNoPrint = [10536];
+                    } else {
+                        $mallOrderNoPrint = [644];
+                    }
+                    if (in_array($order->mainId, $mallOrderNoPrint)) {
+
+                    } else {
+
+                        OrderClass::onlinePrint($order);
+                        $order->printNum += 1;
+                        $order->save();
+                    }
                 }
                 //花店采购供货商端收到APP通知
                 //NoticeClass::ghsNewOrderNotice($order);