X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=reporting%2Frep709.php;h=d944960c87b16e97d4c9be84ecedd9adec0563e7;hb=efc1a9ce400be6233323af9c193ab9460407bcf6;hp=4baf0105841b9e4e4b91416a7c8446ab4258f03e;hpb=ddadb47f2620ce6902ad4694ce6512568862ba05;p=fa-stable.git diff --git a/reporting/rep709.php b/reporting/rep709.php index 4baf0105..d944960c 100644 --- a/reporting/rep709.php +++ b/reporting/rep709.php @@ -107,7 +107,7 @@ function print_tax_report() $rep->Info($params, $cols, $headers, $aligns); if (!$summaryOnly) { - $rep->Header(); + $rep->NewPage(); } $totalnet = 0.0; @@ -140,10 +140,14 @@ function print_tax_report() if ($rep->row < $rep->bottomMargin + $rep->lineHeight) { $rep->Line($rep->row - 2); - $rep->Header(); + $rep->NewPage(); } } - if (in_array($trans['trans_type'], array(ST_BANKDEPOSIT,ST_SALESINVOICE,ST_CUSTCREDIT))) { + 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']; + } + elseif (in_array($trans['trans_type'], array(ST_BANKDEPOSIT,ST_SALESINVOICE,ST_CUSTCREDIT))) { $taxes[$trans['tax_type_id']]['taxout'] += $trans['amount']; $taxes[$trans['tax_type_id']]['out'] += $trans['net_amount']; } else { @@ -166,7 +170,7 @@ function print_tax_report() $rep->headers = $headers2; $rep->aligns = $aligns2; - $rep->Header(); + $rep->NewPage(); $taxtotal = 0; foreach( $taxes as $id=>$sum)