X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=sales%2Fmanage%2Fcustomers.php;h=d00bfdc04390a90c42fae5f52886c5bf5c3d8e04;hb=443214a800fa66cd1473b48f6fadd1b09144a5d4;hp=e7e21e894dab641b8f74eb2ac02a33e674f2833d;hpb=17b390efcf904072b02ec866b2a427490471a260;p=fa-stable.git
diff --git a/sales/manage/customers.php b/sales/manage/customers.php
index e7e21e89..d00bfdc0 100644
--- a/sales/manage/customers.php
+++ b/sales/manage/customers.php
@@ -20,7 +20,7 @@ if ($SysPrefs->use_popup_windows)
if (user_use_date_picker())
$js .= get_js_date_picker();
-page(_($help_context = "Customers"), @$_REQUEST['popup'], false, "", $js);
+page(_($help_context = "Customers"), false, false, "", $js);
include_once($path_to_root . "/includes/date_functions.inc");
include_once($path_to_root . "/includes/banking.inc");
@@ -187,7 +187,7 @@ if (isset($_POST['delete']))
function customer_settings($selected_id)
{
- global $SysPrefs, $path_to_root;
+ global $SysPrefs, $path_to_root, $page_nested;
if (!$selected_id)
{
@@ -284,8 +284,8 @@ function customer_settings($selected_id)
start_row();
echo '
'._('Customer branches').': | ';
hyperlink_params_td($path_to_root . "/sales/manage/customer_branches.php",
- ''. (@$_REQUEST['popup'] ? _("Select or &Add") : _("&Add or Edit ")).'',
- "debtor_no=".$selected_id.(@$_REQUEST['popup'] ? '&popup=1':''));
+ ''. ($page_nested ? _("Select or &Add") : _("&Add or Edit ")).'',
+ "debtor_no=".$selected_id.($page_nested ? '&popup=1':''));
end_row();
}
@@ -308,7 +308,7 @@ function customer_settings($selected_id)
else
{
submit_center_first('submit', _("Update Customer"),
- _('Update customer data'), @$_REQUEST['popup'] ? true : 'default');
+ _('Update customer data'), $page_nested ? true : 'default');
submit_return('select', $selected_id, _("Select this customer and return to document entry."));
submit_center_last('delete', _("Delete Customer"),
_('Delete customer data if have been never used'), true);
@@ -349,8 +349,8 @@ if (!$selected_id)
tabbed_content_start('tabs', array(
'settings' => array(_('&General settings'), $selected_id),
'contacts' => array(_('&Contacts'), $selected_id),
- 'transactions' => array(_('&Transactions'), $selected_id),
- 'orders' => array(_('Sales &Orders'), $selected_id),
+ 'transactions' => array(_('&Transactions'), (user_check_access('SA_SALESTRANSVIEW') ? $selected_id : null)),
+ 'orders' => array(_('Sales &Orders'), (user_check_access('SA_SALESTRANSVIEW') ? $selected_id : null)),
));
switch (get_post('_tabs_sel')) {
@@ -374,7 +374,6 @@ tabbed_content_start('tabs', array(
br();
tabbed_content_end();
-hidden('popup', @$_REQUEST['popup']);
end_form();
-end_page(@$_REQUEST['popup']);
+end_page();