taxinvoice.scm (gnucash-5.0.tar.bz2) | : | taxinvoice.scm (gnucash-5.1.tar.bz2) | ||
---|---|---|---|---|
;; $Author: chris $ $Date: 2009/07/29 09:31:44 $ $Revision: 1.33 $ | ;; $Author: chris $ $Date: 2009/07/29 09:31:44 $ $Revision: 1.33 $ | |||
;; Modified by Dmitry Smirnov <onlyjob@member.fsf.org> 16 Feb 2012 | ||||
;; | ;; | |||
;; This program is free software; you can redistribute it and/or | ;; This program is free software; you can redistribute it and/or | |||
;; modify it under the terms of the GNU General Public License as | ;; modify it under the terms of the GNU General Public License as | |||
;; published by the Free Software Foundation; either version 2 of the | ;; published by the Free Software Foundation; either version 2 of the | |||
;; License, or (at your option) any later version. | ;; License, or (at your option) any later version. | |||
;; | ;; | |||
;; This program is distributed in the hope that it will be useful, | ;; This program is distributed in the hope that it will be useful, | |||
;; but WITHOUT ANY WARRANTY; without even the implied warranty of | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |||
;; General Public License for more details. | ;; General Public License for more details. | |||
skipping to change at line 72 | skipping to change at line 70 | |||
acc)))))) | acc)))))) | |||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |||
;;; Define all the options | ;;; Define all the options | |||
; option pages | ; option pages | |||
(define headingpage (N_ "Headings 1")) | (define headingpage (N_ "Headings 1")) | |||
(define headingpage2 (N_ "Headings 2")) | (define headingpage2 (N_ "Headings 2")) | |||
(define notespage (N_ "Notes")) | (define notespage (N_ "Notes")) | |||
(define displaypage (N_ "Display")) | (define displaypage (N_ "Display")) | |||
(define elementspage (N_ "Elements")) | (define elementspage (N_ "Elements")) | |||
; option names | ; option names | |||
(define optname-col-date (N_ "column: Date")) | (define optname-col-date (N_ "column: Date")) | |||
(define optname-col-taxrate (N_ "column: Tax Rate")) | (define optname-col-taxrate (N_ "column: Tax Rate")) | |||
(define optname-col-units (N_ "column: Units")) | (define optname-col-units (N_ "column: Units")) | |||
(define optname-row-address (N_ "row: Address")) | (define optname-row-address (N_ "row: Address")) | |||
(define optname-row-contact (N_ "row: Contact")) | (define optname-row-contact (N_ "row: Contact")) | |||
(define optname-row-invoice-number (N_ "row: Invoice Number")) | (define optname-row-invoice-number (N_ "row: Invoice Number")) | |||
(define optname-row-company-name (N_ "row: Company Name")) | (define optname-row-company-name (N_ "row: Company Name")) | |||
(define optname-invoice-number-text (N_ "Invoice number text")) | (define optname-invoice-number-text (N_ "Invoice number text")) | |||
(define optname-to-text (N_ "To text")) | (define optname-to-text (N_ "To text")) | |||
(define optname-ref-text (N_ "Ref text")) | (define optname-ref-text (N_ "Ref text")) | |||
(define optname-jobname-text (N_ "Job Name text")) | (define optname-jobname-text (N_ "Job Name text")) | |||
(define optname-jobnumber-text (N_ "Job Number text")) | (define optname-jobnumber-text (N_ "Job Number text")) | |||
(define optname-jobname-show (N_ "Show Job name")) | (define optname-jobname-show (N_ "Show Job name")) | |||
(define optname-jobnumber-show (N_ "Show Job number")) | (define optname-jobnumber-show (N_ "Show Job number")) | |||
(define optname-netprice (N_ "Show net price")) | (define optname-netprice (N_ "Show net price")) | |||
(define optname-invnum-next-to-title (N_ "Invoice number next to title")) | (define optname-invnum-next-to-title (N_ "Invoice number next to title")) | |||
(define optname-border-collapse (N_ "table-border-collapse")) | (define optname-border-collapse (N_ "table-border-collapse")) | |||
(define optname-border-color-th (N_ "table-header-border-color")) | (define optname-border-color-th (N_ "table-header-border-color")) | |||
(define optname-border-color-td (N_ "table-cell-border-color")) | (define optname-border-color-td (N_ "table-cell-border-color")) | |||
(define optname-extra-css (N_ "Embedded CSS")) | (define optname-extra-css (N_ "Embedded CSS")) | |||
(define optname-report-title (N_ "Report Title")) | (define optname-report-title (N_ "Report Title")) | |||
(define optname-template-file (N_ "Template file")) | (define optname-template-file (N_ "Template file")) | |||
(define optname-css-file (N_ "CSS stylesheet file")) | (define optname-css-file (N_ "CSS stylesheet file")) | |||
(define optname-heading-font (N_ "Heading font")) | (define optname-heading-font (N_ "Heading font")) | |||
(define optname-text-font (N_ "Text font")) | (define optname-text-font (N_ "Text font")) | |||
(define optname-logofile (N_ "Logo filename")) | (define optname-logofile (N_ "Logo filename")) | |||
(define optname-logo-width (N_ "Logo width")) | (define optname-logo-width (N_ "Logo width")) | |||
(define optname-units (N_ "Units")) | (define optname-units (N_ "Units")) | |||
(define optname-qty (N_ "Qty")) | (define optname-qty (N_ "Qty")) | |||
(define optname-unit-price (N_ "Unit Price")) | (define optname-unit-price (N_ "Unit Price")) | |||
(define optname-disc-rate (N_ "Discount Rate")) | (define optname-disc-rate (N_ "Discount Rate")) | |||
(define optname-disc-amount (N_ "Discount Amount")) | (define optname-disc-amount (N_ "Discount Amount")) | |||
(define optname-net-price (N_ "Net Price")) | (define optname-net-price (N_ "Net Price")) | |||
(define optname-tax-rate (N_ "Tax Rate")) | (define optname-tax-rate (N_ "Tax Rate")) | |||
(define optname-tax-amount (N_ "Tax Amount")) | (define optname-tax-amount (N_ "Tax Amount")) | |||
(define optname-total-price (N_ "Total Price")) | (define optname-total-price (N_ "Total Price")) | |||
(define optname-subtotal (N_ "Sub-total")) | (define optname-subtotal (N_ "Sub-total")) | |||
(define optname-amount-due (N_ "Amount Due")) | (define optname-amount-due (N_ "Amount Due")) | |||
(define optname-payment-recd (N_ "Payment received text")) | (define optname-payment-recd (N_ "Payment received text")) | |||
(define optname-extra-notes (N_ "Extra Notes")) | (define optname-extra-notes (N_ "Extra Notes")) | |||
(define (options-generator) | (define (options-generator) | |||
;; Options | ;; Options | |||
(let ((options (gnc-new-optiondb))) | (let ((options (gnc-new-optiondb))) | |||
(gnc-register-invoice-option options | (gnc-register-invoice-option options | |||
gnc:pagename-general gnc:optname-invoice-number | gnc:pagename-general gnc:optname-invoice-number | |||
"a" "" '()) | "a" "" '()) | |||
;; Elements page options | ;; Elements page options | |||
(gnc-register-simple-boolean-option options | (gnc-register-simple-boolean-option options | |||
elementspage optname-col-date "a" (N_ "Display the date?") #t) | elementspage optname-col-date "a" (N_ "Display the date?") #t) | |||
(gnc-register-simple-boolean-option options | (gnc-register-simple-boolean-option options | |||
elementspage optname-col-taxrate "b" (N_ "Display the Tax Rate?") #t) | elementspage optname-col-taxrate "b" (N_ "Display the Tax Rate?") #t) | |||
(gnc-register-simple-boolean-option options | (gnc-register-simple-boolean-option options | |||
elementspage optname-col-units "c" (N_ "Display the Units?") #t) | elementspage optname-col-units "c" (N_ "Display the Units?") #t) | |||
(gnc-register-simple-boolean-option options | (gnc-register-simple-boolean-option options | |||
elementspage optname-row-contact "d" (N_ "Display the contact?") #t) | elementspage optname-row-contact "d" (N_ "Display the contact?") #t) | |||
(gnc-register-simple-boolean-option options | (gnc-register-simple-boolean-option options | |||
elementspage optname-row-address "e" (N_ "Display the address?") #t) | elementspage optname-row-address "e" (N_ "Display the address?") #t) | |||
(gnc-register-simple-boolean-option options | (gnc-register-simple-boolean-option options | |||
elementspage optname-row-invoice-number "f" (N_ "Display the Invoice Number?") #t) | elementspage optname-row-invoice-number "f" (N_ "Display the Invoice Number?") #t) | |||
(gnc-register-simple-boolean-option options | (gnc-register-simple-boolean-option options | |||
elementspage optname-row-company-name "g" (N_ "Display the Company Name?") #t) | elementspage optname-row-company-name "g" (N_ "Display the Company Name?") #t) | |||
(gnc-register-simple-boolean-option options | (gnc-register-simple-boolean-option options | |||
elementspage optname-invnum-next-to-title "h" (N_ "Invoice Number next to title?") #f) | elementspage optname-invnum-next-to-title "h" (N_ "Invoice Number next to title?") #f) | |||
(gnc-register-simple-boolean-option options | (gnc-register-simple-boolean-option options | |||
elementspage optname-jobname-show "i" (N_ "Display Job name?") #t) | elementspage optname-jobname-show "i" (N_ "Display Job name?") #t) | |||
(gnc-register-simple-boolean-option options | (gnc-register-simple-boolean-option options | |||
elementspage optname-jobnumber-show "j" (N_ "Invoice Job number?") #f) | elementspage optname-jobnumber-show "j" (N_ "Invoice Job number?") #f) | |||
(gnc-register-simple-boolean-option options | (gnc-register-simple-boolean-option options | |||
elementspage optname-netprice "k" (N_ "Show net price?") #f) | elementspage optname-netprice "k" (N_ "Show ne t price?") #f) | |||
;; Display options | ;; Display options | |||
(gnc-register-string-option options | (gnc-register-string-option options | |||
displaypage optname-template-file "a" | displaypage optname-template-file "a" | |||
(N_ "The file name of the eguile template part of this report. This file sho uld either be in your .gnucash directory, or else in its proper place within the GnuCash installation directories.") | (N_ "The file name of the eguile template part of this report. This file sho uld either be in your .gnucash directory, or else in its proper place within the GnuCash installation directories.") | |||
"taxinvoice.eguile.scm") | "taxinvoice.eguile.scm") | |||
(gnc-register-string-option options | (gnc-register-string-option options | |||
displaypage optname-css-file "b" | displaypage optname-css-file "b" | |||
(N_ "The file name of the CSS stylesheet to use with this report. This file should either be in your .gnucash directory, or else in its proper place within the GnuCash installation directories.") | (N_ "The file name of the CSS stylesheet to use with this report. This file should either be in your .gnucash directory, or else in its proper place within the GnuCash installation directories.") | |||
"taxinvoice.css") | "taxinvoice.css") | |||
skipping to change at line 169 | skipping to change at line 167 | |||
(gnc-register-font-option options | (gnc-register-font-option options | |||
displaypage optname-text-font "d" | displaypage optname-text-font "d" | |||
(N_ "Font to use for everything else.") "Sans 10") | (N_ "Font to use for everything else.") "Sans 10") | |||
(gnc-register-pixmap-option options | (gnc-register-pixmap-option options | |||
displaypage optname-logofile "e" | displaypage optname-logofile "e" | |||
(N_ "Name of a file containing a logo to be used on the report." ) | (N_ "Name of a file containing a logo to be used on the report." ) | |||
"") | "") | |||
(gnc-register-string-option options | (gnc-register-string-option options | |||
displaypage optname-logo-width "f" (N_ "Width of the logo in CSS format, e.g. 10% or 32px. Leave blank to display the logo at its natural width. The height of the logo will be scaled accordingly.") "") | displaypage optname-logo-width "f" (N_ "Width of the logo in CSS format, e.g. 10% or 32px. Leave blank to display the logo at its natural width. The height of the logo will be scaled accordingly.") "") | |||
(gnc-register-simple-boolean-option options | (gnc-register-simple-boolean-option options | |||
displaypage optname-border-collapse "g" (N_ "Border-collapse? ") #f) | displaypage optname-border-collapse "g" (N_ "Border-collapse ?") #f) | |||
(gnc-register-string-option options | (gnc-register-string-option options | |||
displaypage optname-border-color-th "h" (N_ "CSS color.") "bl ack") | displaypage optname-border-color-th "h" (N_ "CSS color.") "b lack") | |||
(gnc-register-string-option options | (gnc-register-string-option options | |||
displaypage optname-border-color-td "i" (N_ "CSS color.") "bl ack") | displaypage optname-border-color-td "i" (N_ "CSS color.") "b lack") | |||
;; Heading options | ;; Heading options | |||
(gnc-register-string-option options | (gnc-register-string-option options | |||
; page / name / orderkey / tooltip / default | ; page / name / orderkey / tooltip / default | |||
headingpage optname-report-title "a" "" (G_ "Invoice")) | headingpage optname-report-title "a" "" (G_ "Invoice")) | |||
(gnc-register-string-option options | (gnc-register-string-option options | |||
headingpage optname-units "b" "" (G_ "Units")) | headingpage optname-units "b" "" (G_ "Units")) | |||
(gnc-register-string-option options | (gnc-register-string-option options | |||
headingpage optname-qty "c" "" (G_ "Qty")) | headingpage optname-qty "c" "" (G_ "Qty")) | |||
(gnc-register-string-option options | (gnc-register-string-option options | |||
skipping to change at line 205 | skipping to change at line 203 | |||
(gnc-register-string-option options | (gnc-register-string-option options | |||
headingpage optname-total-price "j" "" (G_ "Total Price")) | headingpage optname-total-price "j" "" (G_ "Total Price")) | |||
(gnc-register-string-option options | (gnc-register-string-option options | |||
headingpage2 optname-subtotal "a" "" (G_ "Sub-total")) | headingpage2 optname-subtotal "a" "" (G_ "Sub-total")) | |||
(gnc-register-string-option options | (gnc-register-string-option options | |||
headingpage2 optname-amount-due "b" "" (G_ "Amount Due")) | headingpage2 optname-amount-due "b" "" (G_ "Amount Due")) | |||
(gnc-register-string-option options | (gnc-register-string-option options | |||
headingpage2 optname-payment-recd "c" "" | headingpage2 optname-payment-recd "c" "" | |||
(G_ "Payment received, thank you!")) | (G_ "Payment received, thank you!")) | |||
(gnc-register-string-option options | (gnc-register-string-option options | |||
headingpage2 optname-invoice-number-text | headingpage2 optname-invoice-number-text | |||
"d" "" (G_ "Invoice number:")) | "d" "" (G_ "Invoice number:")) | |||
(gnc-register-string-option options | (gnc-register-string-option options | |||
headingpage2 optname-to-text | headingpage2 optname-to-text | |||
"e" "" (G_ "To:")) | "e" "" (G_ "To:")) | |||
(gnc-register-string-option options | (gnc-register-string-option options | |||
headingpage2 optname-ref-text | headingpage2 optname-ref-text | |||
"f" "" (G_ "Your ref:")) | "f" "" (G_ "Your ref:")) | |||
(gnc-register-string-option options | (gnc-register-string-option options | |||
headingpage2 optname-jobnumber-text | headingpage2 optname-jobnumber-text | |||
"g" "" (G_ "Job number:")) | "g" "" (G_ "Job number:")) | |||
(gnc-register-string-option options | (gnc-register-string-option options | |||
headingpage2 optname-jobname-text | headingpage2 optname-jobname-text | |||
"h" "" (G_ "Job name:")) | "h" "" (G_ "Job name:")) | |||
(gnc-register-text-option options | (gnc-register-text-option options | |||
notespage optname-extra-notes "a" | notespage optname-extra-notes "a" | |||
(G_ "Notes added at end of invoice -- may contain HTML markup.") | (G_ "Notes added at end of invoice -- may contain HTML markup.") | |||
(G_ "Thank you for your patronage!")) | (G_ "Thank you for your patronage!")) | |||
(gnc-register-text-option options | (gnc-register-text-option options | |||
notespage optname-extra-css "b" | notespage optname-extra-css "b" | |||
(N_ "Embedded CSS.") "h1.coyname { text-align: left; }") | (N_ "Embedded CSS.") "h1.coyname { text-align: left; }") | |||
(gnc:options-set-default-section options gnc:pagename-general) | (gnc:options-set-default-section options gnc:pagename-general) | |||
options)) | options)) | |||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |||
;;; Create the report | ;;; Create the report | |||
(define (report-renderer report-obj) | (define (report-renderer report-obj) | |||
;; Create and return the report as either an HTML string | ;; Create and return the report as either an HTML string | |||
;; or an <html-document> | ;; or an <html-document> | |||
End of changes. 24 change blocks. | ||||
63 lines changed or deleted | 61 lines changed or added |