fix some handling 2
This commit is contained in:
@@ -34,6 +34,7 @@ class Withdraw extends Model
|
||||
50 => 'در انتظار ارسال',
|
||||
51 => 'ارسال شده',
|
||||
52 => 'لغو شده',
|
||||
53 => 'در انتظار تعیین مجدد قیمت',
|
||||
];
|
||||
|
||||
public function customer()
|
||||
@@ -56,6 +57,18 @@ class Withdraw extends Model
|
||||
return $this->hasOne('App\Models\BankAccount', 'id', 'bank_account_id');
|
||||
}
|
||||
|
||||
/** برداشت فیزیکی — درخواست تحویل محصول */
|
||||
public static function scopePhysicalWithdrawals($query)
|
||||
{
|
||||
return $query->where('note', 'like', '%برداشت فیزیکی%')
|
||||
->whereBetween('sts', [49, 70]);
|
||||
}
|
||||
|
||||
public static function isPhysicalWithdrawNote(?string $note): bool
|
||||
{
|
||||
return $note !== null && str_contains($note, 'برداشت فیزیکی');
|
||||
}
|
||||
|
||||
public static function applyFlowFilter($query, ?string $flowType = 'all')
|
||||
{
|
||||
if (!$flowType || $flowType === 'all') {
|
||||
|
||||
Reference in New Issue
Block a user