Small annoying bug-fixes in items.php and items_trans_db.inc
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Tue, 30 Jun 2009 06:54:50 +0000 (06:54 +0000)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Tue, 30 Jun 2009 06:54:50 +0000 (06:54 +0000)
CHANGELOG.txt
inventory/includes/db/items_trans_db.inc
inventory/manage/items.php

index 4b75caebbc51384393e791d3015fcda099a6fa06..eb34b8d3f89db371d59d17a792366a286af664c1 100644 (file)
@@ -19,6 +19,11 @@ Legend:
 ! -> Note
 $ -> Affected files
 
+30-Jun-2009 Joe Hunt
+# Small annoying bug-fixes in items.php and items_trans_db.inc
+$ /inventory/manage/items.php
+  /inventory/includes/db/items_trans_db.inc
+  
 30-Jun-2009 Joe Hunt
 + Implemented automatic price calculation of items from std. cost.
 $ /admin/company_preferences.php
index eb044cd7a2c6930e1135382ea6759d28dad573c5..dee7ef70f6af6cccea7ba99d41925e1a1129f2dc 100644 (file)
@@ -34,11 +34,11 @@ function stock_cost_update($stock_id, $material_cost, $labour_cost, $overhead_co
 
        $qoh = get_qoh_on_date($_POST['stock_id']);
        
+       $date_ = Today();
        if ($qoh > 0)
        {
     
                $update_no = get_next_trans_no(systypes::cost_update());
-               $date_ = Today();
                if (!is_date_in_fiscalyear($date_))
                        $date_ = end_fiscalyear();
           
index 10af47a6e7352a8e6598bf461d722d4046aa2fba..36249813c2fbfd13b5bf3dd63f038080bd088df6 100644 (file)
@@ -113,6 +113,7 @@ function clear_data()
        unset($_POST['NewStockID']);
        unset($_POST['dimension_id']);
        unset($_POST['dimension2_id']);
+       unset($_POST['no_sale']);
 }
 
 //------------------------------------------------------------------------------------
@@ -192,6 +193,7 @@ if (isset($_POST['addupdate']))
                        display_notification(_("A new item has been added."));
                        $_POST['stock_id'] = $_POST['NewStockID'] = 
                        $_POST['description'] = $_POST['long_description'] = '';
+                       $_POST['no_sale'] = 0;
                        set_focus('NewStockID');
                }
                $Ajax->activate('_page_body');