Kaynağa Gözat

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

wufeng 2 yıl önce
ebeveyn
işleme
6e8ecf19b3
1 değiştirilmiş dosya ile 3 ekleme ve 4 silme
  1. 3 4
      app/command/SplitSale.php

+ 3 - 4
app/command/SplitSale.php

@@ -122,6 +122,9 @@ class SplitSale extends Command
 
 
                         $this->i++;
                         $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') {
                         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])) {
                         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());
             $output->writeln('脚本执行出错,' . $exception->getMessage() . '||' . $exception->getFile() . '||' . $exception->getLine());
         }
         }
 
 
-
     }
     }
 
 
     //构建销售单
     //构建销售单