From 179e8cf33e77512ca94cf8389ea36a253feebba7 Mon Sep 17 00:00:00 2001 From: Janusz Dobrowolski Date: Thu, 24 Sep 2009 19:00:23 +0000 Subject: [PATCH] Additional secondary phone and/or general notes fields in customers, branches, suppliers, locations and shippers tables. --- CHANGELOG.txt | 13 +++++++++ admin/shipping_companies.php | 12 ++++++-- inventory/includes/db/items_locations_db.inc | 11 +++---- inventory/manage/locations.php | 13 +++++---- purchasing/manage/suppliers.php | 17 +++++++---- sales/manage/customer_branches.php | 30 +++++++++++++------- sales/manage/customers.php | 13 ++++++--- sql/alter2.2.sql | 6 ++++ sql/en_US-demo.sql | 28 +++++++++++------- sql/en_US-new.sql | 10 +++++-- 10 files changed, 107 insertions(+), 46 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 11200c2c..e7152664 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -19,6 +19,19 @@ Legend: ! -> Note $ -> Affected files +24-Sep-2009 Janusz Dobrowolski ++ Additional fields for secondary phone and/or general notes in customers, + cust_branches, shippers, locations and suppliers tables. +$ /admin/shipping_companies.php + /inventory/includes/db/items_locations_db.inc + /inventory/manage/locations.php + /purchasing/manage/suppliers.php + /sales/manage/customer_branches.php + /sales/manage/customers.php + /sql/alter2.2.sql + /sql/en_US-demo.sql + /sql/en_US-new.sql + 24-Sep-2009 Joe Hunt # Parse error $ /sales/inquiry/customer_inquiry.php diff --git a/admin/shipping_companies.php b/admin/shipping_companies.php index d5a91b1f..c215f8cd 100644 --- a/admin/shipping_companies.php +++ b/admin/shipping_companies.php @@ -33,10 +33,11 @@ function can_process() if ($Mode=='ADD_ITEM' && can_process()) { - $sql = "INSERT INTO ".TB_PREF."shippers (shipper_name, contact, phone, address) + $sql = "INSERT INTO ".TB_PREF."shippers (shipper_name, contact, phone, phone2, address) VALUES (" . db_escape($_POST['shipper_name']) . ", " . db_escape($_POST['contact']). ", " . db_escape($_POST['phone']). ", " . + db_escape($_POST['phone2']). ", " . db_escape($_POST['address']) . ")"; db_query($sql,"The Shipping Company could not be added"); @@ -52,6 +53,7 @@ if ($Mode=='UPDATE_ITEM' && can_process()) $sql = "UPDATE ".TB_PREF."shippers SET shipper_name=" . db_escape($_POST['shipper_name']). " , contact =" . db_escape($_POST['contact']). " , phone =" . db_escape($_POST['phone']). " , + phone2 =" . db_escape($_POST['phone2']). " , address =" . db_escape($_POST['address']). " WHERE shipper_id = $selected_id"; @@ -112,7 +114,7 @@ $result = db_query($sql,"could not get shippers"); start_form(); start_table($table_style); -$th = array(_("Name"), _("Contact Person"), _("Phone Number"), _("Address"), "", ""); +$th = array(_("Name"), _("Contact Person"), _("Phone Number"), _("Secondary Phone"), _("Address"), "", ""); inactive_control_column($th); table_header($th); @@ -124,6 +126,7 @@ while ($myrow = db_fetch($result)) label_cell($myrow["shipper_name"]); label_cell($myrow["contact"]); label_cell($myrow["phone"]); + label_cell($myrow["phone2"]); label_cell($myrow["address"]); inactive_control_cell($myrow["shipper_id"], $myrow["inactive"], 'shippers', 'shipper_id'); edit_button_cell("Edit".$myrow["shipper_id"], _("Edit")); @@ -151,6 +154,7 @@ if ($selected_id != -1) $_POST['shipper_name'] = $myrow["shipper_name"]; $_POST['contact'] = $myrow["contact"]; $_POST['phone'] = $myrow["phone"]; + $_POST['phone2'] = $myrow["phone2"]; $_POST['address'] = $myrow["address"]; } hidden('selected_id', $selected_id); @@ -160,7 +164,9 @@ text_row_ex(_("Name:"), 'shipper_name', 40); text_row_ex(_("Contact Person:"), 'contact', 30); -text_row_ex(_("Phone Number:"), 'phone', 20); +text_row_ex(_("Phone Number:"), 'phone', 32, 30); + +text_row_ex(_("Secondary Phone Number:"), 'phone2', 32, 30); text_row_ex(_("Address:"), 'address', 50); diff --git a/inventory/includes/db/items_locations_db.inc b/inventory/includes/db/items_locations_db.inc index 3df27803..809e928c 100644 --- a/inventory/includes/db/items_locations_db.inc +++ b/inventory/includes/db/items_locations_db.inc @@ -9,10 +9,11 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the License here . ***********************************************************************/ -function add_item_location($loc_code, $location_name, $delivery_address, $phone, $fax, $email, $contact) +function add_item_location($loc_code, $location_name, $delivery_address, $phone, $phone2, $fax, $email, $contact) { - $sql = "INSERT INTO ".TB_PREF."locations (loc_code, location_name, delivery_address, phone, fax, email, contact) - VALUES (".db_escape($loc_code).", ".db_escape($location_name).", ".db_escape($delivery_address).", ".db_escape($phone).", ".db_escape($fax).", ".db_escape($email).", ".db_escape($contact).")"; + $sql = "INSERT INTO ".TB_PREF."locations (loc_code, location_name, delivery_address, phone, phone2, fax, email, contact) + VALUES (".db_escape($loc_code).", ".db_escape($location_name).", ".db_escape($delivery_address).", " + .db_escape($phone).", ".db_escape($phone2).", ".db_escape($fax).", ".db_escape($email).", ".db_escape($contact).")"; db_query($sql,"a location could not be added"); @@ -25,12 +26,12 @@ function add_item_location($loc_code, $location_name, $delivery_address, $phone, //------------------------------------------------------------------------------------ -function update_item_location($loc_code, $location_name, $delivery_address, $phone, $fax, $email, $contact) +function update_item_location($loc_code, $location_name, $delivery_address, $phone, $phone2, $fax, $email, $contact) { $sql = "UPDATE ".TB_PREF."locations SET location_name=".db_escape($location_name).", delivery_address=".db_escape($delivery_address).", - phone=".db_escape($phone).", fax=".db_escape($fax).", + phone=".db_escape($phone).", phone2=".db_escape($phone2).", fax=".db_escape($fax).", email=".db_escape($email).", contact=".db_escape($contact)." WHERE loc_code = '$loc_code'"; diff --git a/inventory/manage/locations.php b/inventory/manage/locations.php index b43c8781..e7f72290 100644 --- a/inventory/manage/locations.php +++ b/inventory/manage/locations.php @@ -52,7 +52,7 @@ if ($Mode=='ADD_ITEM' || $Mode=='UPDATE_ITEM') { update_item_location($selected_id, $_POST['location_name'], $_POST['delivery_address'], - $_POST['phone'], $_POST['fax'], $_POST['email'], $_POST['contact']); + $_POST['phone'], $_POST['phone2'], $_POST['fax'], $_POST['email'], $_POST['contact']); display_notification(_('Selected location has been updated')); } else @@ -61,7 +61,7 @@ if ($Mode=='ADD_ITEM' || $Mode=='UPDATE_ITEM') /*selected_id is null cos no item selected on first time round so must be adding a record must be submitting new entries in the new Location form */ add_item_location($_POST['loc_code'], $_POST['location_name'], $_POST['delivery_address'], - $_POST['phone'], $_POST['fax'], $_POST['email'], $_POST['contact']); + $_POST['phone'], $_POST['phone2'], $_POST['fax'], $_POST['email'], $_POST['contact']); display_notification(_('New location has been added')); } @@ -168,7 +168,7 @@ $result = db_query($sql, "could not query locations");; start_form(); start_table($table_style); -$th = array(_("Location Code"), _("Location Name"), _("Address"), _("Phone"), "", ""); +$th = array(_("Location Code"), _("Location Name"), _("Address"), _("Phone"), _("Secondary Phone"), "", ""); inactive_control_column($th); table_header($th); $k = 0; //row colour counter @@ -181,6 +181,7 @@ while ($myrow = db_fetch($result)) label_cell($myrow["location_name"]); label_cell($myrow["delivery_address"]); label_cell($myrow["phone"]); + label_cell($myrow["phone2"]); inactive_control_cell($myrow["loc_code"], $myrow["inactive"], 'locations', 'loc_code'); edit_button_cell("Edit".$myrow["loc_code"], _("Edit")); delete_button_cell("Delete".$myrow["loc_code"], _("Delete")); @@ -207,6 +208,7 @@ if ($selected_id != -1) $_POST['delivery_address'] = $myrow["delivery_address"]; $_POST['contact'] = $myrow["contact"]; $_POST['phone'] = $myrow["phone"]; + $_POST['phone2'] = $myrow["phone2"]; $_POST['fax'] = $myrow["fax"]; $_POST['email'] = $myrow["email"]; } @@ -224,8 +226,9 @@ text_row_ex(_("Contact for deliveries:"), 'contact', 30, 30); textarea_row(_("Address:"), 'delivery_address', null, 35, 5); -text_row_ex(_("Telephone No:"), 'phone', 30, 30); -text_row_ex(_("Facsimile No:"), 'fax', 30, 30); +text_row_ex(_("Telephone No:"), 'phone', 32, 30); +text_row_ex(_("Secondary Phone Number:"), 'phone2', 32, 30); +text_row_ex(_("Facsimile No:"), 'fax', 32, 30); email_row_ex(_("E-mail:"), 'email', 30); end_table(1); diff --git a/purchasing/manage/suppliers.php b/purchasing/manage/suppliers.php index 82ee660a..6e52c3a5 100644 --- a/purchasing/manage/suppliers.php +++ b/purchasing/manage/suppliers.php @@ -63,6 +63,7 @@ if (isset($_POST['submit'])) address=".db_escape($_POST['address']) . ", supp_address=".db_escape($_POST['supp_address']) . ", phone=".db_escape($_POST['phone']) . ", + phone2=".db_escape($_POST['phone2']) . ", fax=".db_escape($_POST['fax']) . ", gst_no=".db_escape($_POST['gst_no']) . ", email=".db_escape($_POST['email']) . ", @@ -91,7 +92,7 @@ if (isset($_POST['submit'])) else { - $sql = "INSERT INTO ".TB_PREF."suppliers (supp_name, supp_ref, address, supp_address, phone, fax, gst_no, email, website, + $sql = "INSERT INTO ".TB_PREF."suppliers (supp_name, supp_ref, address, supp_address, phone, phone2, fax, gst_no, email, website, contact, supp_account_no, bank_account, credit_limit, dimension_id, dimension2_id, curr_code, payment_terms, payable_account, purchase_account, payment_discount_account, notes, tax_group_id) VALUES (".db_escape($_POST['supp_name']). ", " @@ -99,6 +100,7 @@ if (isset($_POST['submit'])) .db_escape($_POST['address']) . ", " .db_escape($_POST['supp_address']) . ", " .db_escape($_POST['phone']). ", " + .db_escape($_POST['phone2']). ", " .db_escape($_POST['fax']). ", " .db_escape($_POST['gst_no']). ", " .db_escape($_POST['email']). ", " @@ -202,6 +204,7 @@ if (!$new_supplier) $_POST['address'] = $myrow["address"]; $_POST['supp_address'] = $myrow["supp_address"]; $_POST['phone'] = $myrow["phone"]; + $_POST['phone2'] = $myrow["phone2"]; $_POST['fax'] = $myrow["fax"]; $_POST['gst_no'] = $myrow["gst_no"]; $_POST['email'] = $myrow["email"]; @@ -223,12 +226,13 @@ if (!$new_supplier) } else { - $_POST['supp_name'] = $_POST['supp_ref'] = $_POST['address'] = $_POST['supp_address'] = $_POST['tax_group_id'] = - $_POST['website'] = $_POST['supp_account_no'] = $_POST['notes'] = ''; + $_POST['supp_name'] = $_POST['supp_ref'] = $_POST['address'] = $_POST['supp_address'] = + $_POST['tax_group_id'] = $_POST['website'] = $_POST['supp_account_no'] = $_POST['notes'] = ''; $_POST['dimension_id'] = 0; $_POST['dimension2_id'] = 0; $_POST['sales_type'] = -1; - $_POST['email'] = $_POST['phone'] = $_POST['fax'] = $_POST['gst_no'] = $_POST['contact'] = $_POST['bank_account'] = ''; + $_POST['email'] = $_POST['phone'] = $_POST['phone2'] = $_POST['fax'] = + $_POST['gst_no'] = $_POST['contact'] = $_POST['bank_account'] = ''; $_POST['payment_terms'] = ''; $_POST['credit_limit'] = price_format(0); @@ -246,8 +250,9 @@ text_row(_("Supplier Name:"), 'supp_name', null, 42, 40); text_row(_("Supplier Short Name:"), 'supp_ref', null, 30, 30); text_row(_("Contact Person:"), 'contact', null, 42, 40); -text_row(_("Phone Number:"), 'phone', null, 42, 40); -text_row(_("Fax Number:"), 'fax', null, 42, 40); +text_row(_("Phone Number:"), 'phone', null, 32, 30); +text_row(_("Secondary Phone Number:"), 'phone2', null, 32, 30); +text_row(_("Fax Number:"), 'fax', null, 32, 30); email_row(_("E-mail:"), 'email', null, 35, 55); link_row(_("Website:"), 'website', null, 35, 55); diff --git a/sales/manage/customer_branches.php b/sales/manage/customer_branches.php index fbcbc09b..af6cd996 100644 --- a/sales/manage/customer_branches.php +++ b/sales/manage/customer_branches.php @@ -82,6 +82,7 @@ if ($Mode=='ADD_ITEM' || $Mode=='UPDATE_ITEM') branch_ref = " . db_escape($_POST['br_ref']) . ", br_address = ".db_escape($_POST['br_address']). ", phone=".db_escape($_POST['phone']). ", + phone2=".db_escape($_POST['phone2']). ", fax=".db_escape($_POST['fax']).", contact_name=".db_escape($_POST['contact_name']) . ", salesman= ".db_escape($_POST['salesman']) . ", @@ -96,7 +97,8 @@ if ($Mode=='ADD_ITEM' || $Mode=='UPDATE_ITEM') br_post_address =".db_escape($_POST['br_post_address']) . ", disable_trans=".db_escape($_POST['disable_trans']) . ", group_no=".db_escape($_POST['group_no']) . ", - default_ship_via=".db_escape($_POST['default_ship_via']) . " + default_ship_via=".db_escape($_POST['default_ship_via']) . ", + notes=".db_escape($_POST['notes']) . " WHERE branch_code =".db_escape($_POST['branch_code']) . " AND debtor_no=".db_escape($_POST['customer_id']); @@ -106,13 +108,14 @@ if ($Mode=='ADD_ITEM' || $Mode=='UPDATE_ITEM') { /*Selected branch is null cos no item selected on first time round so must be adding a record must be submitting new entries in the new Customer Branches form */ $sql = "INSERT INTO ".TB_PREF."cust_branch (debtor_no, br_name, branch_ref, br_address, - salesman, phone, fax, + salesman, phone, phone2, fax, contact_name, area, email, tax_group_id, sales_account, receivables_account, payment_discount_account, sales_discount_account, default_location, - br_post_address, disable_trans, group_no, default_ship_via) + br_post_address, disable_trans, group_no, default_ship_via, notes) VALUES (".db_escape($_POST['customer_id']). ",".db_escape($_POST['br_name']) . ", " .db_escape($_POST['br_ref']) . ", " .db_escape($_POST['br_address']) . ", ".db_escape($_POST['salesman']) . ", " - .db_escape($_POST['phone']) . ", ".db_escape($_POST['fax']) . "," + .db_escape($_POST['phone']) . ", ".db_escape($_POST['phone2']) . ", " + .db_escape($_POST['fax']) . "," .db_escape($_POST['contact_name']) . ", ".db_escape($_POST['area']) . "," .db_escape($_POST['email']) . ", ".db_escape($_POST['tax_group_id']) . ", " .db_escape($_POST['sales_account']) . ", " @@ -123,7 +126,8 @@ if ($Mode=='ADD_ITEM' || $Mode=='UPDATE_ITEM') .db_escape($_POST['br_post_address']) . "," .db_escape($_POST['disable_trans']) . ", " .db_escape($_POST['group_no']) . ", " - .db_escape($_POST['default_ship_via']) . ")"; + .db_escape($_POST['default_ship_via']). ", " + .db_escape($_POST['notes']) . ")"; $note = _('New customer branch has been added'); } @@ -290,6 +294,7 @@ if ($selected_id != -1) $_POST['salesman'] =$myrow["salesman"]; $_POST['area'] =$myrow["area"]; $_POST['phone'] =$myrow["phone"]; + $_POST['phone2'] =$myrow["phone2"]; $_POST['fax'] =$myrow["fax"]; $_POST['email'] =$myrow["email"]; $_POST['tax_group_id'] = $myrow["tax_group_id"]; @@ -301,6 +306,8 @@ if ($selected_id != -1) $_POST['receivables_account'] = $myrow['receivables_account']; $_POST['payment_discount_account'] = $myrow['payment_discount_account']; $_POST['group_no'] = $myrow["group_no"]; + $_POST['notes'] = $myrow["notes"]; + } } elseif ($Mode != 'ADD_ITEM') @@ -323,7 +330,7 @@ elseif ($Mode != 'ADD_ITEM') // We use the Item Sales Account as default! // $_POST['sales_account'] = $company_record["default_sales_act"]; - $_POST['sales_account'] = ""; + $_POST['sales_account'] = $_POST['notes'] = ''; $_POST['sales_discount_account'] = $company_record['default_sales_discount_act']; $_POST['receivables_account'] = $company_record['debtors_act']; $_POST['payment_discount_account'] = $company_record['default_prompt_payment_act']; @@ -341,8 +348,9 @@ text_row(_("Branch Name:"), 'br_name', null, 35, 40); text_row(_("Branch Short Name:"), 'br_ref', null, 30, 30); text_row(_("Contact Person:"), 'contact_name', null, 35, 40); -text_row(_("Phone Number:"), 'phone', null, 20, 20); -text_row(_("Fax Number:"), 'fax', null, 20, 20); +text_row(_("Phone Number:"), 'phone', null, 32, 30); +text_row(_("Secondary Phone Number:"), 'phone2', null, 32, 30); +text_row(_("Fax Number:"), 'fax', null, 32, 30); email_row(_("E-mail:"), 'email', null, 35, 55); @@ -377,9 +385,11 @@ gl_all_accounts_list_row(_("Prompt Payment Discount Account:"), 'payment_discoun table_section_title(_("Addresses")); -textarea_row(_("Mailing Address:"), 'br_post_address', null, 35, 5); +textarea_row(_("Mailing Address:"), 'br_post_address', null, 35, 4); + +textarea_row(_("Billing Address:"), 'br_address', null, 35, 4); -textarea_row(_("Billing Address:"), 'br_address', null, 35, 5); +textarea_row(_("General Notes:"), 'notes', null, 35, 4); end_outer_table(1); diff --git a/sales/manage/customers.php b/sales/manage/customers.php index 5120916e..017d1607 100644 --- a/sales/manage/customers.php +++ b/sales/manage/customers.php @@ -91,7 +91,8 @@ function handle_submit() discount=" . input_num('discount') / 100 . ", pymt_discount=" . input_num('pymt_discount') / 100 . ", credit_limit=" . input_num('credit_limit') . ", - sales_type = ".db_escape($_POST['sales_type']) . " + sales_type = ".db_escape($_POST['sales_type']) . ", + notes=".db_escape($_POST['notes']) . " WHERE debtor_no = '". $_POST['customer_id'] . "'"; db_query($sql,"The customer could not be updated"); @@ -109,12 +110,13 @@ function handle_submit() $sql = "INSERT INTO ".TB_PREF."debtors_master (name, debtor_ref, address, tax_id, email, dimension_id, dimension2_id, curr_code, credit_status, payment_terms, discount, pymt_discount,credit_limit, - sales_type) VALUES (".db_escape($_POST['CustName']) .", " .db_escape($_POST['cust_ref']) .", " + sales_type, notes) VALUES (".db_escape($_POST['CustName']) .", " .db_escape($_POST['cust_ref']) .", " .db_escape($_POST['address']) . ", " . db_escape($_POST['tax_id']) . "," .db_escape($_POST['email']) . ", ".db_escape($_POST['dimension_id']) . ", " .db_escape($_POST['dimension2_id']) . ", ".db_escape($_POST['curr_code']) . ", " . db_escape($_POST['credit_status']) . ", ".db_escape($_POST['payment_terms']) . ", " . input_num('discount')/100 . ", - " . input_num('pymt_discount')/100 . ", " . input_num('credit_limit') . ", ".db_escape($_POST['sales_type']) . ")"; + " . input_num('pymt_discount')/100 . ", " . input_num('credit_limit') + .", ".db_escape($_POST['sales_type']).", ".db_escape($_POST['notes']) . ")"; db_query($sql,"The customer could not be added"); @@ -220,7 +222,8 @@ if ($new_customer) $_POST['email'] = ''; $_POST['curr_code'] = get_company_currency(); $_POST['credit_status'] = -1; - $_POST['payment_terms'] = ''; + $_POST['payment_terms'] = $_POST['notes'] = ''; + $_POST['discount'] = $_POST['pymt_discount'] = percent_format(0); $_POST['credit_limit'] = price_format($SysPrefs->default_credit_limit()); $_POST['inactive'] = 0; @@ -247,6 +250,7 @@ else $_POST['discount'] = percent_format($myrow["discount"] * 100); $_POST['pymt_discount'] = percent_format($myrow["pymt_discount"] * 100); $_POST['credit_limit'] = price_format($myrow["credit_limit"]); + $_POST['notes'] = $myrow["notes"]; $_POST['inactive'] = $myrow["inactive"]; } @@ -303,6 +307,7 @@ if (!$new_customer) { } +textarea_row(_("General Notes:"), 'notes', null, 35, 5); record_status_list_row(_("Customer status:"), 'inactive'); end_outer_table(1); diff --git a/sql/alter2.2.sql b/sql/alter2.2.sql index 6fd520b8..5bc9c7dd 100644 --- a/sql/alter2.2.sql +++ b/sql/alter2.2.sql @@ -128,3 +128,9 @@ CREATE TABLE `0_tag_associations` ( PRIMARY KEY (`id`) ) TYPE=MyISAM AUTO_INCREMENT=1; +ALTER TABLE `0_suppliers` ADD COLUMN `phone2` varchar(30) NOT NULL default '' AFTER `phone`; +ALTER TABLE `0_cust_branch` ADD COLUMN `phone2` varchar(30) NOT NULL default '' AFTER `phone`; +ALTER TABLE `0_shippers` ADD COLUMN `phone2` varchar(30) NOT NULL default '' AFTER `phone`; +ALTER TABLE `0_locations` ADD COLUMN `phone2` varchar(30) NOT NULL default '' AFTER `phone`; +ALTER TABLE `0_debtors_master` ADD COLUMN `notes` tinytext NULL default '' AFTER `credit_limit`; +ALTER TABLE `0_cust_branch` ADD COLUMN `notes` tinytext NULL default '' AFTER `group_no`; diff --git a/sql/en_US-demo.sql b/sql/en_US-demo.sql index 05ba73da..2a3820e9 100644 --- a/sql/en_US-demo.sql +++ b/sql/en_US-demo.sql @@ -496,6 +496,7 @@ CREATE TABLE `0_cust_branch` ( `area` int(11) default NULL, `salesman` int(11) NOT NULL default '0', `phone` varchar(30) NOT NULL default '', + `phone2` varchar(30) NOT NULL default '', `fax` varchar(30) NOT NULL default '', `contact_name` varchar(60) NOT NULL default '', `email` varchar(100) NOT NULL default '', @@ -509,6 +510,7 @@ CREATE TABLE `0_cust_branch` ( `disable_trans` tinyint(4) NOT NULL default '0', `br_post_address` tinytext NOT NULL, `group_no` int(11) NOT NULL default '0', + `notes` tinytext NOT NULL, `inactive` tinyint(1) NOT NULL default '0', PRIMARY KEY (`branch_code`,`debtor_no`), KEY `branch_code` (`branch_code`), @@ -518,9 +520,9 @@ CREATE TABLE `0_cust_branch` ( ### Data of table `0_cust_branch` ### -INSERT INTO `0_cust_branch` VALUES ('1', '1', 'Beefeater Ltd.', 'Beefeater', '', '1', '1', '', '', 'Main Branch', '', 'DEF', '2', '', '4510', '1200', '4500', '1', '0', 'Address 1\r\nAddress 2\r\nAddress 3', '0', '0'); -INSERT INTO `0_cust_branch` VALUES ('2', '2', 'Ghostbusters Corp.', 'Ghostbusters', 'Address 1\r\nAddress 2\r\nAddress 3', '1', '1', '', '', 'Main Branch', '', 'DEF', '1', '', '4510', '1200', '4500', '1', '0', 'Address 1\r\nAddress 2\r\nAddress 3', '0', '0'); -INSERT INTO `0_cust_branch` VALUES ('3', '3', 'Brezan', 'Brezan', 'Address 1\r\nAddress 2\r\nAddress 3', '1', '1', '', '', 'Main Branch', '', 'DEF', '1', '', '4510', '1200', '4500', '1', '0', 'Address 1\r\nAddress 2\r\nAddress 3', '0', '0'); +INSERT INTO `0_cust_branch` VALUES ('1', '1', 'Beefeater Ltd.', 'Beefeater', '', '1', '1', '', '', '', 'Main Branch', '', 'DEF', '2', '', '4510', '1200', '4500', '1', '0', 'Address 1\r\nAddress 2\r\nAddress 3', '0', '', '0'); +INSERT INTO `0_cust_branch` VALUES ('2', '2', 'Ghostbusters Corp.', 'Ghostbusters', 'Address 1\r\nAddress 2\r\nAddress 3', '1', '1', '', '', '', 'Main Branch', '', 'DEF', '1', '', '4510', '1200', '4500', '1', '0', 'Address 1\r\nAddress 2\r\nAddress 3', '0', '', '0'); +INSERT INTO `0_cust_branch` VALUES ('3', '3', 'Brezan', 'Brezan', 'Address 1\r\nAddress 2\r\nAddress 3', '1', '1', '', '', '', 'Main Branch', '', 'DEF', '1', '', '4510', '1200', '4500', '1', '0', 'Address 1\r\nAddress 2\r\nAddress 3', '0', '', '0'); ### Structure of table `0_debtor_trans` ### @@ -618,6 +620,7 @@ CREATE TABLE `0_debtors_master` ( `discount` double NOT NULL default '0', `pymt_discount` double NOT NULL default '0', `credit_limit` float NOT NULL default '1000', + `notes` tinytext NOT NULL, `inactive` tinyint(1) NOT NULL default '0', PRIMARY KEY (`debtor_no`), UNIQUE KEY `name` (`name`) @@ -626,9 +629,9 @@ CREATE TABLE `0_debtors_master` ( ### Data of table `0_debtors_master` ### -INSERT INTO `0_debtors_master` VALUES ('1', 'Beefeater Ltd.', 'Beefeater', 'Addr 1\r\nAddr 2\r\nAddr 3', '', '345678', 'GBP', '2', '0', '0', '1', '3', '0', '0', '1000', '0'); -INSERT INTO `0_debtors_master` VALUES ('2', 'Ghostbusters Corp.', 'Ghostbusters', 'Address 1\r\nAddress 2\r\nAddress 3', '', '2222222', 'USD', '1', '0', '0', '1', '4', '0', '0', '1000', '0'); -INSERT INTO `0_debtors_master` VALUES ('3', 'Brezan', 'Brezan', 'Address 1\r\nAddress 2\r\nAddress 3', '', '7777777', 'EUR', '2', '0', '0', '1', '3', '0', '0', '1000', '0'); +INSERT INTO `0_debtors_master` VALUES ('1', 'Beefeater Ltd.', 'Beefeater', 'Addr 1\r\nAddr 2\r\nAddr 3', '', '345678', 'GBP', '2', '0', '0', '1', '3', '0', '0', '1000', '', '0'); +INSERT INTO `0_debtors_master` VALUES ('2', 'Ghostbusters Corp.', 'Ghostbusters', 'Address 1\r\nAddress 2\r\nAddress 3', '', '2222222', 'USD', '1', '0', '0', '1', '4', '0', '0', '1000', '', '0'); +INSERT INTO `0_debtors_master` VALUES ('3', 'Brezan', 'Brezan', 'Address 1\r\nAddress 2\r\nAddress 3', '', '7777777', 'EUR', '2', '0', '0', '1', '3', '0', '0', '1000', '', '0'); ### Structure of table `0_dimensions` ### @@ -977,6 +980,7 @@ CREATE TABLE `0_locations` ( `location_name` varchar(60) NOT NULL default '', `delivery_address` tinytext NOT NULL, `phone` varchar(30) NOT NULL default '', + `phone2` varchar(30) NOT NULL default '', `fax` varchar(30) NOT NULL default '', `email` varchar(100) NOT NULL default '', `contact` varchar(30) NOT NULL default '', @@ -987,7 +991,7 @@ CREATE TABLE `0_locations` ( ### Data of table `0_locations` ### -INSERT INTO `0_locations` VALUES ('DEF', 'Default', 'Delivery 1\r\nDelivery 2\r\nDelivery 3', '', '', '', '', '0'); +INSERT INTO `0_locations` VALUES ('DEF', 'Default', 'Delivery 1\r\nDelivery 2\r\nDelivery 3', '', '', '', '', '', '0'); ### Structure of table `0_movement_types` ### @@ -1436,6 +1440,7 @@ CREATE TABLE `0_shippers` ( `shipper_id` int(11) NOT NULL auto_increment, `shipper_name` varchar(60) NOT NULL default '', `phone` varchar(30) NOT NULL default '', + `phone2` varchar(30) NOT NULL default '', `contact` tinytext NOT NULL, `address` tinytext NOT NULL, `inactive` tinyint(1) NOT NULL default '0', @@ -1446,7 +1451,7 @@ CREATE TABLE `0_shippers` ( ### Data of table `0_shippers` ### -INSERT INTO `0_shippers` VALUES ('1', 'Default', '', '', '', '0'); +INSERT INTO `0_shippers` VALUES ('1', 'Default', '', '', '', '', '0'); ### Structure of table `0_sql_trail` ### @@ -1692,6 +1697,7 @@ CREATE TABLE `0_suppliers` ( `address` tinytext NOT NULL, `supp_address` tinytext NOT NULL, `phone` varchar(30) NOT NULL default '', + `phone2` varchar(30) NOT NULL default '', `fax` varchar(30) NOT NULL default '', `gst_no` varchar(25) NOT NULL default '', `contact` varchar(60) NOT NULL default '', @@ -1716,9 +1722,9 @@ CREATE TABLE `0_suppliers` ( ### Data of table `0_suppliers` ### -INSERT INTO `0_suppliers` VALUES ('1', 'Junk Beer ApS', 'Junk Beer', 'Mailing 1\r\nMailing 2\r\nMailing 3', 'Address 1\r\nAddress 2\r\nAddress 3', '+45 55667788', '', '123456', 'Contact', '111', '', '', '', 'DKK', '3', '1', '0', '2', '1', '5010', '2100', '5060', 'A supplier with junk beers.', '0'); -INSERT INTO `0_suppliers` VALUES ('2', 'Lucky Luke Inc.', 'Lucky Luke', 'Mailing 1\r\nMailing 2\r\nMailing 3', 'Address 1\r\nAddress 2\r\nAddress 3', '(111) 222.333.444', '', '654321', 'Luke', '333', '', '', '', 'USD', '3', '0', '0', '1', '1', '5010', '2100', '5060', '', '0'); -INSERT INTO `0_suppliers` VALUES ('3', 'Money Makers Ltd.', 'Money Makers', 'Mailing 1\r\nMailing 2\r\nMailing 3', 'Address 1\r\nAddress 2\r\nAddress 3', '+44 444 555 666', '', '987654', 'Makers', '222', '', '', '', 'GBP', '3', '0', '0', '2', '1', '5010', '2100', '5060', '', '0'); +INSERT INTO `0_suppliers` VALUES ('1', 'Junk Beer ApS', 'Junk Beer', 'Mailing 1\r\nMailing 2\r\nMailing 3', 'Address 1\r\nAddress 2\r\nAddress 3', '+45 55667788', '', '', '123456', 'Contact', '111', '', '', '', 'DKK', '3', '1', '0', '2', '1', '5010', '2100', '5060', 'A supplier with junk beers.', '0'); +INSERT INTO `0_suppliers` VALUES ('2', 'Lucky Luke Inc.', 'Lucky Luke', 'Mailing 1\r\nMailing 2\r\nMailing 3', 'Address 1\r\nAddress 2\r\nAddress 3', '(111) 222.333.444', '', '', '654321', 'Luke', '333', '', '', '', 'USD', '3', '0', '0', '1', '1', '5010', '2100', '5060', '', '0'); +INSERT INTO `0_suppliers` VALUES ('3', 'Money Makers Ltd.', 'Money Makers', 'Mailing 1\r\nMailing 2\r\nMailing 3', 'Address 1\r\nAddress 2\r\nAddress 3', '+44 444 555 666', '', '', '987654', 'Makers', '222', '', '', '', 'GBP', '3', '0', '0', '2', '1', '5010', '2100', '5060', '', '0'); ### Structure of table `0_sys_types` ### diff --git a/sql/en_US-new.sql b/sql/en_US-new.sql index 4a09214f..0b50e244 100644 --- a/sql/en_US-new.sql +++ b/sql/en_US-new.sql @@ -478,6 +478,7 @@ CREATE TABLE `0_cust_branch` ( `area` int(11) default NULL, `salesman` int(11) NOT NULL default '0', `phone` varchar(30) NOT NULL default '', + `phone2` varchar(30) NOT NULL default '', `fax` varchar(30) NOT NULL default '', `contact_name` varchar(60) NOT NULL default '', `email` varchar(100) NOT NULL default '', @@ -491,6 +492,7 @@ CREATE TABLE `0_cust_branch` ( `disable_trans` tinyint(4) NOT NULL default '0', `br_post_address` tinytext NOT NULL, `group_no` int(11) NOT NULL default '0', + `notes` tinytext NOT NULL, `inactive` tinyint(1) NOT NULL default '0', PRIMARY KEY (`branch_code`,`debtor_no`), KEY `branch_code` (`branch_code`), @@ -581,6 +583,7 @@ CREATE TABLE `0_debtors_master` ( `discount` double NOT NULL default '0', `pymt_discount` double NOT NULL default '0', `credit_limit` float NOT NULL default '1000', + `notes` tinytext NOT NULL, `inactive` tinyint(1) NOT NULL default '0', PRIMARY KEY (`debtor_no`), UNIQUE KEY `name` (`name`) @@ -834,6 +837,7 @@ CREATE TABLE `0_locations` ( `location_name` varchar(60) NOT NULL default '', `delivery_address` tinytext NOT NULL, `phone` varchar(30) NOT NULL default '', + `phone2` varchar(30) NOT NULL default '', `fax` varchar(30) NOT NULL default '', `email` varchar(100) NOT NULL default '', `contact` varchar(30) NOT NULL default '', @@ -844,7 +848,7 @@ CREATE TABLE `0_locations` ( ### Data of table `0_locations` ### -INSERT INTO `0_locations` VALUES ('DEF', 'Default', 'N/A', '', '', '', '', '0'); +INSERT INTO `0_locations` VALUES ('DEF', 'Default', 'N/A', '', '', '', '', '', '0'); ### Structure of table `0_movement_types` ### @@ -1268,6 +1272,7 @@ CREATE TABLE `0_shippers` ( `shipper_id` int(11) NOT NULL auto_increment, `shipper_name` varchar(60) NOT NULL default '', `phone` varchar(30) NOT NULL default '', + `phone2` varchar(30) NOT NULL default '', `contact` tinytext NOT NULL, `address` tinytext NOT NULL, `inactive` tinyint(1) NOT NULL default '0', @@ -1278,7 +1283,7 @@ CREATE TABLE `0_shippers` ( ### Data of table `0_shippers` ### -INSERT INTO `0_shippers` VALUES ('1', 'Default', '', '', '', '0'); +INSERT INTO `0_shippers` VALUES ('1', 'Default', '', '', '', '', '0'); ### Structure of table `0_sql_trail` ### @@ -1475,6 +1480,7 @@ CREATE TABLE `0_suppliers` ( `address` tinytext NOT NULL, `supp_address` tinytext NOT NULL, `phone` varchar(30) NOT NULL default '', + `phone2` varchar(30) NOT NULL default '', `fax` varchar(30) NOT NULL default '', `gst_no` varchar(25) NOT NULL default '', `contact` varchar(60) NOT NULL default '', -- 2.30.2