mirror of
https://github.com/Gnucash/gnucash.git
synced 2026-08-08 20:18:28 -05:00
*** empty log message ***
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@2195 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
@@ -1,5 +1,19 @@
|
||||
2000-04-22 Dave Peticolas <peticola@cs.ucdavis.edu>
|
||||
|
||||
* src/gnome/dialog-options.c: use the default section, if present,
|
||||
when building the dialog.
|
||||
|
||||
* src/scm/options.scm: option databases can have default sections.
|
||||
|
||||
* src/scm/report/transaction-report-2.scm: make the default option
|
||||
section "Report Options". Change "x Display" section to "Display".
|
||||
Add title of report to string database.
|
||||
|
||||
2000-04-21 Dave Peticolas <peticola@cs.ucdavis.edu>
|
||||
|
||||
* src/scm/report/average-balance.scm: comment out query function.
|
||||
This needs to be fixed when the new query api gets g-wrapped.
|
||||
|
||||
* src/engine/Query.c: (xaccFreeQuery): free the split list
|
||||
(xaccQueryGetSplits) handle a null account group
|
||||
|
||||
|
||||
+1318
-934
File diff suppressed because it is too large
Load Diff
+1290
-911
File diff suppressed because it is too large
Load Diff
+49
-3
@@ -6,23 +6,30 @@ _("Status")
|
||||
_("Date")
|
||||
_("Account Name")
|
||||
_("Equity")
|
||||
_("Other Account")
|
||||
_("Account Separator")
|
||||
_("The default background color for splits in multi-line mode and the auto modes")
|
||||
_("Auto-Raise Lists")
|
||||
_("Balance")
|
||||
_("Secondary Sort Order")
|
||||
_("Stock Portfolio Valuation")
|
||||
_("Display the Transactions 2 report.")
|
||||
_("Stock Portfolio")
|
||||
_("Debit Accounts")
|
||||
_("The types of accounts for which balances are sign-reversed")
|
||||
_("The Good")
|
||||
_("The current time is %s.")
|
||||
_("Headers")
|
||||
_("Double Line")
|
||||
_("Display N-1 lines")
|
||||
_("Use a 24 hour (instead of a 12 hour) time format.")
|
||||
_("Income:Salary:Taxable")
|
||||
_("Type of budget report")
|
||||
_("reg_win_width")
|
||||
_("Date (subtotal monthly)")
|
||||
_("Balancing")
|
||||
_("Time")
|
||||
_("Account (w/subtotal)")
|
||||
_("Memo")
|
||||
_("International")
|
||||
_("The background color for an active split in multi-line mode and the auto modes")
|
||||
@@ -67,6 +74,7 @@ _("This page shows your profits and losses.")
|
||||
_("Show Vertical Borders")
|
||||
_("This is a boolean option.")
|
||||
_("_Profit and Loss")
|
||||
_("Display 1 line")
|
||||
_("Background Color")
|
||||
_("The number option formatted as currency is %s.")
|
||||
_("Income/Salary/Taxable")
|
||||
@@ -77,11 +85,14 @@ _("Continental Europe: dd.mm.yyyy")
|
||||
_("account_edit_win_height")
|
||||
_("Import QIF File - Scripted in Guile.")
|
||||
_("Category")
|
||||
_("Single")
|
||||
_("Show Horizontal Borders")
|
||||
_("Sort by check/transaction number")
|
||||
_("The background color for the active transaction in double mode")
|
||||
_("Register Colors")
|
||||
_("The boolean option is %s.")
|
||||
_("Display the memo?")
|
||||
_("(subaccounts)")
|
||||
_("Multi mode default transaction background")
|
||||
_("Double clicking on an account with children expands the account instead of opening a register.")
|
||||
_("The background color for the active transaction in single mode")
|
||||
@@ -89,6 +100,7 @@ _("Loss")
|
||||
_("Credit Accounts")
|
||||
_("Sort by description")
|
||||
_("largest to smallest, latest to earliest")
|
||||
_("Display the description?")
|
||||
_("Secondary Key")
|
||||
_("Save window sizes and positions.")
|
||||
_("Bank")
|
||||
@@ -97,9 +109,12 @@ _("There are no accounts to report on.")
|
||||
_("Report for %s.")
|
||||
_("Reverse Income and Expense Accounts")
|
||||
_("Europe")
|
||||
_("Add in sub-accounts of each selected")
|
||||
_("Day")
|
||||
_("This is for testing. Your reports probably shouldn't have an option like this.")
|
||||
_("Display the headers?")
|
||||
_("Do transaction report on these accounts")
|
||||
_("Reverse Bank, Cash, Asset, Stock, Mutual Fund, Currency, and Expense Accounts")
|
||||
_("Sort and subtotal by account transferred from/to's name")
|
||||
_("Double line mode with a multi-line cursor")
|
||||
_("Single line mode with a multi-line cursor")
|
||||
_("The items selected in the list option are:")
|
||||
@@ -107,18 +122,21 @@ _("Average")
|
||||
_("A_ccount Balance Tracker")
|
||||
_("From")
|
||||
_("Start of reporting period")
|
||||
_("Sort by EXACT entry time")
|
||||
_("Sort by exact entry time")
|
||||
_("account_add_win_width")
|
||||
_("Full")
|
||||
_("The amount of time between data points")
|
||||
_("Upper Limit")
|
||||
_("Multi mode default split background")
|
||||
_("Currency")
|
||||
_("Week")
|
||||
_("Get number at each one of these")
|
||||
_("Crash the report")
|
||||
_("Cash")
|
||||
_("Step Size")
|
||||
_("Hello, World!")
|
||||
_("ISO")
|
||||
_("Display the amount?")
|
||||
_("Multi-Line")
|
||||
_("A report useful for balancing the budget")
|
||||
_("Date Format Display")
|
||||
_("Ending")
|
||||
@@ -137,6 +155,7 @@ _("Transfer from/to")
|
||||
_("Text only")
|
||||
_("Toolbar Buttons")
|
||||
_("Report Items from this date")
|
||||
_("Period")
|
||||
_("The default background color for transactions in multi-line mode and the auto modes")
|
||||
_("Fourth Options")
|
||||
_("Sort by this criterion first")
|
||||
@@ -153,6 +172,7 @@ _("Date Format")
|
||||
_("A list option")
|
||||
_("ISO Standard: yyyy-mm-dd")
|
||||
_("Default Currency")
|
||||
_("largest to t, latest to earliest")
|
||||
_("Do transaction report on this account")
|
||||
_("Recent Price")
|
||||
_("Net Inflow")
|
||||
@@ -175,20 +195,26 @@ _("Ba_lance sheet")
|
||||
_("Help for first option")
|
||||
_("Number")
|
||||
_("Show both icons and text")
|
||||
_("Transfer from/to (w/subtotal)")
|
||||
_("Transactions 2")
|
||||
_("Total")
|
||||
_("Report")
|
||||
_("Notes")
|
||||
_("The number option is %s.")
|
||||
_("The string option is %s.")
|
||||
_("Report style")
|
||||
_("_Reports")
|
||||
_("Single mode active background")
|
||||
_("Register")
|
||||
_("Year")
|
||||
_("Profit and Loss")
|
||||
_("_Transactions 2")
|
||||
_("Month")
|
||||
_("Multi mode active transaction background")
|
||||
_(". (Period)")
|
||||
_("Primary Sort Order")
|
||||
_("Name")
|
||||
_("Display the date?")
|
||||
_("Descending")
|
||||
_("This is a date option")
|
||||
_("Two Week")
|
||||
@@ -203,22 +229,34 @@ _("Order of primary sorting")
|
||||
_("Default Currency For New Accounts")
|
||||
_("Sort by this criterion second")
|
||||
_("true")
|
||||
_("Do not sort")
|
||||
_("Period Ending")
|
||||
_("Income.Salary.Taxable")
|
||||
_("Income")
|
||||
_("Include sub-accounts of all selected accounts")
|
||||
_("Style")
|
||||
_("The Ugly")
|
||||
_("Max")
|
||||
_("Display the other account? (if this is a split transaction, this parameter is guessed.")
|
||||
_("By default, show horizontal borders on the cells.")
|
||||
_("Display the totals?")
|
||||
_(": (Colon)")
|
||||
_("By default, show vertical borders on the cells.")
|
||||
_("Credit")
|
||||
_("Actual")
|
||||
_("Enable EURO support")
|
||||
_("Ascending")
|
||||
_("The Bad")
|
||||
_("Just a Date Option")
|
||||
_("The accounts selected in the account list option are:")
|
||||
_("This is a sample GnuCash report. See the guile (scheme) source code in %s for details on writing your own reports, or extending existing reports.")
|
||||
_("Enables support for the European Union EURO currency")
|
||||
_("Merged")
|
||||
_("The default background color for even rows in single mode")
|
||||
_("The default background color for even rows in double mode")
|
||||
_("Display the account?")
|
||||
_("Display the cheque number?")
|
||||
_("Display N lines")
|
||||
_("Display the Budget report.")
|
||||
_("_Hello, World")
|
||||
_("First Option")
|
||||
@@ -228,8 +266,10 @@ _("account_add_win_height")
|
||||
_("Plot Type")
|
||||
_("Budget")
|
||||
_("Choose whether to display icons, text, or both for toolbar buttons")
|
||||
_("Sort by date & subtotal each year")
|
||||
_("Show text only")
|
||||
_("Icons and Text")
|
||||
_("The type of graph to generate")
|
||||
_("Automatically raise the list of accounts or actions during input.")
|
||||
_("Sort by account transferred from/to's name")
|
||||
_("Net Gain")
|
||||
@@ -258,6 +298,7 @@ _("Icons only")
|
||||
_("Help for third option")
|
||||
_("Default Register Mode")
|
||||
_("Auto Double")
|
||||
_("Lower Limit")
|
||||
_("main_win_width")
|
||||
_("Sort by amount")
|
||||
_("This is an account list option")
|
||||
@@ -267,6 +308,7 @@ _("Profit/Loss")
|
||||
_("Shares")
|
||||
_("Show All Transactions")
|
||||
_("Display the Profit and Loss report.")
|
||||
_("Date (subtotal yearly)")
|
||||
_("Display the Account Balance Tracker report.")
|
||||
_("2Week")
|
||||
_("Nothing")
|
||||
@@ -279,6 +321,7 @@ _("This is a color option")
|
||||
_("QIF File Import (Danger: Unfinished)")
|
||||
_("Make No Plot")
|
||||
_("Bad option")
|
||||
_("Sort by date & subtotal each month")
|
||||
_("Display the Balance sheet report.")
|
||||
_("Display the Account Transactions report.")
|
||||
_("Net")
|
||||
@@ -289,12 +332,15 @@ _("Order of Secondary sorting")
|
||||
_("Help for second option")
|
||||
_("reg_stock_win_width")
|
||||
_("Report items up to and including this date")
|
||||
_("Display")
|
||||
_("Nominal")
|
||||
_("Beginning")
|
||||
_("For help on writing reports, or to contribute your brand new, totally cool report, consult the mailing list %s. For details on subscribing to that list, see %s.")
|
||||
_("The background color for an active transaction in multi-line mode and the auto modes")
|
||||
_("This is a multi choice option.")
|
||||
_("Income & Expense")
|
||||
_("Hello, World")
|
||||
_("Sort & subtotal by account")
|
||||
_("Reverse Credit Card, Liability, Equity, and Income Accounts")
|
||||
_("Stock")
|
||||
_("This is a number option.")
|
||||
|
||||
@@ -1040,7 +1040,7 @@ gnc_options_dialog_add_option(GtkWidget *page,
|
||||
gnc_option_set_ui_widget(option, GTK_BOX(page), tooltips);
|
||||
}
|
||||
|
||||
static void
|
||||
static gint
|
||||
gnc_options_dialog_append_page(GnomePropertyBox *propertybox,
|
||||
GNCOptionSection *section,
|
||||
GtkTooltips *tooltips)
|
||||
@@ -1050,11 +1050,12 @@ gnc_options_dialog_append_page(GnomePropertyBox *propertybox,
|
||||
GtkWidget *page_content_box;
|
||||
gint num_options;
|
||||
gchar *name;
|
||||
gint page;
|
||||
gint i;
|
||||
|
||||
name = gnc_option_section_name(section);
|
||||
if (strncmp(name, "__", 2) == 0)
|
||||
return;
|
||||
return -1;
|
||||
|
||||
page_label = gtk_label_new(_(name));
|
||||
gtk_widget_show(page_label);
|
||||
@@ -1063,7 +1064,8 @@ gnc_options_dialog_append_page(GnomePropertyBox *propertybox,
|
||||
gtk_container_set_border_width(GTK_CONTAINER(page_content_box), 5);
|
||||
gtk_widget_show(page_content_box);
|
||||
|
||||
gnome_property_box_append_page(propertybox, page_content_box, page_label);
|
||||
page = gnome_property_box_append_page(propertybox,
|
||||
page_content_box, page_label);
|
||||
|
||||
num_options = gnc_option_section_num_options(section);
|
||||
for (i = 0; i < num_options; i++)
|
||||
@@ -1071,6 +1073,8 @@ gnc_options_dialog_append_page(GnomePropertyBox *propertybox,
|
||||
option = gnc_get_option_section_option(section, i);
|
||||
gnc_options_dialog_add_option(page_content_box, option, tooltips);
|
||||
}
|
||||
|
||||
return page;
|
||||
}
|
||||
|
||||
|
||||
@@ -1089,16 +1093,32 @@ gnc_build_options_dialog_contents(GnomePropertyBox *propertybox,
|
||||
{
|
||||
GtkTooltips *tooltips;
|
||||
GNCOptionSection *section;
|
||||
gchar *default_section_name;
|
||||
gint default_page = -1;
|
||||
gint num_sections;
|
||||
gint page;
|
||||
gint i;
|
||||
|
||||
tooltips = gtk_tooltips_new();
|
||||
|
||||
num_sections = gnc_option_db_num_sections(odb);
|
||||
default_section_name = gnc_option_db_get_default_section(odb);
|
||||
|
||||
for (i = 0; i < num_sections; i++)
|
||||
{
|
||||
char *section_name;
|
||||
|
||||
section = gnc_option_db_get_section(odb, i);
|
||||
gnc_options_dialog_append_page(propertybox, section, tooltips);
|
||||
page = gnc_options_dialog_append_page(propertybox, section, tooltips);
|
||||
|
||||
section_name = gnc_option_section_name(section);
|
||||
if (safe_strcmp(section_name, default_section_name) == 0)
|
||||
default_page = page;
|
||||
}
|
||||
|
||||
if (default_page >= 0)
|
||||
gtk_notebook_set_page(GTK_NOTEBOOK(propertybox->notebook), default_page);
|
||||
|
||||
if (default_section_name != NULL)
|
||||
free(default_section_name);
|
||||
}
|
||||
|
||||
@@ -1468,6 +1468,35 @@ gnc_option_db_commit(GNCOptionDB *odb)
|
||||
}
|
||||
|
||||
|
||||
/********************************************************************\
|
||||
* gnc_option_db_get_default_section *
|
||||
* returns the malloc'd section name of the default section, *
|
||||
* or NULL if there is none. *
|
||||
* *
|
||||
* Args: odb - option database to get default page for *
|
||||
* Return: g_malloc'd default section name *
|
||||
\********************************************************************/
|
||||
char *
|
||||
gnc_option_db_get_default_section(GNCOptionDB *odb)
|
||||
{
|
||||
SCM getter;
|
||||
SCM value;
|
||||
|
||||
if (odb == NULL)
|
||||
return NULL;
|
||||
|
||||
getter = gh_eval_str("gnc:options-get-default-section");
|
||||
if (!gh_procedure_p(getter))
|
||||
return NULL;
|
||||
|
||||
value = gh_call1(getter, odb->guile_options);
|
||||
if (!gh_string_p(value))
|
||||
return NULL;
|
||||
|
||||
return gh_scm2newstr(value, NULL);
|
||||
}
|
||||
|
||||
|
||||
/********************************************************************\
|
||||
* gnc_option_db_lookup_boolean_option *
|
||||
* looks up a boolean option. If present, returns its value, *
|
||||
|
||||
@@ -125,6 +125,8 @@ void gnc_option_db_clean(GNCOptionDB *odb);
|
||||
|
||||
void gnc_option_db_commit(GNCOptionDB *odb);
|
||||
|
||||
char * gnc_option_db_get_default_section(GNCOptionDB *odb);
|
||||
|
||||
gboolean gnc_option_db_lookup_boolean_option(GNCOptionDB *odb,
|
||||
const char *section,
|
||||
const char *name,
|
||||
|
||||
@@ -176,7 +176,7 @@ configLabels (SplitRegister *reg)
|
||||
LABEL (NUM, NUM_STR);
|
||||
LABEL (DESC, DESC_STR);
|
||||
LABEL (RECN, "R");
|
||||
LABEL (SHRS, TOT_SHRS_STR);
|
||||
LABEL (SHRS, TOTAL_SHARES_STR);
|
||||
LABEL (BALN, BALN_STR);
|
||||
LABEL (ACTN, ACTION_STR);
|
||||
LABEL (XFRM, XFRM_STR);
|
||||
|
||||
+21
-10
@@ -106,9 +106,14 @@
|
||||
(define report-sort-spec-get-subsection-title-proc
|
||||
(record-accessor report-sort-spec-structure 'subsection-title-proc))
|
||||
|
||||
(define make-report-spec
|
||||
(define report-spec-constructor
|
||||
(record-constructor report-spec-structure))
|
||||
|
||||
(define (make-report-spec . args)
|
||||
(let ((spec (apply report-spec-constructor args)))
|
||||
(gnc:register-translatable-strings (report-spec-get-header spec))
|
||||
spec))
|
||||
|
||||
(define report-spec-get-header
|
||||
(record-accessor report-spec-structure 'header))
|
||||
|
||||
@@ -137,7 +142,8 @@
|
||||
(record-accessor report-spec-structure 'first-last-preference))
|
||||
|
||||
;; convert a list of entries into html
|
||||
(define (html-table-render-entries entry-list specs sort-specs line-render-proc count-subentries-proc)
|
||||
(define (html-table-render-entries entry-list specs sort-specs
|
||||
line-render-proc count-subentries-proc)
|
||||
(html-table-do-subsection
|
||||
(html-table-sort entry-list sort-specs)
|
||||
specs sort-specs line-render-proc count-subentries-proc 1))
|
||||
@@ -145,7 +151,8 @@
|
||||
;; the next 3 functions can be passed to html-table-render-entries
|
||||
|
||||
;; convert an entry into html. subentries follow entries
|
||||
(define (html-table-entry-render-entries-first line specs count-subentries-proc)
|
||||
(define (html-table-entry-render-entries-first line specs
|
||||
count-subentries-proc)
|
||||
(html-table-row-group
|
||||
(cons
|
||||
(html-table-row-manual (html-table-do-entry line specs))
|
||||
@@ -154,8 +161,10 @@
|
||||
(html-table-collect-subentries line specs count-subentries-proc)))))
|
||||
|
||||
;; convert an entry into html. first subentry is merged with the entry
|
||||
(define (html-table-entry-render-subentries-merged line specs count-subentries-proc)
|
||||
(let ((subs-lines (html-table-collect-subentries line specs count-subentries-proc)))
|
||||
(define (html-table-entry-render-subentries-merged line specs
|
||||
count-subentries-proc)
|
||||
(let ((subs-lines (html-table-collect-subentries line specs
|
||||
count-subentries-proc)))
|
||||
(html-table-row-group
|
||||
(if (null? subs-lines)
|
||||
(html-table-row-manual (html-table-do-entry line specs))
|
||||
@@ -193,7 +202,7 @@
|
||||
(map
|
||||
(lambda (spec)
|
||||
(html-header-cell
|
||||
(report-spec-get-header spec)))
|
||||
(gnc:_ (report-spec-get-header spec))))
|
||||
specs)))
|
||||
|
||||
;;;;;;;;;;;;;;;;
|
||||
@@ -214,11 +223,11 @@
|
||||
specs)))
|
||||
|
||||
|
||||
|
||||
(define (html-table-sort lst sort-specs)
|
||||
(sort lst (html-table-make-sort-pred sort-specs)))
|
||||
|
||||
(define (html-table-do-subsection lst specs sort-specs line-render-proc count-subentries-proc depth)
|
||||
(define (html-table-do-subsection lst specs sort-specs line-render-proc
|
||||
count-subentries-proc depth)
|
||||
(cond
|
||||
((null? sort-specs)
|
||||
(map
|
||||
@@ -232,7 +241,8 @@
|
||||
(let* ((front '())
|
||||
(back '())
|
||||
(sort-spec (car sort-specs))
|
||||
(subsection-pred (report-sort-spec-get-subsection-pred sort-spec))
|
||||
(subsection-pred (report-sort-spec-get-subsection-pred
|
||||
sort-spec))
|
||||
(get-value-proc (report-sort-spec-get-get-value-proc sort-spec))
|
||||
(value1 (get-value-proc (car lst2))))
|
||||
(cond
|
||||
@@ -254,7 +264,8 @@
|
||||
depth))
|
||||
(else '()))
|
||||
(html-table-do-subsection
|
||||
front specs (cdr sort-specs) line-render-proc count-subentries-proc (+ depth 1))
|
||||
front specs (cdr sort-specs) line-render-proc
|
||||
count-subentries-proc (+ depth 1))
|
||||
(cond (subsection-pred
|
||||
(html-table-subtotals front sort-spec specs depth))
|
||||
(else '()))
|
||||
|
||||
@@ -527,6 +527,14 @@
|
||||
(hash-for-each run-callback callback-hash))
|
||||
(clear-changes))
|
||||
|
||||
(define default-section #f)
|
||||
|
||||
(define (set-default-section section-name)
|
||||
(set! default-section section-name))
|
||||
|
||||
(define (get-default-section)
|
||||
default-section)
|
||||
|
||||
(define (dispatch key)
|
||||
(case key
|
||||
((lookup) lookup-option)
|
||||
@@ -538,6 +546,8 @@
|
||||
((generate-restore-forms) generate-restore-forms)
|
||||
((clear-changes) clear-changes)
|
||||
((run-callbacks) run-callbacks)
|
||||
((set-default-section) set-default-section)
|
||||
((get-default-section) get-default-section)
|
||||
(else (gnc:warn "options: bad key: " key "\n"))))
|
||||
|
||||
dispatch)
|
||||
@@ -573,6 +583,12 @@
|
||||
(define (gnc:options-run-callbacks options)
|
||||
((options 'run-callbacks)))
|
||||
|
||||
(define (gnc:options-set-default-section options section-name)
|
||||
((options 'set-default-section) section-name))
|
||||
|
||||
(define (gnc:options-get-default-section options)
|
||||
((options 'get-default-section)))
|
||||
|
||||
(define (gnc:send-options db_handle options)
|
||||
(gnc:options-for-each
|
||||
(lambda (option)
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
(gnc:register-runavg-option
|
||||
(gnc:make-multichoice-option
|
||||
"Report Options" "Step Size"
|
||||
"b" "Get number at each one of these" 'WeekDelta
|
||||
"b" "The amount of time between data points" 'WeekDelta
|
||||
(list #(DayDelta "Day" "Day")
|
||||
#(WeekDelta "Week" "Week")
|
||||
#(TwoWeekDelta "2Week" "Two Week")
|
||||
@@ -103,12 +103,12 @@
|
||||
(gnc:register-runavg-option
|
||||
(gnc:make-simple-boolean-option
|
||||
"Report Options" "Sub-Accounts"
|
||||
"e" "Add in sub-accounts of each selected" #f))
|
||||
"e" "Include sub-accounts of all selected accounts" #f))
|
||||
|
||||
(gnc:register-runavg-option
|
||||
(gnc:make-multichoice-option
|
||||
"Report Options" "Plot Type"
|
||||
"f" "Get number at each one of these" 'NoPlot
|
||||
"f" "The type of graph to generate" 'NoPlot
|
||||
(list #(NoPlot "Nothing" "Make No Plot")
|
||||
#(AvgBalPlot "Average" "Average Balance")
|
||||
#(GainPlot "Net Gain" "Net Gain")
|
||||
@@ -321,7 +321,6 @@
|
||||
(rept-text "")
|
||||
(gncq (gnc:malloc-query))
|
||||
(slist '()))
|
||||
(gnc:init-query gncq)
|
||||
|
||||
(if (null? accounts)
|
||||
(set! rept-text
|
||||
@@ -339,7 +338,7 @@
|
||||
(set! accounts (addunique accounts a)))
|
||||
(allsubaccounts accounts)))
|
||||
|
||||
(map (lambda (acct) (gnc:query-add-account gncq acct)) accounts)
|
||||
; (map (lambda (acct) (gnc:query-add-account gncq acct)) accounts)
|
||||
|
||||
(set! acctcurrency (gnc:account-get-currency (car accounts)))
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
(list
|
||||
(if
|
||||
(gnc:option-value
|
||||
(gnc:lookup-option options "x Display" "Date"))
|
||||
(gnc:lookup-option options "Display" "Date"))
|
||||
(make-report-spec
|
||||
"Date"
|
||||
(lambda (split)
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
(if
|
||||
(gnc:option-value
|
||||
(gnc:lookup-option options "x Display" "Num"))
|
||||
(gnc:lookup-option options "Display" "Num"))
|
||||
(make-report-spec
|
||||
"Num"
|
||||
(lambda (split)
|
||||
@@ -52,7 +52,7 @@
|
||||
|
||||
(if
|
||||
(gnc:option-value
|
||||
(gnc:lookup-option options "x Display" "Description"))
|
||||
(gnc:lookup-option options "Display" "Description"))
|
||||
(make-report-spec
|
||||
"Description"
|
||||
(lambda (split)
|
||||
@@ -69,7 +69,7 @@
|
||||
|
||||
(if
|
||||
(gnc:option-value
|
||||
(gnc:lookup-option options "x Display" "Memo"))
|
||||
(gnc:lookup-option options "Display" "Memo"))
|
||||
(make-report-spec
|
||||
"Memo"
|
||||
gnc:split-get-memo
|
||||
@@ -85,7 +85,7 @@
|
||||
|
||||
(if
|
||||
(gnc:option-value
|
||||
(gnc:lookup-option options "x Display" "Account"))
|
||||
(gnc:lookup-option options "Display" "Account"))
|
||||
(make-report-spec
|
||||
"Account"
|
||||
(lambda (split)
|
||||
@@ -106,7 +106,7 @@
|
||||
|
||||
(if
|
||||
(gnc:option-value
|
||||
(gnc:lookup-option options "x Display" "Other Account"))
|
||||
(gnc:lookup-option options "Display" "Other Account"))
|
||||
(make-report-spec
|
||||
"Other Account"
|
||||
(lambda (split)
|
||||
@@ -126,7 +126,7 @@
|
||||
|
||||
(if
|
||||
(gnc:option-value
|
||||
(gnc:lookup-option options "x Display" "Amount"))
|
||||
(gnc:lookup-option options "Display" "Amount"))
|
||||
(make-report-spec
|
||||
"Amount"
|
||||
gnc:split-get-value
|
||||
@@ -147,7 +147,8 @@
|
||||
(case key
|
||||
((account)
|
||||
(make-report-sort-spec
|
||||
(lambda (split) (gnc:account-get-full-name (gnc:split-get-account split)))
|
||||
(lambda (split) (gnc:account-get-full-name
|
||||
(gnc:split-get-account split)))
|
||||
(if ascending? string-ci<? string-ci>?)
|
||||
string-ci=?
|
||||
string-ci=?
|
||||
@@ -282,7 +283,8 @@
|
||||
|
||||
;; returns a predicate that returns true only if a split is
|
||||
;; between early-date and late-date
|
||||
(define (split-report-make-date-filter-predicate begin-date-secs end-date-secs)
|
||||
(define (split-report-make-date-filter-predicate begin-date-secs
|
||||
end-date-secs)
|
||||
(lambda (split)
|
||||
(let ((date
|
||||
(car (gnc:timepair-canonical-day-time
|
||||
@@ -367,7 +369,7 @@
|
||||
"Sort by date & subtotal each year")
|
||||
#(time
|
||||
"Time"
|
||||
"Sort by EXACT entry time")
|
||||
"Sort by exact entry time")
|
||||
#(corresponding-acc
|
||||
"Transfer from/to"
|
||||
"Sort by account transferred from/to's name")
|
||||
@@ -426,52 +428,56 @@
|
||||
|
||||
(gnc:register-trep-option
|
||||
(gnc:make-simple-boolean-option
|
||||
"x Display" "Date"
|
||||
"Display" "Date"
|
||||
"b" "Display the date?" #t))
|
||||
|
||||
(gnc:register-trep-option
|
||||
(gnc:make-simple-boolean-option
|
||||
"x Display" "Num"
|
||||
"Display" "Num"
|
||||
"c" "Display the cheque number?" #t))
|
||||
|
||||
(gnc:register-trep-option
|
||||
(gnc:make-simple-boolean-option
|
||||
"x Display" "Description"
|
||||
"Display" "Description"
|
||||
"d" "Display the description?" #t))
|
||||
|
||||
(gnc:register-trep-option
|
||||
(gnc:make-simple-boolean-option
|
||||
"x Display" "Memo"
|
||||
"Display" "Memo"
|
||||
"f" "Display the memo?" #t))
|
||||
|
||||
(gnc:register-trep-option
|
||||
(gnc:make-simple-boolean-option
|
||||
"x Display" "Account"
|
||||
"Display" "Account"
|
||||
"g" "Display the account?" #t))
|
||||
|
||||
(gnc:register-trep-option
|
||||
(gnc:make-simple-boolean-option
|
||||
"x Display" "Other Account"
|
||||
"Display" "Other Account"
|
||||
"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
|
||||
"x Display" "Amount"
|
||||
"Display" "Amount"
|
||||
"i" "Display the amount?" #t))
|
||||
|
||||
(gnc:register-trep-option
|
||||
(gnc:make-simple-boolean-option
|
||||
"x Display" "Headers"
|
||||
"Display" "Headers"
|
||||
"j" "Display the headers?" #t))
|
||||
|
||||
(gnc:register-trep-option
|
||||
(gnc:make-simple-boolean-option
|
||||
"x Display" "Totals"
|
||||
"Display" "Totals"
|
||||
"k" "Display the totals?" #t))
|
||||
|
||||
(gnc:options-set-default-section gnc:*transaction-report-options*
|
||||
"Report Options")
|
||||
|
||||
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"))
|
||||
(enddate (gnc:lookup-option options "Report Options" "To"))
|
||||
@@ -513,37 +519,39 @@
|
||||
(split-report-specs (make-split-report-spec options)))
|
||||
|
||||
(list
|
||||
(html-start-document-title "Transaction Report")
|
||||
(html-para "Transaction report using the new reporting framework in html-generator.scm")
|
||||
(html-start-table)
|
||||
(if
|
||||
(gnc:option-value
|
||||
(gnc:lookup-option options "x Display" "Headers"))
|
||||
(html-table-headers split-report-specs)
|
||||
'())
|
||||
(html-table-render-entries split-list
|
||||
split-report-specs
|
||||
sort-specs
|
||||
(case (gnc:option-value tr-report-style-op)
|
||||
((multi-line)
|
||||
html-table-entry-render-entries-first)
|
||||
((merged)
|
||||
html-table-entry-render-subentries-merged)
|
||||
((single)
|
||||
html-table-entry-render-entries-only))
|
||||
(lambda (split)
|
||||
(length
|
||||
(gnc:split-get-other-splits split))))
|
||||
(if
|
||||
(gnc:option-value
|
||||
(gnc:lookup-option options "x Display" "Totals"))
|
||||
(html-table-totals split-list split-report-specs)
|
||||
'())
|
||||
(html-end-table)
|
||||
(html-end-document))))
|
||||
(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
|
||||
(gnc:lookup-option options "Display" "Headers"))
|
||||
(html-table-headers split-report-specs)
|
||||
'())
|
||||
(html-table-render-entries split-list
|
||||
split-report-specs
|
||||
sort-specs
|
||||
(case (gnc:option-value tr-report-style-op)
|
||||
((multi-line)
|
||||
html-table-entry-render-entries-first)
|
||||
((merged)
|
||||
html-table-entry-render-subentries-merged)
|
||||
((single)
|
||||
html-table-entry-render-entries-only))
|
||||
(lambda (split)
|
||||
(length
|
||||
(gnc:split-get-other-splits split))))
|
||||
(if
|
||||
(gnc:option-value
|
||||
(gnc:lookup-option options "Display" "Totals"))
|
||||
(html-table-totals split-list split-report-specs)
|
||||
'())
|
||||
(html-end-table)
|
||||
(html-end-document))))
|
||||
|
||||
(string-db 'store 'title "Transaction Report")
|
||||
|
||||
(gnc:define-report
|
||||
'version 1
|
||||
'name "Transactions 2"
|
||||
'options-generator trep-options-generator
|
||||
'renderer gnc:trep-renderer))
|
||||
'renderer gnc:trep-renderer))
|
||||
|
||||
@@ -354,7 +354,7 @@
|
||||
"Sort by date")
|
||||
#(time
|
||||
"Time"
|
||||
"Sort by EXACT entry time")
|
||||
"Sort by exact entry time")
|
||||
#(corresponding-acc
|
||||
"Transfer from/to"
|
||||
"Sort by account transferred from/to's name")
|
||||
@@ -391,7 +391,7 @@
|
||||
"Sort by date")
|
||||
#(time
|
||||
"Time"
|
||||
"Sort by EXACT entry time")
|
||||
"Sort by exact entry time")
|
||||
#(corresponding-acc
|
||||
"Transfer from/to"
|
||||
"Sort by account transferred from/to's name")
|
||||
|
||||
Reference in New Issue
Block a user