From 61e9eb852166d020fbbae34fa664bd76163ae006 Mon Sep 17 00:00:00 2001 From: Joe Hunt Date: Wed, 12 Aug 2009 21:52:36 +0000 Subject: [PATCH] [0000159] Memo field's GL entries are not saved (gl_trans) in supplier invoice --- CHANGELOG.txt | 5 +++++ purchasing/includes/db/invoice_db.inc | 2 +- purchasing/includes/purchasing_db.inc | 4 ++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index a92c269..ed777e5 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -19,6 +19,11 @@ Legend: ! -> Note $ -> Affected files +12-Aug-2009 Joe Hunt +# [0000159] Memo field's GL entries are not saved (gl_trans) in supplier invoice +$ /purchasing/includes/purchasing_db.inc + /purchasing/includes/db/invoice_db.inc + 08-Aug-2009 Janusz Dobrowolski # Fixed bug in calculation of taxes for quick entries using multiply tax rates $ /includes/ui/ui_view.inc diff --git a/purchasing/includes/db/invoice_db.inc b/purchasing/includes/db/invoice_db.inc index c5c63c8..adc6245 100644 --- a/purchasing/includes/db/invoice_db.inc +++ b/purchasing/includes/db/invoice_db.inc @@ -182,7 +182,7 @@ function add_supp_invoice($supp_trans, $invoice_no=0) // do not receive as ref b $memo_ = $entered_gl_code->memo_; $total += add_gl_trans_supplier($trans_type, $invoice_id, $date_, $entered_gl_code->gl_code, - $entered_gl_code->gl_dim, $entered_gl_code->gl_dim2, $entered_gl_code->amount, $supp_trans->supplier_id); + $entered_gl_code->gl_dim, $entered_gl_code->gl_dim2, $entered_gl_code->amount, $supp_trans->supplier_id, "", 0, $memo_); add_supp_invoice_gl_item($trans_type, $invoice_id, $entered_gl_code->gl_code, $entered_gl_code->amount, $memo_); diff --git a/purchasing/includes/purchasing_db.inc b/purchasing/includes/purchasing_db.inc index 850d229..dc9cecc 100644 --- a/purchasing/includes/purchasing_db.inc +++ b/purchasing/includes/purchasing_db.inc @@ -32,12 +32,12 @@ include_once($path_to_root . "/purchasing/includes/db/suppliers_db.inc"); // $amount is in SUPPLIERS'S currency function add_gl_trans_supplier($type, $type_no, $date_, $account, $dimension, $dimension2, - $amount, $supplier_id, $err_msg="", $rate=0) + $amount, $supplier_id, $err_msg="", $rate=0, $memo="") { if ($err_msg == "") $err_msg = "The supplier GL transaction could not be inserted"; - return add_gl_trans($type, $type_no, $date_, $account, $dimension, $dimension2, "", + return add_gl_trans($type, $type_no, $date_, $account, $dimension, $dimension2, $memo, $amount, get_supplier_currency($supplier_id), payment_person_types::supplier(), $supplier_id, $err_msg, $rate); } -- 2.30.2