X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=purchasing%2Fmanage%2Fsuppliers.php;h=4c127b7e004eb29ecbbfbd365a8190f272373a5a;hb=a31195793c023906ab5da62f06ab84aefed445c3;hp=6e2867ffaeb5729983d7f9f650c2bc91d770b39e;hpb=e9ad9e87f5eb2682d2e91c93134250fd8a8d2ad9;p=fa-stable.git diff --git a/purchasing/manage/suppliers.php b/purchasing/manage/suppliers.php index 6e2867ff..4c127b7e 100644 --- a/purchasing/manage/suppliers.php +++ b/purchasing/manage/suppliers.php @@ -19,7 +19,7 @@ if ($SysPrefs->use_popup_windows) if (user_use_date_picker()) $js .= get_js_date_picker(); -page(_($help_context = "Suppliers"), @$_REQUEST['popup'], false, "", $js); +page(_($help_context = "Suppliers"), false, false, "", $js); include_once($path_to_root . "/includes/ui.inc"); include_once($path_to_root . "/includes/ui/contacts_view.inc"); @@ -35,7 +35,8 @@ $supplier_id = get_post('supplier_id'); //-------------------------------------------------------------------------------------------- function supplier_settings(&$supplier_id) { - + global $page_nested; + start_outer_table(TABLESTYLE2); table_section(1); @@ -166,10 +167,11 @@ function supplier_settings(&$supplier_id) end_outer_table(1); div_start('controls'); + if (@$_REQUEST['popup']) hidden('popup', 1); if ($supplier_id) { submit_center_first('submit', _("Update Supplier"), - _('Update supplier data'), @$_REQUEST['popup'] ? true : 'default'); + _('Update supplier data'), $page_nested ? true : 'default'); submit_return('select', get_post('supplier_id'), _("Select this supplier and return to document entry.")); submit_center_last('delete', _("Delete Supplier"), _('Delete supplier data if have been never used'), true); @@ -277,6 +279,7 @@ elseif (isset($_POST['delete']) && $_POST['delete'] != "") unset($_SESSION['supplier_id']); $supplier_id = ''; $Ajax->activate('_page_body'); + display_notification("#" . $_POST['supplier_id'] . " " . _("Supplier has been deleted.")); } //end if Delete supplier } @@ -307,8 +310,8 @@ if (!$supplier_id) tabbed_content_start('tabs', array( 'settings' => array(_('&General settings'), $supplier_id), 'contacts' => array(_('&Contacts'), $supplier_id), - 'transactions' => array(_('&Transactions'), $supplier_id), - 'orders' => array(_('Purchase &Orders'), $supplier_id), + 'transactions' => array(_('&Transactions'), (user_check_access('SA_SUPPTRANSVIEW') ? $supplier_id : null)), + 'orders' => array(_('Purchase &Orders'), (user_check_access('SA_SUPPTRANSVIEW') ? $supplier_id : null)), )); switch (get_post('_tabs_sel')) { @@ -322,19 +325,15 @@ tabbed_content_start('tabs', array( break; case 'transactions': $_GET['supplier_id'] = $supplier_id; - $_GET['popup'] = 1; include_once($path_to_root."/purchasing/inquiry/supplier_inquiry.php"); break; case 'orders': $_GET['supplier_id'] = $supplier_id; - $_GET['popup'] = 1; include_once($path_to_root."/purchasing/inquiry/po_search_completed.php"); break; }; br(); tabbed_content_end(); -hidden('popup', @$_REQUEST['popup']); end_form(); - -end_page(@$_REQUEST['popup']); +end_page();