mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
* src/scm/report/transaction-report.scm: add line before
grand total * src/scm/report/register.scm: more work * src/gnome/window-register.c: display shares & current value in stock registers. * src/engine/gnc-pricedb.h: fix spelling error * src/gnc-exp-parser.c (gnc_exp_parser_parse): check for bad numeric value * src/calculation/finvar.h: add new parser error type * src/gnome/dialog-transfer.c (gnc_xfer_dialog_create): don't set editable_enters for amount field * src/engine/gnc-numeric.c: check for invalid arg git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@3787 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
8dca9f3aee
commit
0caac4d270
22
ChangeLog
22
ChangeLog
@ -1,3 +1,25 @@
|
||||
2001-03-16 Dave Peticolas <dave@krondo.com>
|
||||
|
||||
* src/scm/report/transaction-report.scm: add line before
|
||||
grand total
|
||||
|
||||
* src/scm/report/register.scm: more work
|
||||
|
||||
* src/gnome/window-register.c: display shares & current value
|
||||
in stock registers.
|
||||
|
||||
* src/engine/gnc-pricedb.h: fix spelling error
|
||||
|
||||
* src/gnc-exp-parser.c (gnc_exp_parser_parse): check for
|
||||
bad numeric value
|
||||
|
||||
* src/calculation/finvar.h: add new parser error type
|
||||
|
||||
* src/gnome/dialog-transfer.c (gnc_xfer_dialog_create): don't
|
||||
set editable_enters for amount field
|
||||
|
||||
* src/engine/gnc-numeric.c: check for invalid arg
|
||||
|
||||
2001-03-15 Dave Peticolas <dave@krondo.com>
|
||||
|
||||
* src/engine/sixtp-to-dom-parser.c (dom_chars_handler): use
|
||||
|
@ -90,6 +90,15 @@ xaccLedgerDisplayLeader (xaccLedgerDisplay *ld)
|
||||
return xaccAccountLookup (&ld->leader);
|
||||
}
|
||||
|
||||
LedgerDisplayType
|
||||
xaccLedgerDisplayType (xaccLedgerDisplay *ld)
|
||||
{
|
||||
if (!ld)
|
||||
return -1;
|
||||
|
||||
return ld->ld_type;
|
||||
}
|
||||
|
||||
void
|
||||
xaccLedgerDisplaySetUserData (xaccLedgerDisplay *ld, gpointer user_data)
|
||||
{
|
||||
|
@ -59,6 +59,8 @@ typedef enum
|
||||
/* returns the 'lead' account of a ledger display, or NULL if none. */
|
||||
Account * xaccLedgerDisplayLeader (xaccLedgerDisplay *ld);
|
||||
|
||||
LedgerDisplayType xaccLedgerDisplayType (xaccLedgerDisplay *ld);
|
||||
|
||||
/* get and set the user data associated with the ledger */
|
||||
void xaccLedgerDisplaySetUserData (xaccLedgerDisplay *ld, gpointer user_data);
|
||||
gpointer xaccLedgerDisplayGetUserData (xaccLedgerDisplay *ld);
|
||||
|
@ -46,6 +46,7 @@ typedef enum
|
||||
UNDEFINED_CHARACTER,
|
||||
NOT_A_VARIABLE,
|
||||
PARSER_OUT_OF_MEMORY,
|
||||
NUMERIC_ERROR,
|
||||
PARSER_NUM_ERRORS
|
||||
}
|
||||
ParseError;
|
||||
|
@ -734,6 +734,10 @@ gnc_numeric_reduce(gnc_numeric in) {
|
||||
int three_count = 0;
|
||||
gnc_numeric out;
|
||||
|
||||
if(gnc_numeric_check(in)) {
|
||||
return gnc_numeric_error(GNC_ERROR_ARG);
|
||||
}
|
||||
|
||||
/* the strategy is to eliminate common factors from
|
||||
* 2 up to 'max', where max is the smaller of the smaller
|
||||
* part of the fraction and the sqrt of the larger part of
|
||||
|
@ -139,7 +139,7 @@ gboolean gnc_pricedb_add_price(GNCPriceDB *db, GNCPrice *p);
|
||||
gboolean gnc_pricedb_remove_price(GNCPriceDB *db, GNCPrice *p);
|
||||
|
||||
GNCPrice * gnc_pricedb_lookup_latest(GNCPriceDB *db,
|
||||
gnc_commodity *comodity,
|
||||
gnc_commodity *commodity,
|
||||
gnc_commodity *currency);
|
||||
|
||||
/* Return all prices that match the given commodity, currency, and
|
||||
|
@ -427,19 +427,29 @@ gnc_exp_parser_parse (const char * expression, gnc_numeric *value_p,
|
||||
|
||||
if (error_loc == NULL)
|
||||
{
|
||||
if (pnum)
|
||||
if (gnc_numeric_check (pnum->value))
|
||||
{
|
||||
if (value_p)
|
||||
*value_p = gnc_numeric_reduce (pnum->value);
|
||||
if (error_loc_p != NULL)
|
||||
*error_loc_p = (char *) expression;
|
||||
|
||||
if (!result.variable_name)
|
||||
g_free (pnum);
|
||||
last_error = NUMERIC_ERROR;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (pnum)
|
||||
{
|
||||
if (value_p)
|
||||
*value_p = gnc_numeric_reduce (pnum->value);
|
||||
|
||||
if (error_loc_p != NULL)
|
||||
*error_loc_p = NULL;
|
||||
if (!result.variable_name)
|
||||
g_free (pnum);
|
||||
}
|
||||
|
||||
last_error = PARSER_NO_ERROR;
|
||||
if (error_loc_p != NULL)
|
||||
*error_loc_p = NULL;
|
||||
|
||||
last_error = PARSER_NO_ERROR;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -479,5 +489,7 @@ gnc_exp_parser_error_string (void)
|
||||
return _("Not a variable");
|
||||
case PARSER_OUT_OF_MEMORY:
|
||||
return _("Out of memory");
|
||||
case NUMERIC_ERROR:
|
||||
return _("Numeric error");
|
||||
}
|
||||
}
|
||||
|
@ -953,12 +953,12 @@ gnc_xfer_dialog_create(GtkWidget * parent, XferDialog *xferData)
|
||||
amount = gnc_amount_edit_new();
|
||||
hbox = gtk_object_get_data(tdo, "amount_hbox");
|
||||
gtk_box_pack_end(GTK_BOX(hbox), amount, TRUE, TRUE, 0);
|
||||
gnc_amount_edit_set_evaluate_on_enter (GNC_AMOUNT_EDIT (amount), TRUE);
|
||||
xferData->amount_edit = amount;
|
||||
|
||||
entry = gnc_amount_edit_gtk_entry (GNC_AMOUNT_EDIT (amount));
|
||||
gtk_signal_connect(GTK_OBJECT(entry), "focus-out-event",
|
||||
GTK_SIGNAL_FUNC(gnc_xfer_amount_update_cb), xferData);
|
||||
gnome_dialog_editable_enters(GNOME_DIALOG(dialog), GTK_EDITABLE(entry));
|
||||
|
||||
date = gnc_date_edit_new(time(NULL), FALSE, FALSE);
|
||||
hbox = gtk_object_get_data(tdo, "date_hbox");
|
||||
|
@ -47,6 +47,7 @@
|
||||
#include "gnc-component-manager.h"
|
||||
#include "gnc-dateedit.h"
|
||||
#include "gnc-engine-util.h"
|
||||
#include "gnc-pricedb.h"
|
||||
#include "gnc-ui-util.h"
|
||||
#include "gnc-ui.h"
|
||||
#include "gnucash-sheet.h"
|
||||
@ -97,6 +98,8 @@ struct _RegWindow
|
||||
GtkWidget * cleared_label;
|
||||
GtkWidget * reconciled_label;
|
||||
GtkWidget * future_label;
|
||||
GtkWidget * shares_label;
|
||||
GtkWidget * value_label;
|
||||
|
||||
GnucashRegister *reg;
|
||||
|
||||
@ -906,7 +909,7 @@ gnc_register_create_tool_bar (RegWindow *regData)
|
||||
N_("Open a report window for this register"),
|
||||
reportCB,
|
||||
NULL, NULL,
|
||||
GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_PIXMAP_ATTACH,
|
||||
GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_PIXMAP_BOOK_GREEN,
|
||||
0, 0, NULL
|
||||
},
|
||||
GNOMEUIINFO_SEPARATOR,
|
||||
@ -948,77 +951,80 @@ gnc_ui_find_transactions_cb (GtkWidget *widget, gpointer data)
|
||||
}
|
||||
|
||||
static GtkWidget *
|
||||
gnc_register_create_summary_bar (RegWindow *regData)
|
||||
add_summary_label (GtkWidget *summarybar, const char *label_str)
|
||||
{
|
||||
SplitRegister *reg;
|
||||
GtkWidget *summarybar;
|
||||
GtkWidget *hbox;
|
||||
GtkWidget *label;
|
||||
|
||||
reg = xaccLedgerDisplayGetSR (regData->ledger);
|
||||
|
||||
if (reg->type >= NUM_SINGLE_REGISTER_TYPES)
|
||||
{
|
||||
regData->cleared_label = NULL;
|
||||
regData->balance_label = NULL;
|
||||
regData->reconciled_label = NULL;
|
||||
regData->future_label = NULL;
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
summarybar = gtk_hbox_new (FALSE, 4);
|
||||
|
||||
hbox = gtk_hbox_new(FALSE, 2);
|
||||
gtk_box_pack_start (GTK_BOX(summarybar), hbox, FALSE, FALSE, 5);
|
||||
|
||||
label = gtk_label_new (_("Present:"));
|
||||
label = gtk_label_new (label_str);
|
||||
gtk_misc_set_alignment (GTK_MISC(label), 1.0, 0.5);
|
||||
gtk_box_pack_start (GTK_BOX(hbox), label, FALSE, FALSE, 0);
|
||||
|
||||
label = gtk_label_new ("");
|
||||
gtk_misc_set_alignment (GTK_MISC(label), 1.0, 0.5);
|
||||
regData->balance_label = label;
|
||||
gtk_box_pack_start (GTK_BOX(hbox), label, FALSE, FALSE, 0);
|
||||
|
||||
return label;
|
||||
}
|
||||
|
||||
hbox = gtk_hbox_new (FALSE, 2);
|
||||
gtk_box_pack_start (GTK_BOX(summarybar), hbox, FALSE, FALSE, 5);
|
||||
static GtkWidget *
|
||||
gnc_register_create_summary_bar (RegWindow *regData)
|
||||
{
|
||||
gboolean has_shares;
|
||||
GtkWidget *summarybar;
|
||||
GtkWidget *hbox;
|
||||
GtkWidget *label;
|
||||
|
||||
label = gtk_label_new (_("Future:"));
|
||||
gtk_misc_set_alignment (GTK_MISC(label), 1.0, 0.5);
|
||||
gtk_box_pack_start (GTK_BOX(hbox), label, FALSE, FALSE, 0);
|
||||
regData->cleared_label = NULL;
|
||||
regData->balance_label = NULL;
|
||||
regData->reconciled_label = NULL;
|
||||
regData->future_label = NULL;
|
||||
regData->shares_label = NULL;
|
||||
regData->value_label = NULL;
|
||||
|
||||
label = gtk_label_new ("");
|
||||
gtk_misc_set_alignment (GTK_MISC(label), 1.0, 0.5);
|
||||
regData->future_label = label;
|
||||
gtk_box_pack_start (GTK_BOX(hbox), label, FALSE, FALSE, 0);
|
||||
if (xaccLedgerDisplayType (regData->ledger) >= LD_SUBACCOUNT)
|
||||
return NULL;
|
||||
|
||||
{
|
||||
Account *account;
|
||||
GNCAccountType atype;
|
||||
|
||||
hbox = gtk_hbox_new (FALSE, 2);
|
||||
gtk_box_pack_start (GTK_BOX(summarybar), hbox, FALSE, FALSE, 5);
|
||||
account = xaccLedgerDisplayLeader (regData->ledger);
|
||||
atype = xaccAccountGetType (account);
|
||||
|
||||
label = gtk_label_new (_("Cleared:"));
|
||||
gtk_misc_set_alignment (GTK_MISC(label), 1.0, 0.5);
|
||||
gtk_box_pack_start (GTK_BOX(hbox), label, FALSE, FALSE, 0);
|
||||
switch (atype)
|
||||
{
|
||||
case STOCK:
|
||||
case MUTUAL:
|
||||
case CURRENCY:
|
||||
has_shares = TRUE;
|
||||
break;
|
||||
|
||||
label = gtk_label_new ("");
|
||||
gtk_misc_set_alignment (GTK_MISC(label), 1.0, 0.5);
|
||||
regData->cleared_label = label;
|
||||
gtk_box_pack_start (GTK_BOX(hbox), label, FALSE, FALSE, 0);
|
||||
default:
|
||||
has_shares = FALSE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
summarybar = gtk_hbox_new (FALSE, 4);
|
||||
|
||||
hbox = gtk_hbox_new (FALSE, 2);
|
||||
gtk_box_pack_start (GTK_BOX(summarybar), hbox, FALSE, FALSE, 5);
|
||||
|
||||
label = gtk_label_new (_("Reconciled:"));
|
||||
gtk_misc_set_alignment (GTK_MISC(label), 1.0, 0.5);
|
||||
gtk_box_pack_start (GTK_BOX(hbox), label, FALSE, FALSE, 0);
|
||||
|
||||
label = gtk_label_new ("");
|
||||
gtk_misc_set_alignment (GTK_MISC(label), 1.0, 0.5);
|
||||
regData->reconciled_label = label;
|
||||
gtk_box_pack_start (GTK_BOX(hbox), label, FALSE, FALSE, 0);
|
||||
if (!has_shares)
|
||||
{
|
||||
regData->balance_label = add_summary_label (summarybar, _("Present:"));
|
||||
regData->future_label = add_summary_label (summarybar, _("Future:"));
|
||||
regData->cleared_label = add_summary_label (summarybar, _("Cleared:"));
|
||||
regData->reconciled_label = add_summary_label (summarybar,
|
||||
_("Reconciled:"));
|
||||
}
|
||||
else
|
||||
{
|
||||
regData->shares_label = add_summary_label (summarybar, _("Shares:"));
|
||||
regData->value_label = add_summary_label (summarybar,
|
||||
_("Current Value:"));
|
||||
}
|
||||
|
||||
return summarybar;
|
||||
}
|
||||
@ -2125,6 +2131,23 @@ gnc_account_present_balance (Account *account)
|
||||
return gnc_numeric_zero ();
|
||||
}
|
||||
|
||||
static GNCPrice *
|
||||
account_latest_price (Account *account)
|
||||
{
|
||||
GNCBook *book;
|
||||
GNCPriceDB *pdb;
|
||||
gnc_commodity *security;
|
||||
gnc_commodity *currency;
|
||||
|
||||
security = xaccAccountGetSecurity (account);
|
||||
currency = xaccAccountGetCurrency (account);
|
||||
|
||||
book = gncGetCurrentBook ();
|
||||
pdb = gnc_book_get_pricedb (book);
|
||||
|
||||
return gnc_pricedb_lookup_latest (pdb, security, currency);
|
||||
}
|
||||
|
||||
static void
|
||||
gnc_register_redraw_all_cb (GnucashRegister *g_reg, gpointer data)
|
||||
{
|
||||
@ -2234,6 +2257,52 @@ gnc_register_redraw_all_cb (GnucashRegister *g_reg, gpointer data)
|
||||
gtk_label_set_text (GTK_LABEL (regData->future_label), string);
|
||||
}
|
||||
|
||||
if (regData->shares_label != NULL)
|
||||
{
|
||||
print_info = gnc_account_quantity_print_info (leader, TRUE);
|
||||
|
||||
amount = xaccAccountGetShareBalance (leader);
|
||||
if (reverse)
|
||||
amount = gnc_numeric_neg (amount);
|
||||
|
||||
xaccSPrintAmount (string, amount, print_info);
|
||||
|
||||
gnc_set_label_color (regData->shares_label, amount);
|
||||
gtk_label_set_text (GTK_LABEL (regData->shares_label), string);
|
||||
}
|
||||
|
||||
if (regData->value_label != NULL)
|
||||
{
|
||||
GNCPrice *price;
|
||||
|
||||
price = account_latest_price (leader);
|
||||
if (!price)
|
||||
{
|
||||
gnc_set_label_color (regData->value_label, gnc_numeric_zero ());
|
||||
gtk_label_set_text (GTK_LABEL (regData->value_label),
|
||||
_("<No information>"));
|
||||
}
|
||||
else
|
||||
{
|
||||
gnc_commodity *currency = gnc_price_get_currency (price);
|
||||
|
||||
print_info = gnc_commodity_print_info (currency, TRUE);
|
||||
|
||||
amount = xaccAccountGetShareBalance (leader);
|
||||
if (reverse)
|
||||
amount = gnc_numeric_neg (amount);
|
||||
|
||||
amount = gnc_numeric_mul (amount, gnc_price_get_value (price),
|
||||
gnc_commodity_get_fraction (currency),
|
||||
GNC_RND_ROUND);
|
||||
|
||||
xaccSPrintAmount (string, amount, print_info);
|
||||
|
||||
gnc_set_label_color (regData->value_label, amount);
|
||||
gtk_label_set_text (GTK_LABEL (regData->value_label), string);
|
||||
}
|
||||
}
|
||||
|
||||
gnc_reg_set_window_name (regData);
|
||||
|
||||
{
|
||||
|
@ -74,7 +74,6 @@
|
||||
|
||||
(if (opt-val (N_ "Display") (N_ "Price"))
|
||||
(vector-set! column-list 6 #t))
|
||||
; (gnc:warn "Amount Display" (opt-val (N_ "Display") (N_ "Amount")))
|
||||
|
||||
(let ((amount-setting (opt-val (N_ "Display") (N_ "Amount"))))
|
||||
(if (eq? amount-setting 'single)
|
||||
@ -85,9 +84,8 @@
|
||||
(vector-set! column-list 9 #t))))
|
||||
(if (opt-val (N_ "Display") (N_ "Running Balance"))
|
||||
(vector-set! column-list 10 #t))
|
||||
; (gnc:debug "Column list:" column-list)
|
||||
column-list))
|
||||
|
||||
column-list))
|
||||
|
||||
(define (make-heading-list column-vector)
|
||||
(let ((heading-list '()))
|
||||
@ -145,14 +143,20 @@
|
||||
row-contents
|
||||
(gnc:make-gnc-monetary currency (gnc:split-get-share-price split))))
|
||||
(if (used-amount-single column-vector)
|
||||
(addto! row-contents split-value))
|
||||
(addto! row-contents
|
||||
(gnc:make-html-table-header-cell/markup "number-cell"
|
||||
split-value)))
|
||||
(if (used-amount-double-positive column-vector)
|
||||
(if (gnc:numeric-positive-p (gnc:gnc-monetary-amount split-value))
|
||||
(addto! row-contents split-value)
|
||||
(addto! row-contents
|
||||
(gnc:make-html-table-header-cell/markup "number-cell"
|
||||
split-value))
|
||||
(addto! row-contents " ")))
|
||||
(if (used-amount-double-negative column-vector)
|
||||
(if (gnc:numeric-negative-p (gnc:gnc-monetary-amount split-value))
|
||||
(addto! row-contents (gnc:monetary-neg split-value))
|
||||
(addto! row-contents
|
||||
(gnc:make-html-table-header-cell/markup
|
||||
"number-cell" (gnc:monetary-neg split-value)))
|
||||
(addto! row-contents " ")))
|
||||
(if (used-running-balance column-vector)
|
||||
(addto! row-contents
|
||||
@ -224,7 +228,7 @@
|
||||
(gnc:make-multichoice-option
|
||||
(N_ "Display") (N_ "Amount")
|
||||
"i" (N_ "Display the amount?")
|
||||
'single
|
||||
'double
|
||||
(list
|
||||
(vector 'none (N_ "None") (N_ "No amount display"))
|
||||
(vector 'single (N_ "Single") (N_ "Single Column Display"))
|
||||
@ -300,12 +304,17 @@
|
||||
(list 'attribute (list "bgcolor" (gnc:color-option->html bgcolor)))))
|
||||
|
||||
(define (make-split-table splits options)
|
||||
(define (add-subtotal-row table width subtotal-collector
|
||||
subtotal-style)
|
||||
(define (add-subtotal-row table width subtotal-collector subtotal-style)
|
||||
(let ((currency-totals (subtotal-collector
|
||||
'format gnc:make-gnc-monetary #f))
|
||||
(blanks (make-list (- width 1) #f)))
|
||||
|
||||
(gnc:html-table-append-row!
|
||||
table
|
||||
(list
|
||||
(gnc:make-html-table-cell/size
|
||||
1 width (gnc:make-html-text (gnc:html-markup-hr)))))
|
||||
|
||||
(for-each (lambda (currency)
|
||||
(gnc:html-table-append-row!
|
||||
table
|
||||
@ -452,4 +461,3 @@
|
||||
(gnc:option-set-value qo query)
|
||||
(gnc:option-set-value jo journal?)
|
||||
(gnc:report-window (gnc:make-report "Register" options))))
|
||||
|
||||
|
@ -12,7 +12,6 @@
|
||||
|
||||
(let ()
|
||||
|
||||
|
||||
(define-syntax addto!
|
||||
(syntax-rules ()
|
||||
((_ alist element) (set! alist (cons element alist)))))
|
||||
@ -61,7 +60,8 @@
|
||||
(gnc:html-table-append-row!
|
||||
table
|
||||
(list heading-cell))
|
||||
(apply set-last-row-style! (cons table (cons "tr" subheading-style)))))
|
||||
(apply set-last-row-style!
|
||||
(cons table (cons "tr" subheading-style)))))
|
||||
|
||||
(define (render-account-name-subheading split table width subheading-style)
|
||||
(add-subheading-row (gnc:account-get-name
|
||||
@ -69,7 +69,8 @@
|
||||
table width subheading-style))
|
||||
|
||||
(define (render-account-code-subheading split table width subheading-style)
|
||||
(add-subheading-row (gnc:account-get-code (gnc:split-get-account split))
|
||||
(add-subheading-row (gnc:account-get-code
|
||||
(gnc:split-get-account split))
|
||||
table width subheading-style))
|
||||
|
||||
(define (render-corresponding-account-name-subheading
|
||||
@ -385,8 +386,8 @@
|
||||
|
||||
(vector 'corresponding-acc-name-subtotal
|
||||
(N_ "Transfer from/to (w/subtotal) by code ")
|
||||
(N_ "Sort and subtotal by account transferred \
|
||||
from/to's code"))
|
||||
(N_ "Sort and subtotal by account transferred
|
||||
from/to's code"))
|
||||
|
||||
(vector 'corresponding-acc-code
|
||||
(N_ "Transfer from/to code")
|
||||
@ -394,8 +395,8 @@ from/to's code"))
|
||||
|
||||
(vector 'corresponding-acc-code-subtotal
|
||||
(N_ "Transfer from/to (w/subtotal)")
|
||||
(N_ "Sort and subtotal by account \
|
||||
transferred from/to's code"))
|
||||
(N_ "Sort and subtotal by account
|
||||
transferred from/to's code"))
|
||||
|
||||
(vector 'amount
|
||||
(N_ "Amount")
|
||||
@ -485,8 +486,8 @@ transferred from/to's code"))
|
||||
(gnc:register-trep-option
|
||||
(gnc:make-simple-boolean-option
|
||||
(N_ "Display") (N_ "Other Account")
|
||||
"h" (N_ "Display the other account?\
|
||||
(if this is a split transaction, this parameter is guessed).") #f))
|
||||
"h" (N_ "Display the other account?
|
||||
(if this is a split transaction, this parameter is guessed).") #f))
|
||||
|
||||
(gnc:register-trep-option
|
||||
(gnc:make-simple-boolean-option
|
||||
@ -541,7 +542,7 @@ transferred from/to's code"))
|
||||
(gnc:register-trep-option
|
||||
(gnc:make-color-option
|
||||
(N_ "Colors") (N_ "Split Odd")
|
||||
"c" (N_ "Background color for odd-numbered splits (or main splits in a\
|
||||
"c" (N_ "Background color for odd-numbered splits (or main splits in a
|
||||
multi-line report)")
|
||||
(list #xff #xff #xff 0)
|
||||
255
|
||||
@ -550,9 +551,8 @@ transferred from/to's code"))
|
||||
(gnc:register-trep-option
|
||||
(gnc:make-color-option
|
||||
(N_ "Colors") (N_ "Split Even")
|
||||
"d" (N_ "Background color for even-numbered splits\
|
||||
(or \"other\" splits in a\
|
||||
multi-line report)")
|
||||
"d" (N_ "Background color for even-numbered splits
|
||||
(or \"other\" splits in a multi-line report)")
|
||||
(list #xff #xff #xff 0)
|
||||
255
|
||||
#f))
|
||||
@ -589,7 +589,7 @@ transferred from/to's code"))
|
||||
(- unsigned-balance)
|
||||
unsigned-balance)))
|
||||
(string-append acc-name
|
||||
" ("
|
||||
" ("
|
||||
(_ "Opening Balance")
|
||||
" "
|
||||
(gnc:amount->string signed-balance
|
||||
@ -719,7 +719,14 @@ transferred from/to's code"))
|
||||
secondary-subtotal-collector
|
||||
total-collector)
|
||||
(if (null? splits)
|
||||
(add-subtotal-row table width total-collector grand-total-style)
|
||||
(begin
|
||||
(gnc:html-table-append-row!
|
||||
table
|
||||
(list
|
||||
(gnc:make-html-table-cell/size
|
||||
1 width (gnc:make-html-text (gnc:html-markup-hr)))))
|
||||
|
||||
(add-subtotal-row table width total-collector grand-total-style))
|
||||
|
||||
(let* ((current (car splits))
|
||||
(current-row-style (if multi-rows? main-row-style
|
||||
|
Loading…
Reference in New Issue
Block a user