Commit d6e1b37a d6e1b37ad13de9bb7080cf55e96334f7e26ba3ff by lemon

*

1 parent c9a81f50
......@@ -67,4 +67,5 @@ class BaseModel extends Model
return $builder->whereIn('stakeholder_id', request()->get('stakeholder_ids'));
}
}
......
......@@ -20,7 +20,7 @@ class MusicianWithdrawService extends Service
$receipt = [];
StakeholderIncomeByPayer::query()->with('company:company_id,receipt_name,receipt_no,receipt_tel,receipt_address,receipt_bank,receipt_bank_no')
->identify()->whereIn('serial_no', $this->request->input('serial_no'))->select(['id', 'company_id'])->get()->map(function ($item) use (&$receipt) {
->where(['identifier'=>$this->identifier->identifier, 'sync_status'=>1])->whereIn('serial_no', $this->request->input('serial_no'))->select(['id', 'company_id'])->get()->map(function ($item) use (&$receipt) {
if (!empty($item->company)) {
$receipt[$item->company_id] = [
......@@ -59,7 +59,8 @@ class MusicianWithdrawService extends Service
break;
}
if (StakeholderIncomeByPayer::query()->where('sync_status', 1)->identify()->whereIn('serial_no', $this->request->input('serial_no'))->update([
if (StakeholderIncomeByPayer::query()->where(['sync_status'=>1, 'identifier'=>$this->identifier->identifier])
->whereIn('serial_no', $this->request->input('serial_no'))->update([
'withdraw_status'=>$withdraw_status,
])) {
return Response::success();
......