fix some handling 2

This commit is contained in:
2026-07-08 11:25:19 +03:30
parent 130fadc193
commit 5781d5bf53
3 changed files with 279 additions and 0 deletions
+13
View File
@@ -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') {