Browse Source

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

wufeng 2 years ago
parent
commit
7eefd2aff7
1 changed files with 2 additions and 2 deletions
  1. 2 2
      app/abutment/logic/Filing.php

+ 2 - 2
app/abutment/logic/Filing.php

@@ -53,8 +53,8 @@ class Filing
     public static function add(array $data = [])
     {
 
-        if ($data['is_determine_price'] == 1) $data['cgd_charge'] = bcadd($data['price'], $data['expect_service'], 2);//确定售价时,采购价=售价+服务费
-        else $data['price'] = bcsub($data['cgd_charge'], $data['expect_service'], 2);//不确定售价时,售价=采购价-服务费
+        if ($data['is_determine_price'] == 1) $data['cgd_charge'] = round(bcsub($data['price'], $data['expect_service'], 3), 2);//确定售价时,采购价=售价-服务费
+        else $data['price'] = round(bcadd($data['cgd_charge'], $data['expect_service'], 3), 2);//不确定售价时,售价=采购价+服务费
 
         $customerName = Db::name('business')
             ->where(['companyNo' => $data['customerCode']])