mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Merge branch 'scheme-progress-1' of https://github.com/christopherlam/gnucash into unstable
This commit is contained in:
commit
dd0553af6a
@ -2,7 +2,6 @@
|
||||
;; daily-reports.scm: reports based on the day of the week
|
||||
;;
|
||||
;; Copyright (C) 2003, Andy Wingo <wingo at pobox dot com>
|
||||
;; Christopher Lam upgrade to time64 (2017)
|
||||
;;
|
||||
;; based on account-piecharts.scm by Robert Merkel (rgmerk@mira.net)
|
||||
;; and Christian Stimming <stimming@tu-harburg.de> with
|
||||
|
@ -5,7 +5,6 @@
|
||||
;; Copyright 2004 David Montenegro <sunrise2000@comcast.net>
|
||||
;; Copyright 2001 Christian Stimming <stimming@tu-harburg.de>
|
||||
;; Copyright 2000-2001 Bill Gribble <grib@gnumatic.com>
|
||||
;; Copyright 2017 Christopher Lam upgrade to time64
|
||||
;;
|
||||
;; This program is free software; you can redistribute it and/or
|
||||
;; modify it under the terms of the GNU General Public License as
|
||||
|
@ -318,25 +318,30 @@ in the Options panel."))
|
||||
(cons 'tip (_ "Show both (and include void transactions in totals)."))))))
|
||||
|
||||
(define reconcile-status-list
|
||||
;; value will be either #f to disable reconciled-status filter
|
||||
;; or a list of xaccSplitGetReconcile values. e.g. value can
|
||||
;; be '(#\c #\y) to retrieve list of cleared and reconciled splits.
|
||||
(list
|
||||
(cons #f (list
|
||||
(cons 'text (_ "All"))
|
||||
(cons 'tip (_ "Show All Transactions"))))
|
||||
(cons 'all
|
||||
(list
|
||||
(cons 'text (_ "All"))
|
||||
(cons 'tip (_ "Show All Transactions"))
|
||||
(cons 'filter-types #f)))
|
||||
|
||||
(cons '(#\n) (list
|
||||
(cons 'text (_ "Unreconciled"))
|
||||
(cons 'tip (_ "Unreconciled only"))))
|
||||
(cons 'unreconciled
|
||||
(list
|
||||
(cons 'text (_ "Unreconciled"))
|
||||
(cons 'tip (_ "Unreconciled only"))
|
||||
(cons 'filter-types (list #\n))))
|
||||
|
||||
(cons '(#\c) (list
|
||||
(cons 'text (_ "Cleared"))
|
||||
(cons 'tip (_ "Cleared only"))))
|
||||
(cons 'cleared
|
||||
(list
|
||||
(cons 'text (_ "Cleared"))
|
||||
(cons 'tip (_ "Cleared only"))
|
||||
(cons 'filter-types (list #\c))))
|
||||
|
||||
(cons '(#\y) (list
|
||||
(cons 'text (_ "Reconciled"))
|
||||
(cons 'tip (_ "Reconciled only"))))))
|
||||
(cons 'reconciled
|
||||
(list
|
||||
(cons 'text (_ "Reconciled"))
|
||||
(cons 'tip (_ "Reconciled only"))
|
||||
(cons 'filter-types (list #\y))))))
|
||||
|
||||
|
||||
(define ascending-list
|
||||
@ -460,17 +465,17 @@ Credit Card, and Income accounts."))
|
||||
(gnc:make-multichoice-option
|
||||
gnc:pagename-general optname-infobox-display
|
||||
"h" (_ "Add summary of options.")
|
||||
'(no-match)
|
||||
'no-match
|
||||
;; This is an alist of conditions for displaying the infobox
|
||||
;; 'no-match for empty-report
|
||||
;; 'match for generated report
|
||||
(list (vector '(no-match)
|
||||
(list (vector 'no-match
|
||||
(_ "If no transactions matched")
|
||||
(_ "Display summary if no transactions were matched."))
|
||||
(vector '(no-match match)
|
||||
(vector 'always
|
||||
(_ "Always")
|
||||
(_ "Always display summary."))
|
||||
(vector '()
|
||||
(vector 'never
|
||||
(_ "Never")
|
||||
(_ "Disable report summary.")))))
|
||||
|
||||
@ -515,7 +520,7 @@ tags within description, notes or memo. ")
|
||||
(gnc:make-multichoice-option
|
||||
pagename-filter optname-reconcile-status
|
||||
"j1" (_ "Filter by reconcile status.")
|
||||
#f
|
||||
'all
|
||||
(keylist->vectorlist reconcile-status-list)))
|
||||
|
||||
(gnc:register-trep-option
|
||||
@ -1669,7 +1674,9 @@ tags within description, notes or memo. ")
|
||||
(transaction-matcher (opt-val pagename-filter optname-transaction-matcher))
|
||||
(transaction-matcher-regexp (and (opt-val pagename-filter optname-transaction-matcher-regex)
|
||||
(make-regexp transaction-matcher)))
|
||||
(reconcile-status-filter (opt-val pagename-filter optname-reconcile-status))
|
||||
(reconcile-status-filter (keylist-get-info reconcile-status-list
|
||||
(opt-val pagename-filter optname-reconcile-status)
|
||||
'filter-types))
|
||||
(report-title (opt-val gnc:pagename-general gnc:optname-reportname))
|
||||
(primary-key (opt-val pagename-sorting optname-prime-sortkey))
|
||||
(primary-order (opt-val pagename-sorting optname-prime-sortorder))
|
||||
@ -1744,21 +1751,19 @@ tags within description, notes or memo. ")
|
||||
;; error condition: no accounts specified or obtained after filtering
|
||||
(begin
|
||||
|
||||
;; error condition: no accounts specified
|
||||
(begin
|
||||
(gnc:html-document-add-object!
|
||||
document
|
||||
(gnc:html-make-no-account-warning
|
||||
report-title (gnc:report-id report-obj)))
|
||||
|
||||
;; if an empty-report-message is passed by a derived report to
|
||||
;; the renderer, display it here.
|
||||
(if empty-report-message
|
||||
(gnc:html-document-add-object!
|
||||
document
|
||||
(gnc:html-make-no-account-warning report-title (gnc:report-id report-obj)))
|
||||
empty-report-message))
|
||||
|
||||
;; if an empty-report-message is passed by a derived report to
|
||||
;; the renderer, display it here.
|
||||
(if empty-report-message
|
||||
(gnc:html-document-add-object!
|
||||
document
|
||||
empty-report-message)))
|
||||
|
||||
(if (member 'no-match infobox-display)
|
||||
(if (memq infobox-display '(always no-match))
|
||||
(gnc:html-document-add-object!
|
||||
document
|
||||
(gnc:render-options-changed options))))
|
||||
@ -1817,21 +1822,23 @@ tags within description, notes or memo. ")
|
||||
(match? (xaccSplitGetMemo split)))
|
||||
(or (not custom-split-filter) ; #f = ignore custom-split-filter
|
||||
(custom-split-filter split))
|
||||
(or (not reconcile-status-filter) ; #f = ignore next filter
|
||||
(member (xaccSplitGetReconcile split) reconcile-status-filter)))))
|
||||
(or (not reconcile-status-filter) ; #f = ignore reconcile-status-filter
|
||||
(memv (xaccSplitGetReconcile split)
|
||||
reconcile-status-filter)))))
|
||||
splits))
|
||||
|
||||
(if (null? splits)
|
||||
|
||||
;; error condition: no splits found
|
||||
(begin
|
||||
|
||||
(gnc:html-document-add-object!
|
||||
document
|
||||
(gnc:make-html-text
|
||||
(gnc:html-markup-h2 NO-MATCHING-TRANS-HEADER)
|
||||
(gnc:html-markup-p NO-MATCHING-TRANS-TEXT)))
|
||||
(gnc:html-make-generic-warning
|
||||
report-title (gnc:report-id report-obj)
|
||||
NO-MATCHING-TRANS-HEADER NO-MATCHING-TRANS-TEXT))
|
||||
|
||||
(if (member 'no-match infobox-display)
|
||||
(if (memq infobox-display '(always no-match))
|
||||
(gnc:html-document-add-object!
|
||||
document
|
||||
(gnc:render-options-changed options))))
|
||||
@ -1849,7 +1856,7 @@ tags within description, notes or memo. ")
|
||||
(qof-print-date begindate)
|
||||
(qof-print-date enddate)))))
|
||||
|
||||
(if (member 'match infobox-display)
|
||||
(if (eq? infobox-display 'always)
|
||||
(gnc:html-document-add-object!
|
||||
document
|
||||
(gnc:render-options-changed options)))
|
||||
|
@ -91,19 +91,7 @@
|
||||
604800))
|
||||
(begin-string (qof-print-date (+ beginweekt64 345600)))
|
||||
(end-string (qof-print-date (+ beginweekt64 864000))))
|
||||
(format #f (_ "~s to ~s") begin-string end-string)))
|
||||
|
||||
; (let ((begin-string (qof-print-date
|
||||
; (+ (* (gnc:date-get-week
|
||||
; (gnc:time64-start-day-time
|
||||
; (gnc-mktime datevec)))
|
||||
; 604800) 345600)))
|
||||
; (end-string (qof-print-date
|
||||
; (+ (* (gnc:date-get-week
|
||||
; (gnc:time64-start-day-time
|
||||
; (gnc-mktime datevec)))
|
||||
; 604800) 864000))))
|
||||
; (format #f (_ "~s to ~s") begin-string end-string)))
|
||||
(format #f (_ "~a to ~a") begin-string end-string)))
|
||||
|
||||
;; is leap year?
|
||||
(define (gnc:leap-year? year)
|
||||
|
@ -2056,8 +2056,8 @@
|
||||
(set! row-contents (cons return-string row-contents)))))
|
||||
(gnc:options-for-each disp-option-if-changed options)
|
||||
(string-append (string-join (reverse row-contents)
|
||||
(if plaintext? "\n" "<br />"))
|
||||
(if plaintext? "\n\n" "<br /><br />"))))
|
||||
(if plaintext? "\n" "<br />\n"))
|
||||
(if plaintext? "\n\n" "<br />\n<br />\n"))))
|
||||
|
||||
(define (gnc:send-options db_handle options)
|
||||
(gnc:options-for-each
|
||||
|
Loading…
Reference in New Issue
Block a user