X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=sales%2Fcustomer_invoice.php;h=ded481faf5e56747b229d3d00f7bbd3aab45baa4;hb=6183e9450dcd7e4c747889c10903f6ff1b0add33;hp=e8dadd9aeb81b9ccd9e4b485c8f18256510cdce9;hpb=b0a033a1a2db727664018c496730a8be240879ec;p=fa-stable.git diff --git a/sales/customer_invoice.php b/sales/customer_invoice.php index e8dadd9a..ded481fa 100644 --- a/sales/customer_invoice.php +++ b/sales/customer_invoice.php @@ -176,27 +176,32 @@ function check_data() { if (!isset($_POST['InvoiceDate']) || !is_date($_POST['InvoiceDate'])) { display_error(_("The entered invoice date is invalid.")); + set_focus('InvoiceDate'); return false; } if (!is_date_in_fiscalyear($_POST['InvoiceDate'])) { display_error(_("The entered invoice date is not in fiscal year.")); + set_focus('InvoiceDate'); return false; } if (!isset($_POST['due_date']) || !is_date($_POST['due_date'])) { display_error(_("The entered invoice due date is invalid.")); + set_focus('due_date'); return false; } if ($_SESSION['Items']->trans_no == 0) { if (!references::is_valid($_POST['ref'])) { display_error(_("You must enter a reference.")); + set_focus('ref'); return false; } if (!is_new_reference($_POST['ref'], 10)) { display_error(_("The entered reference is already in use.")); + set_focus('ref'); return false; } } @@ -207,6 +212,7 @@ function check_data() if (!check_num('ChargeFreightCost', 0)) { display_error(_("The entered shipping value is not numeric.")); + set_focus('ChargeFreightCost'); return false; }