Quellcode durchsuchen

版本大修改

cqp vor 2 Monaten
Ursprung
Commit
5f640856e4
1 geänderte Dateien mit 2 neuen und 1 gelöschten Zeilen
  1. 2 1
      app/Service/DispatchService.php

+ 2 - 1
app/Service/DispatchService.php

@@ -483,7 +483,8 @@ class DispatchService extends Service
             foreach ($tmp as $t => $v) {
                 $q = $map[$value['id'] . $v['process_id']] ?? 0;
                 $tmp[$t]['dispatch_quantity'] = $q;
-                $tmp[$t]['not_dispatch_quantity'] = $value['production_quantity'] - $q;
+                $q_s = bcsub($value['production_quantity'], $q,3);
+                $tmp[$t]['not_dispatch_quantity'] = $q_s >= 0 ? $q_s : 0;
             }
             $data['data'][$key]['process'] = $tmp;
             $last_process = end($tmp);