From: Janusz Dobrowolski Date: Thu, 29 Jan 2009 21:01:47 +0000 (+0000) Subject: Sign fix on tax calculation X-Git-Tag: v2.4.2~19^2~1569 X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=commitdiff_plain;h=ee8713ca7561ab37a11c07ee7acaec40a437d564;p=fa-stable.git Sign fix on tax calculation --- 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)*