mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Rob Graham Merkel's transaction report patch.
Renames CHANGES to NEWS. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@2252 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
acf0aa1344
commit
897c354024
10
ChangeLog
10
ChangeLog
@ -1,3 +1,8 @@
|
|||||||
|
2000-05-01 Robert Graham Merkel <rgmerk@mira.net>
|
||||||
|
|
||||||
|
* src/scm/report/transaction-report-2.scm : Added i18n and
|
||||||
|
optional two-columns printout to the new transaction report.
|
||||||
|
|
||||||
2000-04-30 Dave Peticolas <peticola@cs.ucdavis.edu>
|
2000-04-30 Dave Peticolas <peticola@cs.ucdavis.edu>
|
||||||
|
|
||||||
* src/engine/Queue.c (xaccQueueGetShares): computation should start
|
* src/engine/Queue.c (xaccQueueGetShares): computation should start
|
||||||
@ -44,6 +49,11 @@
|
|||||||
* src/gnome/reconcile-list.c (gnc_reconcile_list_fill): debits are
|
* src/gnome/reconcile-list.c (gnc_reconcile_list_fill): debits are
|
||||||
positive, credits are negative.
|
positive, credits are negative.
|
||||||
|
|
||||||
|
2000-04-28 Robert Graham Merkel <rgmerk@mira.net>
|
||||||
|
|
||||||
|
* src/scm/html-generator.scm (html-table-do-entry): Bryan Larsen's
|
||||||
|
fix for null (#f) generators.
|
||||||
|
|
||||||
2000-04-28 Dave Peticolas <peticola@cs.ucdavis.edu>
|
2000-04-28 Dave Peticolas <peticola@cs.ucdavis.edu>
|
||||||
|
|
||||||
* src/gnome/option-util.c: redid the option database storage as
|
* src/gnome/option-util.c: redid the option database storage as
|
||||||
|
@ -173,7 +173,7 @@ install:
|
|||||||
$(INSTALL_DATA) doc/*.txt ${GNC_DOCDIR}
|
$(INSTALL_DATA) doc/*.txt ${GNC_DOCDIR}
|
||||||
$(INSTALL_DATA) doc/INSTALL ${GNC_DOCDIR}
|
$(INSTALL_DATA) doc/INSTALL ${GNC_DOCDIR}
|
||||||
$(INSTALL_DATA) TODO ${GNC_DOCDIR}
|
$(INSTALL_DATA) TODO ${GNC_DOCDIR}
|
||||||
$(INSTALL_DATA) CHANGES ${GNC_DOCDIR}
|
$(INSTALL_DATA) NEWS ${GNC_DOCDIR}
|
||||||
|
|
||||||
$(INSTALL_DATA) doc/examples/*.xac ${GNC_DOCDIR}/examples
|
$(INSTALL_DATA) doc/examples/*.xac ${GNC_DOCDIR}/examples
|
||||||
$(INSTALL_DATA) doc/examples/*.qif ${GNC_DOCDIR}/examples
|
$(INSTALL_DATA) doc/examples/*.qif ${GNC_DOCDIR}/examples
|
||||||
|
@ -596,6 +596,16 @@ budget_name_entry_changed(GtkEditable *editable, BudgetDialog *bd)
|
|||||||
budget_changed(bd);
|
budget_changed(bd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
entry_type_menu_changed(GtkButton *button, BudgetDialog *bd)
|
||||||
|
{
|
||||||
|
if (bd->ignore_changes)
|
||||||
|
return;
|
||||||
|
|
||||||
|
budget_changed(bd);
|
||||||
|
bd->entry_changed = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
allow_edits(BudgetDialog *bd, gboolean allow_edits)
|
allow_edits(BudgetDialog *bd, gboolean allow_edits)
|
||||||
{
|
{
|
||||||
@ -746,6 +756,13 @@ on_budget_entry_tree_scroll_vertical (GtkCList *clist,
|
|||||||
select_node(bd, node);
|
select_node(bd, node);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
connect_entry_type_menu_item(GtkWidget *item, gpointer data)
|
||||||
|
{
|
||||||
|
gtk_signal_connect(GTK_OBJECT(item), "activate",
|
||||||
|
GTK_SIGNAL_FUNC(entry_type_menu_changed), data);
|
||||||
|
}
|
||||||
|
|
||||||
BudgetDialog *
|
BudgetDialog *
|
||||||
gnc_ui_budget_dialog_create(SCM budget, SCM apply_func)
|
gnc_ui_budget_dialog_create(SCM budget, SCM apply_func)
|
||||||
{
|
{
|
||||||
@ -754,6 +771,7 @@ gnc_ui_budget_dialog_create(SCM budget, SCM apply_func)
|
|||||||
GtkWidget *button;
|
GtkWidget *button;
|
||||||
GtkWidget *arrow;
|
GtkWidget *arrow;
|
||||||
GtkWidget *box;
|
GtkWidget *box;
|
||||||
|
GtkWidget *menu;
|
||||||
|
|
||||||
initialize_getters();
|
initialize_getters();
|
||||||
initialize_preds();
|
initialize_preds();
|
||||||
@ -781,6 +799,9 @@ gnc_ui_budget_dialog_create(SCM budget, SCM apply_func)
|
|||||||
GTK_SIGNAL_FUNC(entry_description_entry_changed), bd);
|
GTK_SIGNAL_FUNC(entry_description_entry_changed), bd);
|
||||||
|
|
||||||
bd->entry_type_menu = gtk_object_get_data(bdo, "entry_type_menu");
|
bd->entry_type_menu = gtk_object_get_data(bdo, "entry_type_menu");
|
||||||
|
menu = gtk_option_menu_get_menu(GTK_OPTION_MENU(bd->entry_type_menu));
|
||||||
|
gtk_container_forall(GTK_CONTAINER(menu), connect_entry_type_menu_item, bd);
|
||||||
|
|
||||||
bd->entry_frame = gtk_object_get_data(bdo, "entry_frame");
|
bd->entry_frame = gtk_object_get_data(bdo, "entry_frame");
|
||||||
|
|
||||||
bd->subentry_description_entry =
|
bd->subentry_description_entry =
|
||||||
|
@ -311,7 +311,8 @@
|
|||||||
(define (html-table-do-entry line specs)
|
(define (html-table-do-entry line specs)
|
||||||
(map
|
(map
|
||||||
(lambda (spec)
|
(lambda (spec)
|
||||||
(cond ((report-spec-get-get-value-proc spec)
|
(cond ((and (report-spec-get-get-value-proc spec)
|
||||||
|
(report-spec-get-html-proc spec))
|
||||||
((report-spec-get-html-proc spec)
|
((report-spec-get-html-proc spec)
|
||||||
((report-spec-get-get-value-proc spec) line)))
|
((report-spec-get-get-value-proc spec) line)))
|
||||||
(else #f)))
|
(else #f)))
|
||||||
|
@ -10,6 +10,8 @@
|
|||||||
(gnc:depend "html-generator.scm")
|
(gnc:depend "html-generator.scm")
|
||||||
|
|
||||||
(let ()
|
(let ()
|
||||||
|
(define string-db (gnc:make-string-database))
|
||||||
|
|
||||||
|
|
||||||
(define (make-split-report-spec options)
|
(define (make-split-report-spec options)
|
||||||
(remove-if-not
|
(remove-if-not
|
||||||
@ -19,7 +21,7 @@
|
|||||||
(gnc:option-value
|
(gnc:option-value
|
||||||
(gnc:lookup-option options "Display" "Date"))
|
(gnc:lookup-option options "Display" "Date"))
|
||||||
(make-report-spec
|
(make-report-spec
|
||||||
"Date"
|
(string-db 'lookup 'date-string)
|
||||||
(lambda (split)
|
(lambda (split)
|
||||||
(gnc:transaction-get-date-posted
|
(gnc:transaction-get-date-posted
|
||||||
(gnc:split-get-parent split)))
|
(gnc:split-get-parent split)))
|
||||||
@ -32,12 +34,12 @@
|
|||||||
#f ; subs-list-proc
|
#f ; subs-list-proc
|
||||||
#f)
|
#f)
|
||||||
#f)
|
#f)
|
||||||
|
|
||||||
(if
|
(if
|
||||||
(gnc:option-value
|
(gnc:option-value
|
||||||
(gnc:lookup-option options "Display" "Num"))
|
(gnc:lookup-option options "Display" "Num"))
|
||||||
(make-report-spec
|
(make-report-spec
|
||||||
"Num"
|
(string-db 'lookup 'num-string)
|
||||||
(lambda (split)
|
(lambda (split)
|
||||||
(gnc:transaction-get-num
|
(gnc:transaction-get-num
|
||||||
(gnc:split-get-parent split)))
|
(gnc:split-get-parent split)))
|
||||||
@ -54,7 +56,7 @@
|
|||||||
(gnc:option-value
|
(gnc:option-value
|
||||||
(gnc:lookup-option options "Display" "Description"))
|
(gnc:lookup-option options "Display" "Description"))
|
||||||
(make-report-spec
|
(make-report-spec
|
||||||
"Description"
|
(string-db 'lookup 'desc-string)
|
||||||
(lambda (split)
|
(lambda (split)
|
||||||
(gnc:transaction-get-description
|
(gnc:transaction-get-description
|
||||||
(gnc:split-get-parent split)))
|
(gnc:split-get-parent split)))
|
||||||
@ -71,7 +73,7 @@
|
|||||||
(gnc:option-value
|
(gnc:option-value
|
||||||
(gnc:lookup-option options "Display" "Memo"))
|
(gnc:lookup-option options "Display" "Memo"))
|
||||||
(make-report-spec
|
(make-report-spec
|
||||||
"Memo"
|
(string-db 'lookup 'memo-string)
|
||||||
gnc:split-get-memo
|
gnc:split-get-memo
|
||||||
(lambda (memo) (html-left-cell (html-string memo)))
|
(lambda (memo) (html-left-cell (html-string memo)))
|
||||||
#f ; total-proc
|
#f ; total-proc
|
||||||
@ -87,7 +89,7 @@
|
|||||||
(gnc:option-value
|
(gnc:option-value
|
||||||
(gnc:lookup-option options "Display" "Account"))
|
(gnc:lookup-option options "Display" "Account"))
|
||||||
(make-report-spec
|
(make-report-spec
|
||||||
"Account"
|
(string-db 'lookup 'acc-string)
|
||||||
(lambda (split)
|
(lambda (split)
|
||||||
(gnc:account-get-full-name
|
(gnc:account-get-full-name
|
||||||
(gnc:split-get-account split)))
|
(gnc:split-get-account split)))
|
||||||
@ -108,7 +110,7 @@
|
|||||||
(gnc:option-value
|
(gnc:option-value
|
||||||
(gnc:lookup-option options "Display" "Other Account"))
|
(gnc:lookup-option options "Display" "Other Account"))
|
||||||
(make-report-spec
|
(make-report-spec
|
||||||
"Other Account"
|
(string-db 'lookup 'other-acc-string)
|
||||||
(lambda (split)
|
(lambda (split)
|
||||||
(let ((others (gnc:split-get-other-splits split)))
|
(let ((others (gnc:split-get-other-splits split)))
|
||||||
(if (null? others)
|
(if (null? others)
|
||||||
@ -125,10 +127,10 @@
|
|||||||
#f)
|
#f)
|
||||||
|
|
||||||
(if
|
(if
|
||||||
(gnc:option-value
|
(eq? (gnc:option-value
|
||||||
(gnc:lookup-option options "Display" "Amount"))
|
(gnc:lookup-option options "Display" "Amount")) 'single)
|
||||||
(make-report-spec
|
(make-report-spec
|
||||||
"Amount"
|
(string-db 'lookup 'amount-string)
|
||||||
gnc:split-get-value
|
gnc:split-get-value
|
||||||
(lambda (value) (html-right-cell (html-currency value)))
|
(lambda (value) (html-right-cell (html-currency value)))
|
||||||
+ ; total-proc
|
+ ; total-proc
|
||||||
@ -141,6 +143,69 @@
|
|||||||
(map gnc:split-get-value (gnc:split-get-other-splits split)))
|
(map gnc:split-get-value (gnc:split-get-other-splits split)))
|
||||||
(lambda (value)
|
(lambda (value)
|
||||||
(html-right-cell (html-ital (html-currency value)))))
|
(html-right-cell (html-ital (html-currency value)))))
|
||||||
|
#f)
|
||||||
|
|
||||||
|
(if
|
||||||
|
(eq? (gnc:option-value
|
||||||
|
(gnc:lookup-option options "Display" "Amount")) 'double)
|
||||||
|
(make-report-spec
|
||||||
|
(string-db 'lookup 'credit-string)
|
||||||
|
(lambda (split) (max 0 (gnc:split-get-value split)))
|
||||||
|
(lambda (value)
|
||||||
|
(if (> value 0) (html-right-cell (html-currency value))
|
||||||
|
(html-right-cell (html-string " "))))
|
||||||
|
+ ; total-proc
|
||||||
|
(lambda (value)
|
||||||
|
(html-right-cell (html-strong (html-currency value))))
|
||||||
|
(lambda (value)
|
||||||
|
(html-right-cell (html-strong (html-currency value))))
|
||||||
|
#t ; first-last-preference
|
||||||
|
(lambda (split)
|
||||||
|
(map gnc:split-get-value (gnc:split-get-other-splits split)))
|
||||||
|
(lambda (value)
|
||||||
|
(if (> value 0) (html-right-cell (html-ital (html-currency value)))
|
||||||
|
(html-right-cell (html-ital (html-string " "))))))
|
||||||
|
#f)
|
||||||
|
|
||||||
|
(if
|
||||||
|
(eq? (gnc:option-value
|
||||||
|
(gnc:lookup-option options "Display" "Amount")) 'double)
|
||||||
|
(make-report-spec
|
||||||
|
(string-db 'lookup -debit-string)
|
||||||
|
(lambda (split) (min 0 (gnc:split-get-value split)))
|
||||||
|
(lambda (value)
|
||||||
|
(if (< value 0) (html-right-cell (html-currency value))
|
||||||
|
(html-right-cell (html-string " "))))
|
||||||
|
+ ; total-proc
|
||||||
|
(lambda (value)
|
||||||
|
(html-right-cell (html-strong (html-currency value))))
|
||||||
|
(lambda (value)
|
||||||
|
(html-right-cell (html-strong (html-currency value))))
|
||||||
|
#t ; first-last-preference
|
||||||
|
(lambda (split)
|
||||||
|
(map gnc:split-get-value (gnc:split-get-other-splits split)))
|
||||||
|
(lambda (value)
|
||||||
|
(if (< value 0) (html-right-cell (html-ital (html-currency value)))
|
||||||
|
(html-right-cell (html-ital (html-string " "))))))
|
||||||
|
#f)
|
||||||
|
|
||||||
|
(if
|
||||||
|
(eq? (gnc:option-value
|
||||||
|
(gnc:lookup-option options "Display" "Amount")) 'double)
|
||||||
|
(make-report-spec
|
||||||
|
(string-db 'lookup 'total-string)
|
||||||
|
gnc:split-get-value
|
||||||
|
;(lambda (value) (html-right-cell (html-currency value)))
|
||||||
|
;(lambda (value) (html-right-cell (html-string "hello")))
|
||||||
|
#f
|
||||||
|
+ ; total-proc
|
||||||
|
(lambda (value)
|
||||||
|
(html-right-cell (html-strong (html-currency value))))
|
||||||
|
(lambda (value)
|
||||||
|
(html-right-cell (html-strong (html-currency value))))
|
||||||
|
#t ; first-last-preference
|
||||||
|
#f ;
|
||||||
|
#f)
|
||||||
#f))))
|
#f))))
|
||||||
|
|
||||||
(define (split-report-get-sort-spec-entry key ascending?)
|
(define (split-report-get-sort-spec-entry key ascending?)
|
||||||
@ -266,7 +331,7 @@
|
|||||||
|
|
||||||
((none) #f)
|
((none) #f)
|
||||||
(else (gnc:error "invalid sort argument"))))
|
(else (gnc:error "invalid sort argument"))))
|
||||||
|
|
||||||
|
|
||||||
(define (make-split-list account split-filter-pred)
|
(define (make-split-list account split-filter-pred)
|
||||||
(let ((num-splits (gnc:account-get-split-count account)))
|
(let ((num-splits (gnc:account-get-split-count account)))
|
||||||
@ -352,7 +417,7 @@
|
|||||||
#(single
|
#(single
|
||||||
"Single"
|
"Single"
|
||||||
"Display 1 line"))))
|
"Display 1 line"))))
|
||||||
|
|
||||||
|
|
||||||
(let ((key-choice-list
|
(let ((key-choice-list
|
||||||
(list #(account
|
(list #(account
|
||||||
@ -408,7 +473,7 @@
|
|||||||
(list
|
(list
|
||||||
#(ascend "Ascending" "smallest to largest, earliest to latest")
|
#(ascend "Ascending" "smallest to largest, earliest to latest")
|
||||||
#(descend "Descending" "largest to smallest, latest to earliest"))))
|
#(descend "Descending" "largest to smallest, latest to earliest"))))
|
||||||
|
|
||||||
(gnc:register-trep-option
|
(gnc:register-trep-option
|
||||||
(gnc:make-multichoice-option
|
(gnc:make-multichoice-option
|
||||||
"Sorting" "Secondary Key"
|
"Sorting" "Secondary Key"
|
||||||
@ -454,12 +519,16 @@
|
|||||||
(gnc:register-trep-option
|
(gnc:register-trep-option
|
||||||
(gnc:make-simple-boolean-option
|
(gnc:make-simple-boolean-option
|
||||||
"Display" "Other Account"
|
"Display" "Other Account"
|
||||||
"h" "Display the other account? (if this is a split transaction, this parameter is guessed." #f))
|
"h" "Display the other account? (if this is a split transaction, this parameter is guessed)." #f))
|
||||||
|
|
||||||
(gnc:register-trep-option
|
(gnc:register-trep-option
|
||||||
(gnc:make-simple-boolean-option
|
(gnc:make-multichoice-option
|
||||||
"Display" "Amount"
|
"Display" "Amount"
|
||||||
"i" "Display the amount?" #t))
|
"i" "Display the amount?"
|
||||||
|
'single
|
||||||
|
(list #(none "None" "No amount display")
|
||||||
|
#(single "Single" "Single Column Display")
|
||||||
|
#(double "Double" "Two Column Display"))))
|
||||||
|
|
||||||
(gnc:register-trep-option
|
(gnc:register-trep-option
|
||||||
(gnc:make-simple-boolean-option
|
(gnc:make-simple-boolean-option
|
||||||
@ -476,7 +545,7 @@
|
|||||||
|
|
||||||
gnc:*transaction-report-options*)
|
gnc:*transaction-report-options*)
|
||||||
|
|
||||||
(define string-db (gnc:make-string-database))
|
|
||||||
|
|
||||||
(define (gnc:trep-renderer options)
|
(define (gnc:trep-renderer options)
|
||||||
(let* ((begindate (gnc:lookup-option options "Report Options" "From"))
|
(let* ((begindate (gnc:lookup-option options "Report Options" "From"))
|
||||||
@ -520,7 +589,6 @@
|
|||||||
|
|
||||||
(list
|
(list
|
||||||
(html-start-document-title (string-db 'lookup 'title))
|
(html-start-document-title (string-db 'lookup 'title))
|
||||||
(html-para "Transaction report using the new reporting framework in html-generator.scm")
|
|
||||||
(html-start-table)
|
(html-start-table)
|
||||||
(if
|
(if
|
||||||
(gnc:option-value
|
(gnc:option-value
|
||||||
@ -548,10 +616,21 @@
|
|||||||
(html-end-table)
|
(html-end-table)
|
||||||
(html-end-document))))
|
(html-end-document))))
|
||||||
|
|
||||||
|
|
||||||
(string-db 'store 'title "Transaction Report")
|
(string-db 'store 'title "Transaction Report")
|
||||||
|
(string-db 'store 'date-string "Date")
|
||||||
|
(string-db 'store 'num-string "Num")
|
||||||
|
(string-db 'store 'desc-string "Description")
|
||||||
|
(string-db 'store 'memo-string "Memo")
|
||||||
|
(string-db 'store 'acc-string "Account")
|
||||||
|
(string-db 'store 'other-acc-string "Other Account")
|
||||||
|
(string-db 'store 'amount-string "Amount")
|
||||||
|
(string-db 'store 'debit-string "Debit")
|
||||||
|
(string-db 'store 'credit-string "Credit")
|
||||||
|
(string-db 'store 'total-string "Total")
|
||||||
|
|
||||||
(gnc:define-report
|
(gnc:define-report
|
||||||
'version 1
|
'version 1
|
||||||
'name "Transactions 2"
|
'name (string-db 'lookup 'title)
|
||||||
'options-generator trep-options-generator
|
'options-generator trep-options-generator
|
||||||
'renderer gnc:trep-renderer))
|
'renderer gnc:trep-renderer))
|
||||||
|
Loading…
Reference in New Issue
Block a user