- 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']]['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))) {