X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=sales%2Fcustomer_delivery.php;h=1e29859ea49905f170704b7f19967f9c62c0a4e7;hb=dfc8254c800df90e357cbdf9087d28d8999bcafa;hp=90905a2cbbc32267a69e5771a2cf138ce4cd08d1;hpb=a52ac85e7b37a748bd6b4210e8f669fbb615ddcc;p=fa-stable.git
diff --git a/sales/customer_delivery.php b/sales/customer_delivery.php
index 90905a2c..1e29859e 100644
--- a/sales/customer_delivery.php
+++ b/sales/customer_delivery.php
@@ -19,17 +19,16 @@ $path_to_root = "..";
include_once($path_to_root . "/sales/includes/cart_class.inc");
include_once($path_to_root . "/includes/session.inc");
include_once($path_to_root . "/includes/data_checks.inc");
-include_once($path_to_root . "/includes/manufacturing.inc");
include_once($path_to_root . "/sales/includes/sales_db.inc");
include_once($path_to_root . "/sales/includes/sales_ui.inc");
include_once($path_to_root . "/reporting/includes/reporting.inc");
include_once($path_to_root . "/taxes/tax_calc.inc");
$js = "";
-if ($use_popup_windows) {
+if ($SysPrefs->use_popup_windows) {
$js .= get_js_open_window(900, 500);
}
-if ($use_date_picker) {
+if (user_use_date_picker()) {
$js .= get_js_date_picker();
}
@@ -58,7 +57,8 @@ if (isset($_GET['AddedID'])) {
display_note(get_gl_view_str(13, $dispatch_no, _("View the GL Journal Entries for this Dispatch")),1);
- hyperlink_params("$path_to_root/sales/customer_invoice.php", _("Invoice This Delivery"), "DeliveryNumber=$dispatch_no");
+ if (!isset($_GET['prepaid']))
+ hyperlink_params("$path_to_root/sales/customer_invoice.php", _("Invoice This Delivery"), "DeliveryNumber=$dispatch_no");
hyperlink_params("$path_to_root/sales/inquiry/sales_orders_view.php", _("Select Another Order For Dispatch"), "OutstandingOnly=1");
@@ -77,7 +77,8 @@ if (isset($_GET['AddedID'])) {
display_note(print_document_link($delivery_no, _("P&rint as Packing Slip"), true, ST_CUSTDELIVERY, false, "printlink", "", 0, 1));
display_note(print_document_link($delivery_no, _("E&mail as Packing Slip"), true, ST_CUSTDELIVERY, false, "printlink", "", 1, 1), 1);
- hyperlink_params($path_to_root . "/sales/customer_invoice.php", _("Confirm Delivery and Invoice"), "DeliveryNumber=$delivery_no");
+ if (!isset($_GET['prepaid']))
+ hyperlink_params($path_to_root . "/sales/customer_invoice.php", _("Confirm Delivery and Invoice"), "DeliveryNumber=$delivery_no");
hyperlink_params($path_to_root . "/sales/inquiry/sales_deliveries_view.php", _("Select A Different Delivery"), "OutstandingOnly=1");
@@ -88,13 +89,22 @@ if (isset($_GET['AddedID'])) {
if (isset($_GET['OrderNumber']) && $_GET['OrderNumber'] > 0) {
$ord = new Cart(ST_SALESORDER, $_GET['OrderNumber'], true);
+ if ($ord->is_prepaid())
+ check_deferred_income_act(_("You have to set Deferred Income Account in GL Setup to entry prepayment invoices."));
if ($ord->count_items() == 0) {
hyperlink_params($path_to_root . "/sales/inquiry/sales_orders_view.php",
_("Select a different sales order to delivery"), "OutstandingOnly=1");
- die ("
" . _("This order has no items. There is nothing to delivery.") . "");
+ echo "