include_once($path_to_root . "/includes/db_pager.inc");
include_once($path_to_root . "/includes/session.inc");
$js = "";
include_once($path_to_root . "/includes/db_pager.inc");
include_once($path_to_root . "/includes/session.inc");
$js = "";
$js .= get_js_open_window(900, 500);
if (user_use_date_picker())
$js .= get_js_date_picker();
$js .= get_js_open_window(900, 500);
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");
include_once($path_to_root . "/includes/date_functions.inc");
include_once($path_to_root . "/includes/banking.inc");
{
add_branch($selected_id, $_POST['CustName'], $_POST['cust_ref'],
$_POST['address'], $_POST['salesman'], $_POST['area'], $_POST['tax_group_id'], '',
{
add_branch($selected_id, $_POST['CustName'], $_POST['cust_ref'],
$_POST['address'], $_POST['salesman'], $_POST['area'], $_POST['tax_group_id'], '',
display_notification(_("A default Branch has been automatically created, please check default Branch values by using link below."));
$Ajax->activate('_page_body');
display_notification(_("A default Branch has been automatically created, please check default Branch values by using link below."));
$Ajax->activate('_page_body');
{
table_section_title(_("Branch"));
text_row(_("Phone:"), 'phone', null, 32, 30);
{
table_section_title(_("Branch"));
text_row(_("Phone:"), 'phone', null, 32, 30);
start_row();
echo '<td class="label">'._('Customer branches').':</td>';
hyperlink_params_td($path_to_root . "/sales/manage/customer_branches.php",
start_row();
echo '<td class="label">'._('Customer branches').':</td>';
hyperlink_params_td($path_to_root . "/sales/manage/customer_branches.php",
- '<b>'. (@$_REQUEST['popup'] ? _("Select or &Add") : _("&Add or Edit ")).'</b>',
- "debtor_no=".$selected_id.(@$_REQUEST['popup'] ? '&popup=1':''));
+ '<b>'. ($page_nested ? _("Select or &Add") : _("&Add or Edit ")).'</b>',
+ "debtor_no=".$selected_id.($page_nested ? '&popup=1':''));
end_row();
}
textarea_row(_("General Notes:"), 'notes', null, 35, 5);
end_row();
}
textarea_row(_("General Notes:"), 'notes', null, 35, 5);
{
table_section_title(_("Branch"));
locations_list_row(_("Default Inventory Location:"), 'location');
{
table_section_title(_("Branch"));
locations_list_row(_("Default Inventory Location:"), 'location');
if (!$selected_id)
{
submit_center('submit', _("Add New Customer"), true, '', 'default');
if (!$selected_id)
{
submit_center('submit', _("Add New Customer"), 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);
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);
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),
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),
+ 'transactions' => array(_('&Transactions'), (user_check_access('SA_SALESTRANSVIEW') ? $selected_id : null)),
+ 'orders' => array(_('Sales &Orders'), (user_check_access('SA_SALESTRANSVIEW') ? $selected_id : null)),