-function copy_from_so()
-{
- if ($_SESSION['Items']->direct_invoice)
- $_POST['InvoiceText'] = $_SESSION['Items']->memo_;
-
- $_POST['OrderDate'] = $_SESSION['Items']->orig_order_date;
- $_POST['delivery_date'] = $_SESSION['Items']->delivery_date;
- $_POST['cust_ref'] = $_SESSION['Items']->cust_ref;
- $_POST['freight_cost'] = $_SESSION['Items']->freight_cost;
- $_POST['Comments'] = $_SESSION['Items']->Comments;
-
- $_POST['deliver_to'] = $_SESSION['Items']->deliver_to;
- $_POST["delivery_address"] = $_SESSION['Items']->delivery_address;
- $_POST["phone"] = $_SESSION['Items']->phone;
- $_POST["Location"] = $_SESSION['Items']->Location;
- $_POST["ship_via"] = $_SESSION['Items']->ship_via;
-}
+ submenu_option(_("Enter a New &Quotation"), "/sales/sales_order_entry.php?NewQuotation=0");
+
+ display_footer_exit();
+
+} elseif (isset($_GET['UpdatedQU'])) {
+ $order_no = $_GET['UpdatedQU'];
+
+ display_notification_centered(sprintf( _("Quotation # %d has been updated."),$order_no));
+
+ submenu_view(_("&View This Quotation"), ST_SALESQUOTE, $order_no);
+
+ submenu_print(_("&Print This Quotation"), ST_SALESQUOTE, $order_no, 'prtopt');
+ submenu_print(_("&Email This Quotation"), ST_SALESQUOTE, $order_no, null, 1);
+ set_focus('prtopt');
+
+ submenu_option(_("Make &Sales Order Against This Quotation"),
+ "/sales/sales_order_entry.php?NewQuoteToSalesOrder=$order_no");
+
+ submenu_option(_("Select A Different &Quotation"),
+ "/sales/inquiry/sales_orders_view.php?type=".ST_SALESQUOTE);
+
+ display_footer_exit();
+} elseif (isset($_GET['AddedDN'])) {
+ $delivery = $_GET['AddedDN'];
+
+ display_notification_centered(sprintf(_("Delivery # %d has been entered."),$delivery));
+
+ submenu_view(_("&View This Delivery"), ST_CUSTDELIVERY, $delivery);
+
+ submenu_print(_("&Print Delivery Note"), ST_CUSTDELIVERY, $delivery, 'prtopt');
+ submenu_print(_("&Email Delivery Note"), ST_CUSTDELIVERY, $delivery, null, 1);
+ submenu_print(_("P&rint as Packing Slip"), ST_CUSTDELIVERY, $delivery, 'prtopt', null, 1);
+ submenu_print(_("E&mail as Packing Slip"), ST_CUSTDELIVERY, $delivery, null, 1, 1);
+ set_focus('prtopt');
+
+ display_note(get_gl_view_str(ST_CUSTDELIVERY, $delivery, _("View the GL Journal Entries for this Dispatch")),0, 1);
+
+ submenu_option(_("Make &Invoice Against This Delivery"),
+ "/sales/customer_invoice.php?DeliveryNumber=$delivery");
+
+ if ((isset($_GET['Type']) && $_GET['Type'] == 1))
+ submenu_option(_("Enter a New Template &Delivery"),
+ "/sales/inquiry/sales_orders_view.php?DeliveryTemplates=Yes");
+ else
+ submenu_option(_("Enter a &New Delivery"),
+ "/sales/sales_order_entry.php?NewDelivery=0");
+
+ display_footer_exit();
+
+} elseif (isset($_GET['AddedDI'])) {
+ $invoice = $_GET['AddedDI'];
+
+ display_notification_centered(sprintf(_("Invoice # %d has been entered."), $invoice));
+
+ submenu_view(_("&View This Invoice"), ST_SALESINVOICE, $invoice);
+
+ submenu_print(_("&Print Sales Invoice"), ST_SALESINVOICE, $invoice."-".ST_SALESINVOICE, 'prtopt');
+ submenu_print(_("&Email Sales Invoice"), ST_SALESINVOICE, $invoice."-".ST_SALESINVOICE, null, 1);
+ set_focus('prtopt');
+
+ $row = db_fetch(get_allocatable_from_cust_transactions(null, $invoice, ST_SALESINVOICE));
+ if ($row !== false)
+ submenu_print(_("Print &Receipt"), $row['type'], $row['trans_no']."-".$row['type'], 'prtopt');