X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=sales%2Fmanage%2Fcustomers.php;h=3810e2b4f2c271a0688ce61d4056c57d9d0a05e0;hb=a7e711f2718d867380952b884f6cbb839d818a78;hp=e7e21e894dab641b8f74eb2ac02a33e674f2833d;hpb=17b390efcf904072b02ec866b2a427490471a260;p=fa-stable.git
diff --git a/sales/manage/customers.php b/sales/manage/customers.php
index e7e21e89..3810e2b4 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();
}
@@ -301,6 +301,7 @@ function customer_settings($selected_id)
end_outer_table(1);
div_start('controls');
+ if (@$_REQUEST['popup']) hidden('popup', 1);
if (!$selected_id)
{
submit_center('submit', _("Add New Customer"), true, '', 'default');
@@ -308,7 +309,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 +350,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 +375,6 @@ tabbed_content_start('tabs', array(
br();
tabbed_content_end();
-hidden('popup', @$_REQUEST['popup']);
end_form();
-end_page(@$_REQUEST['popup']);
+end_page();