From a5953f4c442fb44f1e60eb1e15eb7066dca95420 Mon Sep 17 00:00:00 2001 From: Joe Hunt Date: Wed, 1 Jul 2009 22:16:31 +0000 Subject: [PATCH] Small bug/layout fixes --- CHANGELOG.txt | 6 ++++++ inventory/manage/item_categories.php | 19 ++++++++++--------- inventory/manage/locations.php | 2 +- sql/en_US-demo.sql | 8 ++++---- sql/en_US-new.sql | 8 ++++---- 5 files changed, 25 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index ca541bb6..724714b8 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -19,8 +19,14 @@ Legend: ! -> Note $ -> Affected files +01-Jul-2009 Joe Hunt ! Small adjustment in /inventory/prices.php to see the calculated prices if they are set. $ /inventory/prices.php +# Small bug/layout fixes +$ /inventory/manage/item_categories.php + /inventory/manage/locations.php + /sql/en_US-demo.sql + /sql/en_US-new.sql 30-Jun-2009 Joe Hunt # Small annoying bug-fixes in items.php and items_trans_db.inc diff --git a/inventory/manage/item_categories.php b/inventory/manage/item_categories.php index ec54c174..cff22f47 100644 --- a/inventory/manage/item_categories.php +++ b/inventory/manage/item_categories.php @@ -103,7 +103,7 @@ $result = db_query($sql, "could not get stock categories"); start_form(); start_table("$table_style width=80%"); $th = array(_("Name"), _("Tax type"), _("Units"), _("Type"), _("Sales Act"), -_("COGS Account"), _("Inventory Account"), _("Adjustment Account"), +_("Inventory Account"), _("COGS Account"), _("Adjustment Account"), _("Assembly Account"), "", ""); inactive_control_column($th); @@ -120,8 +120,8 @@ while ($myrow = db_fetch($result)) label_cell($myrow["dflt_units"], "align=center"); label_cell($stock_types[$myrow["dflt_mb_flag"]]); label_cell($myrow["dflt_sales_act"], "align=center"); - label_cell($myrow["dflt_cogs_act"], "align=center"); label_cell($myrow["dflt_inventory_act"], "align=center"); + label_cell($myrow["dflt_cogs_act"], "align=center"); label_cell($myrow["dflt_adjustment_act"], "align=center"); label_cell($myrow["dflt_assembly_act"], "align=center"); inactive_control_cell($myrow["category_id"], $myrow["inactive"], 'stock_category', 'category_id'); @@ -198,17 +198,18 @@ check_row(_("Exclude from sales:"), 'no_sale', $_POST['no_sale']); gl_all_accounts_list_row(_("Sales Account:"), 'sales_account', $_POST['sales_account']); -gl_all_accounts_list_row(_("Inventory Account:"), 'inventory_account', $_POST['inventory_account']); - -if (!is_service($_POST['mb_flag'])) +if (is_service($_POST['mb_flag'])) { gl_all_accounts_list_row(_("C.O.G.S. Account:"), 'cogs_account', $_POST['cogs_account']); - gl_all_accounts_list_row(_("Inventory Adjustments Account:"), 'adjustment_account', $_POST['adjustment_account']); + hidden('inventory_account', $_POST['inventory_account']); + hidden('adjustment_account', $_POST['adjustment_account']); } -else +else { - hidden('cogs_account', $_POST['cogs_account']); - hidden('adjustment_account', $_POST['adjustment_account']); + gl_all_accounts_list_row(_("Inventory Account:"), 'inventory_account', $_POST['inventory_account']); + + gl_all_accounts_list_row(_("C.O.G.S. Account:"), 'cogs_account', $_POST['cogs_account']); + gl_all_accounts_list_row(_("Inventory Adjustments Account:"), 'adjustment_account', $_POST['adjustment_account']); } if (is_manufactured($_POST['mb_flag'])) diff --git a/inventory/manage/locations.php b/inventory/manage/locations.php index 26152b28..3b05629d 100644 --- a/inventory/manage/locations.php +++ b/inventory/manage/locations.php @@ -167,7 +167,7 @@ if (!check_value('show_inactive')) $sql .= " WHERE !inactive"; $result = db_query($sql, "could not query locations");; start_form(); -start_table("$table_style width=30%"); +start_table($table_style); $th = array(_("Location Code"), _("Location Name"), _("Address"), _("Phone"), "", ""); inactive_control_column($th); table_header($th); diff --git a/sql/en_US-demo.sql b/sql/en_US-demo.sql index 7c61ca21..d0800030 100644 --- a/sql/en_US-demo.sql +++ b/sql/en_US-demo.sql @@ -1458,10 +1458,10 @@ CREATE TABLE `0_stock_category` ( ### Data of table `0_stock_category` ### -INSERT INTO `0_stock_category` VALUES ('1', 'Components', '1', 'each', 'B', '4010', '1510', '5010', '5040', '1530', '0', '0', '0', '0'); -INSERT INTO `0_stock_category` VALUES ('2', 'Charges', '1', 'each', 'D', '4010', '1510', '5010', '5040', '1530', '0', '0', '0', '0'); -INSERT INTO `0_stock_category` VALUES ('3', 'Systems', '1', 'each', 'M', '4010', '1510', '5010', '5040', '1530', '0', '0', '0', '0'); -INSERT INTO `0_stock_category` VALUES ('4', 'Services', '1', 'hrs', 'D', '4010', '1510', '5010', '5040', '1530', '0', '0', '0', '0'); +INSERT INTO `0_stock_category` VALUES ('1', 'Components', '1', 'each', 'B', '4010', '5010', '1510', '5040', '1530', '0', '0', '0', '0'); +INSERT INTO `0_stock_category` VALUES ('2', 'Charges', '1', 'each', 'D', '4010', '5010', '1510', '5040', '1530', '0', '0', '0', '0'); +INSERT INTO `0_stock_category` VALUES ('3', 'Systems', '1', 'each', 'M', '4010', '5010', '1510', '5040', '1530', '0', '0', '0', '0'); +INSERT INTO `0_stock_category` VALUES ('4', 'Services', '1', 'hrs', 'D', '4010', '5010', '1510', '5040', '1530', '0', '0', '0', '0'); ### Structure of table `0_stock_master` ### diff --git a/sql/en_US-new.sql b/sql/en_US-new.sql index 5d0a7686..90a44aa5 100644 --- a/sql/en_US-new.sql +++ b/sql/en_US-new.sql @@ -1290,10 +1290,10 @@ CREATE TABLE `0_stock_category` ( ### Data of table `0_stock_category` ### -INSERT INTO `0_stock_category` VALUES ('1', 'Components', '1', 'each', 'B', '4010', '1510', '5010', '5040', '1530', '0', '0', '0', '0'); -INSERT INTO `0_stock_category` VALUES ('2', 'Charges', '1', 'each', 'D', '4010', '1510', '5010', '5040', '1530', '0', '0', '0', '0'); -INSERT INTO `0_stock_category` VALUES ('3', 'Systems', '1', 'each', 'M', '4010', '1510', '5010', '5040', '1530', '0', '0', '0', '0'); -INSERT INTO `0_stock_category` VALUES ('4', 'Services', '1', 'hrs', 'D', '4010', '1510', '5010', '5040', '1530', '0', '0', '0', '0'); +INSERT INTO `0_stock_category` VALUES ('1', 'Components', '1', 'each', 'B', '4010', '5010', '1510', '5040', '1530', '0', '0', '0', '0'); +INSERT INTO `0_stock_category` VALUES ('2', 'Charges', '1', 'each', 'D', '4010', '5010', '1510', '5040', '1530', '0', '0', '0', '0'); +INSERT INTO `0_stock_category` VALUES ('3', 'Systems', '1', 'each', 'M', '4010', '5010', '1510', '5040', '1530', '0', '0', '0', '0'); +INSERT INTO `0_stock_category` VALUES ('4', 'Services', '1', 'hrs', 'D', '4010', '5010', '1510', '5040', '1530', '0', '0', '0', '0'); ### Structure of table `0_stock_master` ### -- 2.30.2