mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-04-03 23:01:50 -04:00
Giftcard number validation (#2935)
This commit is contained in:
@@ -174,7 +174,7 @@ class Giftcards extends Secure_Controller
|
||||
{
|
||||
$giftcard_amount = prepare_decimal($this->request->getPost('giftcard_amount'));
|
||||
$parsed_value = filter_var($giftcard_amount, FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION);
|
||||
echo json_encode (['success' => $parsed_value !== false, 'giftcard_amount' => to_currency_no_money($parsed_value)]);
|
||||
echo json_encode (['success' => $parsed_value !== false && $parsed_value > 0, 'giftcard_amount' => to_currency_no_money($parsed_value)]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user