From: Janusz Dobrowolski Date: Wed, 23 Mar 2011 17:42:37 +0000 (+0100) Subject: Blocked purchase invoice and delivery entry for closed date. X-Git-Tag: v2.4.2~19^2~388 X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=commitdiff_plain;h=ce52a2dd6cb28234935d002d661a2ee3c3d96ccb;p=fa-stable.git Blocked purchase invoice and delivery entry for closed date. --- diff --git a/purchasing/po_entry_items.php b/purchasing/po_entry_items.php index a6ca4c33..294d4be5 100644 --- a/purchasing/po_entry_items.php +++ b/purchasing/po_entry_items.php @@ -337,7 +337,12 @@ function can_commit() set_focus('OrderDate'); return false; } - + if (($_SESSION['PO']->trans_type == ST_SUPPRECEIVE || $_SESSION['PO']->trans_type == ST_SUPPINVOICE) + && !is_date_in_fiscalyear($_POST['OrderDate'])) { + display_error(_("The entered date is out of fiscal year or is closed for further data entry.")); + 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 85acc0ad..83900c86 100644 --- a/purchasing/po_receive_items.php +++ b/purchasing/po_receive_items.php @@ -175,6 +175,11 @@ function can_process() set_focus('DefaultReceivedDate'); return false; } + if (!is_date_in_fiscalyear($_POST['DefaultReceivedDate'])) { + display_error(_("The entered date is out of fiscal year or is closed for further data entry.")); + set_focus('DefaultReceivedDate'); + return false; + } if (!$Refs->is_valid($_POST['ref'])) { diff --git a/purchasing/supplier_invoice.php b/purchasing/supplier_invoice.php index 28fb7215..90b86a94 100644 --- a/purchasing/supplier_invoice.php +++ b/purchasing/supplier_invoice.php @@ -171,7 +171,7 @@ function check_data() } elseif (!is_date_in_fiscalyear($_SESSION['supp_trans']->tran_date)) { - display_error(_("The entered date is not in fiscal year.")); + display_error(_("The entered date is out of fiscal year or is closed for further data entry.")); set_focus('trans_date'); return false; }