r21682 - gnucash/trunk/src/report/business-reports - Minor variable name unification - let all invoice reports use gnc:pagename-general.
Christian Stimming
cstim at code.gnucash.org
Mon Dec 5 16:25:09 EST 2011
Author: cstim
Date: 2011-12-05 16:25:09 -0500 (Mon, 05 Dec 2011)
New Revision: 21682
Trac: http://svn.gnucash.org/trac/changeset/21682
Modified:
gnucash/trunk/src/report/business-reports/easy-invoice.scm
gnucash/trunk/src/report/business-reports/fancy-invoice.scm
gnucash/trunk/src/report/business-reports/taxinvoice.scm
Log:
Minor variable name unification - let all invoice reports use gnc:pagename-general.
Modified: gnucash/trunk/src/report/business-reports/easy-invoice.scm
===================================================================
--- gnucash/trunk/src/report/business-reports/easy-invoice.scm 2011-12-05 21:24:50 UTC (rev 21681)
+++ gnucash/trunk/src/report/business-reports/easy-invoice.scm 2011-12-05 21:25:09 UTC (rev 21682)
@@ -40,9 +40,6 @@
(use-modules (gnucash report standard-reports))
(use-modules (gnucash report business-reports))
-(define invoice-page gnc:pagename-general)
-(define invoice-name (N_ "Invoice Number"))
-
(define-macro (addto! alist element)
`(set! ,alist (cons ,element ,alist)))
@@ -249,12 +246,12 @@
(gnc:register-option gnc:*report-options* new-option))
(gnc:register-inv-option
- (gnc:make-invoice-option invoice-page invoice-name "x" ""
+ (gnc:make-invoice-option gnc:pagename-general gnc:optname-invoice-number "x" ""
(lambda () '()) #f))
(gnc:register-inv-option
(gnc:make-string-option
- invoice-page (N_ "Custom Title")
+ gnc:pagename-general (N_ "Custom Title")
"z" (N_ "A custom string to replace Invoice, Bill or Expense Voucher")
""))
@@ -430,7 +427,7 @@
(define (add-payment-row table used-columns split total-collector reverse-payments?)
(let* ((t (xaccSplitGetParent split))
(currency (xaccTransGetCurrency t))
- (invoice (opt-val invoice-page invoice-name))
+ (invoice (opt-val gnc:pagename-general gnc:optname-invoice-number))
(owner '())
;; Depending on the document type, the payments may need to be sign-reversed
(amt (gnc:make-gnc-monetary currency
@@ -700,11 +697,11 @@
(let* ((document (gnc:make-html-document))
(table '())
(orders '())
- (invoice (opt-val invoice-page invoice-name))
+ (invoice (opt-val gnc:pagename-general gnc:optname-invoice-number))
(owner '())
(references? (opt-val "Display" "References"))
(default-title (_ "Invoice"))
- (custom-title (opt-val invoice-page "Custom Title"))
+ (custom-title (opt-val gnc:pagename-general "Custom Title"))
(title "")
(cust-doc? #f)
(credit-note? #f))
@@ -907,7 +904,7 @@
(define (gnc:easy-invoice-report-create-internal invoice)
(let* ((options (gnc:make-report-options easy-invoice-guid))
- (invoice-op (gnc:lookup-option options invoice-page invoice-name)))
+ (invoice-op (gnc:lookup-option options gnc:pagename-general gnc:optname-invoice-number)))
(gnc:option-set-value invoice-op invoice)
(gnc:make-report easy-invoice-guid options)))
Modified: gnucash/trunk/src/report/business-reports/fancy-invoice.scm
===================================================================
--- gnucash/trunk/src/report/business-reports/fancy-invoice.scm 2011-12-05 21:24:50 UTC (rev 21681)
+++ gnucash/trunk/src/report/business-reports/fancy-invoice.scm 2011-12-05 21:25:09 UTC (rev 21682)
@@ -58,9 +58,6 @@
(use-modules (gnucash report standard-reports))
(use-modules (gnucash report business-reports))
-(define invoice-page gnc:pagename-general)
-(define invoice-name (N_ "Invoice Number"))
-
(define-macro (addto! alist element)
`(set! ,alist (cons ,element ,alist)))
@@ -249,12 +246,12 @@
(gnc:register-option gnc:*report-options* new-option))
(gnc:register-inv-option
- (gnc:make-invoice-option invoice-page invoice-name "x" ""
+ (gnc:make-invoice-option gnc:pagename-general gnc:optname-invoice-number "x" ""
(lambda () '()) #f))
(gnc:register-inv-option
(gnc:make-string-option
- invoice-page (N_ "Custom Title")
+ gnc:pagename-general (N_ "Custom Title")
"z" (N_ "A custom string to replace Invoice, Bill or Expense Voucher")
""))
@@ -449,7 +446,7 @@
(define (add-payment-row table used-columns split total-collector)
(let* ((t (xaccSplitGetParent split))
(currency (xaccTransGetCurrency t))
- (invoice (opt-val invoice-page invoice-name))
+ (invoice (opt-val gnc:pagename-general gnc:optname-invoice-number))
(owner '())
;; XXX Need to know when to reverse the value
(amt (gnc:make-gnc-monetary currency (xaccSplitGetValue split)))
@@ -799,11 +796,11 @@
(let* ((document (gnc:make-html-document))
(table '())
(orders '())
- (invoice (opt-val invoice-page invoice-name))
+ (invoice (opt-val gnc:pagename-general gnc:optname-invoice-number))
(owner '())
(references? (opt-val "Display" "References"))
(default-title (_ "Invoice"))
- (custom-title (opt-val invoice-page "Custom Title"))
+ (custom-title (opt-val gnc:pagename-general "Custom Title"))
(invoice? #f))
@@ -1020,7 +1017,7 @@
(define (gnc:fancy-invoice-report-create-internal invoice)
(let* ((options (gnc:make-report-options fancy-invoice-guid))
- (invoice-op (gnc:lookup-option options invoice-page invoice-name)))
+ (invoice-op (gnc:lookup-option options gnc:pagename-general gnc:optname-invoice-number)))
(gnc:option-set-value invoice-op invoice)
(gnc:make-report fancy-invoice-guid options)))
Modified: gnucash/trunk/src/report/business-reports/taxinvoice.scm
===================================================================
--- gnucash/trunk/src/report/business-reports/taxinvoice.scm 2011-12-05 21:24:50 UTC (rev 21681)
+++ gnucash/trunk/src/report/business-reports/taxinvoice.scm 2011-12-05 21:25:09 UTC (rev 21682)
@@ -85,10 +85,8 @@
(define notespage (N_ "Notes"))
;(define filespage (N_ "Files"))
(define displaypage (N_ "Display"))
-(define generalpage gnc:pagename-general)
; option names
(define optname-report-title (N_ "Report title"))
-(define optname-invoice-number (N_ "Invoice number"))
(define optname-template-file (N_ "Template file"))
(define optname-css-file (N_ "CSS stylesheet file"))
(define optname-heading-font (N_ "Heading font"))
@@ -131,7 +129,7 @@
(add-option
(gnc:make-invoice-option ; defined in gnucash/scm/business-options.scm
- generalpage optname-invoice-number
+ gnc:pagename-general gnc:optname-invoice-number
"a" "" (lambda () '())
#f)) ;customers-only)) ;-- see above
@@ -192,7 +190,7 @@
;(N_ "(Development version -- don't rely on the numbers on this report without double-checking them.<br>Change the 'Extra Notes' option to get rid of this message)")))
(gnc:options-set-default-section
- report-options generalpage)
+ report-options gnc:pagename-general)
report-options)
@@ -210,7 +208,7 @@
; Get all the options
(let* ((document (gnc:make-html-document))
- (opt-invoice (opt-value generalpage optname-invoice-number))
+ (opt-invoice (opt-value gnc:pagename-general gnc:optname-invoice-number))
(opt-template-file (find-file
(opt-value displaypage optname-template-file)))
(opt-css-file (find-file
More information about the gnucash-changes
mailing list