X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=reporting%2Frep709.php;h=bd518b594f52adc7ed235709541a3cea217f1a6b;hb=3f3cfa578adbc2b71f4fd9c8d0f5536d26af43d8;hp=c3cd8e193a4f46ad550e37a477392fb4c8e552c8;hpb=231f4c00e32dd026d3d740d32bbdaf841ab68330;p=fa-stable.git diff --git a/reporting/rep709.php b/reporting/rep709.php index c3cd8e19..bd518b59 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'];