The reference for deposits and payments didn't show up in Tax Report
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Fri, 28 Aug 2009 10:36:48 +0000 (10:36 +0000)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Fri, 28 Aug 2009 10:36:48 +0000 (10:36 +0000)
CHANGELOG.txt
gl/includes/db/gl_db_banking.inc
gl/includes/db/gl_db_trans.inc
reporting/rep709.php

index 586e6db193eab456cf5c73e7b79473d12d188a89..7f2e280e88b852e0336f2d75a928758c0c68dc8c 100644 (file)
@@ -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
   
index d7971cfb0d7e7c8ce078d7028b75913a0bfb077f..e73e1e3ac877aab3f5fa7020f5c95cdba0f50893 100644 (file)
@@ -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
index 8cd63f4600020435f24f5c9f2681230dcebc4307..111d4e331a8a579f899cc6dac0e54d0fc19f5dca 100644 (file)
@@ -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) {
index 57183a884a6ff64fe97a0d78d13d1f9da2bcde5c..39b2e04a4e37973dd3d14d0dfc084eef0968f2d1 100644 (file)
@@ -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']);