X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=reporting%2Frep709.php;h=21646d78d0e77b92cb6c7f9421238c9a5e6a2314;hb=fff65dd000727b3403f641cb265c7b327b4fe22d;hp=dbe25e5bd59e82f1472f06b0c566ee4e9f055baf;hpb=2868af36843011d5f96da63e0ddeea05039a7bf5;p=fa-stable.git diff --git a/reporting/rep709.php b/reporting/rep709.php index dbe25e5b..21646d78 100644 --- a/reporting/rep709.php +++ b/reporting/rep709.php @@ -122,7 +122,7 @@ function print_tax_report() while ($trans=db_fetch($transactions)) { - if (in_array($trans['trans_type'], array(ST_CUSTCREDIT,ST_SUPPINVOICE))) { + if (in_array($trans['trans_type'], array(ST_CUSTCREDIT,ST_SUPPINVOICE,ST_JOURNAL))) { $trans['net_amount'] *= -1; $trans['amount'] *= -1; } @@ -152,8 +152,12 @@ function print_tax_report() } } if ($trans['trans_type']==ST_JOURNAL && $trans['amount']<0) { - $taxes[$trans['tax_type_id']]['taxout'] -= $trans['amount']; - $taxes[$trans['tax_type_id']]['out'] -= $trans['net_amount']; + $taxes[$trans['tax_type_id']]['taxin'] += $trans['amount']; + $taxes[$trans['tax_type_id']]['in'] += $trans['net_amount']; + } + elseif ($trans['trans_type']==ST_JOURNAL && $trans['amount']>=0) { + $taxes[$trans['tax_type_id']]['taxout'] += $trans['amount']; + $taxes[$trans['tax_type_id']]['out'] += $trans['net_amount']; } elseif (in_array($trans['trans_type'], array(ST_BANKDEPOSIT,ST_SALESINVOICE,ST_CUSTCREDIT))) { $taxes[$trans['tax_type_id']]['taxout'] += $trans['amount'];