projects
/
fa-stable.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Direct posting to GL accountswith more than one related tax type forbidden.
[fa-stable.git]
/
includes
/
ui
/
ui_view.inc
diff --git
a/includes/ui/ui_view.inc
b/includes/ui/ui_view.inc
index e978b36d9b9564a931ad25a1cb14989915d00977..df4a2bddbb98fe668cf63f1fe6fa19fc3995dbcf 100644
(file)
--- a/
includes/ui/ui_view.inc
+++ b/
includes/ui/ui_view.inc
@@
-608,6
+608,11
@@
function display_quick_entries(&$cart, $id, $base, $type, $descr='')
$gl_code = ($type == QE_DEPOSIT || ($type == QE_JOURNAL && $base < 0))
? $item_tax['sales_gl_code'] : $item_tax['purchasing_gl_code'];
$tax_total += $tax;
$gl_code = ($type == QE_DEPOSIT || ($type == QE_JOURNAL && $base < 0))
? $item_tax['sales_gl_code'] : $item_tax['purchasing_gl_code'];
$tax_total += $tax;
+ if ($tax==0) continue;
+ if (!is_tax_gl_unique($gl_code)) {
+ display_error(_("Cannot post to GL account used by more than one tax type."));
+ break 3;
+ }
if ($type != QE_SUPPINV)
$cart->add_gl_item($gl_code,
$qe_line['dimension_id'], $qe_line['dimension2_id'],
if ($type != QE_SUPPINV)
$cart->add_gl_item($gl_code,
$qe_line['dimension_id'], $qe_line['dimension2_id'],