Voiding PO GRN's could be dangerous, if deliveries have been done. Eliminating it...
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Wed, 20 Aug 2008 00:25:37 +0000 (00:25 +0000)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Wed, 20 Aug 2008 00:25:37 +0000 (00:25 +0000)
CHANGELOG.txt
admin/db/voiding_db.inc
purchasing/includes/db/grn_db.inc

index 981efd66cf3022ade9936f428f07a835a2209c9f..2f52c72b55f45d74efce3089b6a12f8d0686678f 100644 (file)
@@ -19,6 +19,12 @@ Legend:
 ! -> Note
 $ -> Affected files
 
+20-Aug-2008
+# Voiding PO GRN's could be dangerous, if deliveries have been done. Eliminating it. Use item adjustment with 0 price.
+$ /admin/db/voiding_db.inc
+# Fixing a minor bug in grn_db.inc
+$ /purchasing/includes/db/grn_db.inc 
+  
 19-Aug-2008 Joe Hunt
 # Fixed some color conversion problems in the new PDF Engine
 $ /reporting/includes/pdf_report.inc
index 1b74929c967be609de6e27bdb7aacf5b953d3d2a..2dd72d379a638cc4adc4c11bc79c43400ec1c991 100644 (file)
@@ -50,10 +50,11 @@ function void_transaction($type, $type_no, $date_, $memo_)
                        void_stock_adjustment($type_no);
                        break;
 
+               case 25 : // it's a GRN
+                       return false;
                case 20 : // it's a suppler invoice
                case 21 : // it's a supplier credit note
                case 22 : // it's a supplier payment
-               case 25 : // it's a GRN
                        if (!exists_supp_trans($type, $type_no))
                                return false;
                        if (!post_void_supp_trans($type, $type_no))
index 0118fa376629923bcf62476de20e0e732a4a42b4..bb24300a945808e279d98b897c43f1dec77c66f4 100644 (file)
@@ -2,7 +2,7 @@
 
 //------------------- update average material cost ------------------------------------------ Joe Hunt Mar-03-2008
 
-function update_average_material_cost($supplier, $stock_id, $price, $qty, $date, $adj_only)
+function update_average_material_cost($supplier, $stock_id, $price, $qty, $date, $adj_only=false)
 {
        $currency = get_supplier_currency($supplier);
        if ($currency != null)