diff --git a/app/adminapi/logic/contract/ProcurementContractDetailLogic.php b/app/adminapi/logic/contract/ProcurementContractDetailLogic.php index 428d4205d..5513a7c33 100644 --- a/app/adminapi/logic/contract/ProcurementContractDetailLogic.php +++ b/app/adminapi/logic/contract/ProcurementContractDetailLogic.php @@ -122,7 +122,7 @@ class ProcurementContractDetailLogic extends BaseLogic public static function detail($params): array { $data = ProcurementContractDetail::field('id,material_purchase_request_detail_id,contract_id,num,price,tax_rate,amount_excluding_tax,amount_including_tax')->findOrEmpty($params['id']); - $contract = ProcurementContract::field('contract_no,project_id,supplier_id,contract_type')->where('id',$data['contract_id'])->findOrEmpty(); + $contract = ProcurementContract::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(); $material_purchase_request_detail = MaterialPurchaseRequestDetail::field('material_purchase_request_id,project_material_budget_detail_id')->where('id',$data['material_purchase_request_detail_id'])->findOrEmpty(); @@ -135,6 +135,7 @@ class ProcurementContractDetailLogic extends BaseLogic $data['supplier_code'] = $supplier['supplier_code']; $data['supplier_name'] = $supplier['supplier_name']; $data['contract_no'] = $contract['contract_no']; + $data['contract_name'] = $contract['contract_name']; $data['contract_type'] = $contract->contract_type_text; $data['material_purchase_request_code'] = $material_purchase_request['material_purchase_request_code']; $data['material_first_level'] = $material_classify[$material['first_level']];