From eeb82d4707125d5d98916ec846d0d83b605af8b2 Mon Sep 17 00:00:00 2001 From: Joe Hunt Date: Wed, 20 Aug 2008 00:25:37 +0000 Subject: [PATCH] Voiding PO GRN's could be dangerous, if deliveries have been done. Eliminating it. Use item adjustment with 0 price. --- CHANGELOG.txt | 6 ++++++ admin/db/voiding_db.inc | 3 ++- purchasing/includes/db/grn_db.inc | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 981efd66..2f52c72b 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -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 diff --git a/admin/db/voiding_db.inc b/admin/db/voiding_db.inc index 1b74929c..2dd72d37 100644 --- a/admin/db/voiding_db.inc +++ b/admin/db/voiding_db.inc @@ -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)) diff --git a/purchasing/includes/db/grn_db.inc b/purchasing/includes/db/grn_db.inc index 0118fa37..bb24300a 100644 --- a/purchasing/includes/db/grn_db.inc +++ b/purchasing/includes/db/grn_db.inc @@ -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) -- 2.30.2