From: Joe Hunt Date: Tue, 28 Oct 2008 23:48:13 +0000 (+0000) Subject: Voiding a supplier invoice/credit note with GL Postings creates a database error X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=commitdiff_plain;h=4bfb59c8ad5d00b9920c2094bfd1920ecd7a5ba2;p=textcart.git Voiding a supplier invoice/credit note with GL Postings creates a database error --- diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 769d614..b35d356 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -19,6 +19,10 @@ Legend: ! -> Note $ -> Affected files +29-Oct-2008 Joe Hunt +# Voiding a supplier invoice/credit note with GL Postings creates a database error +$ /purchasing/includes/db/invoice_db.inc + 28-Oct-2008 Joe Hunt # [000009] Delivery Note/Sales Invoice should not be editable after it has been voided. $ /admin/db/voiding_db.inc diff --git a/purchasing/includes/db/invoice_db.inc b/purchasing/includes/db/invoice_db.inc index 33ec2b5..ec22b1c 100644 --- a/purchasing/includes/db/invoice_db.inc +++ b/purchasing/includes/db/invoice_db.inc @@ -362,7 +362,7 @@ function void_supp_invoice($type, $type_no) $date_ = Today(); while ($details_row = db_fetch($result)) { - if (strlen($details_row["grn_item_id"]) > 0) // it can be empty for GL items + if ((int)$details_row["grn_item_id"] > 0) // it can be empty for GL items { // Changed 2008-10-17 by Joe Hunt to get the avg. material cost updated $old = update_supp_received_items_for_invoice($details_row["grn_item_id"],