diff --git a/src/report/business-reports/taxinvoice.eguile.scm b/src/report/business-reports/taxinvoice.eguile.scm index 985e56e48f..c45cb8717c 100644 --- a/src/report/business-reports/taxinvoice.eguile.scm +++ b/src/report/business-reports/taxinvoice.eguile.scm @@ -7,8 +7,10 @@ ;; taxinvoice.eguile.scm 0.03 ;; GnuCash report template called from taxinvoice.scm 0.02 ;; (c) 2009 Chris Dennis chris@starsoftanalysis.co.uk +;; © 2012 Dmitry Smirnov ;; ;; $Author: chris $ $Date: 2009/07/23 10:42:08 $ $Revision: 1.33 $ +;; Modified by Dmitry Smirnov 16 Feb 2012 ;; ;; This file is a mixture of HTML and Guile -- ;; see eguile-gnc.scm for details. @@ -54,7 +56,10 @@ (coyfax (coy-info slots gnc:*company-fax*)) (coyurl (coy-info slots gnc:*company-url*)) (coyemail (coy-info slots gnc:*company-email*)) - (owneraddr (gnc:owner-get-name-and-address-dep owner)) + (owneraddr (gnc:owner-get-address-dep owner)) + (ownername (gnc:owner-get-name-dep owner)) + (jobnumber (gncJobGetID (gncOwnerGetJob (gncInvoiceGetOwner opt-invoice)))) + (jobname (gncJobGetName (gncOwnerGetJob (gncInvoiceGetOwner opt-invoice)))) (billcontact (gncAddressGetName (gnc:owner-get-address owner))) ; flags and counters (discount? #f) ; any discounts on this invoice? @@ -63,8 +68,9 @@ (payments? #f) ; have any payments been made on this invoice? (units? #f) ; does any row specify units? (qty? #f) ; does any row have qty <> 1? - (spancols1 2) ; for total line - (spancols2 2)) ; for subtotal line + (spancols_subtotal 1) ; for subtotal line + (spancols_payments 0) ; for payments line (between total and subtotal) + (spancols_total 0)) ; for total line ; load splits, if any (if (not (null? lot)) @@ -157,16 +163,15 @@

-

+

+ +

- -
- - + br coyaddr) ?>
@@ -175,6 +180,11 @@
+ + + + + @@ -207,21 +217,24 @@
+ - - - - -
- - Attn:
+ +
- br owneraddr) ?> + br owneraddr) ?>
+ - + + @@ -235,6 +248,24 @@ + + + + + + + + + + + + + + + + + + @@ -242,11 +273,6 @@
: 
Your ref:
@@ -254,31 +280,36 @@ + + - + - + - + - + - + + + - + @@ -308,12 +339,16 @@ (dsc-total 'add currency rdiscval) ?> + + + + @@ -330,7 +365,9 @@ + + @@ -341,13 +378,15 @@ - + + + @@ -363,17 +402,21 @@ (let ((c (xaccTransGetCurrency t)) (a (xaccSplitGetValue split))) (inv-total 'add c a) + (set! spancols_payments (+ 0 spancols_total)) ?> + - + + - + diff --git a/src/report/business-reports/taxinvoice.scm b/src/report/business-reports/taxinvoice.scm index 4d0b0cde20..1369cf1399 100644 --- a/src/report/business-reports/taxinvoice.scm +++ b/src/report/business-reports/taxinvoice.scm @@ -1,5 +1,6 @@ ;; $Author: chris $ $Date: 2009/07/29 09:31:44 $ $Revision: 1.33 $ +;; Modified by Dmitry Smirnov 16 Feb 2012 ;; ;; This program is free software; you can redistribute it and/or ;; modify it under the terms of the GNU General Public License as @@ -85,7 +86,24 @@ (define notespage (N_ "Notes")) ;(define filespage (N_ "Files")) (define displaypage (N_ "Display")) +(define elementspage (N_ "Elements")) ; option names +(define optname-col-date (N_ "column: Date")) +(define optname-col-taxrate (N_ "column: Tax Rate")) +(define optname-col-units (N_ "column: Units")) +(define optname-row-address (N_ "row: Address")) +(define optname-row-contact (N_ "row: Contact")) +(define optname-row-invoice-number (N_ "row: Invoice Number")) +(define optname-row-company-name (N_ "row: Company Name")) +(define optname-report-currency (N_ "Report Currency")) +(define optname-invoice-number-text (N_ "Invoice number text")) +(define optname-to-text (N_ "To text")) +(define optname-ref-text (N_ "Ref text")) +(define optname-jobname-text (N_ "Job Number text")) +(define optname-jobnumber-text (N_ "Job Name text")) +(define optname-jobname-show (N_ "Show Job name")) +(define optname-jobnumber-show (N_ "Sjow Job number")) +(define optname-invnum-next-to-title (N_ "Invoice number next to title")) (define optname-border-collapse (N_ "table-border-collapse")) (define optname-border-color-th (N_ "table-header-border-color")) (define optname-border-color-td (N_ "table-cell-border-color")) @@ -137,6 +155,20 @@ "a" "" (lambda () '()) #f)) ;customers-only)) ;-- see above +(add-option (gnc:make-currency-option gnc:pagename-general optname-report-currency "b" "" (N_ ""))) + + ;; Elements page options +(add-option (gnc:make-simple-boolean-option elementspage optname-col-date "a" (N_ "Display the date?") #t)) +(add-option (gnc:make-simple-boolean-option elementspage optname-col-taxrate "b" (N_ "Display the Tax Rate?") #t)) +(add-option (gnc:make-simple-boolean-option elementspage optname-col-units "c" (N_ "Display the Units?") #t)) +(add-option (gnc:make-simple-boolean-option elementspage optname-row-contact "d" (N_ "Display the contact?") #t)) +(add-option (gnc:make-simple-boolean-option elementspage optname-row-address "e" (N_ "Display the address?") #t)) +(add-option (gnc:make-simple-boolean-option elementspage optname-row-invoice-number "f" (N_ "Display the Invoice Number?") #t)) +(add-option (gnc:make-simple-boolean-option elementspage optname-row-company-name "g" (N_ "Display the Company Name?") #t)) +(add-option (gnc:make-simple-boolean-option elementspage optname-invnum-next-to-title "h" (N_ "Invoice Number next to title?") #f)) +(add-option (gnc:make-simple-boolean-option elementspage optname-jobname-show "i" (N_ "Display Job name?") #t)) +(add-option (gnc:make-simple-boolean-option elementspage optname-jobnumber-show "j" (N_ "Invoice Job number?") #f)) + ;; Display options (add-option (gnc:make-string-option displaypage optname-template-file "a" (N_ "The file name of the eguile template part of this report. This file should either be in your .gnucash directory, or else in its proper place within the GnuCash installation directories.") @@ -175,25 +207,35 @@ (add-option (gnc:make-string-option headingpage optname-disc-amount "f" "" (_ "Discount Amount"))) (add-option (gnc:make-string-option - headingpage optname-net-price "g" "" (_ "Net Price"))) + headingpage optname-net-price "g" "" (_ "Net Price"))) (add-option (gnc:make-string-option headingpage optname-tax-rate "h" "" (_ "Tax Rate"))) (add-option (gnc:make-string-option headingpage optname-tax-amount "i" "" (_ "Tax Amount"))) (add-option (gnc:make-string-option - headingpage optname-total-price "j" "" (_ "Total Price"))) + headingpage optname-total-price "j" "" (_ "Total Price"))) (add-option (gnc:make-string-option headingpage2 optname-subtotal "a" "" (_ "Sub-total"))) (add-option (gnc:make-string-option - headingpage2 optname-amount-due "b" "" (_ "Amount Due"))) + headingpage2 optname-amount-due "b" "" (_ "Amount Due"))) (add-option (gnc:make-string-option headingpage2 optname-payment-recd "c" "" (_ "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 + "e" "" (N_ "To: "))) + (add-option (gnc:make-string-option headingpage2 optname-ref-text + "f" "" (N_ "Your ref: "))) + (add-option (gnc:make-string-option headingpage2 optname-jobnumber-text + "g" "" (N_ "Job number: "))) + (add-option (gnc:make-string-option headingpage2 optname-jobname-text + "h" "" (N_ "Job name: "))) (add-option (gnc:make-text-option notespage optname-extra-notes "a" (_ "Notes added at end of invoice -- may contain HTML markup") - "")) + "Thank you for your patronage.")) ;(N_ "(Development version -- don't rely on the numbers on this report without double-checking them.
Change the 'Extra Notes' option to get rid of this message)"))) (add-option (gnc:make-text-option notespage optname-extra-css "b" @@ -228,6 +270,17 @@ (opt-value displaypage optname-text-font))) (opt-logofile (opt-value displaypage optname-logofile)) (opt-logo-width (opt-value displaypage optname-logo-width)) + (opt-col-date (opt-value elementspage optname-col-date)) + (opt-col-taxrate (opt-value elementspage optname-col-taxrate)) + (opt-col-units (opt-value elementspage optname-col-units)) + (opt-row-contact (opt-value elementspage optname-row-contact)) + (opt-row-address (opt-value elementspage optname-row-address)) + (opt-row-invoice-number (opt-value elementspage optname-row-invoice-number)) + (opt-row-company-name (opt-value elementspage optname-row-company-name)) + (opt-invnum-next-to-title (opt-value elementspage optname-invnum-next-to-title)) + (opt-jobname-show (opt-value elementspage optname-jobname-show)) + (opt-jobnumber-show (opt-value elementspage optname-jobnumber-show)) + (opt-report-currency (opt-value gnc:pagename-general optname-report-currency)) (opt-css-border-collapse (if (opt-value displaypage optname-border-collapse) "border-collapse:collapse;")) (opt-css-border-color-th (opt-value displaypage optname-border-color-th)) (opt-css-border-color-td (opt-value displaypage optname-border-color-td)) @@ -244,6 +297,11 @@ (opt-subtotal-heading (opt-value headingpage2 optname-subtotal)) (opt-amount-due-heading (opt-value headingpage2 optname-amount-due)) (opt-payment-recd-heading (opt-value headingpage2 optname-payment-recd)) + (opt-invoice-number-text (opt-value headingpage2 optname-invoice-number-text)) + (opt-to-text (opt-value headingpage2 optname-to-text)) + (opt-ref-text (opt-value headingpage2 optname-ref-text)) + (opt-jobnumber-text (opt-value headingpage2 optname-jobnumber-text)) + (opt-jobname-text (opt-value headingpage2 optname-jobname-text)) (opt-extra-css (opt-value notespage optname-extra-css)) (opt-extra-notes (opt-value notespage optname-extra-notes)) (css? #t) ;(and (defined? 'gnc-html-engine-supports-css) (gnc-html-engine-supports-css)))
 
, +