include_once($path_to_root . "/includes/ui.inc");
include_once($path_to_root . "/includes/banking.inc");
include_once($path_to_root . "/includes/data_checks.inc");
-//include_once($path_to_root . "/purchasing/includes/ui/supp_alloc_ui.inc");
include_once($path_to_root . "/purchasing/includes/purchasing_db.inc");
include_once($path_to_root . "/reporting/includes/reporting.inc");
{
global $Refs;
+ if (!get_post('supplier_id'))
+ {
+ display_error(_("There is no supplier selected."));
+ set_focus('supplier_id');
+ return false;
+ }
+
if ($_POST['amount'] == "")
{
$_POST['amount'] = price_format(0);
return false;
}
- if (input_num('amount') - input_num('discount') <= 0)
+ //if (input_num('amount') - input_num('discount') <= 0)
+ if (input_num('amount') <= 0)
{
display_error(_("The total of the amount and the discount is zero or negative. Please enter positive values."));
set_focus('amount');
start_form();
- start_outer_table("$table_style2 width=60%", 5);
+ start_outer_table(TABLESTYLE2, "width=60%", 5);
table_section(1);
div_end();
}
- start_table("$table_style width=60%");
+ start_table(TABLESTYLE, "width=60%");
amount_row(_("Amount of Discount:"), 'discount');
amount_row(_("Amount of Payment:"), 'amount');
textarea_row(_("Memo:"), 'memo_', null, 22, 4);