Wrong tax report and wrong supp trans/gl records with gl item lines.
! -> Note
$ -> Affected files
+10-Oct-2010 Joe Hunt
+# Master bug in class supp_trans get_items_total. Minor bug in gl_db_trans.inc
+ Wrong tax report and wrong supp trans/gl records with gl item lines.
+$ /purchasing/includes/supp_trans_class.inc
+ /gl/includes/db/gl_db_trans.inc
+
06-Oct-2010 Jusz Dobrowolski
# Fixed gettext for extension links.
$ /reporting/includes/reports_classes.inc
if(!$tax_type) return; // $gl_code is not tax account
$tax = get_tax_type($tax_type);
- if ($gl_code == $tax['sales_gl_code'])
+ //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 ($tax['rate'] == 0) {
foreach ($this->grn_items as $ln_itm)
$total += round($ln_itm->this_quantity_inv * $ln_itm->chg_price, user_price_dec());
- return $total;
-
foreach ($this->gl_codes as $gl_line)
- {
- $total += $gl_line->amount;
+ { //////// 2010-10-10 Joe Hunt
+ if (!is_tax_account($gl_line->gl_code))
+ $total += $gl_line->amount;
}
+ return $total;
}
} /* end of class defintion */