[grisbi-cvs] grisbi/src gsb_data_partial_balance.c,1.7,1.8
Pierre Biava
pbiava at users.sourceforge.net
Fri Oct 9 21:16:14 CEST 2009
Update of /cvsroot/grisbi/grisbi/src
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv14561
Modified Files:
gsb_data_partial_balance.c
Log Message:
fixes the bug of the partial balance of bug 670
Index: gsb_data_partial_balance.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_data_partial_balance.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- gsb_data_partial_balance.c 27 Sep 2009 15:30:49 -0000 1.7
+++ gsb_data_partial_balance.c 9 Oct 2009 19:16:12 -0000 1.8
@@ -1033,6 +1033,7 @@
struct_partial_balance *partial_balance;
gsb_real solde = null_real;
gchar **tab;
+ gchar *string;
gint i;
partial_balance = gsb_data_partial_balance_get_structure ( partial_balance_number );
@@ -1073,7 +1074,14 @@
solde = gsb_real_add ( solde, tmp_real );
}
}
- return gsb_real_get_string_with_currency (solde, partial_balance -> currency, TRUE);
+ if ( partial_balance -> colorise && solde.mantissa < 0 )
+ string = g_strdup_printf ( "<span color=\"red\">%s</span>",
+ gsb_real_get_string_with_currency (
+ solde, partial_balance -> currency, TRUE) );
+ else
+ string = gsb_real_get_string_with_currency (solde, partial_balance -> currency, TRUE);
+
+ return string;
}
More information about the cvs
mailing list