changes of giftcard

This commit is contained in:
2026-09-12 10:12:43 +03:30
parent f3202ee89e
commit aecbd5b3bf
3 changed files with 86 additions and 32 deletions
+7 -2
View File
@@ -109,14 +109,19 @@ class Withdraw extends Model
});
}
/** واریز: ورود پول/طلا به کیف (درگاه، شارژ ادمین، پاداش) — بدون کسر ادمین */
/** واریز: ورود پول/طلا به کیف (درگاه، شارژ ادمین، پاداش، کارت هدیه ریالی) — بدون کسر ادمین */
public static function scopeDeposits($query)
{
return $query->where(function ($q) {
$q->where(function ($inner) {
$inner->where('note', 'like', '%واریز%')
->orWhere('type', 1)
->orWhereIn('sts', [4, 5, 9]);
->orWhereIn('sts', [4, 5, 9])
// کارت هدیه ریالی (نه فلزی/مسی)
->orWhere(function ($gift) {
$gift->where('note', 'like', '%کارت هدیه%')
->where('cash', '>', 0);
});
})->where(function ($excludeWithdrawNotes) {
$excludeWithdrawNotes->whereNull('note')
->orWhere('note', 'not like', '%برداشت%');