X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;ds=inline;f=sales%2Fcustomer_delivery.php;h=c0da3f3bb2741fdcae21e7175ca05b4580d2c98b;hb=8f7ac519b7aaf8ec219862597e878d3a28316ac6;hp=8e5da8e8b8efa69c67045591a3fe1cb6a6fe2b02;hpb=f6857ddce763542393996620848daa7ce519842d;p=fa-stable.git diff --git a/sales/customer_delivery.php b/sales/customer_delivery.php index 8e5da8e8..c0da3f3b 100644 --- a/sales/customer_delivery.php +++ b/sales/customer_delivery.php @@ -1,4 +1,14 @@ . +***********************************************************************/ //----------------------------------------------------------------------------- // // Entry/Modify Delivery Note against Sales Order @@ -37,11 +47,12 @@ page($_SESSION['page_title'], false, false, "", $js); if (isset($_GET['AddedID'])) { $dispatch_no = $_GET['AddedID']; - display_notification(_("Dispatch processed:") . ' '.$_GET['AddedID'], true); + display_notification_centered(sprintf(_("Delivery # %d has been entered."),$dispatch_no)); - display_note(get_customer_trans_view_str(13, $dispatch_no, _("View this dispatch")), 0, 1); + display_note(get_customer_trans_view_str(13, $dispatch_no, _("&View This Delivery")), 0, 1); - display_note(print_document_link($dispatch_no, _("Print this delivery"), true, 13)); + display_note(print_document_link($dispatch_no, _("&Print Delivery Note"), true, 13)); + display_note(print_document_link($dispatch_no, _("&Email Delivery Note"), true, 13, false, "", "", 1),0, 1); display_note(get_gl_view_str(13, $dispatch_no, _("View the GL Journal Entries for this Dispatch")),1); @@ -86,7 +97,7 @@ if (isset($_GET['OrderNumber']) && $_GET['OrderNumber'] > 0) { $ord->order_no = key($ord->trans_no); $ord->trans_no = 0; $ord->reference = references::get_next(13); - $ord->document_date = Today(); + $ord->document_date = new_doc_date(); $_SESSION['Items'] = $ord; copy_from_cart(); @@ -114,14 +125,16 @@ if (isset($_GET['OrderNumber']) && $_GET['OrderNumber'] > 0) { end_page(); exit; -} elseif (!check_quantities()) { - display_error(_("Selected quantity cannot be less than quantity invoiced nor more than quantity - not dispatched on sales order.")); +} else { + check_edit_conflicts(); -} elseif(!check_num('ChargeFreightCost', 0)) - display_error(_("Freight cost cannot be less than zero")); - set_focus('ChargeFreightCost'); + if (!check_quantities()) { + display_error(_("Selected quantity cannot be less than quantity invoiced nor more than quantity not dispatched on sales order.")); + } elseif(!check_num('ChargeFreightCost', 0)) + display_error(_("Freight cost cannot be less than zero")); + set_focus('ChargeFreightCost'); +} //----------------------------------------------------------------------------- @@ -206,6 +219,7 @@ function copy_from_cart() $_POST['due_date'] = $cart->due_date; $_POST['Location'] = $cart->Location; $_POST['Comments'] = $cart->Comments; + $_POST['cart_id'] = $cart->cart_id; } //------------------------------------------------------------------------------ @@ -279,6 +293,7 @@ if (isset($_POST['process_delivery']) && check_data() && check_qoh()) { $newdelivery = ($dn->trans_no == 0); copy_to_cart(); + if ($newdelivery) new_doc_date($dn->document_date); $delivery_no = $dn->write($bo_policy); processing_end(); @@ -293,7 +308,8 @@ if (isset($_POST['Update']) || isset($_POST['_Location_update'])) { $Ajax->activate('Items'); } //------------------------------------------------------------------------------ -start_form(false, true); +start_form(); +hidden('cart_id'); start_table("$table_style2 width=80%", 5); echo "