2002-01-06 Christian Stimming <stimming@tuhh.de>

* src/report/report-system/html-utilities.scm,
	src/report/standard-reports/*: Added option hyperlink in report
	warnings.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@6522 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Christian Stimming 2002-01-06 22:24:03 +00:00
parent f9e8a3ada2
commit 49bc361cd4
11 changed files with 76 additions and 42 deletions

View File

@ -1,5 +1,9 @@
2002-01-06 Christian Stimming <stimming@tuhh.de> 2002-01-06 Christian Stimming <stimming@tuhh.de>
* src/report/report-system/html-utilities.scm,
src/report/standard-reports/*: Added option hyperlink in report
warnings.
* doc/sgml/*/xacc-euro.sgml: Fixed DEM rate as pointed out by * doc/sgml/*/xacc-euro.sgml: Fixed DEM rate as pointed out by
Gregor Hoffleit <gregor@hoffleit.de>. Gregor Hoffleit <gregor@hoffleit.de>.

View File

@ -679,7 +679,8 @@
table)) table))
(define (gnc:html-make-no-account-warning report-title-string) (define (gnc:html-make-no-account-warning
report-title-string report-id)
(let ((p (gnc:make-html-text))) (let ((p (gnc:make-html-text)))
(gnc:html-text-append! (gnc:html-text-append!
p p
@ -689,9 +690,17 @@
(gnc:html-markup-h2 (_ "No accounts selected")) (gnc:html-markup-h2 (_ "No accounts selected"))
(gnc:html-markup-p (gnc:html-markup-p
(_ "This report requires accounts to be selected."))) (_ "This report requires accounts to be selected.")))
(if report-id
(gnc:html-text-append!
p
(gnc:html-markup-p
(gnc:html-markup-anchor
(sprintf #f "gnc-options:report-id=%a" report-id)
(_ "Edit report options")))))
p)) p))
(define (gnc:html-make-empty-data-warning report-title-string) (define (gnc:html-make-empty-data-warning
report-title-string report-id)
(let ((p (gnc:make-html-text))) (let ((p (gnc:make-html-text)))
(gnc:html-text-append! (gnc:html-text-append!
p p
@ -700,4 +709,11 @@
(gnc:html-markup-h2 (_ "No data")) (gnc:html-markup-h2 (_ "No data"))
(gnc:html-markup-p (gnc:html-markup-p
(_ "The selected accounts contain no data/transactions (or only zeroes) for the selected time period"))) (_ "The selected accounts contain no data/transactions (or only zeroes) for the selected time period")))
(if report-id
(gnc:html-text-append!
p
(gnc:html-markup-p
(gnc:html-markup-anchor
(sprintf #f "gnc-options:report-id=%a" report-id)
(_ "Edit report options")))))
p)) p))

View File

@ -399,11 +399,13 @@ balance at a given time"))
(gnc:html-document-add-object! (gnc:html-document-add-object!
document document
(gnc:html-make-empty-data-warning report-title)))) (gnc:html-make-empty-data-warning
report-title (gnc:report-id report-obj)))))
(gnc:html-document-add-object! (gnc:html-document-add-object!
document document
(gnc:html-make-no-account-warning report-title))) (gnc:html-make-no-account-warning
report-title (gnc:report-id report-obj))))
document))) document)))

View File

@ -205,7 +205,8 @@
;; error condition: no accounts specified ;; error condition: no accounts specified
(gnc:html-document-add-object! (gnc:html-document-add-object!
doc doc
(gnc:html-make-no-account-warning report-title))) (gnc:html-make-no-account-warning
report-title (gnc:report-id report-obj))))
doc)) doc))

View File

@ -471,7 +471,7 @@
(gnc:html-document-add-object! (gnc:html-document-add-object!
document document
(gnc:html-make-empty-data-warning (gnc:html-make-empty-data-warning
(_ "Average Balance")))))) report-title (gnc:report-id report-obj))))))
;; make a table (optionally) ;; make a table (optionally)
(if show-table? (if show-table?
@ -496,7 +496,8 @@
;; if there are no accounts selected... ;; if there are no accounts selected...
(gnc:html-document-add-object! (gnc:html-document-add-object!
document document
(gnc:html-make-no-account-warning))) (gnc:html-make-no-account-warning
report-title (gnc:report-id report-obj))))
document)) document))
(gnc:define-report (gnc:define-report

View File

@ -356,7 +356,9 @@
;; error condition: no accounts specified ;; error condition: no accounts specified
(gnc:html-document-add-object! (gnc:html-document-add-object!
doc (gnc:html-make-no-account-warning (_ "Balance Sheet")))) doc
(gnc:html-make-no-account-warning
(_ "Balance Sheet") (gnc:report-id report-obj))))
doc)) doc))
(gnc:define-report (gnc:define-report

View File

@ -458,12 +458,14 @@ developing over time"))
;; else if empty data ;; else if empty data
(gnc:html-document-add-object! (gnc:html-document-add-object!
document document
(gnc:html-make-empty-data-warning report-title)))) (gnc:html-make-empty-data-warning
report-title (gnc:report-id report-obj)))))
;; else if no accounts selected ;; else if no accounts selected
(gnc:html-document-add-object! (gnc:html-document-add-object!
document document
(gnc:html-make-no-account-warning report-title))) (gnc:html-make-no-account-warning
report-title (gnc:report-id report-obj))))
document)) document))

View File

@ -342,12 +342,14 @@
(gnc:html-document-add-object! document chart) (gnc:html-document-add-object! document chart)
(gnc:html-document-add-object! (gnc:html-document-add-object!
document document
(gnc:html-make-empty-data-warning report-title)))) (gnc:html-make-empty-data-warning
report-title (gnc:report-id report-obj)))))
;; else no accounts selected ;; else no accounts selected
(gnc:html-document-add-object! (gnc:html-document-add-object!
document document
(gnc:html-make-no-account-warning report-title))) (gnc:html-make-no-account-warning
report-title (gnc:report-id report-obj))))
document)) document))

View File

@ -204,7 +204,9 @@
;; error condition: no accounts specified ;; error condition: no accounts specified
(gnc:html-document-add-object! (gnc:html-document-add-object!
doc (gnc:html-make-no-account-warning report-title))) doc
(gnc:html-make-no-account-warning
report-title (gnc:report-id report-obj))))
doc)) doc))
(gnc:define-report (gnc:define-report

View File

@ -225,8 +225,9 @@
;if no accounts selected. ;if no accounts selected.
(gnc:html-document-add-object! (gnc:html-document-add-object!
document (gnc:html-make-no-account-warning report-title))) document
(gnc:html-make-no-account-warning
report-title (gnc:report-id report-obj))))
document)) document))

View File

@ -1054,13 +1054,13 @@ Credit Card, and Income accounts")))))
name-sortkey name-subtotal name-date-subtotal name-sortkey name-subtotal name-date-subtotal
3 2)) 3 2))
(define (get-other-account-names account-list) (define (get-other-account-names account-list)
( map (lambda (acct) (gnc:account-get-full-name acct)) account-list)) ( map (lambda (acct) (gnc:account-get-full-name acct)) account-list))
(let ((document (gnc:make-html-document)) (let ((document (gnc:make-html-document))
(c_account_1 (opt-val gnc:pagename-accounts "Report Accounts")) (c_account_1 (opt-val gnc:pagename-accounts "Report Accounts"))
(c_account_2 (opt-val gnc:pagename-accounts "Filter Accounts")) (c_account_2 (opt-val gnc:pagename-accounts "Filter Accounts"))
(filter-mode (opt-val gnc:pagename-accounts "Filter Type")) (filter-mode (opt-val gnc:pagename-accounts "Filter Type"))
(begindate (gnc:timepair-start-day-time (begindate (gnc:timepair-start-day-time
(gnc:date-option-absolute-time (gnc:date-option-absolute-time
(opt-val gnc:pagename-general "From")))) (opt-val gnc:pagename-general "From"))))
@ -1078,10 +1078,10 @@ Credit Card, and Income accounts")))))
(splits '()) (splits '())
(query (gnc:malloc-query))) (query (gnc:malloc-query)))
;;(gnc:warn "accts in trep-renderer:" c_account_1) ;;(gnc:warn "accts in trep-renderer:" c_account_1)
;;(gnc:warn "Report Account names:" (get-other-account-names c_account_1)) ;;(gnc:warn "Report Account names:" (get-other-account-names c_account_1))
(if (not (or (null? c_account_1) (and-map not c_account_1))) (if (not (or (null? c_account_1) (and-map not c_account_1)))
(begin (begin
(gnc:query-set-book query (gnc:get-current-book)) (gnc:query-set-book query (gnc:get-current-book))
;;(gnc:warn "query is:" query) ;;(gnc:warn "query is:" query)
@ -1110,27 +1110,27 @@ Credit Card, and Income accounts")))))
<gnc:Split*>)) <gnc:Split*>))
;;(gnc:warn "Splits in trep-renderer:" splits) ;;(gnc:warn "Splits in trep-renderer:" splits)
;;(gnc:warn "Filter account names:" (get-other-account-names c_account_2)) ;;(gnc:warn "Filter account names:" (get-other-account-names c_account_2))
;;This should probably a cond or a case to allow for different filter types. ;;This should probably a cond or a case to allow for different filter types.
;;(gnc:warn "Filter Mode: " filter-mode) ;;(gnc:warn "Filter Mode: " filter-mode)
(if (string=? filter-mode "include") (if (string=? filter-mode "include")
(begin (begin
;;(gnc:warn "Including Filter Accounts") ;;(gnc:warn "Including Filter Accounts")
(set! splits (filter (lambda (split) (set! splits (filter (lambda (split)
(member (gnc:split-get-corr-account-full-name split) (get-other-account-names c_account_2))) (member (gnc:split-get-corr-account-full-name split) (get-other-account-names c_account_2)))
splits)) splits))
)
) )
)
(if (string=? filter-mode "exclude") (if (string=? filter-mode "exclude")
(begin (begin
;;(gnc:warn "Excluding Filter Accounts") ;;(gnc:warn "Excluding Filter Accounts")
(set! splits (filter (lambda (split) (set! splits (filter (lambda (split)
(not (member (gnc:split-get-corr-account-full-name split) (get-other-account-names c_account_2)))) (not (member (gnc:split-get-corr-account-full-name split) (get-other-account-names c_account_2))))
splits)) splits))
)
) )
)
(if (not (null? splits)) (if (not (null? splits))
(let ((table (let ((table
@ -1182,7 +1182,8 @@ match the given time interval and account selection.")))
(gnc:html-document-add-object! (gnc:html-document-add-object!
document document
(gnc:html-make-no-account-warning report-title))) (gnc:html-make-no-account-warning
report-title (gnc:report-id report-obj))))
document)) document))