include_once($path_to_root . "/sales/includes/sales_db.inc");\r
include_once($path_to_root . "/reporting/includes/reporting.inc");\r
\r
-$js = "";\r
-if ($use_popup_windows)\r
- $js .= get_js_open_window(900, 500);\r
-if ($use_date_picker)\r
- $js .= get_js_date_picker();\r
-page(_($help_context = "Customer Transactions"), isset($_GET['customer_id']), false, "", $js);\r
-\r
+if (!@$_GET['popup'])\r
+{\r
+ $js = "";\r
+ if ($use_popup_windows)\r
+ $js .= get_js_open_window(900, 500);\r
+ if ($use_date_picker)\r
+ $js .= get_js_date_picker();\r
+ page(_($help_context = "Customer Transactions"), isset($_GET['customer_id']), false, "", $js);\r
+}\r
\r
if (isset($_GET['customer_id']))\r
{\r
\r
//------------------------------------------------------------------------------------------------\r
\r
-start_form();\r
+if (!@$_GET['popup'])\r
+ start_form();\r
\r
if (!isset($_POST['customer_id']))\r
$_POST['customer_id'] = get_global_customer();\r
start_table(TABLESTYLE_NOBORDER);\r
start_row();\r
\r
-customer_list_cells(_("Select a customer: "), 'customer_id', null, true, false, false, true);\r
+if (!@$_GET['popup'])\r
+ customer_list_cells(_("Select a customer: "), 'customer_id', null, true, false, false, !@$_GET['popup']);\r
\r
date_cells(_("From:"), 'TransAfterDate', '', null, -30);\r
date_cells(_("To:"), 'TransToDate', '', null, 1);\r
\r
function credit_link($row)\r
{\r
+ if (@$_GET['popup'])\r
+ return '';\r
return $row['type'] == ST_SALESINVOICE && $row["Outstanding"] > 0 ?\r
pager_link(_("Credit This") ,\r
"/sales/customer_credit_invoice.php?InvoiceNumber=". $row['trans_no'], ICON_CREDIT):'';\r
{\r
$str = '';\r
\r
+ if (@$_GET['popup'])\r
+ return '';\r
switch($row['type']) {\r
case ST_SALESINVOICE:\r
if (get_voided_entry(ST_SALESINVOICE, $row["trans_no"]) === false && $row['Allocated'] == 0)\r
\r
display_db_pager($table);\r
\r
-end_form();\r
-end_page();\r
-\r
+if (!@$_GET['popup'])\r
+{\r
+ end_form();\r
+ end_page(@$_GET['popup'], false, false);\r
+}\r
?>\r