X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=sales%2Fview%2Fview_invoice.php;h=9532bb778e5d005e498219be1899f964f977d7e8;hb=7561718ee5113232ce917f63085d272884b0929c;hp=d6a6cb7aba96ed7b5874430f4309d74b1299fb37;hpb=90b3d069d96b99671af51726e2953352738abb75;p=fa-stable.git
diff --git a/sales/view/view_invoice.php b/sales/view/view_invoice.php
index d6a6cb7a..9532bb77 100644
--- a/sales/view/view_invoice.php
+++ b/sales/view/view_invoice.php
@@ -18,7 +18,7 @@ include_once($path_to_root . "/sales/includes/sales_ui.inc");
include_once($path_to_root . "/sales/includes/sales_db.inc");
$js = "";
-if ($use_popup_windows)
+if ($SysPrefs->use_popup_windows)
$js .= get_js_open_window(900, 600);
page(_($help_context = "View Sales Invoice"), true, false, "", $js);
@@ -35,12 +35,14 @@ elseif (isset($_POST["trans_no"]))
// 3 different queries to get the information - what a JOKE !!!!
$myrow = get_customer_trans($trans_id, ST_SALESINVOICE);
+$paym = get_payment_terms($myrow['payment_terms']);
$branch = get_branch($myrow["branch_code"]);
$sales_order = get_sales_order_header($myrow["order_"], ST_SALESORDER);
-display_heading(sprintf(_("SALES INVOICE #%d"),$trans_id));
+display_heading(sprintf($myrow['prep_amount'] > 0 ? (
+ $paym['days_before_due']>=0 ? _("FINAL INVOICE #%d") : _("PREPAYMENT INVOICE #%d")) : _("SALES INVOICE #%d"),$trans_id));
echo "
";
start_table(TABLESTYLE2, "width=95%");
@@ -73,7 +75,6 @@ echo "