mirror of
https://github.com/hotspotbilling/phpnuxbill.git
synced 2025-08-03 17:54:41 +02:00
case sensitive voucher check
This commit is contained in:
parent
4d7c2bd373
commit
3f7c17d9b1
4 changed files with 20 additions and 19 deletions
|
@ -482,8 +482,8 @@ switch ($action) {
|
|||
}
|
||||
$time3months = strtotime('-3 months');
|
||||
$d = ORM::for_table('tbl_voucher')->where_equal('status', '1')
|
||||
->where_raw("UNIX_TIMESTAMP(used_date) < $time3months")
|
||||
->findMany();
|
||||
->where_raw("UNIX_TIMESTAMP(used_date) < $time3months")
|
||||
->findMany();
|
||||
if ($d) {
|
||||
$jml = 0;
|
||||
foreach ($d as $v) {
|
||||
|
@ -756,9 +756,9 @@ switch ($action) {
|
|||
if (!in_array($admin['user_type'], ['SuperAdmin', 'Admin', 'Agent', 'Sales'])) {
|
||||
_alert(Lang::T('You do not have permission to access this page'), 'danger', "dashboard");
|
||||
}
|
||||
$code = _post('code');
|
||||
$code = Text::alphanumeric(_post('code'), "-_.,");
|
||||
$user = ORM::for_table('tbl_customers')->where('id', _post('id_customer'))->find_one();
|
||||
$v1 = ORM::for_table('tbl_voucher')->where('code', $code)->where('status', 0)->find_one();
|
||||
$v1 = ORM::for_table('tbl_voucher')->whereRaw("BINARY `code` = '?'", [$code])->where('status', 0)->find_one();
|
||||
|
||||
run_hook('refill_customer'); #HOOK
|
||||
if ($v1) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue