X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=sales%2Fcustomer_delivery.php;h=1e29859ea49905f170704b7f19967f9c62c0a4e7;hb=25379bdc9f10bda4aae4b37f04d16eb1bbe7e4f6;hp=ef5aa72cac178e12f71104c148facfef2eae3830;hpb=cb7da60bef5f27507540f827e4a03ede8d08f684;p=fa-stable.git
diff --git a/sales/customer_delivery.php b/sales/customer_delivery.php
index ef5aa72c..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 "