Added Item Code Entry in Work Order Entry and quantity decimals now follows the item
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Tue, 16 Jun 2009 00:07:48 +0000 (00:07 +0000)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Tue, 16 Jun 2009 00:07:48 +0000 (00:07 +0000)
CHANGELOG.txt
includes/ui/ui_lists.inc
manufacturing/work_order_entry.php

index f5ab1841750a7d9ccde7b0a8c141434303d0c83d..4bc0d1345fb78c3e72ef4e3a771b20d916ff133d 100644 (file)
@@ -19,6 +19,11 @@ Legend:
 ! -> Note
 $ -> Affected files
 
+15-Jun-2009 Joe Hunt
+! Added Item Code Entry in Work Order Entry and quantity decimals now follows the item
+$ /includes/ui/ui_lists.inc
+  /manufacturing/work_order_entry.php
+  
 14-Jun-2009 Joe Hunt
 ! Much better presentation of new Balance Sheet, P&L Statement and Monthly Breakdown.
 $ /gl/includes/db/gl_db_account_types.inc
index f136c38229cccdced7113d1c99ee5d869689a716..d7e2c964c511b3f16abdfc793ce33ff5c7683c15 100644 (file)
@@ -818,8 +818,15 @@ function stock_manufactured_items_list_row($label, $name, $selected_id=null,
                $all_option=false, $submit_on_change=false)
 {
        echo "<tr>\n";
-       $str = stock_manufactured_items_list_cells($label, $name, $selected_id,
-                       $all_option, $submit_on_change);
+       if ($label != null)
+               echo "<td>$label</td>\n";
+       echo "<td>";
+       $str = stock_items_list($name, $selected_id, $all_option, $submit_on_change,
+               array('where'=>array("mb_flag = 'M'"), 
+                       'edit_submit' => true));
+       //$str = stock_manufactured_items_list_cells($label, $name, $selected_id,
+       //              $all_option, $submit_on_change);
+       echo "</td>\n";
        echo "</tr>\n";
        return $str;
 }
index 7977a59db19c09485aba6aaa99b2d6800eb4cd74..659e9bec41a88228830f5492f19ce43c11c5f082 100644 (file)
@@ -391,13 +391,18 @@ if (get_post('released'))
 }
 else
 {
-       stock_manufactured_items_list_row(_("Item:"), 'stock_id', null);
+       stock_manufactured_items_list_row(_("Item:"), 'stock_id', null, false, true);
+       if (list_updated('stock_id'))
+               $Ajax->activate('quantity');
 
        locations_list_row(_("Destination Location:"), 'StockLocation', null);
 }
 
 if (!isset($_POST['quantity']))
        $_POST['quantity'] = qty_format(1, $_POST['stock_id'], $dec);
+else
+       $_POST['quantity'] = qty_format($_POST['quantity'], $_POST['stock_id'], $dec);
+       
 
 if (get_post('type') == wo_types::advanced())
 {