X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=sales%2Fmanage%2Fcustomers.php;h=01d9fe505dbaa6c24df5edd67c32bd627bcbb344;hb=982b7733b1249637671f24d9720116602850635f;hp=e7e21e894dab641b8f74eb2ac02a33e674f2833d;hpb=d1babda7c01b314d35fb89f2d195553b55936532;p=fa-stable.git
diff --git a/sales/manage/customers.php b/sales/manage/customers.php
index e7e21e89..01d9fe50 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();
}
@@ -294,13 +294,14 @@ function customer_settings($selected_id)
{
table_section_title(_("Branch"));
locations_list_row(_("Default Inventory Location:"), 'location');
- shippers_list_row(_("Default Shipping Company:"), 'ship_via');
+ shipping_methods_list_row(_("Default Shipping:"), 'ship_via');
sales_areas_list_row( _("Sales Area:"), 'area', null);
tax_groups_list_row(_("Tax Group:"), 'tax_group_id', null);
}
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();