*
Showing
2 changed files
with
4 additions
and
3 deletions
... | @@ -2,6 +2,7 @@ | ... | @@ -2,6 +2,7 @@ |
2 | 2 | ||
3 | namespace App\Models\Legal; | 3 | namespace App\Models\Legal; |
4 | 4 | ||
5 | use App\Models\BaseModel; | ||
5 | use Illuminate\Database\Eloquent\Factories\HasFactory; | 6 | use Illuminate\Database\Eloquent\Factories\HasFactory; |
6 | use Illuminate\Database\Eloquent\Model; | 7 | use Illuminate\Database\Eloquent\Model; |
7 | 8 | ||
... | @@ -10,7 +11,7 @@ use Illuminate\Database\Eloquent\Model; | ... | @@ -10,7 +11,7 @@ use Illuminate\Database\Eloquent\Model; |
10 | * Class StakeholderIncomeByPayer | 11 | * Class StakeholderIncomeByPayer |
11 | * @package App\Models\Legal | 12 | * @package App\Models\Legal |
12 | */ | 13 | */ |
13 | class StakeholderIncomeByPayer extends Model | 14 | class StakeholderIncomeByPayer extends BaseModel |
14 | { | 15 | { |
15 | use HasFactory; | 16 | use HasFactory; |
16 | 17 | ... | ... |
... | @@ -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 | ->whereIn('serial_no', $this->request->input('serial_no'))->get()->map(function ($item) use (&$receipt) { | 23 | ->identify()->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,7 @@ class MusicianWithdrawService extends Service | ... | @@ -59,7 +59,7 @@ class MusicianWithdrawService extends Service |
59 | break; | 59 | break; |
60 | } | 60 | } |
61 | 61 | ||
62 | if (StakeholderIncomeByPayer::query()->where('sync_status', 1)->whereIn('serial_no', $this->request->input('serial_no'))->update([ | 62 | if (StakeholderIncomeByPayer::query()->where('sync_status', 1)->identify()->whereIn('serial_no', $this->request->input('serial_no'))->update([ |
63 | 'withdraw_status'=>$withdraw_status, | 63 | 'withdraw_status'=>$withdraw_status, |
64 | ])) { | 64 | ])) { |
65 | return Response::success(); | 65 | return Response::success(); | ... | ... |
-
Please register or sign in to post a comment