From 8b3bc81bdb2a8fceca3007aff0c8a43467d6e5b7 Mon Sep 17 00:00:00 2001 From: Joe Hunt Date: Fri, 28 Aug 2009 10:36:48 +0000 Subject: [PATCH] The reference for deposits and payments didn't show up in Tax Report --- CHANGELOG.txt | 3 +-- gl/includes/db/gl_db_banking.inc | 2 +- gl/includes/db/gl_db_trans.inc | 2 +- reporting/rep709.php | 2 ++ 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 586e6db1..7f2e280e 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -21,8 +21,7 @@ $ -> Affected files 28-Aug-2009 Joe Hunt # The reference for deposits and payments didn't show up in Tax Report -$ /gl/includes/db/gl_db_banking.inc - /gl/includes/db/gl_db_trans.inc +$ /reporting/rep709.php # Minor bug in Quick Entries display $ /includes/ui/ui_view.inc diff --git a/gl/includes/db/gl_db_banking.inc b/gl/includes/db/gl_db_banking.inc index d7971cfb..e73e1e3a 100644 --- a/gl/includes/db/gl_db_banking.inc +++ b/gl/includes/db/gl_db_banking.inc @@ -212,7 +212,7 @@ function add_bank_transaction($trans_type, $from_account, $items, $date_, $ex_rate = get_exchange_rate_from_home_currency($currency, $date_); add_gl_tax_details($gl_item->code_id, $trans_type, $trans_no, -$amount, - $ex_rate, $date_, $ref); + $ex_rate, $date_, $memo_); } // do the source account postings diff --git a/gl/includes/db/gl_db_trans.inc b/gl/includes/db/gl_db_trans.inc index 8cd63f46..111d4e33 100644 --- a/gl/includes/db/gl_db_trans.inc +++ b/gl/includes/db/gl_db_trans.inc @@ -388,7 +388,7 @@ function write_journal_entries(&$cart, $reverse) } // store tax details if the gl account is a tax account add_gl_tax_details($journal_item->code_id, - ($journal_item->amount < 0.0 ? 2 : 1), $trans_id, -$journal_item->amount, 1, $date_, $ref); + ($journal_item->amount < 0.0 ? 2 : 1), $trans_id, -$journal_item->amount, 1, $date_, $memo_); } if ($new) { diff --git a/reporting/rep709.php b/reporting/rep709.php index 57183a88..39b2e04a 100644 --- a/reporting/rep709.php +++ b/reporting/rep709.php @@ -124,6 +124,8 @@ function print_tax_report() if (!$summaryOnly) { $rep->TextCol(0, 1, systypes::name($trans['trans_type'])); + if ($trans['memo'] == '') + $trans['memo'] = get_reference($trans['trans_type'], $trans['trans_no']); $rep->TextCol(1, 2, $trans['memo']); $rep->DateCol(2, 3, $trans['tran_date'], true); $rep->TextCol(3, 4, $trans['name']); -- 2.30.2