X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=purchasing%2Fsupplier_invoice.php;h=915ec27c1b3611157927ea6b1c6f5f8c32e5da32;hb=3a1f2b3032483a04ffca4bb037ddb5c73d4730a7;hp=33afd6c48763c6097ec19ef1543ab02553710796;hpb=da8311619dd73feae101d246a1957b972e00cbd2;p=fa-stable.git diff --git a/purchasing/supplier_invoice.php b/purchasing/supplier_invoice.php index 33afd6c4..915ec27c 100644 --- a/purchasing/supplier_invoice.php +++ b/purchasing/supplier_invoice.php @@ -14,6 +14,8 @@ include_once($path_to_root . "/purchasing/includes/purchasing_ui.inc"); $js = ""; if ($use_popup_windows) $js .= get_js_open_window(900, 500); +if ($use_date_picker) + $js .= get_js_date_picker(); page(_("Enter Supplier Invoice"), false, false, "", $js); @@ -70,34 +72,40 @@ function check_data() if (!references::is_valid($_SESSION['supp_trans']->reference)) { display_error(_("You must enter an invoice reference.")); + set_focus('reference'); return false; } if (!is_new_reference($_SESSION['supp_trans']->reference, 20)) { display_error(_("The entered reference is already in use.")); + set_focus('reference'); return false; } if (!references::is_valid($_SESSION['supp_trans']->supp_reference)) { display_error(_("You must enter a supplier's invoice reference.")); + set_focus('supp_reference'); return false; } if (!is_date( $_SESSION['supp_trans']->tran_date)) { display_error(_("The invoice as entered cannot be processed because the invoice date is in an incorrect format.")); + set_focus('trans_date'); return false; } elseif (!is_date_in_fiscalyear($_SESSION['supp_trans']->tran_date)) { display_error(_("The entered date is not in fiscal year.")); + set_focus('trans_date'); return false; } if (!is_date( $_SESSION['supp_trans']->due_date)) { display_error(_("The invoice as entered cannot be processed because the due date is in an incorrect format.")); + set_focus('due_date'); return false; }