From c674982ebc83a5077b3091eaf104eba74557f87f Mon Sep 17 00:00:00 2001 From: Janusz Dobrowolski Date: Thu, 29 Jan 2009 20:50:25 +0000 Subject: [PATCH] Fixed input/output tax qualification. --- reporting/rep709.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/reporting/rep709.php b/reporting/rep709.php index 842a7663..1a5663ee 100644 --- a/reporting/rep709.php +++ b/reporting/rep709.php @@ -48,6 +48,7 @@ function getTaxTransactions($from, $to) LEFT JOIN ".TB_PREF."cust_branch as branch ON dtrans.branch_code=branch.branch_code, ".TB_PREF."sys_types stype WHERE taxrec.trans_type=stype.type_id + AND (taxrec.amount != 0 OR taxrec.net_amount != 0) AND taxrec.trans_type != 13 AND taxrec.tran_date >= '$fromdate' AND taxrec.tran_date <= '$todate' @@ -144,7 +145,7 @@ function print_tax_report() $rep->Header(); } } - if ($trans['net_amount'] > 0) { + if (in_array($trans['trans_type'], array(0,2,10,11))) { $taxes[$trans['tax_type_id']]['taxout'] += $trans['amount']; $taxes[$trans['tax_type_id']]['out'] += $trans['net_amount']; } else { -- 2.30.2