$js = "";
if ($use_popup_windows)
$js .= get_js_open_window(800, 500);
+if ($use_date_picker)
+ $js .= get_js_date_picker();
page(_("Transfer between Bank Accounts"), false, false, "", $js);
check_db_has_bank_accounts(_("There are no bank accounts defined in the system."));
return false;
}
- if (!is_numeric($_POST['amount']))
+ if (!check_num('amount', 0))
{
- display_error(_("The entered amount is invalid."));
- return false;
- }
- if ($_POST['amount'] <= 0)
- {
- display_error(_("The entered amount must be a positive number."));
+ display_error(_("The entered amount is invalid or less than zero."));
return false;
}
global $path_to_root;
$trans_no = add_bank_transfer($_POST['FromBankAccount'], $_POST['ToBankAccount'],
- $_POST['DatePaid'], $_POST['amount'],
+ $_POST['DatePaid'], input_num('amount'),
$_POST['TransferType'], $_POST['ref'], $_POST['memo_']);
meta_forward($_SERVER['PHP_SELF'], "AddedID=$trans_no");