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:
Dave Peticolas 2000-05-01 06:14:17 +00:00
parent acf0aa1344
commit 897c354024
6 changed files with 132 additions and 21 deletions

View File

@ -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>
* src/engine/Queue.c (xaccQueueGetShares): computation should start
@ -44,6 +49,11 @@
* src/gnome/reconcile-list.c (gnc_reconcile_list_fill): debits are
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>
* src/gnome/option-util.c: redid the option database storage as

View File

@ -173,7 +173,7 @@ install:
$(INSTALL_DATA) doc/*.txt ${GNC_DOCDIR}
$(INSTALL_DATA) doc/INSTALL ${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/*.qif ${GNC_DOCDIR}/examples

View File

View File

@ -596,6 +596,16 @@ budget_name_entry_changed(GtkEditable *editable, BudgetDialog *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
allow_edits(BudgetDialog *bd, gboolean allow_edits)
{
@ -746,6 +756,13 @@ on_budget_entry_tree_scroll_vertical (GtkCList *clist,
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 *
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 *arrow;
GtkWidget *box;
GtkWidget *menu;
initialize_getters();
initialize_preds();
@ -781,6 +799,9 @@ gnc_ui_budget_dialog_create(SCM budget, SCM apply_func)
GTK_SIGNAL_FUNC(entry_description_entry_changed), bd);
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->subentry_description_entry =

View File

@ -311,7 +311,8 @@
(define (html-table-do-entry line specs)
(map
(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-get-value-proc spec) line)))
(else #f)))

View File

@ -10,6 +10,8 @@
(gnc:depend "html-generator.scm")
(let ()
(define string-db (gnc:make-string-database))
(define (make-split-report-spec options)
(remove-if-not
@ -19,7 +21,7 @@
(gnc:option-value
(gnc:lookup-option options "Display" "Date"))
(make-report-spec
"Date"
(string-db 'lookup 'date-string)
(lambda (split)
(gnc:transaction-get-date-posted
(gnc:split-get-parent split)))
@ -37,7 +39,7 @@
(gnc:option-value
(gnc:lookup-option options "Display" "Num"))
(make-report-spec
"Num"
(string-db 'lookup 'num-string)
(lambda (split)
(gnc:transaction-get-num
(gnc:split-get-parent split)))
@ -54,7 +56,7 @@
(gnc:option-value
(gnc:lookup-option options "Display" "Description"))
(make-report-spec
"Description"
(string-db 'lookup 'desc-string)
(lambda (split)
(gnc:transaction-get-description
(gnc:split-get-parent split)))
@ -71,7 +73,7 @@
(gnc:option-value
(gnc:lookup-option options "Display" "Memo"))
(make-report-spec
"Memo"
(string-db 'lookup 'memo-string)
gnc:split-get-memo
(lambda (memo) (html-left-cell (html-string memo)))
#f ; total-proc
@ -87,7 +89,7 @@
(gnc:option-value
(gnc:lookup-option options "Display" "Account"))
(make-report-spec
"Account"
(string-db 'lookup 'acc-string)
(lambda (split)
(gnc:account-get-full-name
(gnc:split-get-account split)))
@ -108,7 +110,7 @@
(gnc:option-value
(gnc:lookup-option options "Display" "Other Account"))
(make-report-spec
"Other Account"
(string-db 'lookup 'other-acc-string)
(lambda (split)
(let ((others (gnc:split-get-other-splits split)))
(if (null? others)
@ -125,10 +127,10 @@
#f)
(if
(gnc:option-value
(gnc:lookup-option options "Display" "Amount"))
(eq? (gnc:option-value
(gnc:lookup-option options "Display" "Amount")) 'single)
(make-report-spec
"Amount"
(string-db 'lookup 'amount-string)
gnc:split-get-value
(lambda (value) (html-right-cell (html-currency value)))
+ ; total-proc
@ -141,6 +143,69 @@
(map gnc:split-get-value (gnc:split-get-other-splits split)))
(lambda (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))))
(define (split-report-get-sort-spec-entry key ascending?)
@ -454,12 +519,16 @@
(gnc:register-trep-option
(gnc:make-simple-boolean-option
"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:make-simple-boolean-option
(gnc:make-multichoice-option
"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:make-simple-boolean-option
@ -476,7 +545,7 @@
gnc:*transaction-report-options*)
(define string-db (gnc:make-string-database))
(define (gnc:trep-renderer options)
(let* ((begindate (gnc:lookup-option options "Report Options" "From"))
@ -520,7 +589,6 @@
(list
(html-start-document-title (string-db 'lookup 'title))
(html-para "Transaction report using the new reporting framework in html-generator.scm")
(html-start-table)
(if
(gnc:option-value
@ -548,10 +616,21 @@
(html-end-table)
(html-end-document))))
(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
'version 1
'name "Transactions 2"
'name (string-db 'lookup 'title)
'options-generator trep-options-generator
'renderer gnc:trep-renderer))