From: Joe Hunt Date: Wed, 30 Mar 2011 07:45:59 +0000 (+0200) Subject: Missing restriction on fiscal year in direct GRN and direct Supp Invoice X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=commitdiff_plain;h=63fa3f67bb359c02a947efca8b69bb8a16074d06;p=textcart.git Missing restriction on fiscal year in direct GRN and direct Supp Invoice --- diff --git a/purchasing/po_entry_items.php b/purchasing/po_entry_items.php index 84fe0e3..8cd68c2 100644 --- a/purchasing/po_entry_items.php +++ b/purchasing/po_entry_items.php @@ -335,6 +335,13 @@ function can_commit() return false; } + if ($_SESSION['PO']->trans_type != ST_PURCHORDER && !is_date_in_fiscalyear($_POST['OrderDate'])) + { + display_error(_("The entered date is not in fiscal year")); + set_focus('OrderDate'); + return false; + } + if (($_SESSION['PO']->trans_type==ST_SUPPINVOICE) && !is_date($_POST['due_date'])) { display_error(_("The entered due date is invalid.")); diff --git a/purchasing/po_receive_items.php b/purchasing/po_receive_items.php index 85acc0a..3d09c3d 100644 --- a/purchasing/po_receive_items.php +++ b/purchasing/po_receive_items.php @@ -176,6 +176,13 @@ function can_process() return false; } + if (!is_date_in_fiscalyear($_POST['DefaultReceivedDate'])) + { + display_error(_("The entered date is not in fiscal year")); + set_focus('DefaultReceivedDate'); + return false; + } + if (!$Refs->is_valid($_POST['ref'])) { display_error(_("You must enter a reference."));