gnucash master: Bug 695610 - GnuCash Tax Invoice for Australia

Geert Janssens gjanssens at code.gnucash.org
Sat Sep 27 11:30:38 EDT 2014


Updated	 via  https://github.com/Gnucash/gnucash/commit/7a226444 (commit)
	from  https://github.com/Gnucash/gnucash/commit/14c93e73 (commit)



commit 7a2264444775b2a07a2a4ceda4934221f280526a
Author: Geert Janssens <janssens-geert at telenet.be>
Date:   Sat Sep 27 17:40:27 2014 +0200

    Bug 695610 - GnuCash Tax Invoice for Australia
    
    This commit defines a new report called "Australian Tax Invoice"
    which is the normal "Tax Invoice" with some changed default values.
    These changed defaults have been filtered out of the the patch
    that was attached to the above bug.
    
    Not all changes have been picked. For example the two changed fonts
    have been ommitted because they are not available on all platforms.
    
    Also due to a bug introduced in commit 7015cf9edf312069aaab0028a1d9ac217cb8b43f
    some options are now hard-coded. These include the report title,
    the notes and the invoice number text.

diff --git a/src/report/business-reports/taxinvoice.scm b/src/report/business-reports/taxinvoice.scm
index 106f8d7..53c880d 100644
--- a/src/report/business-reports/taxinvoice.scm
+++ b/src/report/business-reports/taxinvoice.scm
@@ -226,7 +226,7 @@
                 headingpage2 optname-amount-due "b" "" (_ "Amount Due")))
   (add-option (gnc:make-string-option
                 headingpage2 optname-payment-recd "c" "" 
-                (_ "Payment received, thank you")))
+                (_ "Payment received, thank you.")))
   (add-option (gnc:make-string-option	headingpage2	optname-invoice-number-text
     "d" "" (N_ "Invoice number: ")))
   (add-option (gnc:make-string-option	headingpage2	optname-to-text
@@ -340,3 +340,31 @@
   'options-generator options-generator
   'renderer report-renderer)
 
+(define (au-tax-options-generator)
+  (define (set-opt options page name value)
+    (let ((option (gnc:lookup-option options page name)))
+         (gnc:option-set-value option value)))
+
+  (let ((options (options-generator)))
+       (set-opt options headingpage optname-report-title (_ "Tax Invoice"))
+       ;(gnc:warn "title: " (gnc:option-value title-op))
+       (set-opt options headingpage optname-unit-price (_ "Unit"))
+       ;(gnc:warn "unitprice: " (gnc:option-value unit-price-op))
+       (set-opt options headingpage optname-tax-rate (_ "GST Rate"))
+       (set-opt options headingpage optname-tax-amount (_ "GST Amount"))
+       (set-opt options headingpage2 optname-amount-due (_ "Amount Due (inc GST)"))
+       (set-opt options headingpage2 optname-invoice-number-text (_ "Invoice #: "))
+       (set-opt options headingpage2 optname-ref-text (_ "Reference: "))
+       (set-opt options headingpage2 optname-jobname-text (_ "Engagement: "))
+       (set-opt options notespage optname-extra-css "h1.coyname { text-align: right; margin-bottom: 0px ; font-size: 200%; } h2.invoice { text-align: left; margin-bottom: 0px ; font-size: 500%; }")
+       options))
+
+(gnc:define-report
+  'version 1
+  'name (N_ "Australian Tax Invoice")
+  'report-guid "3dbbc2584da64e7a8674355bc3fbfe3d"
+  'menu-name (N_ "Australian Tax Invoice")
+  'menu-tip (N_ "Display an Australian customer invoice with tax columns (using eguile template)")
+  'menu-path (list gnc:menuname-business-reports)
+  'options-generator au-tax-options-generator
+  'renderer report-renderer)



Summary of changes:
 src/report/business-reports/taxinvoice.scm | 30 +++++++++++++++++++++++++++++-
 1 file changed, 29 insertions(+), 1 deletion(-)



More information about the gnucash-changes mailing list