<?php $page_security = 3; $path_to_root = "../.."; include $path_to_root . "/includes/session.inc"; page(tr("Customer Branches")); include $path_to_root . "/includes/ui.inc"; //------------------------------------------------------------------ check_db_has_customers(tr("There are no customers defined in the system. Please define a customer to add customer branches.")); check_db_has_sales_people(tr("There are no sales people defined in the system. At least one sales person is required before proceeding.")); check_db_has_sales_areas(tr("There are no sales areas defined in the system. At least one sales area is required before proceeding.")); check_db_has_shippers(tr("There are no shipping companies defined in the system. At least one shipping company is required before proceeding.")); check_db_has_tax_groups(tr("There are no tax groups defined in the system. At least one tax group is required before proceeding.")); //------------------------------------------------------------------ if (isset($_GET['debtor_no'])) { $_POST['customer_id'] = strtoupper($_GET['debtor_no']); $_POST['New'] = "1"; } if (isset($_GET['SelectedBranch'])) { $_POST['branch_code'] = strtoupper($_GET['SelectedBranch']); unset($_POST['New']); } if (!isset($_GET['SelectedBranch']) && !isset($_POST['AddUpdate'])) { $_POST['New'] = "1"; } check_branches(); // we always want to have a branch (if possible) //--------------------------------------------------------------------- if (isset($_POST['ADD_ITEM']) || isset($_POST['UPDATE_ITEM'])) { //initialise no input errors assumed initially before we test $input_error = 0;
$ret .= " " . $postcode . "\n"; } else { $ret .= "\n"; } if (not_null($country)) { $ret .= $country . "\n"; } return $ret; } //error_reporting(E_ALL); //ini_set("display_errors", "on"); global $db; // Allow access to the FA database connection $debug_sql = 0; // Change to 1 for debug messages check_db_has_sales_areas("You must first define at least one Sales Area"); $dbHost = ""; $dbUser = ""; $dbPassword = ""; $dbName = ""; $lastcid = 0; $lastoid = 0; $defaultTaxGroup = 0; $defaultCurrency = ""; $db_Host = ""; $db_User = ""; $db_Password = ""; $db_Name = ""; $last_cid = 0; $last_oid = 0; $default_TaxGroup = 0;