更新quotation_detail

This commit is contained in:
shengchanzhe 2024-01-14 12:26:00 +08:00
parent fcec7088c4
commit b7ad755ca7
4 changed files with 4 additions and 4 deletions

View File

@ -66,7 +66,7 @@ class BidDocumentExaminationLogic extends BaseLogic
'business_contract_deviation_annex' => !empty($params['business_contract_deviation_annex']) ? $params['business_contract_deviation_annex'] : null,
]);
if(!empty($params['quotation_detail'])){
$quotation_detail = json_decode($params['quotation_detail'],true);
$quotation_detail = $params['quotation_detail'];
foreach ($quotation_detail as $item)
{
BidDocumentExaminationDetail::create([

View File

@ -44,7 +44,7 @@ class QuotationLogic extends BaseLogic
public static function add(array $params): bool
{
$amount_including_tax = 0;
$quotation_detail = json_decode($params['quotation_detail'],true);
$quotation_detail = $params['quotation_detail'];
$tax_rate_dict = DictData::where('type_value','tax_rate')->column('name','value');
foreach($quotation_detail as &$v){
$amount_including_tax += $v['num'] * $v['tax_inclusive_price'];

View File

@ -162,7 +162,7 @@ class BidDocumentExaminationValidate extends BaseValidate
public function checkQuotationDetail($value,$rule,$data): bool|string
{
$quotation_detail = json_decode($value,true);
$quotation_detail = $value;
if(empty($quotation_detail) || !is_array($quotation_detail)){
return '审查明细数据格式错误';
}

View File

@ -149,7 +149,7 @@ class QuotationValidate extends BaseValidate
public function checkQuotationDetail($value,$rule,$data): bool|string
{
$quotation_detail = json_decode($value,true);
$quotation_detail = $value;
if(empty($quotation_detail) || !is_array($quotation_detail)){
return '报价明细数据格式错误';
}