From ee8713ca7561ab37a11c07ee7acaec40a437d564 Mon Sep 17 00:00:00 2001 From: Janusz Dobrowolski Date: Thu, 29 Jan 2009 21:01:47 +0000 Subject: [PATCH] Sign fix on tax calculation --- gl/includes/db/gl_db_trans.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gl/includes/db/gl_db_trans.inc b/gl/includes/db/gl_db_trans.inc index d8e6d58a..8aaa76fb 100644 --- a/gl/includes/db/gl_db_trans.inc +++ b/gl/includes/db/gl_db_trans.inc @@ -287,9 +287,9 @@ 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_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, amount*ex_rate,0)) payable, + 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, SUM(IF( trans_type=1 || trans_type=11 || trans_type=20,-1,1)* -- 2.30.2