diff --git a/app/adminapi/logic/project/ProjectSettlementLogic.php b/app/adminapi/logic/project/ProjectSettlementLogic.php index 15849f0ea..85fdc60ef 100644 --- a/app/adminapi/logic/project/ProjectSettlementLogic.php +++ b/app/adminapi/logic/project/ProjectSettlementLogic.php @@ -120,9 +120,9 @@ class ProjectSettlementLogic extends BaseLogic public static function detail($params): array { $data = ProjectSettlement::field('id,settlement_code,project_id,contract_id,settlement_amount,settlement_amount_uppercase,remaining_amount,settlement_date,remark,annex')->findOrEmpty($params['id'])->toArray(); - $project = Project::field('name,project_code')->where('id',$data['project_id'])->findOrEmpty(); - $contract = Contract::field('customer_id,contract_name,contract_code,amount,amount_daxie')->where('id',$data['contract_id'])->findOrEmpty(); - $custom = Custom::field('name')->where('id',$contract['customer_id'])->findOrEmpty(); + $project = Project::field('custom_id,name,project_code')->where('id',$data['project_id'])->findOrEmpty(); + $contract = Contract::field('contract_name,contract_code,amount')->where('id',$data['contract_id'])->findOrEmpty(); + $custom = Custom::field('name')->where('id',$project['custom_id'])->findOrEmpty(); $data['project_name'] = $project['name']; $data['project_code'] = $project['project_code']; $data['contract_name'] = $contract['contract_name'];