This commit is contained in:
weiz 2024-01-23 09:30:39 +08:00
parent 8b52125968
commit 33368a6b06

View File

@ -119,7 +119,7 @@ class SubcontractingContractDetailLogic extends BaseLogic
public static function detail($params): array
{
$data = SubcontractingContractDetail::field('id,contract_id,subpackage_budget_detail_id,num,price,tax_rate,amount_excluding_tax,amount_including_tax,remark')->findOrEmpty($params['id']);
$contract = SubcontractingContract::field('contract_no,project_id,supplier_id,contract_type')->where('id',$data['contract_id'])->findOrEmpty();
$contract = SubcontractingContract::field('contract_no,contract_name,project_id,supplier_id,contract_type')->where('id',$data['contract_id'])->findOrEmpty();
$project = Project::field('name,project_code')->where('id',$contract['project_id'])->findOrEmpty();
$supplier = Supplier::field('supplier_code,supplier_name')->where('id',$contract['supplier_id'])->findOrEmpty();
$subpackage_budget_detail = ProjectSubpackageBudgetDetail::field('work_type,work_content,project_features,unit')->where('id',$data['subpackage_budget_detail_id'])->findOrEmpty();
@ -127,6 +127,7 @@ class SubcontractingContractDetailLogic extends BaseLogic
$data['project_name'] = $project['name'];
$data['supplier_code'] = $supplier['supplier_code'];
$data['supplier_name'] = $supplier['supplier_name'];
$data['contract_name'] = $contract['contract_name'];
$data['contract_no'] = $contract['contract_no'];
$data['contract_type'] = $contract->contract_type_text;
$data['work_type'] = $subpackage_budget_detail['work_type'];