From ffb77b26d201f54cde952743014359035eb3114f Mon Sep 17 00:00:00 2001 From: Joe Hunt Date: Fri, 30 Jan 2009 08:48:08 +0000 Subject: [PATCH] *** empty log message *** --- CHANGELOG.txt | 5 +++-- gl/includes/db/gl_db_trans.inc | 8 ++++---- gl/inquiry/tax_inquiry.php | 8 ++++---- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index fb0877f3..9f5d7dcf 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -21,8 +21,9 @@ $ -> Affected files 30-Jan-2009 Joe Hunt + Outputs/Inputs on tax inquiry as well (why not) -$ /gl/inquiry/tax_inquiry.php - +$ /gl/includes/db/gl_db_trans.inc + /gl/inquiry/tax_inquiry.php + 29-Jan-2009 Joe Hunt # A few minor fixes to get the tax report and inquiry right and syncronized $ /gl/includes/db/gl_db_trans.inc diff --git a/gl/includes/db/gl_db_trans.inc b/gl/includes/db/gl_db_trans.inc index 0e2d0b42..49246746 100644 --- a/gl/includes/db/gl_db_trans.inc +++ b/gl/includes/db/gl_db_trans.inc @@ -287,13 +287,13 @@ function get_tax_summary($from, $to) $sql = "SELECT SUM(IF( trans_type=1 || trans_type=11 || trans_type=20,-1,1)* - IF(trans_type=0 || trans_type=2 || trans_type=10 || trans_type=11, net_amount*ex_rate,0)) net_input, + IF(trans_type=0 || trans_type=2 || trans_type=10 || trans_type=11, net_amount*ex_rate,0)) net_output, SUM(IF( trans_type=1 || trans_type=11 || trans_type=20,-1,1)* - IF(trans_type=0 || trans_type=2 || trans_type=10 || trans_type=11, amount*ex_rate,0)) collectible, + IF(trans_type=0 || trans_type=2 || trans_type=10 || trans_type=11, amount*ex_rate,0)) payable, SUM(IF( trans_type=1 || trans_type=11 || trans_type=20,-1,1)* - IF(trans_type=0 || trans_type=2 || trans_type=10 || trans_type=11, 0, net_amount*ex_rate)) net_output, + IF(trans_type=0 || trans_type=2 || trans_type=10 || trans_type=11, 0, net_amount*ex_rate)) net_input, SUM(IF( trans_type=1 || trans_type=11 || trans_type=20,-1,1)* - IF(trans_type=0 || trans_type=2 || trans_type=10 || trans_type=11, 0, amount*ex_rate)) payable, + IF(trans_type=0 || trans_type=2 || trans_type=10 || trans_type=11, 0, amount*ex_rate)) collectible, taxrec.rate, ttype.id, ttype.name diff --git a/gl/inquiry/tax_inquiry.php b/gl/inquiry/tax_inquiry.php index 269edda9..9c8b7a37 100644 --- a/gl/inquiry/tax_inquiry.php +++ b/gl/inquiry/tax_inquiry.php @@ -106,14 +106,14 @@ function show_results() alt_table_row_color($k); label_cell($tx['name'] . " " . $tx['rate'] . "%"); label_cell(_("Charged on sales") . " (" . _("Output Tax")."):"); - amount_cell($collectible); - amount_cell($tx['net_input']); + amount_cell($payable); + amount_cell($tx['net_output']); end_row(); alt_table_row_color($k); label_cell($tx['name'] . " " . $tx['rate'] . "%"); label_cell(_("Paid on purchases") . " (" . _("Input Tax")."):"); - amount_cell($payable); - amount_cell($tx['net_output']); + amount_cell($collectible); + amount_cell($tx['net_input']); end_row(); alt_table_row_color($k); label_cell("".$tx['name'] . " " . $tx['rate'] . "%"); -- 2.30.2