mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal.git
synced 2026-08-19 04:24:12 +00:00
fix account statement mapping issue
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace App\Classes\General\Eloquent\Filters;
|
||||
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
|
||||
class PaymentMethodNotIn implements Filter
|
||||
{
|
||||
|
||||
/**
|
||||
* @param Builder $builder
|
||||
* @param $value
|
||||
* @return Builder|mixed
|
||||
*/
|
||||
public static function apply(Builder $builder, $value)
|
||||
{
|
||||
return $builder->whereNotIn('payment_method', $value);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -26,7 +26,7 @@ class MappableTransactionResource extends JsonResource
|
||||
$reference = $this->owner->owner->inviters()->withPivot('invitee_reference')->first()->pivot->invitee_reference;
|
||||
}
|
||||
|
||||
if($this->type === TransactionType::PAYMENT && $this->owner !== Wallet::class){
|
||||
if($this->type === TransactionType::PAYMENT && $this->owner_type !== Wallet::class){
|
||||
$reference = $this->owner->owner->owner->reference;
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ class MappableTransactionResource extends JsonResource
|
||||
'status' => 'success',
|
||||
'system' => 'SHIPPING_PORTAL',
|
||||
'type' => $this->type,
|
||||
'owner_type' => $this->owner_type,
|
||||
'owner_type' => Transaction::class,
|
||||
'owner_id'=> $this->id,
|
||||
'owner_reference'=> $reference,
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user