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."));
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']))
{
}
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;
}