From: Joe Hunt Date: Fri, 13 Feb 2009 14:10:19 +0000 (+0000) Subject: Minor bug fix in Quick Entry tax account choice for Journal Entry. X-Git-Tag: v2.4.2~19^2~1537 X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=commitdiff_plain;h=120314d9597fde0592600a37d82a3bad431ad5af;p=fa-stable.git Minor bug fix in Quick Entry tax account choice for Journal Entry. --- diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 5be11e3a..fd8c9fd0 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -19,6 +19,10 @@ Legend: ! -> Note $ -> Affected files +13-Feb-2009 Joe Hunt +# Minor bug fix in Quick Entry tax account choice for Journal Entry. +$ /includes/ui/ui_view.inc + 12-Feb-2009 Janusz Dobrowolski ! Changed extension menu file placement, added support for gettext in extensions. $ /frontaccounting.php diff --git a/includes/ui/ui_view.inc b/includes/ui/ui_view.inc index 66d42c7f..fff49cb0 100644 --- a/includes/ui/ui_view.inc +++ b/includes/ui/ui_view.inc @@ -611,8 +611,8 @@ function display_quick_entries(&$cart, $id, $base, $type, $descr='') else $tax = round2($base * $item_tax['rate'] / 100, user_price_dec()); - $gl_code = $type != QE_DEPOSIT - ? $item_tax['purchasing_gl_code'] : $item_tax['sales_gl_code']; + $gl_code = ($type == QE_DEPOSIT || ($type == QE_JOURNAL && $base < 0)) + ? $item_tax['sales_gl_code'] : $item_tax['purchasing_gl_code']; $tax_total += $tax; if ($type != QE_SUPPINV) $cart->add_gl_item($gl_code,