When saving work order entries a lot of debug boxes appeared. Fixed
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Sat, 28 Apr 2007 13:26:19 +0000 (13:26 +0000)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Sat, 28 Apr 2007 13:26:19 +0000 (13:26 +0000)
When clicking on the link, Issue, on work order inquires an empty screen appeared. Fixed

CHANGELOG.txt
manufacturing/includes/db/work_orders_quick_db.inc
manufacturing/includes/work_order_issue_ui.inc
manufacturing/work_order_entry.php

index f0dea4da05d6f2dbc43cc9ab33b8d698cd9f565e..976ae83df65b69472c7e97457bbeab03f1ffd280 100644 (file)
@@ -19,6 +19,13 @@ Legend:
 ! -> Note
 $ -> Affected files
 
+28-Apr-2007 Joe Hunt
+ # When saving work order entries a lot of debug boxes appeared. Fixed
+ # When clicking on the link Issue on work order inquires an empty screen appeared. Fixed
+ $ /manufacturing/work_order_entry.php
+   /manufacturing/includes/work_order_issue_ui.inc
+   /manufacturing/includes/db/work_orders_quick_db.inc
+   
 25-Apr-2007 Joe Hunt
  # Missing Date Picker
  $ /sales/customer_invoice.php
index b3eca142acd233fe7598ea6b295ce988a8d11ad4..aec2ee896599b33289dea45f5300583637184df9 100644 (file)
@@ -86,7 +86,6 @@ function work_order_quick_costs($woid, $stock_id, $units_reqd, $date_, $addition
                
                add_gl_trans_std_cost(systypes::work_order(), $woid, $date_, $bom_accounts["inventory_account"], 0, 0,
                        null, -$bom_cost);
-               alert("bokade bom- cost ".-$bom_cost);
                
                $total_cost += $bom_cost;
        }       
@@ -94,13 +93,11 @@ function work_order_quick_costs($woid, $stock_id, $units_reqd, $date_, $addition
        $item_accounts = get_stock_gl_code($stock_id);
        add_gl_trans_std_cost(systypes::work_order(), $woid, $date_, $item_accounts["assembly_account"], 
                $item_accounts["dimension_id"], $item_accounts["dimension2_id"], null, -$additional_costs);
-       alert("bokade additional cost ".-$additional_costs.", acc = ".$item_accounts["assembly_account"]);
        
        // debit total components + additional
        $total_cost += $additional_costs;       
        add_gl_trans_std_cost(systypes::work_order(), $woid, $date_, $item_accounts["inventory_account"], 
                0, 0, null, $total_cost);
-       alert("bokade total- cost ".$total_cost);
 } 
 
 //--------------------------------------------------------------------------------------
index c81b779256f4c3b06130858fd639ffa74e7954ba..531e9983a5186a61d4314399b3f98f388fc91fd0 100644 (file)
@@ -57,7 +57,7 @@ function display_adjustment_items($Title, &$order)
                label_cell("<a target='_blank' href='$path_to_root/inventory/inquiry/stock_status.php?" . SID . "stock_id=" . $stock_item->stock_id . "'>$stock_item->stock_id</a>");
                label_cell($stock_item->item_description);
                qty_cell($stock_item_quantity);
-               if (strlen($stock_item->units)
+               if (strlen($stock_item->units))
                        label_cell($stock_item->units);
                else
                        label_cell("");
index b26ed9cce0d653bc8ddf04e0976a301a1c4a3105..a8253edcb0b2b6e2e050abacdd8820a61862738c 100644 (file)
@@ -146,6 +146,8 @@ function can_process()
                return false;
         }
 
+               if ($_POST['Costs'] == "")
+                       $_POST['Costs'] = 0;
        if (!is_numeric($_POST['Costs']))
        {
                display_error( _("The cost entered must be numeric."));