|
@@ -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']])
|