*
Showing
2 changed files
with
4 additions
and
2 deletions
... | @@ -67,4 +67,5 @@ class BaseModel extends Model | ... | @@ -67,4 +67,5 @@ class BaseModel extends Model |
67 | return $builder->whereIn('stakeholder_id', request()->get('stakeholder_ids')); | 67 | return $builder->whereIn('stakeholder_id', request()->get('stakeholder_ids')); |
68 | } | 68 | } |
69 | 69 | ||
70 | |||
70 | } | 71 | } | ... | ... |
... | @@ -20,7 +20,7 @@ class MusicianWithdrawService extends Service | ... | @@ -20,7 +20,7 @@ class MusicianWithdrawService extends Service |
20 | $receipt = []; | 20 | $receipt = []; |
21 | 21 | ||
22 | StakeholderIncomeByPayer::query()->with('company:company_id,receipt_name,receipt_no,receipt_tel,receipt_address,receipt_bank,receipt_bank_no') | 22 | StakeholderIncomeByPayer::query()->with('company:company_id,receipt_name,receipt_no,receipt_tel,receipt_address,receipt_bank,receipt_bank_no') |
23 | ->identify()->whereIn('serial_no', $this->request->input('serial_no'))->select(['id', 'company_id'])->get()->map(function ($item) use (&$receipt) { | 23 | ->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) { |
24 | 24 | ||
25 | if (!empty($item->company)) { | 25 | if (!empty($item->company)) { |
26 | $receipt[$item->company_id] = [ | 26 | $receipt[$item->company_id] = [ |
... | @@ -59,7 +59,8 @@ class MusicianWithdrawService extends Service | ... | @@ -59,7 +59,8 @@ class MusicianWithdrawService extends Service |
59 | break; | 59 | break; |
60 | } | 60 | } |
61 | 61 | ||
62 | if (StakeholderIncomeByPayer::query()->where('sync_status', 1)->identify()->whereIn('serial_no', $this->request->input('serial_no'))->update([ | 62 | if (StakeholderIncomeByPayer::query()->where(['sync_status'=>1, 'identifier'=>$this->identifier->identifier]) |
63 | ->whereIn('serial_no', $this->request->input('serial_no'))->update([ | ||
63 | 'withdraw_status'=>$withdraw_status, | 64 | 'withdraw_status'=>$withdraw_status, |
64 | ])) { | 65 | ])) { |
65 | return Response::success(); | 66 | return Response::success(); | ... | ... |
-
Please register or sign in to post a comment