From 456e55ebf02d8d4d6d9eb69a8d34918726d8dfb7 Mon Sep 17 00:00:00 2001 From: Janusz Dobrowolski Date: Mon, 21 Jun 2010 17:10:58 +0000 Subject: [PATCH] Added popup mode. --- sales/inquiry/customer_inquiry.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/sales/inquiry/customer_inquiry.php b/sales/inquiry/customer_inquiry.php index 10aefa26..5f17730d 100644 --- a/sales/inquiry/customer_inquiry.php +++ b/sales/inquiry/customer_inquiry.php @@ -23,7 +23,7 @@ if ($use_popup_windows) $js .= get_js_open_window(900, 500); if ($use_date_picker) $js .= get_js_date_picker(); -page(_($help_context = "Customer Transactions"), false, false, "", $js); +page(_($help_context = "Customer Transactions"), isset($_GET['customer_id']), false, "", $js); if (isset($_GET['customer_id'])) @@ -154,11 +154,9 @@ function fmt_credit($row) function credit_link($row) { - return $row['type'] == ST_SALESINVOICE && $row["TotalAmount"] - $row["Allocated"] > 0 ? - pager_link(_("Credit This"), - "/sales/customer_credit_invoice.php?InvoiceNumber=". - $row['trans_no'], ICON_CREDIT) - : ''; + return $row['type'] == ST_SALESINVOICE && $row["Outstanding"] > 0 ? + pager_link(_("Credit This") , + "/sales/customer_credit_invoice.php?InvoiceNumber=". $row['trans_no'], ICON_CREDIT):''; } function edit_link($row) -- 2.30.2