*** empty log message ***
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Fri, 30 Jan 2009 08:48:08 +0000 (08:48 +0000)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Fri, 30 Jan 2009 08:48:08 +0000 (08:48 +0000)
CHANGELOG.txt
gl/includes/db/gl_db_trans.inc
gl/inquiry/tax_inquiry.php

index fb0877f3e8b35671e9449eda2ae1d52fd9b648a8..9f5d7dcf169e156ceaae195bbc56d1dac2cca38c 100644 (file)
@@ -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
index 0e2d0b42a8b43ec92eb3116046af379c0eba9aa3..4924674678837e119a6f8305e38e5527a97ca54e 100644 (file)
@@ -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
index 269edda90bf9480bed3fb422c15c591ddc8e38d2..9c8b7a3725ee78e2f7564d2a41149e34c57887e2 100644 (file)
@@ -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("<b>".$tx['name'] . " " . $tx['rate'] . "%</b>");