Browse Source

Merge branch 'dev_wf' of wugg/phpstock into version1.5

wufeng 2 years ago
parent
commit
6e8ecf19b3
1 changed files with 3 additions and 4 deletions
  1. 3 4
      app/command/SplitSale.php

+ 3 - 4
app/command/SplitSale.php

@@ -122,6 +122,9 @@ class SplitSale extends Command
 
                         $this->i++;
 
+                        $sale_total = $cgd_total;
+                        $cgd_total = round(bcsub($cgd_total, bcmul($sale['total_price'] ?? 0, $pay_rate['rate'], 5), 5), 4);
+
                         //只处理采购单
                         if (strtoupper($pay_rate['companyNo']) == 'KH') {
 
@@ -150,9 +153,6 @@ class SplitSale extends Command
 
                         }
 
-                        $sale_total = $cgd_total;
-                        $cgd_total = round(bcsub($cgd_total, bcmul($sale['total_price'] ?? 0, $pay_rate['rate'], 5), 5), 4);
-
                         //把自己覆盖到上一个记录的供应商记录中
                         if (isset($this->cgd_insert[$this->cgd_key - 1])) {
 
@@ -188,7 +188,6 @@ class SplitSale extends Command
             $output->writeln('脚本执行出错,' . $exception->getMessage() . '||' . $exception->getFile() . '||' . $exception->getLine());
         }
 
-
     }
 
     //构建销售单