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");
//--------------------------------------------------------------------------------------------
function supplier_settings(&$supplier_id)
{
-
+ global $page_nested;
+
start_outer_table(TABLESTYLE2);
table_section(1);
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);
unset($_SESSION['supplier_id']);
$supplier_id = '';
$Ajax->activate('_page_body');
+ display_notification("#" . $_POST['supplier_id'] . " " . _("Supplier has been deleted."));
} //end if Delete supplier
}
if (db_has_suppliers())
{
start_table(false, "", 3);
-// start_table(TABLESTYLE_NOBORDER);
start_row();
supplier_list_cells(_("Select a supplier: "), 'supplier_id', null,
_('New supplier'), true, check_value('show_inactive'));
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')) {
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();