fix some bug
This commit is contained in:
+11
-3
@@ -89,12 +89,13 @@ class Withdraw extends Model
|
||||
->where('note', 'like', '%برداشت%');
|
||||
})
|
||||
->orWhere(function ($deduct) {
|
||||
$deduct->where('cash', '<', 0);
|
||||
$deduct->where('cash', '<', 0)
|
||||
->orWhere('gold', '<', 0);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
/** واریز: ورود پول/طلا به کیف (درگاه، شارژ ادمین، پاداش) */
|
||||
/** واریز: ورود پول/طلا به کیف (درگاه، شارژ ادمین، پاداش) — بدون کسر ادمین */
|
||||
public static function scopeDeposits($query)
|
||||
{
|
||||
return $query->where(function ($q) {
|
||||
@@ -105,7 +106,14 @@ class Withdraw extends Model
|
||||
})->where(function ($excludeWithdrawNotes) {
|
||||
$excludeWithdrawNotes->whereNull('note')
|
||||
->orWhere('note', 'not like', '%برداشت%');
|
||||
})->whereNotBetween('sts', [50, 52]);
|
||||
})->whereNotBetween('sts', [50, 52])
|
||||
->where(function ($positive) {
|
||||
$positive->where(function ($cash) {
|
||||
$cash->whereNull('cash')->orWhere('cash', '>=', 0);
|
||||
})->where(function ($gold) {
|
||||
$gold->whereNull('gold')->orWhere('gold', '>=', 0);
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user