} else { hidden('customer_id'); } if (!$selected_id) { unset($_POST['_tabs_sel']); } // force settings tab for new customer 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))); switch (get_post('_tabs_sel')) { default: case 'settings': customer_settings($selected_id); break; case 'contacts': $contacts = new contacts('contacts', $selected_id, 'customer'); $contacts->show(); break; case 'transactions': $_GET['customer_id'] = $selected_id; $_GET['popup'] = 1; include_once $path_to_root . "/sales/inquiry/customer_inquiry.php"; break; case 'orders': $_GET['customer_id'] = $selected_id; $_GET['popup'] = 1; include_once $path_to_root . "/sales/inquiry/sales_orders_view.php"; break; } br(); tabbed_content_end(); hidden('popup', @$_REQUEST['popup']);