Small bug/layout fixes
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Wed, 1 Jul 2009 22:16:31 +0000 (22:16 +0000)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Wed, 1 Jul 2009 22:16:31 +0000 (22:16 +0000)
CHANGELOG.txt
inventory/manage/item_categories.php
inventory/manage/locations.php
sql/en_US-demo.sql
sql/en_US-new.sql

index ca541bb61a5e80b12a8cfcda5e7e8db8f09bcafe..724714b85edf5fc43fde415c3af3591b0b158cc4 100644 (file)
@@ -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
index ec54c1740eab5d519c154567c0e8ab488f2710ba..cff22f4739f0f94b0699e1d19fe39e67f62ec8b1 100644 (file)
@@ -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']))
index 26152b28694316d8726d3109194260f8dfad0e36..3b05629dae7958d91835b1f5ac45917cf4d9cccf 100644 (file)
@@ -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);
index 7c61ca21b0c59195ca805cdee9e8ddf6df69a9c7..d0800030de7d812d501eecc1682a7ab51a4fbb66 100644 (file)
@@ -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` ###
index 5d0a76869596561b07db440d383ed9145ade0970..90a44aa5318d57771fe614dee8191ac70370cae3 100644 (file)
@@ -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` ###