changes of giftcard
This commit is contained in:
@@ -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', '%برداشت%');
|
||||
|
||||
Reference in New Issue
Block a user