X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=sales%2Fmanage%2Fcustomer_branches.php;h=48b8e76a4501c31a4904193a35a9e648a2f3a504;hb=2f3375b4493c1b1e0b17c2801298275f22f8d76e;hp=7cd65cb3795b92eb9497506a40e5c1a463b574b1;hpb=47537a8ce4779d5dddebe70e231e342661fca6e0;p=fa-stable.git diff --git a/sales/manage/customer_branches.php b/sales/manage/customer_branches.php index 7cd65cb3..48b8e76a 100644 --- a/sales/manage/customer_branches.php +++ b/sales/manage/customer_branches.php @@ -15,7 +15,11 @@ $path_to_root="../.."; include($path_to_root . "/includes/db_pager.inc"); include($path_to_root . "/includes/session.inc"); -page(_($help_context = "Customer Branches"), @$_REQUEST['popup']); +$js = ""; +if ($SysPrefs->use_popup_windows && $SysPrefs->use_popup_search) + $js .= get_js_open_window(900, 500); + +page(_($help_context = "Customer Branches"), @$_REQUEST['popup'], false, "", $js); include($path_to_root . "/includes/ui.inc"); include($path_to_root . "/includes/ui/contacts_view.inc"); @@ -199,7 +203,7 @@ function branch_settings($selected_id, $num_branches) { elseif ($Mode != 'ADD_ITEM') { $myrow = get_default_info_for_branch($_POST['customer_id']); - if(!$num_branches) { + if($myrow && !$num_branches) { $_POST['br_name'] = $myrow["name"]; $_POST['br_ref'] = $myrow["debtor_ref"]; $_POST['contact_name'] = _('Main Branch');