diff --git a/src/report/business-reports/taxinvoice.eguile.scm b/src/report/business-reports/taxinvoice.eguile.scm index 260864fe1b..889acf2841 100644 --- a/src/report/business-reports/taxinvoice.eguile.scm +++ b/src/report/business-reports/taxinvoice.eguile.scm @@ -85,6 +85,7 @@ (let ((action (gncEntryGetAction entry)) (qty (gncEntryGetDocQuantity entry credit-note?)) (discount (gncEntryGetInvDiscount entry)) + (taxable? (gncEntryGetInvTaxable entry)) (taxtable (gncEntryGetInvTaxTable entry))) (if (not (string=? action "")) (set! units? #t)) @@ -92,14 +93,15 @@ (set! qty? #t)) (if (not (gnc-numeric-zero-p discount)) (set! discount? #t)) ;(if taxable - no, this flag is redundant - (if (not (eq? taxtable '())) - (begin ; presence of a tax table means it's taxed + (if taxable? ; Also check if the taxable flag is set + (if (not (eq? taxtable '())) + (begin ; presence of a tax table AND taxable flag means it's taxed (set! tax? #t) (let ((ttentries (gncTaxTableGetEntries taxtable))) (if (string-prefix? "#string ttentries)) ; error in SWIG binding -- disable display of tax details ; (see http://bugzilla.gnome.org/show_bug.cgi?id=573645) - (set! taxtables? #f))))))) ; hack required until Swig is fixed + (set! taxtables? #f)))))))) ; hack required until Swig is fixed (fixed in r18056, hack still here) ; pre-scan invoice splits to see if any payments have been made (for split in splits do