shish %!s(int64=3) %!d(string=hai) anos
pai
achega
d710c37ad0
Modificáronse 1 ficheiros con 13 adicións e 0 borrados
  1. 13 0
      biz-hd/order/classes/OrderClass.php

+ 13 - 0
biz-hd/order/classes/OrderClass.php

@@ -509,6 +509,19 @@ class OrderClass extends BaseClass
             if ($order->fromType == 4) {
                 $printSn = $ext['mtPrintSn'] ?? '';
             }
+            $workList = WorkClass::getAllByCondition(['orderId' => $order->id], null, '*', null, true);
+            $hasSh = 0;
+            if (!empty($workList)) {
+                foreach ($workList as $work) {
+                    $sh = $work->sh ?? 0;
+                    if ($sh == 1) {
+                        $hasSh = 1;
+                    }
+                }
+            }
+            if($hasSh == 1){
+                $printSn = $ext['printSn'] ?? '';
+            }
         }
         if (empty($printSn)) {
             return false;