This commit is contained in:
weiz 2024-01-23 18:57:05 +08:00
parent 62ec8e6e3c
commit 092ad6f08f

@ -87,6 +87,8 @@ class ProjectSalaryPaymentLogic extends BaseLogic
$project = Project::field('name,project_code')->where('id',$data['project_id'])->findOrEmpty();
$data['project_name'] = $project['name'];
$data['project_code'] = $project['project_code'];
//总工资付款
$data['total_amount'] = ProjectSalaryDetail::where('salary_payment_id',$data['id'])->sum('apply_amount');
$data['payment_detail'] = ProjectSalaryDetail::field('person_id,apply_amount,remark')->where('salary_payment_id',$data['id'])
->select()->each(function($item){
$person = ProjectPersonnel::field('name,idcard,work_type,deposit_bank,bank_no')->where('id',$item['person_id'])->findOrEmpty();
@ -95,8 +97,6 @@ class ProjectSalaryPaymentLogic extends BaseLogic
$item['person_work_type_text'] = $person->work_type_text;
$item['person_deposit_bank'] = $person['deposit_bank'];
$item['person_bank_no'] = $person['bank_no'];
//总工资付款
$item['total_amount'] = ProjectSalaryDetail::where('salary_payment_id',$item['id'])->sum('apply_amount');
//总考勤收入
$daily_income = ProjectAttendanceDetail::where('person_id',$item['person_id'])->sum('daily_income');
//总施工收入