X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=sales%2Fcustomer_delivery.php;h=db8a51b848de253c3e8e345adcffea5ff3a262cd;hb=8fd0c50cc4a19a07c61ee87a632377419d096a5a;hp=eca3446868a64aa6cda2b774f445016d6a117204;hpb=0ad7b92c6cf2e4e65ca0fa94ba31f30f7b292ba8;p=fa-stable.git diff --git a/sales/customer_delivery.php b/sales/customer_delivery.php index eca34468..db8a51b8 100644 --- a/sales/customer_delivery.php +++ b/sales/customer_delivery.php @@ -121,6 +121,7 @@ if (isset($_GET['OrderNumber']) && $_GET['OrderNumber'] > 0) { } elseif(!check_num('ChargeFreightCost', 0)) display_error(_("Freight cost cannot be less than zero")); + set_focus('ChargeFreightCost'); //----------------------------------------------------------------------------- @@ -129,27 +130,32 @@ function check_data() { if (!isset($_POST['DispatchDate']) || !is_date($_POST['DispatchDate'])) { display_error(_("The entered date of delivery is invalid.")); + set_focus('DispatchDate'); return false; } if (!is_date_in_fiscalyear($_POST['DispatchDate'])) { display_error(_("The entered date of delivery is not in fiscal year.")); + set_focus('DispatchDate'); return false; } if (!isset($_POST['due_date']) || !is_date($_POST['due_date'])) { display_error(_("The entered dead-line for invoice 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 ($_SESSION['Items']->trans_no==0 && !is_new_reference($_POST['ref'], 13)) { display_error(_("The entered reference is already in use.")); + set_focus('ref'); return false; } } @@ -159,6 +165,7 @@ function check_data() if (!check_num('ChargeFreightCost',0)) { display_error(_("The entered shipping value is not numeric.")); + set_focus('ChargeFreightCost'); return false; } @@ -378,7 +385,7 @@ foreach ($_SESSION['Items']->line_items as $line=>$ln_itm) { label_cell($ln_itm->units); qty_cell($ln_itm->qty_done); - small_amount_cells(null, 'Line'.$line, qty_format($ln_itm->qty_dispatched)); + small_qty_cells(null, 'Line'.$line, qty_format($ln_itm->qty_dispatched)); $display_discount_percent = percent_format($ln_itm->discount_percent*100) . "%";