소스 검색

版本大修改

cqp 2 달 전
부모
커밋
5f640856e4
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  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);