if(!$tax_type) return; // $gl_code is not tax account
$tax = get_tax_type($tax_type);
- //if ($gl_code == $tax['sales_gl_code'])
if ($trans_type == ST_SALESINVOICE || $trans_type == ST_CUSTDELIVERY || $trans_type == ST_CUSTCREDIT)
$amount = -$amount;
// we have to restore net amount as we cannot know the base amount
if ($net_amount===null) {
if ($tax['rate'] == 0) {
-// display_warning(_("You should not post gl transactions
-// to tax account with zero tax rate."));
$net_amount = 0;
} else {
// calculate net amount