mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
apply peticolas patch of 17 Jan 2000 00:15:12 -0800
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@2001 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
c8c4ffa54e
commit
30d852ceea
83
ChangeLog
83
ChangeLog
@ -1,5 +1,88 @@
|
||||
2000-01-16 Dave Peticolas <peticola@cs.ucdavis.edu>
|
||||
|
||||
* src/gnome/dialog-add.c (gnc_ui_accWindow_list_box_create): Put
|
||||
the account types in a scrolled window.
|
||||
(gnc_ui_accWindow_tree_select): scroll the list types when a new
|
||||
type is selected.
|
||||
(accWindow): remember window size and recreate it.
|
||||
|
||||
* src/engine/util.c (xaccParseQIFAmount): rename this from
|
||||
xaccParseUSAmount to explictly reflect its only usage. Modify
|
||||
the parsing to guess what symbol is used as a decimal point.
|
||||
|
||||
2000-01-15 Dave Peticolas <peticola@cs.ucdavis.edu>
|
||||
|
||||
* src/gnome/window-report.c (gnc_report_export): add error checking
|
||||
and i18n messages.
|
||||
|
||||
* src/gnome/window-html.c (gnc_html_load): set toolbar button
|
||||
states at end.
|
||||
|
||||
2000-01-15 Robert Graham Merkel <rgmerk@mira.net>
|
||||
|
||||
* src/gnome/window-report.c (gnc_report_export): new function to
|
||||
allow generated HTML reports to be exported to a file.
|
||||
(reportWindow): added a button to the toolbar for exporting HTML
|
||||
|
||||
2000-01-15 Dave Peticolas <peticola@cs.ucdavis.edu>
|
||||
|
||||
* Makefile.config.finish: Get rid of xemacs mode comments.
|
||||
|
||||
* configure.in: Move the commands at the end of configure.in into
|
||||
the EXTRA-CMDS section of AC_OUTPUT so that config.status will
|
||||
redo them. Don't bother defining GNC_RUNTIME_* vars as they are
|
||||
not substituted using AC_OUTPUT.
|
||||
|
||||
2000-01-14 Robert Graham Merkel <rgmerk@mira.net>
|
||||
|
||||
* src/scm/report/transaction-report.scm: Added initial balance
|
||||
and summary displays.
|
||||
|
||||
2000-01-12 Robert Graham Merkel <rgmerk@mira.net>
|
||||
|
||||
* src/scm/report/transaction-report.scm: Added balance field,
|
||||
running totals, patched for empty-second-split case, fixed
|
||||
other bugs, added documentation.
|
||||
|
||||
2000-01-10 Dave Peticolas <peticola@cs.ucdavis.edu>
|
||||
|
||||
* Apply Jan Schrage's doc patch.
|
||||
|
||||
* src/gnome/window-reconcile.c (recnWindow): tighter arrangement
|
||||
of the buttons.
|
||||
|
||||
* src/g-wrap/gnc.gwp: removed wrap of private engine function.
|
||||
|
||||
* src/engine/util.c (gnc_localeconv): new function to get a lconv
|
||||
structure for locale info.
|
||||
(PrintAmt): add argument which determines whether amounts are
|
||||
monetary or not. Use locale information to get separators.
|
||||
(xaccSPrintAmount): first cut at printing i18n'd amounts.
|
||||
(xaccParseAmount): new function for parsing i18n'd amounts,
|
||||
both monetary and non-monetary.
|
||||
|
||||
* src/register/splitreg.c (xaccInitSplitRegister): let the price
|
||||
cell format be the default monetary format. Set the shares cell
|
||||
and, for stock registers, the credit and debit cells to
|
||||
non-monetary cells.
|
||||
|
||||
* src/register/pricecell.c (xaccSetPriceCellMonetary): new
|
||||
function for setting 'monetary' member.
|
||||
|
||||
* src/register/pricecell.h: add a 'monetary' boolean member
|
||||
of price cells which indicate whether the value should be
|
||||
parsed as money or not.
|
||||
|
||||
2000-01-09 Dave Peticolas <peticola@cs.ucdavis.edu>
|
||||
|
||||
* src/register/splitreg.c: print price cells in a monetary format,
|
||||
not 4 place decimal notation.
|
||||
|
||||
* src/gnome/window-register.c (regRefresh): print separators in
|
||||
the amounts at the bottom of the register window.
|
||||
|
||||
* Applied Ken Yamaguchi's QIF import patch.
|
||||
|
||||
* src/scm/prefs.scm: modified the account list option so
|
||||
that it returns the default-getter value until explicitly
|
||||
set.
|
||||
|
@ -1,4 +1,4 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN">
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
@ -34,10 +34,11 @@
|
||||
of an asset towards zero.
|
||||
|
||||
<p> Depreciation tends to only get calculated on assets
|
||||
that are used for business purposes, because governments
|
||||
that are used for professional or business purposes, because
|
||||
governments
|
||||
don't generally allow you to claim depreciation deductions
|
||||
on personal assets, and it's pointless to bother with the
|
||||
procedure if it's not deductible.</p>
|
||||
procedure if it's not deductible. </p>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
@ -101,37 +102,43 @@
|
||||
does.)</p>
|
||||
|
||||
<p> Properly tracking the continually-increasing value of the
|
||||
Degas will require at least three accounts:</p>
|
||||
Degas will require at least three, quite possibly the following
|
||||
four accounts (plus a bank or cash account where the money for
|
||||
the purchase comes from):</p>
|
||||
|
||||
<ul>
|
||||
<li>An <em>Asset Cost Account</em> to track the original cost
|
||||
of the painting,</li>
|
||||
<li>An <em>Asset Cost</em> asset account to track the
|
||||
original cost of the painting,</li>
|
||||
|
||||
<li>An <em>Accrued Unrealized Gains on Asset Account</em> to
|
||||
keep track of increases in value, and</li>
|
||||
<li>An <em>Accrued Unrealized Gains on Asset</em> asset
|
||||
account to keep track of increases in value, and</li>
|
||||
|
||||
<li>An <em>Gain On Asset Income Account</em> in which to
|
||||
record the income side of the annual gains in your
|
||||
riches.</li>
|
||||
<li>An <em>Accrued Gain On Asset Income</em> income account
|
||||
in which to record the income side of the annual gains in
|
||||
your riches, and</li>
|
||||
|
||||
<li>A <em>Realized Gain On Asset Income</em> income account
|
||||
in which to record the realized income when you sell the
|
||||
asset.</li>
|
||||
</ul>
|
||||
|
||||
<p> This likely won't affect your taxable income for <em>
|
||||
income</em> tax purposes, although it could have some effect on
|
||||
<em> property</em> taxes.</p>
|
||||
<p> The <em>accrued gains</em> likely won't affect your taxable
|
||||
income for <em> income</em> tax purposes, although it could
|
||||
have some effect on <em> property</em> taxes.</p>
|
||||
|
||||
<h2>The handling of capital gains in GnuCash</h2>
|
||||
|
||||
<h3> The Acquisition</h3>
|
||||
|
||||
<p>The first thing you have to do is to create an asset
|
||||
account, then transfer the sum you paid for this painting from
|
||||
your bank account to this asset account to record the
|
||||
purchase.</p>
|
||||
<p>The first thing you have to do is to create the <em>asset
|
||||
cost account</em>, then transfer the sum you paid for this
|
||||
painting from your bank account to this asset account to record
|
||||
the purchase.</p>
|
||||
|
||||
<p> A month later, you have reason to suspect that the value of
|
||||
your painting has increased by $1200. In order to record this
|
||||
you transfer $1200 from your income account to your asset
|
||||
account.</p>
|
||||
you transfer $1200 from your <em>accrued gains on asset</em>
|
||||
income account to your asset account.</p>
|
||||
|
||||
<p>Your main window will resemble this:</p>
|
||||
<img src="appr-main1.gif" alt=
|
||||
@ -255,8 +262,7 @@
|
||||
</li>
|
||||
|
||||
<li>
|
||||
You were overoptimistic about the value about the painting.
|
||||
|
||||
You were overoptimistic about the value of the painting.
|
||||
|
||||
<p> Instead of the $16055 you thought the painting was
|
||||
worth are only offered $15000. But you still decide to
|
||||
@ -360,7 +366,7 @@
|
||||
|
||||
<p> In practice, it truly is important to keep the <em> Accrued
|
||||
Gain Income</em> separate from the <em> Realized Gain
|
||||
Income,</em> as the former is likely to be ignored by you tax
|
||||
Income,</em> as the former is likely to be ignored by your tax
|
||||
authorities, who will only care to charge you on the <em>
|
||||
Realized Gain.</em></p>
|
||||
|
||||
@ -394,7 +400,7 @@
|
||||
|
||||
<p> Until you have actually sold your asset and got the
|
||||
money, any numbers on paper (or magnetic patterns on your
|
||||
hard disk) are merely numbers on a piece of paper.</p>
|
||||
hard disk) are merely that.</p>
|
||||
|
||||
<p> If you could realistically convince a banker to lend
|
||||
you money, using the assets as collateral, that is a pretty
|
||||
@ -422,7 +428,9 @@
|
||||
<p> North American home owners <em> usually</em> find that when
|
||||
they sell personal residences, capital gains that occur are
|
||||
exempt from taxation. It appears that other countries treat
|
||||
sale of homes differently, taxing people on such gains.</p>
|
||||
sale of homes differently, taxing people on such gains. German
|
||||
authorities, for example, tax those gains only if you owned the
|
||||
property for less than ten years.</p>
|
||||
|
||||
<p> <a href="mailto:cbbrowne@hex.net"> I have</a> one story
|
||||
from my professional tax preparation days where a family sold a
|
||||
@ -480,11 +488,11 @@
|
||||
|
||||
<table summary="Example 1">
|
||||
<tr>
|
||||
<td>Year</td>
|
||||
<th>Year</th>
|
||||
|
||||
<td>Depreciation</td>
|
||||
<th>Depreciation</th>
|
||||
|
||||
<td>Remaining Value</td>
|
||||
<th>Remaining Value</th>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
@ -545,18 +553,18 @@
|
||||
<p> The result of this approach is that asset value decreases
|
||||
more rapidly at the beginning than at the end which is <em>
|
||||
probably</em> more realistic for most assets than a linear
|
||||
scheme. It is certainly true for automobiles.</p>
|
||||
scheme. This is certainly true for automobiles.</p>
|
||||
|
||||
<p><strong>Example:</strong> We take the same example as above,
|
||||
with a yearly depreciation of 30%.</p>
|
||||
with an annual depreciation of 30%.</p>
|
||||
|
||||
<table summary="Example 2">
|
||||
<tr>
|
||||
<td>Year</td>
|
||||
<th>Year</th>
|
||||
|
||||
<td>Depreciation</td>
|
||||
<th>Depreciation</th>
|
||||
|
||||
<td>Remaining Value</td>
|
||||
<th>Remaining Value</th>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
@ -613,11 +621,11 @@
|
||||
|
||||
<table summary="Example 3">
|
||||
<tr>
|
||||
<td>Year</td>
|
||||
<th>Year</th>
|
||||
|
||||
<td>Depreciation</td>
|
||||
<th>Depreciation</th>
|
||||
|
||||
<td>Remaining Value</td>
|
||||
<th>Remaining Value</th>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
@ -674,14 +682,15 @@
|
||||
which to collect the sum of all of the years' depreciation
|
||||
amounts;</li>
|
||||
|
||||
<li>An <em>Depreciation Expense</em> expense account in which
|
||||
<li>A <em>Depreciation Expense</em> expense account in which
|
||||
to record periodic depreciation expenses.</li>
|
||||
</ul>
|
||||
|
||||
<p>This first step, again, is to record the purchase of your
|
||||
computer by transferring the money from the bank account to the
|
||||
asset account. Afterwards, in each accounting period you record
|
||||
the depreciation as an expense in the appropriate account.</p>
|
||||
<p>The first step, again, is to record the purchase of your
|
||||
asset by transferring the money from bank bank account to the
|
||||
<em>asset cost</em> account. Afterwards, in each accounting
|
||||
period you record the depreciation as an expense in the
|
||||
appropriate account.</p>
|
||||
|
||||
<p>The two windows below show your asset account and the main
|
||||
window after the third year of depreciation using a "sum of
|
||||
|
@ -4,4 +4,4 @@
|
||||
# the HTML files here.
|
||||
for i in *.html ; do
|
||||
tidy -m -i $i
|
||||
donediff -u 'pristine/gnucash/Docs/Fr/xacc-about-fr.html' 'working/gnucash/Docs/Fr/xacc-about-fr.html'
|
||||
done
|
||||
|
@ -23,8 +23,3 @@ all:
|
||||
|
||||
cd lib/g-wrap && \
|
||||
./configure --prefix=${PWD}/lib/g-wrap-install
|
||||
|
||||
|
||||
# Local Variables:
|
||||
# tab-width: 2
|
||||
# End:
|
||||
|
@ -241,5 +241,7 @@ install:
|
||||
# done
|
||||
|
||||
.PHONY: default install-private install
|
||||
.PHONY: motif motif-static motif.static gnome gnome-static gnome.static qt qt.static
|
||||
.PHONY: motif motif-static motif.static
|
||||
.PHONY: gnome gnome-static gnome.static
|
||||
.PHONY: qt qt-static qt.static
|
||||
.PHONY: depend dist clean distclean
|
||||
|
125
configure
vendored
125
configure
vendored
@ -3494,22 +3494,20 @@ GNC_RUNTIME_PERLLIBPATH=`eval echo ${GNC_LIBDIR}`
|
||||
|
||||
|
||||
|
||||
# We have to handle these here because they are the *runtime* (not install
|
||||
# time) defaults, and they're substituted into bootstrap.scm and gnucash.h
|
||||
# directly, so:
|
||||
|
||||
# The variables GNC_RUNTIME_SHAREDIR and GNC_RUNTIME_CONFIGDIR are used
|
||||
# to configure bootstrap.scm and gnucash.h. This configuration is performed
|
||||
# by Makefile.config.finish, invoked at the end of AC_OUTPUT. We have to
|
||||
# handle these separately, because they are the *runtime* (not install
|
||||
# time) defaults, and thus
|
||||
# 1) We don't want them to change if you do
|
||||
# make prefix=foo install
|
||||
# 2) They are normally defined in terms of $prefix so we need to expand
|
||||
# that before substituting into those source files. I wish I knew how
|
||||
# to force a recursive expansion...
|
||||
# This allows you to build distributions in a separate directory.
|
||||
# 2) They are normally defined in terms of $prefix, and AC_OUPUT does
|
||||
# not do recursive substitution, i.e., if we USED AC_OUTPUT to
|
||||
# generate them, we would get ${prefix}/share/gnucash instead
|
||||
# of the fully expanded directory name.
|
||||
|
||||
GNC_RUNTIME_SHAREDIR=`eval echo ${GNC_SHAREDIR}`
|
||||
GNC_RUNTIME_CONFIGDIR=`eval echo ${GNC_CONFIGDIR}`
|
||||
|
||||
|
||||
|
||||
|
||||
#CFLAGS="${CFLAGS} -Werror -Wno-unused"
|
||||
|
||||
ABSOLUTE_TOP_SRCDIR=`pwd`
|
||||
|
||||
@ -3528,17 +3526,17 @@ fi
|
||||
|
||||
ac_safe=`echo "locale.h" | sed 'y%./+-%__p_%'`
|
||||
echo $ac_n "checking for locale.h""... $ac_c" 1>&6
|
||||
echo "configure:3532: checking for locale.h" >&5
|
||||
echo "configure:3530: checking for locale.h" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 3537 "configure"
|
||||
#line 3535 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <locale.h>
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:3542: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:3540: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
||||
if test -z "$ac_err"; then
|
||||
rm -rf conftest*
|
||||
@ -3562,19 +3560,19 @@ fi
|
||||
|
||||
if test "$ac_cv_header_locale_h" = yes; then
|
||||
echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
|
||||
echo "configure:3566: checking for LC_MESSAGES" >&5
|
||||
echo "configure:3564: checking for LC_MESSAGES" >&5
|
||||
if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 3571 "configure"
|
||||
#line 3569 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <locale.h>
|
||||
int main() {
|
||||
return LC_MESSAGES
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:3578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
if { (eval echo configure:3576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
rm -rf conftest*
|
||||
am_cv_val_LC_MESSAGES=yes
|
||||
else
|
||||
@ -3595,7 +3593,7 @@ EOF
|
||||
fi
|
||||
fi
|
||||
echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
|
||||
echo "configure:3599: checking whether NLS is requested" >&5
|
||||
echo "configure:3597: checking whether NLS is requested" >&5
|
||||
# Check whether --enable-nls or --disable-nls was given.
|
||||
if test "${enable_nls+set}" = set; then
|
||||
enableval="$enable_nls"
|
||||
@ -3615,7 +3613,7 @@ fi
|
||||
EOF
|
||||
|
||||
echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
|
||||
echo "configure:3619: checking whether included gettext is requested" >&5
|
||||
echo "configure:3617: checking whether included gettext is requested" >&5
|
||||
# Check whether --with-included-gettext or --without-included-gettext was given.
|
||||
if test "${with_included_gettext+set}" = set; then
|
||||
withval="$with_included_gettext"
|
||||
@ -3634,17 +3632,17 @@ fi
|
||||
|
||||
ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
|
||||
echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
|
||||
echo "configure:3638: checking for libintl.h" >&5
|
||||
echo "configure:3636: checking for libintl.h" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 3643 "configure"
|
||||
#line 3641 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <libintl.h>
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:3648: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:3646: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
||||
if test -z "$ac_err"; then
|
||||
rm -rf conftest*
|
||||
@ -3661,19 +3659,19 @@ fi
|
||||
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
|
||||
echo "$ac_t""yes" 1>&6
|
||||
echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
|
||||
echo "configure:3665: checking for gettext in libc" >&5
|
||||
echo "configure:3663: checking for gettext in libc" >&5
|
||||
if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 3670 "configure"
|
||||
#line 3668 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <libintl.h>
|
||||
int main() {
|
||||
return (int) gettext ("")
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:3677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
if { (eval echo configure:3675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
rm -rf conftest*
|
||||
gt_cv_func_gettext_libc=yes
|
||||
else
|
||||
@ -3689,7 +3687,7 @@ echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
|
||||
|
||||
if test "$gt_cv_func_gettext_libc" != "yes"; then
|
||||
echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
|
||||
echo "configure:3693: checking for bindtextdomain in -lintl" >&5
|
||||
echo "configure:3691: checking for bindtextdomain in -lintl" >&5
|
||||
ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
|
||||
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
@ -3697,7 +3695,7 @@ else
|
||||
ac_save_LIBS="$LIBS"
|
||||
LIBS="-lintl $LIBS"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 3701 "configure"
|
||||
#line 3699 "configure"
|
||||
#include "confdefs.h"
|
||||
/* Override any gcc2 internal prototype to avoid an error. */
|
||||
/* We use char because int might match the return type of a gcc2
|
||||
@ -3708,7 +3706,7 @@ int main() {
|
||||
bindtextdomain()
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:3712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
if { (eval echo configure:3710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_lib_$ac_lib_var=yes"
|
||||
else
|
||||
@ -3724,12 +3722,12 @@ fi
|
||||
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
|
||||
echo "$ac_t""yes" 1>&6
|
||||
echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
|
||||
echo "configure:3728: checking for gettext in libintl" >&5
|
||||
echo "configure:3726: checking for gettext in libintl" >&5
|
||||
if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
echo $ac_n "checking for gettext in -lintl""... $ac_c" 1>&6
|
||||
echo "configure:3733: checking for gettext in -lintl" >&5
|
||||
echo "configure:3731: checking for gettext in -lintl" >&5
|
||||
ac_lib_var=`echo intl'_'gettext | sed 'y%./+-%__p_%'`
|
||||
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
@ -3737,7 +3735,7 @@ else
|
||||
ac_save_LIBS="$LIBS"
|
||||
LIBS="-lintl $LIBS"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 3741 "configure"
|
||||
#line 3739 "configure"
|
||||
#include "confdefs.h"
|
||||
/* Override any gcc2 internal prototype to avoid an error. */
|
||||
/* We use char because int might match the return type of a gcc2
|
||||
@ -3748,7 +3746,7 @@ int main() {
|
||||
gettext()
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:3752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
if { (eval echo configure:3750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_lib_$ac_lib_var=yes"
|
||||
else
|
||||
@ -3787,7 +3785,7 @@ EOF
|
||||
# Extract the first word of "msgfmt", so it can be a program name with args.
|
||||
set dummy msgfmt; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
echo "configure:3791: checking for $ac_word" >&5
|
||||
echo "configure:3789: checking for $ac_word" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@ -3821,12 +3819,12 @@ fi
|
||||
for ac_func in dcgettext
|
||||
do
|
||||
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
|
||||
echo "configure:3825: checking for $ac_func" >&5
|
||||
echo "configure:3823: checking for $ac_func" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 3830 "configure"
|
||||
#line 3828 "configure"
|
||||
#include "confdefs.h"
|
||||
/* System header to define __stub macros and hopefully few prototypes,
|
||||
which can conflict with char $ac_func(); below. */
|
||||
@ -3849,7 +3847,7 @@ $ac_func();
|
||||
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:3853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
if { (eval echo configure:3851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_func_$ac_func=yes"
|
||||
else
|
||||
@ -3876,7 +3874,7 @@ done
|
||||
# Extract the first word of "gmsgfmt", so it can be a program name with args.
|
||||
set dummy gmsgfmt; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
echo "configure:3880: checking for $ac_word" >&5
|
||||
echo "configure:3878: checking for $ac_word" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@ -3912,7 +3910,7 @@ fi
|
||||
# Extract the first word of "msgmerge", so it can be a program name with args.
|
||||
set dummy msgmerge; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
echo "configure:3916: checking for $ac_word" >&5
|
||||
echo "configure:3914: checking for $ac_word" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_path_GMSGMERGE'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@ -3948,7 +3946,7 @@ fi
|
||||
# Extract the first word of "xgettext", so it can be a program name with args.
|
||||
set dummy xgettext; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
echo "configure:3952: checking for $ac_word" >&5
|
||||
echo "configure:3950: checking for $ac_word" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@ -3980,7 +3978,7 @@ else
|
||||
fi
|
||||
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 3984 "configure"
|
||||
#line 3982 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
int main() {
|
||||
@ -3988,7 +3986,7 @@ extern int _nl_msg_cat_cntr;
|
||||
return _nl_msg_cat_cntr
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:3992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
if { (eval echo configure:3990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
rm -rf conftest*
|
||||
CATOBJEXT=.gmo
|
||||
DATADIRNAME=share
|
||||
@ -4011,7 +4009,7 @@ fi
|
||||
|
||||
if test "$CATOBJEXT" = "NONE"; then
|
||||
echo $ac_n "checking whether catgets can be used""... $ac_c" 1>&6
|
||||
echo "configure:4015: checking whether catgets can be used" >&5
|
||||
echo "configure:4013: checking whether catgets can be used" >&5
|
||||
# Check whether --with-catgets or --without-catgets was given.
|
||||
if test "${with_catgets+set}" = set; then
|
||||
withval="$with_catgets"
|
||||
@ -4024,7 +4022,7 @@ fi
|
||||
|
||||
if test "$nls_cv_use_catgets" = "yes"; then
|
||||
echo $ac_n "checking for main in -li""... $ac_c" 1>&6
|
||||
echo "configure:4028: checking for main in -li" >&5
|
||||
echo "configure:4026: checking for main in -li" >&5
|
||||
ac_lib_var=`echo i'_'main | sed 'y%./+-%__p_%'`
|
||||
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
@ -4032,14 +4030,14 @@ else
|
||||
ac_save_LIBS="$LIBS"
|
||||
LIBS="-li $LIBS"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 4036 "configure"
|
||||
#line 4034 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
int main() {
|
||||
main()
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:4043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
if { (eval echo configure:4041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_lib_$ac_lib_var=yes"
|
||||
else
|
||||
@ -4067,12 +4065,12 @@ else
|
||||
fi
|
||||
|
||||
echo $ac_n "checking for catgets""... $ac_c" 1>&6
|
||||
echo "configure:4071: checking for catgets" >&5
|
||||
echo "configure:4069: checking for catgets" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_func_catgets'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 4076 "configure"
|
||||
#line 4074 "configure"
|
||||
#include "confdefs.h"
|
||||
/* System header to define __stub macros and hopefully few prototypes,
|
||||
which can conflict with char catgets(); below. */
|
||||
@ -4095,7 +4093,7 @@ catgets();
|
||||
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:4099: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
if { (eval echo configure:4097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_func_catgets=yes"
|
||||
else
|
||||
@ -4117,7 +4115,7 @@ EOF
|
||||
# Extract the first word of "gencat", so it can be a program name with args.
|
||||
set dummy gencat; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
echo "configure:4121: checking for $ac_word" >&5
|
||||
echo "configure:4119: checking for $ac_word" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_path_GENCAT'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@ -4153,7 +4151,7 @@ fi
|
||||
# Extract the first word of "gmsgfmt", so it can be a program name with args.
|
||||
set dummy gmsgfmt; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
echo "configure:4157: checking for $ac_word" >&5
|
||||
echo "configure:4155: checking for $ac_word" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@ -4190,7 +4188,7 @@ fi
|
||||
# Extract the first word of "msgfmt", so it can be a program name with args.
|
||||
set dummy msgfmt; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
echo "configure:4194: checking for $ac_word" >&5
|
||||
echo "configure:4192: checking for $ac_word" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@ -4225,7 +4223,7 @@ fi
|
||||
# Extract the first word of "xgettext", so it can be a program name with args.
|
||||
set dummy xgettext; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
echo "configure:4229: checking for $ac_word" >&5
|
||||
echo "configure:4227: checking for $ac_word" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@ -4283,7 +4281,7 @@ fi
|
||||
# Extract the first word of "msgfmt", so it can be a program name with args.
|
||||
set dummy msgfmt; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
echo "configure:4287: checking for $ac_word" >&5
|
||||
echo "configure:4285: checking for $ac_word" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@ -4317,7 +4315,7 @@ fi
|
||||
# Extract the first word of "gmsgfmt", so it can be a program name with args.
|
||||
set dummy gmsgfmt; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
echo "configure:4321: checking for $ac_word" >&5
|
||||
echo "configure:4319: checking for $ac_word" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@ -4353,7 +4351,7 @@ fi
|
||||
# Extract the first word of "xgettext", so it can be a program name with args.
|
||||
set dummy xgettext; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
echo "configure:4357: checking for $ac_word" >&5
|
||||
echo "configure:4355: checking for $ac_word" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@ -4448,7 +4446,7 @@ fi
|
||||
LINGUAS=
|
||||
else
|
||||
echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
|
||||
echo "configure:4452: checking for catalogs to be installed" >&5
|
||||
echo "configure:4450: checking for catalogs to be installed" >&5
|
||||
NEW_LINGUAS=
|
||||
for lang in ${LINGUAS=$ALL_LINGUAS}; do
|
||||
case "$ALL_LINGUAS" in
|
||||
@ -4700,8 +4698,6 @@ s%@GNC_LIBDIR@%$GNC_LIBDIR%g
|
||||
s%@GNC_CONFIGDIR@%$GNC_CONFIGDIR%g
|
||||
s%@GNC_SHAREDIR@%$GNC_SHAREDIR%g
|
||||
s%@GNC_RUNTIME_PERLLIBPATH@%$GNC_RUNTIME_PERLLIBPATH%g
|
||||
s%@GNC_RUNTIME_SHAREDIR@%$GNC_RUNTIME_SHAREDIR%g
|
||||
s%@GNC_RUNTIME_CONFIGDIR@%$GNC_RUNTIME_CONFIGDIR%g
|
||||
s%@ABSOLUTE_TOP_SRCDIR@%$ABSOLUTE_TOP_SRCDIR%g
|
||||
s%@LOCALE_DIR@%$LOCALE_DIR%g
|
||||
s%@USE_NLS@%$USE_NLS%g
|
||||
@ -5008,16 +5004,11 @@ cat >> $CONFIG_STATUS <<\EOF
|
||||
case "$CONFIG_FILES" in *po/Makefile.in*)
|
||||
sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
|
||||
esac
|
||||
|
||||
chmod +x gnucash
|
||||
${MAKE-make} -f Makefile.config.finish
|
||||
exit 0
|
||||
EOF
|
||||
chmod +x $CONFIG_STATUS
|
||||
rm -fr confdefs* $ac_clean_files
|
||||
test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
|
||||
|
||||
|
||||
chmod +x gnucash
|
||||
|
||||
${MAKE-make} -f Makefile.config.finish prefix=${prefix} \
|
||||
GNC_SHAREDIR=${GNC_SHAREDIR} \
|
||||
GNC_CONFIGDIR=${GNC_SHAREDIR}
|
||||
|
34
configure.in
34
configure.in
@ -502,22 +502,20 @@ GNC_RUNTIME_PERLLIBPATH=`eval echo ${GNC_LIBDIR}`
|
||||
|
||||
AC_SUBST(GNC_RUNTIME_PERLLIBPATH)
|
||||
|
||||
# We have to handle these here because they are the *runtime* (not install
|
||||
# time) defaults, and they're substituted into bootstrap.scm and gnucash.h
|
||||
# directly, so:
|
||||
|
||||
# The variables GNC_RUNTIME_SHAREDIR and GNC_RUNTIME_CONFIGDIR are used
|
||||
# to configure bootstrap.scm and gnucash.h. This configuration is performed
|
||||
# by Makefile.config.finish, invoked at the end of AC_OUTPUT. We have to
|
||||
# handle these separately, because they are the *runtime* (not install
|
||||
# time) defaults, and thus
|
||||
# 1) We don't want them to change if you do
|
||||
# make prefix=foo install
|
||||
# 2) They are normally defined in terms of $prefix so we need to expand
|
||||
# that before substituting into those source files. I wish I knew how
|
||||
# to force a recursive expansion...
|
||||
# This allows you to build distributions in a separate directory.
|
||||
# 2) They are normally defined in terms of $prefix, and AC_OUPUT does
|
||||
# not do recursive substitution, i.e., if we USED AC_OUTPUT to
|
||||
# generate them, we would get ${prefix}/share/gnucash instead
|
||||
# of the fully expanded directory name.
|
||||
|
||||
GNC_RUNTIME_SHAREDIR=`eval echo ${GNC_SHAREDIR}`
|
||||
GNC_RUNTIME_CONFIGDIR=`eval echo ${GNC_CONFIGDIR}`
|
||||
|
||||
AC_SUBST(GNC_RUNTIME_SHAREDIR)
|
||||
AC_SUBST(GNC_RUNTIME_CONFIGDIR)
|
||||
|
||||
#CFLAGS="${CFLAGS} -Werror -Wno-unused"
|
||||
|
||||
ABSOLUTE_TOP_SRCDIR=`pwd`
|
||||
AC_SUBST(ABSOLUTE_TOP_SRCDIR)
|
||||
@ -560,10 +558,6 @@ AC_OUTPUT(Makefile
|
||||
lib/Makefile
|
||||
lib/Xbae-4.6.2-linas/Makefile
|
||||
lib/Xbae-4.6.2-linas/src/Makefile
|
||||
lib/ComboBox-1.33/Makefile)
|
||||
|
||||
chmod +x gnucash
|
||||
|
||||
${MAKE-make} -f Makefile.config.finish prefix=${prefix} \
|
||||
GNC_SHAREDIR=${GNC_SHAREDIR} \
|
||||
GNC_CONFIGDIR=${GNC_SHAREDIR}
|
||||
lib/ComboBox-1.33/Makefile,
|
||||
chmod +x gnucash
|
||||
${MAKE-make} -f Makefile.config.finish)
|
||||
|
@ -127,3 +127,4 @@ stamp-cat-id
|
||||
po/extract-macros.perl
|
||||
include/messages_i18n.h
|
||||
lib/g-wrap/aclocal.m4
|
||||
src/guile/i18n.h
|
||||
|
256
po/fr.po
256
po/fr.po
@ -1,6 +1,6 @@
|
||||
# Messages en francais pour Gnucash
|
||||
# Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
# Yannick LE NY <y-le-ny@ifrance.com>, 1999.
|
||||
# Yannick LE NY <y-le-ny@ifrance.com>, 1998,1999,2000.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
@ -22,6 +22,8 @@ msgid ""
|
||||
"The GnuCash personal finance manager.\n"
|
||||
"The GNU way to manage your money!"
|
||||
msgstr ""
|
||||
"Le gestionnaire de finances personnelles GnuCash.\n"
|
||||
"La voie GNU pour gérer votre argent!"
|
||||
|
||||
#: messages-i18n.c:12
|
||||
#, fuzzy
|
||||
@ -29,8 +31,8 @@ msgid ""
|
||||
"To adjust an account's balance, you must first\n"
|
||||
"choose an account to adjust.\n"
|
||||
msgstr ""
|
||||
"Pour afficher un compte, vous devez d'abord \n"
|
||||
"choisir un compte à afficher.\n"
|
||||
"Pour ajuster le solde d'un compte, vous devez d'abord \n"
|
||||
"choisir un compte à ajuster.\n"
|
||||
|
||||
#: messages-i18n.c:13
|
||||
msgid ""
|
||||
@ -73,17 +75,17 @@ msgid ""
|
||||
"To open an account, you must first \n"
|
||||
"choose an account to open.\n"
|
||||
msgstr ""
|
||||
"Pour afficher un compte, vous devez d'abord \n"
|
||||
"choisir un compte à afficher.\n"
|
||||
"Pour ouvrir un compte, vous devez d'abord \n"
|
||||
"choisir un compte à ouvrir.\n"
|
||||
|
||||
#: messages-i18n.c:19
|
||||
msgid "You must select an account to scrub."
|
||||
msgstr ""
|
||||
msgstr "Vous devez sélectionner un compte à nettoyer."
|
||||
|
||||
#: messages-i18n.c:20
|
||||
#, fuzzy
|
||||
msgid "You must select an account type."
|
||||
msgstr "Afficher le compte sélectionné."
|
||||
msgstr "Vous devez sélectionner un type de compte."
|
||||
|
||||
#: messages-i18n.c:21
|
||||
#, fuzzy
|
||||
@ -91,33 +93,34 @@ msgid ""
|
||||
"To reconcile an account, you must first \n"
|
||||
"choose an account to reconcile.\n"
|
||||
msgstr ""
|
||||
"Pour supprimer un compte, vous devez d'abord \n"
|
||||
"choisir un compte à supprimer.\n"
|
||||
"Pour rapprocher un compte, vous devez d'abord \n"
|
||||
"choisir un compte à rapprocher.\n"
|
||||
|
||||
#: messages-i18n.c:22
|
||||
#, fuzzy
|
||||
msgid "The amount must be a number."
|
||||
msgstr "Un nom doit etre donné au compte! \n"
|
||||
msgstr "Le montant doit être un nombre."
|
||||
|
||||
#: messages-i18n.c:23
|
||||
#, fuzzy
|
||||
msgid "The balance must be a number."
|
||||
msgstr "Un nom doit etre donné au compte! \n"
|
||||
msgstr "Le solde doit être un nombre."
|
||||
|
||||
#: messages-i18n.c:24
|
||||
msgid "Delete all the splits"
|
||||
msgstr ""
|
||||
msgstr "Supprimer toutes les divisions"
|
||||
|
||||
#: messages-i18n.c:25
|
||||
#, fuzzy
|
||||
msgid "Delete the whole transaction"
|
||||
msgstr "Supprimer la transaction"
|
||||
msgstr "Supprimer la transaction en totalité"
|
||||
|
||||
#: messages-i18n.c:26
|
||||
msgid ""
|
||||
"This selection will delete the whole transaction. This is what you usually "
|
||||
"want."
|
||||
msgstr ""
|
||||
"Cette sélection supprimera transaction en totalité. C'est celà que vous voulez."
|
||||
|
||||
#: messages-i18n.c:27
|
||||
msgid ""
|
||||
@ -125,6 +128,9 @@ msgid ""
|
||||
"probably shouldn't do this unless you're going to immediately add another "
|
||||
"split to bring the transaction back into balance."
|
||||
msgstr ""
|
||||
"Attention: l'ffacement de juste toutes les divisions fera de votre compte, un compte anormal."
|
||||
"Vous ne devrez probablement pas faire celà à moins que vous n'allez immediatement ajouter un autre"
|
||||
"division amener la transaction de retour dans le solde."
|
||||
|
||||
#: messages-i18n.c:28 messages-i18n.c:29
|
||||
#, c-format
|
||||
@ -152,14 +158,16 @@ msgid ""
|
||||
"This file appears to be from a newer version of GnuCash. \n"
|
||||
"Do you want to continue?"
|
||||
msgstr ""
|
||||
"Ce fichier semble provenir d'une nouvelle version de GnuCash. Voulez-vous "
|
||||
"continuer?"
|
||||
"Ce fichier semble provenir d'une nouvelle version de GnuCash. \n"
|
||||
"Voulez-vous continuer?"
|
||||
|
||||
#: messages-i18n.c:32
|
||||
msgid ""
|
||||
"There was an error reading the file. \n"
|
||||
"Do you want to continue?"
|
||||
msgstr "Il y a une erreur de lecture du fichier. Voulez-vous continuer?"
|
||||
msgstr ""
|
||||
"Il y a une erreur de lecture du fichier. \n"
|
||||
"Voulez-vous continuer?"
|
||||
|
||||
#: messages-i18n.c:33
|
||||
#, c-format
|
||||
@ -170,7 +178,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Le fichier \n"
|
||||
" %s\n"
|
||||
" ne peut pas etre trouvé."
|
||||
" ne peut pas être trouvé."
|
||||
|
||||
#: messages-i18n.c:34
|
||||
#, c-format
|
||||
@ -200,7 +208,7 @@ msgstr ""
|
||||
"Le fichier \n"
|
||||
" %s\n"
|
||||
" existe déjà.\n"
|
||||
"Etes-vous sur de vouloir l'écraser ?"
|
||||
"Etes-vous sûr de vouloir l'écraser ?"
|
||||
|
||||
#: messages-i18n.c:37
|
||||
#, c-format
|
||||
@ -228,7 +236,7 @@ msgstr ""
|
||||
|
||||
#: messages-i18n.c:39
|
||||
msgid "The source for price quotes"
|
||||
msgstr ""
|
||||
msgstr "La source des cours des actions"
|
||||
|
||||
#: messages-i18n.c:40
|
||||
#, fuzzy
|
||||
@ -236,10 +244,8 @@ msgid ""
|
||||
"The account is not balanced.\n"
|
||||
"Are you sure you want to finish?"
|
||||
msgstr ""
|
||||
"Le fichier \n"
|
||||
" %s\n"
|
||||
" existe déjà.\n"
|
||||
"Etes-vous sur de vouloir l'écraser ?"
|
||||
"Le compte n'est pas soldé.\n"
|
||||
"Etes-vous sûr de vouloir terminer?"
|
||||
|
||||
#: messages-i18n.c:41
|
||||
msgid "Warning! This is a reconciled transaction. Do you want do continue?"
|
||||
@ -248,13 +254,16 @@ msgstr ""
|
||||
|
||||
#: messages-i18n.c:42
|
||||
msgid "Show the income and expense accounts."
|
||||
msgstr ""
|
||||
msgstr "Montrer les comptes de revenus et dépenses."
|
||||
|
||||
#: messages-i18n.c:43
|
||||
msgid ""
|
||||
"The current transaction has been changed.\n"
|
||||
"Would you like to record it?"
|
||||
msgstr ""
|
||||
"La transaction en cours a été modifié.\n"
|
||||
"Voulez vous l'enregistrer?"
|
||||
|
||||
|
||||
#: messages-i18n.c:44
|
||||
#, c-format
|
||||
@ -264,14 +273,15 @@ msgid ""
|
||||
"from the transaction\n"
|
||||
" %s ?"
|
||||
msgstr ""
|
||||
"Etes-vous sur de vouloir \n"
|
||||
" supprimer la transaction \n"
|
||||
" %s ?"
|
||||
"Etes-vous sûr de vouloir supprimer\n"
|
||||
" %s\n"
|
||||
" depuis la transaction\n"
|
||||
" %s ?"
|
||||
|
||||
#: messages-i18n.c:45
|
||||
#, fuzzy
|
||||
msgid "Are you sure you want to delete the current transaction?"
|
||||
msgstr "Etes-vous sur de vouloir supprimer le compte %s ?"
|
||||
msgstr "Etes-vous sur de vouloir supprimer la transaction en cours?"
|
||||
|
||||
#: messages-i18n.c:46
|
||||
msgid ""
|
||||
@ -279,20 +289,22 @@ msgid ""
|
||||
"created before you can transfer funds."
|
||||
msgstr ""
|
||||
"Il doit y avoir au moins deux comptes\n"
|
||||
"créés avant que vous puissiez transférer des fonds."
|
||||
"créés avant que vous ne puissiez transférer des fonds."
|
||||
|
||||
#: messages-i18n.c:47
|
||||
msgid ""
|
||||
"You cannot transfer between those accounts.\n"
|
||||
"They do not have a common currency."
|
||||
msgstr ""
|
||||
"Vous ne pouvez pas transférer entre ces comptes.\n"
|
||||
"Ils n'ont pas une monnaie commune."
|
||||
|
||||
#: messages-i18n.c:48
|
||||
msgid ""
|
||||
"The \"From\" and \"To\" accounts\n"
|
||||
" must be different!"
|
||||
msgstr ""
|
||||
"Le \"depuis\" et \"vers\" les comptes\n"
|
||||
"Les comptes \"depuis\" et \"vers\" \n"
|
||||
" doivent etre differents!"
|
||||
|
||||
#: messages-i18n.c:49
|
||||
@ -312,44 +324,44 @@ msgstr ""
|
||||
#: messages-i18n.c:51
|
||||
#, fuzzy
|
||||
msgid "Adjust the balance of the selected account."
|
||||
msgstr "Supprimer le compte sélectionné."
|
||||
msgstr "Ajuster le solde du compte sélectionné."
|
||||
|
||||
#: messages-i18n.c:52
|
||||
#, fuzzy
|
||||
msgid "Adjust the ending balance"
|
||||
msgstr "Ajuster le solde"
|
||||
msgstr "Ajuster le solde final"
|
||||
|
||||
#: messages-i18n.c:53
|
||||
#, fuzzy
|
||||
msgid "Adjust the balance of the main account for this register."
|
||||
msgstr "Supprimer le compte sélectionné."
|
||||
msgstr "Ajuster le solde du compte principal pour ce registre."
|
||||
|
||||
#: messages-i18n.c:54
|
||||
msgid "Double line mode with a multi-line cursor"
|
||||
msgstr ""
|
||||
msgstr "Mode ligne double avec un curseur multi-ligne"
|
||||
|
||||
#: messages-i18n.c:55
|
||||
msgid "Single line mode with a multi-line cursor"
|
||||
msgstr ""
|
||||
msgstr "Mode ligne simple avec un curseur multi-ligne"
|
||||
|
||||
#: messages-i18n.c:56
|
||||
#, fuzzy
|
||||
msgid "Cancel the current transaction"
|
||||
msgstr "Supprimer la transaction"
|
||||
msgstr "Supprimer la transaction en cours"
|
||||
|
||||
#: messages-i18n.c:57
|
||||
#, fuzzy
|
||||
msgid "Close this HTML window."
|
||||
msgstr "Fermer la fenetre"
|
||||
msgstr "Fermer cette fenêtre HTML."
|
||||
|
||||
#: messages-i18n.c:58
|
||||
#, fuzzy
|
||||
msgid "Close this register window."
|
||||
msgstr "Fermer la fenetre"
|
||||
msgstr "Fermer cette fenetre du registre"
|
||||
|
||||
#: messages-i18n.c:59
|
||||
msgid "Set the date range of this register"
|
||||
msgstr ""
|
||||
msgstr "Mettre une échelle de date pour ce registre"
|
||||
|
||||
#: messages-i18n.c:60
|
||||
msgid "Delete selected account."
|
||||
@ -358,11 +370,11 @@ msgstr "Supprimer le compte s
|
||||
#: messages-i18n.c:61
|
||||
#, fuzzy
|
||||
msgid "Delete the current transaction"
|
||||
msgstr "Supprimer la transaction"
|
||||
msgstr "Supprimer la transaction en cours"
|
||||
|
||||
#: messages-i18n.c:62
|
||||
msgid "Show transactions on two lines with more information"
|
||||
msgstr ""
|
||||
msgstr "Montrer les transactions sur deux lignes avec plus d'informations"
|
||||
|
||||
#: messages-i18n.c:63
|
||||
#, fuzzy
|
||||
@ -371,12 +383,12 @@ msgstr "Afficher le compte s
|
||||
|
||||
#: messages-i18n.c:64
|
||||
msgid "Edit the main account for this register."
|
||||
msgstr ""
|
||||
msgstr "Afficher le compte principal pour ce registre."
|
||||
|
||||
#: messages-i18n.c:65
|
||||
#, fuzzy
|
||||
msgid "Edit the current transaction"
|
||||
msgstr "Supprimer la transaction"
|
||||
msgstr "Afficher la transaction en cours"
|
||||
|
||||
#: messages-i18n.c:66
|
||||
msgid "Exit GnuCash."
|
||||
@ -384,28 +396,28 @@ msgstr "Quitter GnuCash."
|
||||
|
||||
#: messages-i18n.c:67
|
||||
msgid "Open the GnuCash help window."
|
||||
msgstr ""
|
||||
msgstr "Ouvrir la fenêtre d'aide de Gnucash."
|
||||
|
||||
#: messages-i18n.c:68
|
||||
msgid "Move back one step in the history."
|
||||
msgstr ""
|
||||
msgstr "Reculer d'un pas dans l'historique."
|
||||
|
||||
#: messages-i18n.c:69
|
||||
msgid "Move forward one step in the history."
|
||||
msgstr ""
|
||||
msgstr "Avancer d'un pas dans l'historique."
|
||||
|
||||
#: messages-i18n.c:70
|
||||
msgid "Import a Quicken QIF file."
|
||||
msgstr ""
|
||||
msgstr "Importer un fichier QIF de Quicken."
|
||||
|
||||
#: messages-i18n.c:71
|
||||
#, fuzzy
|
||||
msgid "Jump to the corresponding transaction in the other account"
|
||||
msgstr "Vous ne pouvez pas transférer depuis et vers le meme compte!"
|
||||
msgstr "Sauter à la transaction correspondante dans l'autre compte"
|
||||
|
||||
#: messages-i18n.c:72
|
||||
msgid "Show transactions on multiple lines with one line for each split"
|
||||
msgstr ""
|
||||
msgstr "Montrer les transactions sur de multiples lignes avec une ligne pour chaque division"
|
||||
|
||||
#: messages-i18n.c:73
|
||||
msgid "Create a new account."
|
||||
@ -414,102 +426,102 @@ msgstr "Cr
|
||||
#: messages-i18n.c:74
|
||||
#, fuzzy
|
||||
msgid "Create a new file."
|
||||
msgstr "Créer un nouveau compte."
|
||||
msgstr "Créer un nouveau fichier."
|
||||
|
||||
#: messages-i18n.c:75
|
||||
#, fuzzy
|
||||
msgid "Add a new transaction to the account"
|
||||
msgstr "Vous ne pouvez pas transférer depuis et vers le meme compte!"
|
||||
msgstr "Ajouter une nouvelle transaction au compte"
|
||||
|
||||
#: messages-i18n.c:76
|
||||
#, fuzzy
|
||||
msgid "Open the selected account."
|
||||
msgstr "Supprimer le compte sélectionné."
|
||||
msgstr "Ouvrir le compte sélectionné."
|
||||
|
||||
#: messages-i18n.c:77
|
||||
#, fuzzy
|
||||
msgid "Open the selected account and all its subaccounts."
|
||||
msgstr "Supprimer le compte sélectionné."
|
||||
msgstr "Ouvrir le compte sélectionné et tous ses sous-comptes."
|
||||
|
||||
#: messages-i18n.c:78
|
||||
#, fuzzy
|
||||
msgid "Open a file."
|
||||
msgstr "Ouvrir fichier"
|
||||
msgstr "Ouvrir un fichier"
|
||||
|
||||
#: messages-i18n.c:79
|
||||
msgid "Open the global preferences dialog."
|
||||
msgstr ""
|
||||
msgstr "Ouvrir la boîte des préférence globales."
|
||||
|
||||
#: messages-i18n.c:80
|
||||
#, fuzzy
|
||||
msgid "Reconcile the selected account."
|
||||
msgstr "Supprimer le compte sélectionné."
|
||||
msgstr "Rapprocher le compte sélectionné."
|
||||
|
||||
#: messages-i18n.c:81
|
||||
#, fuzzy
|
||||
msgid "Reconcile the main account for this register."
|
||||
msgstr "Supprimer le compte sélectionné."
|
||||
msgstr "Rapprocher le compte principal pour ce registre."
|
||||
|
||||
#: messages-i18n.c:82
|
||||
#, fuzzy
|
||||
msgid "Record the current transaction"
|
||||
msgstr "Supprimer la transaction"
|
||||
msgstr "Enregistrer la transaction en cours"
|
||||
|
||||
#: messages-i18n.c:83
|
||||
msgid "Set the parameters for this report."
|
||||
msgstr ""
|
||||
msgstr "Mettre des paramètres pour ce rapport."
|
||||
|
||||
#: messages-i18n.c:84
|
||||
msgid "Save the file to disk."
|
||||
msgstr ""
|
||||
msgstr "Sauvegarder le fichier sur le disque."
|
||||
|
||||
#: messages-i18n.c:85
|
||||
msgid "Identify and fix problems in the account."
|
||||
msgstr ""
|
||||
msgstr "Identification et corrrection des problèmes dans le compte."
|
||||
|
||||
#: messages-i18n.c:86
|
||||
msgid "Identify and fix problems in all the accounts."
|
||||
msgstr ""
|
||||
msgstr "Identification et corrrection des problèmes dans tous les comptes."
|
||||
|
||||
#: messages-i18n.c:87
|
||||
msgid "Identify and fix problems in the account and its subaccounts."
|
||||
msgstr ""
|
||||
msgstr "Identification et corrrection des problèmes dans le compte et ces sous-comptes."
|
||||
|
||||
#: messages-i18n.c:88
|
||||
msgid "Identify and fix problems in the accounts of this register."
|
||||
msgstr ""
|
||||
msgstr "Identification et corrrection des problèmes dans les comptes de ce registre."
|
||||
|
||||
#: messages-i18n.c:89
|
||||
msgid "Show transactions on single lines"
|
||||
msgstr ""
|
||||
msgstr "Montrer les transactions sur des lignes simples"
|
||||
|
||||
#: messages-i18n.c:90
|
||||
msgid "Sort by Amount, then Date, then Num"
|
||||
msgstr ""
|
||||
msgstr "Trier par Montant, puis Date, puis Num"
|
||||
|
||||
#: messages-i18n.c:91
|
||||
msgid "Sort by Date, then Num, then Amount"
|
||||
msgstr ""
|
||||
msgstr "Trier par Date, puis Num, puis Montant"
|
||||
|
||||
#: messages-i18n.c:92
|
||||
msgid "Sort by Description, then Date, then Num"
|
||||
msgstr ""
|
||||
msgstr "Trier par Description, puis Date, puis Num"
|
||||
|
||||
#: messages-i18n.c:93
|
||||
msgid "Sort by Memo, then Date, then Num"
|
||||
msgstr ""
|
||||
msgstr "Trier par Memo, puis Date, puis Num"
|
||||
|
||||
#: messages-i18n.c:94
|
||||
msgid "Sort by Num, then Date, then Amount"
|
||||
msgstr ""
|
||||
msgstr "Trier par Num, puis Date, puis Montant"
|
||||
|
||||
#: messages-i18n.c:95
|
||||
msgid "Keep normal account order"
|
||||
msgstr ""
|
||||
msgstr "Garder l'ordre normal du compte"
|
||||
|
||||
#: messages-i18n.c:96
|
||||
msgid "Transfer funds from one account to another."
|
||||
msgstr ""
|
||||
msgstr "Transfert de fonds depuis un compte vers un autre."
|
||||
|
||||
#: messages-i18n.c:97
|
||||
msgid "Account Code"
|
||||
@ -521,7 +533,7 @@ msgstr "Nom du compte"
|
||||
|
||||
#: messages-i18n.c:99
|
||||
msgid "Account Type"
|
||||
msgstr "Type du compte"
|
||||
msgstr "Type de compte"
|
||||
|
||||
#: messages-i18n.c:100
|
||||
msgid "Adjust Balance"
|
||||
@ -530,16 +542,16 @@ msgstr "Ajuster le solde"
|
||||
#: messages-i18n.c:101
|
||||
#, fuzzy
|
||||
msgid "Auto Double"
|
||||
msgstr "Dépot Automatique"
|
||||
msgstr "Double automatique"
|
||||
|
||||
#: messages-i18n.c:102
|
||||
msgid "Auto Single"
|
||||
msgstr ""
|
||||
msgstr "Simple automatique"
|
||||
|
||||
#: messages-i18n.c:103
|
||||
#, fuzzy
|
||||
msgid "Clear All"
|
||||
msgstr "Solde pointé"
|
||||
msgstr "Tout pointé"
|
||||
|
||||
#: messages-i18n.c:104
|
||||
msgid "Close Window"
|
||||
@ -555,7 +567,7 @@ msgstr "Ligne de cr
|
||||
|
||||
#: messages-i18n.c:107
|
||||
msgid "Date Range"
|
||||
msgstr ""
|
||||
msgstr "Echelle de date"
|
||||
|
||||
#: messages-i18n.c:108
|
||||
msgid "Delete Account"
|
||||
@ -567,7 +579,7 @@ msgstr "Supprimer la transaction"
|
||||
|
||||
#: messages-i18n.c:110
|
||||
msgid "Double Line"
|
||||
msgstr ""
|
||||
msgstr "Ligne double"
|
||||
|
||||
#: messages-i18n.c:111
|
||||
msgid "Edit Account"
|
||||
@ -579,11 +591,11 @@ msgstr "Solde final"
|
||||
|
||||
#: messages-i18n.c:113
|
||||
msgid "End date"
|
||||
msgstr ""
|
||||
msgstr "Date de fin"
|
||||
|
||||
#: messages-i18n.c:114
|
||||
msgid "General Ledger"
|
||||
msgstr ""
|
||||
msgstr "Registre général"
|
||||
|
||||
#: messages-i18n.c:115
|
||||
msgid "Hide Inc/Exp"
|
||||
@ -603,7 +615,7 @@ msgstr "March
|
||||
|
||||
#: messages-i18n.c:119
|
||||
msgid "Multi Line"
|
||||
msgstr ""
|
||||
msgstr "Ligne multiple"
|
||||
|
||||
#: messages-i18n.c:120
|
||||
msgid "Mutual Fund"
|
||||
@ -624,7 +636,7 @@ msgstr "Nouveau fichier"
|
||||
#: messages-i18n.c:124
|
||||
#, fuzzy
|
||||
msgid "New top level account"
|
||||
msgstr "Supprimer le compte sélectionné."
|
||||
msgstr "Nouveau compte de niveau supérieur."
|
||||
|
||||
#: messages-i18n.c:125
|
||||
msgid "Open Account"
|
||||
@ -664,7 +676,7 @@ msgstr "Source des cours d'actions"
|
||||
|
||||
#: messages-i18n.c:134
|
||||
msgid "Register date ranges"
|
||||
msgstr ""
|
||||
msgstr "Echelles de dates du registre"
|
||||
|
||||
#: messages-i18n.c:135
|
||||
msgid "Sale Price"
|
||||
@ -677,35 +689,35 @@ msgstr "Enregistrer sous"
|
||||
#: messages-i18n.c:137
|
||||
#, fuzzy
|
||||
msgid "Scrub Account"
|
||||
msgstr "Compte"
|
||||
msgstr "Nettoyer le compte"
|
||||
|
||||
#: messages-i18n.c:138
|
||||
#, fuzzy
|
||||
msgid "Scrub All"
|
||||
msgstr "Fouiller"
|
||||
msgstr "Tout nettoyer"
|
||||
|
||||
#: messages-i18n.c:139
|
||||
#, fuzzy
|
||||
msgid "Scrub Subaccounts"
|
||||
msgstr "Ouvrir sous-comptes"
|
||||
msgstr "Nettoyer les sous-comptes"
|
||||
|
||||
#: messages-i18n.c:140
|
||||
#, fuzzy
|
||||
msgid "Select All"
|
||||
msgstr "Fouiller"
|
||||
msgstr "Tout sélectionner"
|
||||
|
||||
#: messages-i18n.c:141
|
||||
#, fuzzy
|
||||
msgid "Select Default"
|
||||
msgstr "Fouiller"
|
||||
msgstr "Selectionner par défaut"
|
||||
|
||||
#: messages-i18n.c:142
|
||||
msgid "Set to default"
|
||||
msgstr ""
|
||||
msgstr "Mettre par défaut"
|
||||
|
||||
#: messages-i18n.c:143
|
||||
msgid "Set Up Account"
|
||||
msgstr "Dresser un compte"
|
||||
msgstr "Configurer un compte"
|
||||
|
||||
#: messages-i18n.c:144
|
||||
msgid "Show Inc/Exp"
|
||||
@ -713,45 +725,45 @@ msgstr "Montrer Revenus/D
|
||||
|
||||
#: messages-i18n.c:145
|
||||
msgid "Show Categories"
|
||||
msgstr ""
|
||||
msgstr "Montrer catégories"
|
||||
|
||||
#: messages-i18n.c:146
|
||||
msgid "Single Line"
|
||||
msgstr ""
|
||||
msgstr "Ligne unique"
|
||||
|
||||
#: messages-i18n.c:147
|
||||
#, fuzzy
|
||||
msgid "Sort by Amount"
|
||||
msgstr "Compte"
|
||||
msgstr "Trier par montant"
|
||||
|
||||
#: messages-i18n.c:148
|
||||
msgid "Sort by Date"
|
||||
msgstr ""
|
||||
msgstr "Trier par date"
|
||||
|
||||
#: messages-i18n.c:149
|
||||
#, fuzzy
|
||||
msgid "Sort by Description"
|
||||
msgstr "Description"
|
||||
msgstr "Trier par description"
|
||||
|
||||
#: messages-i18n.c:150
|
||||
msgid "Sort by Memo"
|
||||
msgstr ""
|
||||
msgstr "Trier par mémo"
|
||||
|
||||
#: messages-i18n.c:151
|
||||
msgid "Sort by Num"
|
||||
msgstr ""
|
||||
msgstr "Trier par num"
|
||||
|
||||
#: messages-i18n.c:152
|
||||
msgid "Sort Order"
|
||||
msgstr ""
|
||||
msgstr "Ordre de tri"
|
||||
|
||||
#: messages-i18n.c:153
|
||||
msgid "Start date"
|
||||
msgstr ""
|
||||
msgstr "Date de départ"
|
||||
|
||||
#: messages-i18n.c:154
|
||||
msgid "Standard order"
|
||||
msgstr ""
|
||||
msgstr "Ordre standard"
|
||||
|
||||
#: messages-i18n.c:155
|
||||
msgid "Tot Shrs"
|
||||
@ -760,7 +772,7 @@ msgstr "Nombre"
|
||||
#: messages-i18n.c:156
|
||||
#, fuzzy
|
||||
msgid "Transfer Information"
|
||||
msgstr "Transfert depuis"
|
||||
msgstr "Transfert d'informations"
|
||||
|
||||
#: messages-i18n.c:157
|
||||
msgid "Transfer Money"
|
||||
@ -772,7 +784,7 @@ msgstr "Transfert depuis"
|
||||
|
||||
#: messages-i18n.c:159
|
||||
msgid "Transfer To"
|
||||
msgstr "Transferer à"
|
||||
msgstr "Transferer vers"
|
||||
|
||||
#: messages-i18n.c:160
|
||||
msgid "About"
|
||||
@ -789,7 +801,7 @@ msgstr "Comptes"
|
||||
#: messages-i18n.c:163
|
||||
#, fuzzy
|
||||
msgid "Account Information"
|
||||
msgstr "Transfert depuis"
|
||||
msgstr "Informations du compte"
|
||||
|
||||
#: messages-i18n.c:164
|
||||
msgid "AutoDep"
|
||||
@ -869,7 +881,7 @@ msgstr "V
|
||||
|
||||
#: messages-i18n.c:183
|
||||
msgid "Cleared"
|
||||
msgstr "Solde pointé"
|
||||
msgstr "Pointé"
|
||||
|
||||
#: messages-i18n.c:184
|
||||
msgid "Close"
|
||||
@ -901,11 +913,11 @@ msgstr "Date"
|
||||
|
||||
#: messages-i18n.c:191
|
||||
msgid "Debit"
|
||||
msgstr "Debit"
|
||||
msgstr "Débiter"
|
||||
|
||||
#: messages-i18n.c:192
|
||||
msgid "Debits"
|
||||
msgstr "Debits"
|
||||
msgstr "Débits"
|
||||
|
||||
#: messages-i18n.c:193
|
||||
msgid "Decrease"
|
||||
@ -921,7 +933,7 @@ msgstr "Supprimer"
|
||||
|
||||
#: messages-i18n.c:196
|
||||
msgid "Deposit"
|
||||
msgstr "Depot"
|
||||
msgstr "Dépot"
|
||||
|
||||
#: messages-i18n.c:197
|
||||
msgid "Depreciation"
|
||||
@ -954,7 +966,7 @@ msgstr "Capitaux propres"
|
||||
#: messages-i18n.c:204
|
||||
#, fuzzy
|
||||
msgid "Exit"
|
||||
msgstr "Afficher"
|
||||
msgstr "Quitter"
|
||||
|
||||
#: messages-i18n.c:205
|
||||
msgid "Expense"
|
||||
@ -962,7 +974,7 @@ msgstr "D
|
||||
|
||||
#: messages-i18n.c:206
|
||||
msgid "Extensions"
|
||||
msgstr ""
|
||||
msgstr "Extensions"
|
||||
|
||||
#: messages-i18n.c:207
|
||||
msgid "Fee"
|
||||
@ -983,7 +995,7 @@ msgstr "Depuis"
|
||||
#: messages-i18n.c:211
|
||||
#, fuzzy
|
||||
msgid "GnuCash Preferences"
|
||||
msgstr "Différence"
|
||||
msgstr "Préférences de GnuCash"
|
||||
|
||||
#: messages-i18n.c:212
|
||||
msgid "Help"
|
||||
@ -992,7 +1004,7 @@ msgstr "Aide"
|
||||
#: messages-i18n.c:213
|
||||
#, fuzzy
|
||||
msgid "Import"
|
||||
msgstr "Importer QIF"
|
||||
msgstr "Importer"
|
||||
|
||||
#: messages-i18n.c:214
|
||||
msgid "Income"
|
||||
@ -1008,7 +1020,7 @@ msgstr "Int"
|
||||
|
||||
#: messages-i18n.c:217
|
||||
msgid "Jump"
|
||||
msgstr ""
|
||||
msgstr "Sauter"
|
||||
|
||||
#: messages-i18n.c:218
|
||||
msgid "Liability"
|
||||
@ -1064,7 +1076,7 @@ msgstr "Ouvrir"
|
||||
|
||||
#: messages-i18n.c:231
|
||||
msgid "Parameters"
|
||||
msgstr ""
|
||||
msgstr "Paramètres"
|
||||
|
||||
#: messages-i18n.c:232
|
||||
msgid "Payment"
|
||||
@ -1072,7 +1084,7 @@ msgstr "Paiement"
|
||||
|
||||
#: messages-i18n.c:233
|
||||
msgid "Portfolio"
|
||||
msgstr ""
|
||||
msgstr "Portefeuille"
|
||||
|
||||
#: messages-i18n.c:234
|
||||
msgid "POS"
|
||||
@ -1081,7 +1093,7 @@ msgstr "DAB"
|
||||
#: messages-i18n.c:235
|
||||
#, fuzzy
|
||||
msgid "Preferences"
|
||||
msgstr "Différence"
|
||||
msgstr "Préferences"
|
||||
|
||||
#: messages-i18n.c:236
|
||||
msgid "Price"
|
||||
@ -1117,7 +1129,7 @@ msgstr "Enregistrer"
|
||||
|
||||
#: messages-i18n.c:244
|
||||
msgid "Register"
|
||||
msgstr ""
|
||||
msgstr "Registre"
|
||||
|
||||
#: messages-i18n.c:245
|
||||
msgid "Report"
|
||||
@ -1133,7 +1145,7 @@ msgstr "Epargne"
|
||||
|
||||
#: messages-i18n.c:248
|
||||
msgid "Scrub"
|
||||
msgstr "Fouiller"
|
||||
msgstr "Nettoyer"
|
||||
|
||||
#: messages-i18n.c:249
|
||||
msgid "Security"
|
||||
@ -1146,7 +1158,7 @@ msgstr "Vendre"
|
||||
#: messages-i18n.c:251
|
||||
#, fuzzy
|
||||
msgid "Settings"
|
||||
msgstr "Epargne"
|
||||
msgstr "Paramètres"
|
||||
|
||||
#: messages-i18n.c:252
|
||||
msgid "Simple"
|
||||
@ -1158,7 +1170,7 @@ msgstr "Vendu"
|
||||
|
||||
#: messages-i18n.c:254
|
||||
msgid "Spend"
|
||||
msgstr "Depense"
|
||||
msgstr "Dépenser"
|
||||
|
||||
#: messages-i18n.c:255
|
||||
msgid "Split"
|
||||
@ -1174,7 +1186,7 @@ msgstr "Actions"
|
||||
|
||||
#: messages-i18n.c:258
|
||||
msgid "Style"
|
||||
msgstr ""
|
||||
msgstr "Style"
|
||||
|
||||
#: messages-i18n.c:259
|
||||
msgid "Surplus"
|
||||
@ -1191,7 +1203,7 @@ msgstr "Vers"
|
||||
#: messages-i18n.c:262
|
||||
#, fuzzy
|
||||
msgid "Today"
|
||||
msgstr "Total"
|
||||
msgstr "Aujourd'hui"
|
||||
|
||||
#: messages-i18n.c:263
|
||||
msgid "Total"
|
||||
@ -1204,7 +1216,7 @@ msgstr "Type"
|
||||
#: messages-i18n.c:265
|
||||
#, fuzzy
|
||||
msgid "Transaction"
|
||||
msgstr "Supprimer la transaction"
|
||||
msgstr "Transaction"
|
||||
|
||||
#: messages-i18n.c:266
|
||||
msgid "Transfer"
|
||||
|
@ -854,6 +854,13 @@ xaccConsolidateTransactions (Account * acc)
|
||||
sb = acc->splits[j];
|
||||
tb = sb->parent;
|
||||
|
||||
/* A single transaction can have multiple splits in the same
|
||||
* account. For instance, a split deposit in AccountA of two
|
||||
* checks from AccountB creates two splits in AccountB with
|
||||
* the same parent transaction. Skip this case.
|
||||
*/
|
||||
if (ta == tb) continue;
|
||||
|
||||
/* if no match, then continue on in the loop.
|
||||
* we really must match everything to get a duplicate */
|
||||
retval = xaccTransMatch (&ta, &tb);
|
||||
|
@ -830,7 +830,7 @@ xaccReadQIFTransaction (int fd, Account *acc, int guess_name,
|
||||
break;
|
||||
case 'I': /* I == share price */
|
||||
{
|
||||
double amt = xaccParseUSAmount (&qifline[1]);
|
||||
double amt = xaccParseQIFAmount (&qifline[1]);
|
||||
xaccSplitSetSharePrice (source_split, amt);
|
||||
}
|
||||
break;
|
||||
@ -896,7 +896,7 @@ xaccReadQIFTransaction (int fd, Account *acc, int guess_name,
|
||||
* math errors ... */
|
||||
{
|
||||
double pute;
|
||||
adjust = xaccParseUSAmount (&qifline[1]);
|
||||
adjust = xaccParseQIFAmount (&qifline[1]);
|
||||
pute = xaccSplitGetValue (source_split);
|
||||
if (isneg) pute = -pute;
|
||||
|
||||
@ -922,7 +922,7 @@ xaccReadQIFTransaction (int fd, Account *acc, int guess_name,
|
||||
case 'Q':
|
||||
/* Q == number of shares */
|
||||
{
|
||||
double amt = xaccParseUSAmount (&qifline[1]);
|
||||
double amt = xaccParseQIFAmount (&qifline[1]);
|
||||
if (isneg) amt = -amt;
|
||||
xaccSplitSetShareAmount (source_split, amt);
|
||||
got_share_quantity = 1;
|
||||
@ -944,7 +944,7 @@ xaccReadQIFTransaction (int fd, Account *acc, int guess_name,
|
||||
/* T == total */
|
||||
/* ignore T for stock transactions, since T is a dollar amount */
|
||||
if (0 == got_share_quantity) {
|
||||
double amt = xaccParseUSAmount (&qifline[1]);
|
||||
double amt = xaccParseQIFAmount (&qifline[1]);
|
||||
if (isneg) amt = -amt;
|
||||
xaccSplitSetValue (source_split, amt);
|
||||
}
|
||||
@ -964,7 +964,7 @@ xaccReadQIFTransaction (int fd, Account *acc, int guess_name,
|
||||
/* $ == dollar amount */
|
||||
/* for splits, $ records the part of the total for each split */
|
||||
if (split) {
|
||||
double amt = xaccParseUSAmount (&qifline[1]);
|
||||
double amt = xaccParseQIFAmount (&qifline[1]);
|
||||
amt = -amt;
|
||||
xaccSplitSetValue (split, amt);
|
||||
} else {
|
||||
@ -977,7 +977,7 @@ xaccReadQIFTransaction (int fd, Account *acc, int guess_name,
|
||||
*/
|
||||
double parse, pute;
|
||||
int got, wanted;
|
||||
parse = xaccParseUSAmount (&qifline[1]);
|
||||
parse = xaccParseQIFAmount (&qifline[1]);
|
||||
pute = xaccSplitGetValue (source_split);
|
||||
if (isneg) pute = -pute;
|
||||
|
||||
|
@ -1511,7 +1511,7 @@ xaccTransMatch (Transaction **tap, Transaction **tbp)
|
||||
while ((sb=tb->splits[nb])) {
|
||||
if (-1 < sb->tickee) {nb++; continue;}
|
||||
retval = xaccSplitMatch (&sa, &sb);
|
||||
if ((0 == retval) && (sa->acc = sb->acc)) {
|
||||
if ((0 == retval) && (sa->acc == sb->acc)) {
|
||||
sb->tickee = na;
|
||||
sa->tickee = nb;
|
||||
break;
|
||||
|
@ -27,9 +27,11 @@
|
||||
#include <malloc.h>
|
||||
#include <math.h>
|
||||
#include <string.h>
|
||||
#include <locale.h>
|
||||
|
||||
#include "config.h"
|
||||
#include "messages.h"
|
||||
#include "gnc-common.h"
|
||||
#include "util.h"
|
||||
|
||||
/* hack alert -- stpcpy prototype is missing, use -DGNU */
|
||||
@ -201,72 +203,106 @@ stpcpy (char *dest, const char *src)
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/********************************************************************\
|
||||
* currency & locale related stuff.
|
||||
* first attempt at internationalization i18n of currency amounts
|
||||
* In the long run, amounts should be printed with punctuation
|
||||
* returned from the localconv() subroutine
|
||||
\********************************************************************/
|
||||
|
||||
|
||||
/* THOU_SEP is a comma in U.S. but a period in some parts of Europe */
|
||||
/* CENT_SEP is a period in U.S. but a comma in some parts of Europe */
|
||||
#define THOU_SEP ','
|
||||
#define CENT_SEP '.'
|
||||
|
||||
static int
|
||||
PrintAmt(char *buf, double val, int prec, int use_commas)
|
||||
static void
|
||||
gnc_lconv_set(char **p_value, char *default_value)
|
||||
{
|
||||
int i, stringLength, numWholeDigits, commaCount;
|
||||
char *value = *p_value;
|
||||
|
||||
if ((value == NULL) || (value[0] == 0))
|
||||
*p_value = default_value;
|
||||
}
|
||||
|
||||
struct lconv *
|
||||
gnc_localeconv()
|
||||
{
|
||||
static struct lconv lc;
|
||||
static gncBoolean lc_set = GNC_F;
|
||||
|
||||
if (lc_set)
|
||||
return &lc;
|
||||
|
||||
lc = *localeconv();
|
||||
|
||||
gnc_lconv_set(&lc.decimal_point, ".");
|
||||
gnc_lconv_set(&lc.thousands_sep, ",");
|
||||
gnc_lconv_set(&lc.currency_symbol, CURRENCY_SYMBOL);
|
||||
gnc_lconv_set(&lc.mon_decimal_point, ".");
|
||||
gnc_lconv_set(&lc.mon_thousands_sep, ",");
|
||||
gnc_lconv_set(&lc.negative_sign, "-");
|
||||
|
||||
lc_set = GNC_T;
|
||||
|
||||
return &lc;
|
||||
}
|
||||
|
||||
/* Utility function for printing non-negative amounts */
|
||||
static int
|
||||
PrintAmt(char *buf, double val, int prec,
|
||||
gncBoolean use_separators, gncBoolean monetary)
|
||||
{
|
||||
int i, stringLength, numWholeDigits, sepCount;
|
||||
struct lconv *lc = gnc_localeconv();
|
||||
char tempBuf[50];
|
||||
char *bufPtr = buf;
|
||||
|
||||
/* check if we're printing infinity */
|
||||
if (!finite(val)) {
|
||||
strcpy (buf, "inf");
|
||||
return 3;
|
||||
strcpy (buf, "inf");
|
||||
return 3;
|
||||
}
|
||||
|
||||
util_fptostr(tempBuf, val, prec);
|
||||
|
||||
if (!use_commas)
|
||||
{
|
||||
/* If we're not using commas, then the whole string is copied */
|
||||
strcpy(buf, tempBuf);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Determine where the decimal place is, if there is one */
|
||||
stringLength = strlen(tempBuf);
|
||||
numWholeDigits = -1;
|
||||
for (i = 0; i < stringLength; i++) {
|
||||
if (tempBuf[i] == '.') {
|
||||
numWholeDigits = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (numWholeDigits < 0)
|
||||
numWholeDigits = stringLength; /* Can't find decimal place, it's
|
||||
* a whole number */
|
||||
if (val < 0.0)
|
||||
val = DABS(val);
|
||||
|
||||
/* We now know the number of whole digits, now insert commas while
|
||||
* copying them from the temp buffer to the destination */
|
||||
bufPtr = buf;
|
||||
for (i = 0; i < numWholeDigits; i++, bufPtr++) {
|
||||
*bufPtr = tempBuf[i];
|
||||
commaCount = (numWholeDigits - i) - 1;
|
||||
if ( (commaCount % 3 == 0) &&
|
||||
(commaCount != 0) &&
|
||||
(tempBuf[i] != '-'))
|
||||
{
|
||||
bufPtr++;
|
||||
*bufPtr = ',';
|
||||
}
|
||||
util_fptostr(tempBuf, val, prec);
|
||||
|
||||
if (!use_separators)
|
||||
{
|
||||
/* If we're not using separators, then the whole string is copied */
|
||||
strcpy(buf, tempBuf);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Determine where the decimal place is, if there is one */
|
||||
stringLength = strlen(tempBuf);
|
||||
numWholeDigits = -1;
|
||||
for (i = stringLength - 1; i >= 0; i--) {
|
||||
if (tempBuf[i] == lc->decimal_point[0]) {
|
||||
numWholeDigits = i;
|
||||
if (monetary)
|
||||
tempBuf[i] = lc->mon_decimal_point[0];
|
||||
break;
|
||||
}
|
||||
|
||||
strcpy(bufPtr, &tempBuf[numWholeDigits]);
|
||||
} /* endif */
|
||||
}
|
||||
|
||||
if (numWholeDigits < 0)
|
||||
numWholeDigits = stringLength; /* Can't find decimal place, it's
|
||||
* a whole number */
|
||||
|
||||
/* We now know the number of whole digits, now insert separators while
|
||||
* copying them from the temp buffer to the destination */
|
||||
bufPtr = buf;
|
||||
for (i = 0; i < numWholeDigits; i++, bufPtr++) {
|
||||
*bufPtr = tempBuf[i];
|
||||
sepCount = (numWholeDigits - i) - 1;
|
||||
if ((sepCount % 3 == 0) &&
|
||||
(sepCount != 0))
|
||||
{
|
||||
bufPtr++;
|
||||
if (monetary)
|
||||
*bufPtr = lc->mon_thousands_sep[0];
|
||||
else
|
||||
*bufPtr = lc->thousands_sep[0];
|
||||
}
|
||||
}
|
||||
|
||||
strcpy(bufPtr, &tempBuf[numWholeDigits]);
|
||||
} /* endif */
|
||||
|
||||
return strlen(buf);
|
||||
}
|
||||
@ -274,29 +310,122 @@ PrintAmt(char *buf, double val, int prec, int use_commas)
|
||||
int
|
||||
xaccSPrintAmount (char * bufp, double val, short shrs)
|
||||
{
|
||||
char * orig_bufp = bufp;
|
||||
struct lconv *lc;
|
||||
|
||||
char *orig_bufp = bufp;
|
||||
char *currency_symbol;
|
||||
char *sign;
|
||||
|
||||
char cs_precedes;
|
||||
char sep_by_space;
|
||||
char sign_posn;
|
||||
|
||||
int precision = 2;
|
||||
gncBoolean print_sign = GNC_T;
|
||||
|
||||
if (!bufp) return 0;
|
||||
|
||||
lc = gnc_localeconv();
|
||||
|
||||
if (DEQ(val, 0.0))
|
||||
val = 0.0;
|
||||
|
||||
if (shrs & PRTSHR) {
|
||||
bufp += PrintAmt(orig_bufp, val, 4, shrs & PRTSEP);
|
||||
if (shrs & PRTSYM) {
|
||||
/* stpcpy returns pointer to end of string, not like strcpy */
|
||||
bufp = stpcpy (bufp, " shrs");
|
||||
}
|
||||
} else {
|
||||
if (shrs & PRTSYM) {
|
||||
bufp += sprintf( bufp, "%s ", CURRENCY_SYMBOL);
|
||||
}
|
||||
|
||||
bufp += PrintAmt(orig_bufp, val, 2, shrs & PRTSEP);
|
||||
if (shrs & PRTSHR)
|
||||
{
|
||||
currency_symbol = "shrs";
|
||||
cs_precedes = 0; /* currency symbol follows amount */
|
||||
sep_by_space = 1; /* they are separated by a space */
|
||||
precision = 4;
|
||||
}
|
||||
else
|
||||
{
|
||||
currency_symbol = lc->currency_symbol;
|
||||
if (val < 0.0)
|
||||
{
|
||||
cs_precedes = lc->n_cs_precedes;
|
||||
sep_by_space = lc->n_sep_by_space;
|
||||
}
|
||||
else
|
||||
{
|
||||
cs_precedes = lc->p_cs_precedes;
|
||||
sep_by_space = lc->p_sep_by_space;
|
||||
}
|
||||
}
|
||||
|
||||
if (val < 0.0)
|
||||
{
|
||||
sign = lc->negative_sign;
|
||||
sign_posn = lc->n_sign_posn;
|
||||
}
|
||||
else
|
||||
{
|
||||
sign = lc->positive_sign;
|
||||
sign_posn = lc->p_sign_posn;
|
||||
}
|
||||
|
||||
if ((val == 0.0) || (sign == NULL) || (sign[0] == 0))
|
||||
print_sign = GNC_F;
|
||||
|
||||
/* See if we print sign now */
|
||||
if (print_sign && (sign_posn == 1))
|
||||
bufp = stpcpy(bufp, sign);
|
||||
|
||||
/* Now see if we print currency */
|
||||
if (cs_precedes)
|
||||
{
|
||||
/* See if we print sign now */
|
||||
if (print_sign && (sign_posn == 3))
|
||||
bufp = stpcpy(bufp, sign);
|
||||
|
||||
if (shrs & PRTSYM)
|
||||
{
|
||||
bufp = stpcpy(bufp, currency_symbol);
|
||||
if (sep_by_space)
|
||||
bufp = stpcpy(bufp, " ");
|
||||
}
|
||||
|
||||
/* See if we print sign now */
|
||||
if (print_sign && (sign_posn == 4))
|
||||
bufp = stpcpy(bufp, sign);
|
||||
}
|
||||
|
||||
/* Now see if we print parentheses */
|
||||
if (print_sign && (sign_posn == 0))
|
||||
bufp = stpcpy(bufp, "(");
|
||||
|
||||
/* Now print the value */
|
||||
bufp += PrintAmt(bufp, DABS(val), precision,
|
||||
shrs & PRTSEP, ~(shrs & PRTSHR));
|
||||
|
||||
/* Now see if we print parentheses */
|
||||
if (print_sign && (sign_posn == 0))
|
||||
bufp = stpcpy(bufp, ")");
|
||||
|
||||
/* Now see if we print currency */
|
||||
if (!cs_precedes)
|
||||
{
|
||||
/* See if we print sign now */
|
||||
if (print_sign && (sign_posn == 3))
|
||||
bufp = stpcpy(bufp, sign);
|
||||
|
||||
if (shrs & PRTSYM)
|
||||
{
|
||||
if (sep_by_space)
|
||||
bufp = stpcpy(bufp, " ");
|
||||
bufp = stpcpy(bufp, currency_symbol);
|
||||
}
|
||||
|
||||
/* See if we print sign now */
|
||||
if (print_sign && (sign_posn == 4))
|
||||
bufp = stpcpy(bufp, sign);
|
||||
}
|
||||
|
||||
/* See if we print sign now */
|
||||
if (print_sign && (sign_posn == 2))
|
||||
bufp = stpcpy(bufp, sign);
|
||||
|
||||
/* return length of printed string */
|
||||
return (bufp-orig_bufp);
|
||||
return (bufp - orig_bufp);
|
||||
}
|
||||
|
||||
char *
|
||||
@ -313,9 +442,115 @@ xaccPrintAmount (double val, short shrs)
|
||||
|
||||
|
||||
/********************************************************************\
|
||||
* xaccParseUSAmount *
|
||||
* parses U.S. style monetary strings *
|
||||
* (strings of the form DDD,DDD,DDD.CC *
|
||||
* xaccParseAmount *
|
||||
* parses amount strings using locale data *
|
||||
* *
|
||||
* Args: str -- pointer to string rep of num *
|
||||
monetary -- boolean indicating whether value is monetary *
|
||||
* Return: double -- the parsed amount *
|
||||
\********************************************************************/
|
||||
|
||||
double xaccParseAmount (const char * instr, gncBoolean monetary)
|
||||
{
|
||||
struct lconv *lc = gnc_localeconv();
|
||||
char *mstr, *str, *tok;
|
||||
double amount = 0.0;
|
||||
char negative_sign;
|
||||
char thousands_sep;
|
||||
char decimal_point;
|
||||
int len;
|
||||
int isneg = 0;
|
||||
|
||||
if (!instr) return 0.0;
|
||||
mstr = strdup (instr);
|
||||
str = mstr;
|
||||
|
||||
negative_sign = lc->negative_sign[0];
|
||||
if (monetary)
|
||||
{
|
||||
thousands_sep = lc->mon_thousands_sep[0];
|
||||
decimal_point = lc->mon_decimal_point[0];
|
||||
}
|
||||
else
|
||||
{
|
||||
thousands_sep = lc->thousands_sep[0];
|
||||
decimal_point = lc->decimal_point[0];
|
||||
}
|
||||
|
||||
/* strip off garbage at end of the line */
|
||||
tok = strchr (str, '\r');
|
||||
if (tok) *tok = 0x0;
|
||||
tok = strchr (str, '\n');
|
||||
if (tok) *tok = 0x0;
|
||||
|
||||
/* search for a negative sign */
|
||||
tok = strchr (str, negative_sign);
|
||||
if (tok) {
|
||||
isneg = 1;
|
||||
str = tok + sizeof(char);
|
||||
}
|
||||
|
||||
/* remove thousands separator */
|
||||
tok = strchr (str, thousands_sep);
|
||||
while (tok) {
|
||||
*tok = 0x0;
|
||||
amount *= 1000.0;
|
||||
amount += ((double) (1000 * atoi (str)));
|
||||
str = tok + sizeof(char);
|
||||
tok = strchr (str, thousands_sep);
|
||||
}
|
||||
|
||||
/* search for a decimal point */
|
||||
tok = strchr (str, decimal_point);
|
||||
if (tok) {
|
||||
*tok = 0x0;
|
||||
amount += ((double) (atoi (str)));
|
||||
str = tok + sizeof(char);
|
||||
|
||||
/* if there is anything trailing the decimal
|
||||
* point, convert it */
|
||||
if (str[0]) {
|
||||
|
||||
/* strip off garbage at end of the line */
|
||||
tok = strchr (str, ' ');
|
||||
if (tok) *tok = 0x0;
|
||||
|
||||
/* adjust for number of decimal places */
|
||||
len = strlen(str);
|
||||
if (6 == len) {
|
||||
amount += 0.000001 * ((double) atoi (str));
|
||||
} else
|
||||
if (5 == len) {
|
||||
amount += 0.00001 * ((double) atoi (str));
|
||||
} else
|
||||
if (4 == len) {
|
||||
amount += 0.0001 * ((double) atoi (str));
|
||||
} else
|
||||
if (3 == len) {
|
||||
amount += 0.001 * ((double) atoi (str));
|
||||
} else
|
||||
if (2 == len) {
|
||||
amount += 0.01 * ((double) atoi (str));
|
||||
} else
|
||||
if (1 == len) {
|
||||
amount += 0.1 * ((double) atoi (str));
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
amount += ((double) (atoi (str)));
|
||||
}
|
||||
|
||||
if (isneg) amount = -amount;
|
||||
|
||||
free (mstr);
|
||||
return amount;
|
||||
}
|
||||
|
||||
|
||||
/********************************************************************\
|
||||
* xaccParseQIFAmount *
|
||||
* parses monetary strings in QIF files *
|
||||
* *
|
||||
* Args: str -- pointer to string rep of sum *
|
||||
* Return: double -- the parsed amount *
|
||||
@ -333,12 +568,14 @@ xaccPrintAmount (double val, short shrs)
|
||||
#define K_SEP ',' /* thousands separator */
|
||||
#define DEC_SEP '.' /* decimal point */
|
||||
|
||||
double xaccParseUSAmount (const char * instr)
|
||||
double xaccParseQIFAmount (const char * instr)
|
||||
{
|
||||
char decimal_point = DEC_SEP;
|
||||
char thousands_sep = K_SEP;
|
||||
char *mstr, *str, *tok;
|
||||
double dollars = 0.0;
|
||||
int len;
|
||||
int isneg = 0;
|
||||
int len;
|
||||
|
||||
if (!instr) return 0.0;
|
||||
mstr = strdup (instr);
|
||||
@ -357,18 +594,32 @@ double xaccParseUSAmount (const char * instr)
|
||||
str = tok+sizeof(char);
|
||||
}
|
||||
|
||||
/* figure out separators */
|
||||
{
|
||||
char *tok1, *tok2;
|
||||
|
||||
tok1 = strrchr(str, DEC_SEP);
|
||||
tok2 = strrchr(str, K_SEP);
|
||||
|
||||
if (tok1 < tok2)
|
||||
{
|
||||
decimal_point = K_SEP;
|
||||
thousands_sep = DEC_SEP;
|
||||
}
|
||||
}
|
||||
|
||||
/* remove comma's */
|
||||
tok = strchr (str, K_SEP);
|
||||
tok = strchr (str, thousands_sep);
|
||||
while (tok) {
|
||||
*tok = 0x0;
|
||||
dollars *= 1000.0;
|
||||
dollars += ((double) (1000 * atoi (str)));
|
||||
str = tok+sizeof(char);
|
||||
tok = strchr (str, K_SEP);
|
||||
tok = strchr (str, thousands_sep);
|
||||
}
|
||||
|
||||
/* search for a decimal point */
|
||||
tok = strchr (str, DEC_SEP);
|
||||
tok = strchr (str, decimal_point);
|
||||
if (tok) {
|
||||
*tok = 0x0;
|
||||
dollars += ((double) (atoi (str)));
|
||||
|
@ -29,6 +29,7 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include "config.h"
|
||||
#include "gnc-common.h"
|
||||
|
||||
#define BUFSIZE 1024
|
||||
|
||||
@ -138,6 +139,14 @@ int safe_strcmp (const char * da, const char * db);
|
||||
|
||||
char * ultostr (unsigned long val, int base);
|
||||
|
||||
|
||||
/* The gnc_localeconv() subroutine returns an lconv structure
|
||||
* containing locale information. If no locale is set, the
|
||||
* structure is given default (en_US) values.
|
||||
*/
|
||||
struct lconv * gnc_localeconv();
|
||||
|
||||
|
||||
/** PROTOTYPES ******************************************************/
|
||||
|
||||
/*
|
||||
@ -150,7 +159,7 @@ char * ultostr (unsigned long val, int base);
|
||||
* of the following:
|
||||
*
|
||||
* PRTSYM -- also print currency symbol.
|
||||
* PRTSHR -- print three decimal places
|
||||
* PRTSHR -- print four decimal places
|
||||
* PRTSYM | PRTSHR -- prints three decimal places followed by string "shrs"
|
||||
* PRTSEP -- print comma-separated K's
|
||||
*
|
||||
@ -168,13 +177,28 @@ char * ultostr (unsigned long val, int base);
|
||||
char * xaccPrintAmount (double val, short shrs);
|
||||
int xaccSPrintAmount (char *buf, double val, short shrs);
|
||||
|
||||
/* Parse i18n amount strings */
|
||||
double xaccParseAmount (const char * instr, gncBoolean monetary);
|
||||
|
||||
|
||||
/********************************************************************\
|
||||
* xaccParseUSAmount *
|
||||
* parses U.S. style monetary strings *
|
||||
* (strings of the form DDD,DDD,DDD.CC *
|
||||
* *
|
||||
* xaccParseQIFAmount *
|
||||
* parses monetary strings in QIF files *
|
||||
* Note that these strings may be in the 'US' format of DDD,DDD,DDD.CC
|
||||
* or they may be in european format: DDD.DDD.DDD,CC
|
||||
* The routine tries to 'guess' which of these it is.
|
||||
* This sounds really dopey, but Intuit/Quicken managed to 'internationalize'
|
||||
* thier export format, causeing no end of pain.
|
||||
*
|
||||
* XXX hack alert: the right way to do this is to do the following:
|
||||
* -- have a global flag that indicates 'euro' or 'us style'
|
||||
* -- initial value of global flag depends on locale
|
||||
* -- if during parsing, a euro-format currency is found, then flag is set to euro.
|
||||
* -- if during parsing, a use-format amount is found, then flag set to us.
|
||||
* -- if both styles found during one run, then flag an error.
|
||||
* *
|
||||
\********************************************************************/
|
||||
double xaccParseUSAmount (const char * str);
|
||||
double xaccParseQIFAmount (const char * str);
|
||||
|
||||
|
||||
/** TEMPLATES ******************************************************/
|
||||
|
@ -168,20 +168,12 @@ gnc_ui_accWindow_list_fill(GtkCList *type_list)
|
||||
static GtkWidget *
|
||||
gnc_ui_accWindow_list_box_create(AccWindow * accData)
|
||||
{
|
||||
GtkWidget *frame, *hbox;
|
||||
GtkWidget *frame, *scroll_win;
|
||||
|
||||
frame = gtk_frame_new(ACC_TYPE_STR);
|
||||
gtk_widget_show(frame);
|
||||
|
||||
hbox = gtk_hbox_new(TRUE, 0);
|
||||
gtk_widget_show(hbox);
|
||||
gtk_container_border_width(GTK_CONTAINER(hbox), 5);
|
||||
|
||||
gtk_container_add(GTK_CONTAINER(frame), hbox);
|
||||
|
||||
accData->type_list = GTK_CLIST(gtk_clist_new(1));
|
||||
gtk_container_border_width(GTK_CONTAINER(accData->type_list), 3);
|
||||
gtk_widget_show(GTK_WIDGET(accData->type_list));
|
||||
|
||||
gnc_ui_accWindow_list_fill(accData->type_list);
|
||||
|
||||
@ -198,8 +190,14 @@ gnc_ui_accWindow_list_box_create(AccWindow * accData)
|
||||
gtk_clist_select_row(accData->type_list,
|
||||
_accWindow_last_used_account_type, 0);
|
||||
|
||||
gtk_box_pack_start(GTK_BOX(hbox), GTK_WIDGET(accData->type_list),
|
||||
TRUE, TRUE, 0);
|
||||
scroll_win = gtk_scrolled_window_new(NULL, NULL);
|
||||
gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scroll_win),
|
||||
GTK_POLICY_NEVER,
|
||||
GTK_POLICY_AUTOMATIC);
|
||||
|
||||
gtk_container_add(GTK_CONTAINER(frame), scroll_win);
|
||||
gtk_container_border_width(GTK_CONTAINER(scroll_win), 5);
|
||||
gtk_container_add(GTK_CONTAINER(scroll_win), GTK_WIDGET(accData->type_list));
|
||||
|
||||
return frame;
|
||||
}
|
||||
@ -284,6 +282,7 @@ gnc_ui_accWindow_tree_select(GNCAccountTree *tree,
|
||||
{
|
||||
accData->type = parentAccType;
|
||||
gtk_clist_select_row(accData->type_list, parentAccType, 0);
|
||||
gtk_clist_moveto(accData->type_list, parentAccType, 0, 0.5, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -469,6 +468,9 @@ gnc_accWindow_create(AccWindow *accData)
|
||||
AccWindow *
|
||||
accWindow (AccountGroup *this_is_not_used)
|
||||
{
|
||||
static gint last_width = 0;
|
||||
static gint last_height = 0;
|
||||
|
||||
AccWindow *accData = g_new0(AccWindow, 1);
|
||||
AccountFieldStrings strings;
|
||||
GtkWidget *dialog;
|
||||
@ -481,6 +483,9 @@ accWindow (AccountGroup *this_is_not_used)
|
||||
xaccAccountSetName(accData->newAccount, NEW_TOP_ACCT_STR);
|
||||
|
||||
dialog = gnc_accWindow_create(accData);
|
||||
if (last_width > 0)
|
||||
gtk_window_set_default_size(GTK_WINDOW(dialog), last_width, last_height);
|
||||
|
||||
gtk_widget_show_all(dialog);
|
||||
|
||||
while (1)
|
||||
@ -524,8 +529,12 @@ accWindow (AccountGroup *this_is_not_used)
|
||||
|
||||
DEBUG("destroying account add window\n");
|
||||
|
||||
gdk_window_get_geometry(dialog->window, NULL, NULL,
|
||||
&last_width, &last_height, NULL);
|
||||
|
||||
gtk_widget_destroy(dialog);
|
||||
g_free(accData);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -62,7 +62,7 @@ static gboolean gnc_file_box_delete_cb(GtkWidget *widget, GdkEvent *event,
|
||||
* *
|
||||
* Args: title - the title of the window *
|
||||
* filter - the file filter to use *
|
||||
* Return: none *
|
||||
* Return: char * containing the name of the file the user selected *
|
||||
\********************************************************************/
|
||||
char *
|
||||
fileBox(const char * title, const char * filter)
|
||||
|
@ -307,7 +307,8 @@ gnc_verify_dialog_parented(GtkWindow *parent, const char *message,
|
||||
GNOME_STOCK_BUTTON_NO,
|
||||
NULL);
|
||||
|
||||
gnome_dialog_set_parent(GNOME_DIALOG(verify_box), parent);
|
||||
if (parent != NULL)
|
||||
gnome_dialog_set_parent(GNOME_DIALOG(verify_box), parent);
|
||||
|
||||
gnome_dialog_set_default(GNOME_DIALOG(verify_box), yes_is_default ? 0 : 1);
|
||||
|
||||
|
@ -361,6 +361,23 @@ gnc_html_window_user_data(HTMLWindow *hw)
|
||||
}
|
||||
|
||||
|
||||
/********************************************************************\
|
||||
* gnc_html_window_get_window *
|
||||
* return the gtk window for the html window *
|
||||
* *
|
||||
* Args: none *
|
||||
* Return: gtk window for html window *
|
||||
\********************************************************************/
|
||||
GtkWidget *
|
||||
gnc_html_window_get_window(HTMLWindow *hw)
|
||||
{
|
||||
if (hw == NULL)
|
||||
return NULL;
|
||||
|
||||
return hw->window;
|
||||
}
|
||||
|
||||
|
||||
/********************************************************************\
|
||||
* gnc_html_window_new *
|
||||
* g_malloc and initialize HTMLWindow structure *
|
||||
@ -839,6 +856,8 @@ gnc_html_load(HTMLWindow *hw)
|
||||
XmHTMLAnchorScrollToName(hw->htmlwidget, label);
|
||||
else
|
||||
XmHTMLTextScrollToLine(hw->htmlwidget, 0);
|
||||
|
||||
htmlSetButtonStates(hw);
|
||||
}
|
||||
|
||||
|
||||
|
@ -43,10 +43,10 @@ typedef void (*HTMLJumpCB)(HTMLUserData user_data,
|
||||
|
||||
|
||||
HTMLUserData gnc_html_window_user_data(HTMLWindow *hw);
|
||||
GtkWidget * gnc_html_window_get_window(HTMLWindow *hw);
|
||||
|
||||
HTMLWindow * gnc_html_window_new(HTMLAnchorCB anchor_cb, HTMLJumpCB jump_cb);
|
||||
|
||||
|
||||
void gnc_html_window_destroy(HTMLWindow *hw);
|
||||
|
||||
HTMLData * gnc_html_data_new(const char *title, HTMLUserData user_data,
|
||||
|
@ -585,7 +585,7 @@ recnWindow(GtkWidget *parent, Account *account)
|
||||
|
||||
gtk_box_pack_start(GTK_BOX(main_area), debcred_area, TRUE, TRUE, 0);
|
||||
gtk_box_pack_start(GTK_BOX(debcred_area), debits_frame, TRUE, FALSE, 0);
|
||||
gtk_box_pack_start(GTK_BOX(debcred_area), credits_frame, TRUE, FALSE, 0);
|
||||
gtk_box_pack_end(GTK_BOX(debcred_area), credits_frame, TRUE, FALSE, 0);
|
||||
|
||||
{
|
||||
GtkWidget *hbox, *title_vbox, *value_vbox, *button;
|
||||
@ -596,6 +596,9 @@ recnWindow(GtkWidget *parent, Account *account)
|
||||
gtk_box_pack_start(GTK_BOX(main_area), hbox, FALSE, FALSE, 0);
|
||||
|
||||
bbox = gtk_hbutton_box_new();
|
||||
gtk_button_box_set_spacing(GTK_BUTTON_BOX(bbox), 10);
|
||||
gtk_button_box_set_layout(GTK_BUTTON_BOX(bbox), GTK_BUTTONBOX_START);
|
||||
|
||||
gtk_box_pack_start(GTK_BOX(hbox), bbox, FALSE, FALSE, 0);
|
||||
|
||||
button = gtk_button_new_with_label(NEW_STR);
|
||||
|
@ -1216,7 +1216,8 @@ gnc_reg_refresh_toolbar(RegWindow *regData)
|
||||
static void
|
||||
regRefresh(xaccLedgerDisplay *ledger)
|
||||
{
|
||||
RegWindow *regData = (RegWindow *) (ledger->gui_hook);
|
||||
RegWindow *regData = (RegWindow *) (ledger->gui_hook);
|
||||
int print_flags = PRTSYM | PRTSEP;
|
||||
|
||||
gnc_reg_refresh_toolbar(regData);
|
||||
|
||||
@ -1225,10 +1226,10 @@ regRefresh(xaccLedgerDisplay *ledger)
|
||||
if (regData->window != NULL)
|
||||
{
|
||||
gtk_label_set_text(GTK_LABEL(regData->balance_label),
|
||||
xaccPrintAmount(ledger->balance, PRTSYM));
|
||||
xaccPrintAmount(ledger->balance, print_flags));
|
||||
|
||||
gtk_label_set_text(GTK_LABEL(regData->cleared_label),
|
||||
xaccPrintAmount(ledger->clearedBalance, PRTSYM));
|
||||
xaccPrintAmount(ledger->clearedBalance, print_flags));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -27,14 +27,18 @@
|
||||
#include "top-level.h"
|
||||
|
||||
#include <gnome.h>
|
||||
#include <sys/stat.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "window-report.h"
|
||||
#include "window-html.h"
|
||||
#include "option-util.h"
|
||||
#include "guile-util.h"
|
||||
#include "dialog-options.h"
|
||||
#include "query-user.h"
|
||||
#include "messages.h"
|
||||
#include "util.h"
|
||||
#include "FileBox.h"
|
||||
|
||||
static short module = MOD_HTML;
|
||||
|
||||
@ -281,6 +285,82 @@ gnc_report_properties_cb(GtkWidget *widget, gpointer data)
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
gnc_report_export(ReportData *report_data)
|
||||
{
|
||||
GtkWindow *parent;
|
||||
char *export_filename;
|
||||
struct stat file_status;
|
||||
FILE *export_dest;
|
||||
char *message;
|
||||
char *text;
|
||||
|
||||
if (report_data->text == NULL)
|
||||
text = "";
|
||||
else
|
||||
text = report_data->text;
|
||||
|
||||
/* Get the filename */
|
||||
export_filename = fileBox(EXPORT_TO_STR, NULL);
|
||||
if (export_filename == NULL)
|
||||
return;
|
||||
|
||||
parent = GTK_WINDOW(gnc_html_window_get_window(reportwindow));
|
||||
|
||||
/* See if the file exists */
|
||||
if ((stat(export_filename, &file_status) == 0))
|
||||
{
|
||||
gncBoolean result;
|
||||
|
||||
message = g_strdup_printf(FMB_EEXIST_MSG, export_filename);
|
||||
result = gnc_verify_dialog_parented(parent, message, GNC_F);
|
||||
g_free(message);
|
||||
|
||||
if (!result)
|
||||
return;
|
||||
}
|
||||
|
||||
/* Open the file */
|
||||
export_dest = fopen(export_filename, "w");
|
||||
if (export_dest == NULL)
|
||||
{
|
||||
message = g_strdup_printf(FILE_EOPEN_MSG, export_filename);
|
||||
gnc_error_dialog_parented(parent, message);
|
||||
g_free(message);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
/* Write the data */
|
||||
if (fputs(text, export_dest) == EOF)
|
||||
{
|
||||
message = g_strdup_printf(FILE_EWRITE_MSG, export_filename);
|
||||
gnc_error_dialog_parented(parent, message);
|
||||
g_free(message);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
/* Close the file */
|
||||
if (fclose(export_dest) == EOF)
|
||||
{
|
||||
message = g_strdup_printf(FILE_ECLOSE_MSG, export_filename);
|
||||
gnc_error_dialog_parented(parent, message);
|
||||
g_free(message);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gnc_report_export_cb(GtkWidget *widget, gpointer data)
|
||||
{
|
||||
ReportData *report_data = data;
|
||||
|
||||
gnc_report_export(report_data);
|
||||
}
|
||||
|
||||
|
||||
/********************************************************************\
|
||||
* reportWindow *
|
||||
* opens up a report window, and displays html *
|
||||
@ -316,7 +396,6 @@ reportWindow(const char *title, SCM rendering_thunk, SCM guile_options)
|
||||
g_free(prop_title);
|
||||
}
|
||||
|
||||
if (report_data->option_dialog != NULL)
|
||||
{
|
||||
GnomeUIInfo user_buttons[] =
|
||||
{
|
||||
@ -328,18 +407,23 @@ reportWindow(const char *title, SCM rendering_thunk, SCM guile_options)
|
||||
GNOME_APP_PIXMAP_STOCK,
|
||||
GNOME_STOCK_PIXMAP_PROPERTIES,
|
||||
0, 0, NULL
|
||||
},
|
||||
{ GNOME_APP_UI_ITEM,
|
||||
EXPORT_STR,
|
||||
TOOLTIP_EXPORT_REPORT,
|
||||
gnc_report_export_cb, report_data,
|
||||
NULL,
|
||||
GNOME_APP_PIXMAP_STOCK,
|
||||
GNOME_STOCK_PIXMAP_CONVERT,
|
||||
0,0, NULL
|
||||
}
|
||||
};
|
||||
|
||||
gint num_buttons = sizeof(user_buttons) / sizeof(GnomeUIInfo);
|
||||
|
||||
html_data = gnc_html_data_new(title, report_data,
|
||||
report_data_destroy,
|
||||
html_data = gnc_html_data_new(title, report_data, report_data_destroy,
|
||||
user_buttons, num_buttons);
|
||||
}
|
||||
else
|
||||
html_data = gnc_html_data_new(title, report_data,
|
||||
report_data_destroy, NULL, 0);
|
||||
|
||||
htmlWindow(NULL, &reportwindow, html_data);
|
||||
}
|
||||
|
@ -27,15 +27,13 @@
|
||||
|
||||
#include <ctype.h>
|
||||
#include <string.h>
|
||||
#include <locale.h>
|
||||
|
||||
#include "util.h"
|
||||
|
||||
#include "basiccell.h"
|
||||
#include "pricecell.h"
|
||||
|
||||
#define DECIMAL_PT '.'
|
||||
|
||||
#define VERY_SMALL (1.0e-20)
|
||||
|
||||
static void PriceSetValue (BasicCell *, const char *);
|
||||
static char * xaccPriceCellPrintValue (PriceCell *cell);
|
||||
@ -71,14 +69,21 @@ PriceMV (BasicCell *_cell,
|
||||
int *cursor_position)
|
||||
{
|
||||
PriceCell *cell = (PriceCell *) _cell;
|
||||
struct lconv *lc = gnc_localeconv();
|
||||
char decimal_point;
|
||||
|
||||
if (cell->monetary)
|
||||
decimal_point = lc->mon_decimal_point[0];
|
||||
else
|
||||
decimal_point = lc->decimal_point[0];
|
||||
|
||||
/* accept the newval string if user action was delete, etc. */
|
||||
if (change) {
|
||||
/* if change is a decimal point, then count decimal points */
|
||||
if (DECIMAL_PT == change[0]) {
|
||||
if (decimal_point == change[0]) {
|
||||
int i, count=0;
|
||||
for (i=0; 0 != newval[i]; i++) {
|
||||
if (DECIMAL_PT == newval[i]) count ++;
|
||||
if (decimal_point == newval[i]) count ++;
|
||||
}
|
||||
if (1 < count) return NULL;
|
||||
} else {
|
||||
@ -88,7 +93,7 @@ PriceMV (BasicCell *_cell,
|
||||
}
|
||||
|
||||
/* parse the float pt value and store it */
|
||||
cell->amount = xaccParseUSAmount (newval);
|
||||
cell->amount = xaccParseAmount (newval, cell->monetary);
|
||||
SET ((&(cell->cell)), newval);
|
||||
return newval;
|
||||
}
|
||||
@ -128,10 +133,11 @@ void
|
||||
xaccInitPriceCell (PriceCell *cell)
|
||||
{
|
||||
xaccInitBasicCell( &(cell->cell));
|
||||
|
||||
cell->amount = 0.0;
|
||||
cell->blank_zero = 1;
|
||||
// cell->prt_format = strdup ("%.2f");
|
||||
cell->prt_format = strdup ("%m");
|
||||
cell->monetary = GNC_T;
|
||||
|
||||
SET ( &(cell->cell), "");
|
||||
|
||||
@ -161,11 +167,9 @@ xaccPriceCellPrintValue (PriceCell *cell)
|
||||
char tmpval[PRTBUF];
|
||||
char *monet;
|
||||
|
||||
if (cell->blank_zero &&
|
||||
(VERY_SMALL > cell->amount) && ((-VERY_SMALL) < cell->amount)) {
|
||||
|
||||
strcpy(buff, "");
|
||||
return buff;
|
||||
if (cell->blank_zero && DEQ(cell->amount, 0.0)) {
|
||||
strcpy(buff, "");
|
||||
return buff;
|
||||
}
|
||||
|
||||
/* check for monetary-style format not natively supported by printf */
|
||||
@ -214,6 +218,14 @@ void xaccSetPriceCellFormat (PriceCell * cell, char * fmt)
|
||||
|
||||
/* ================================================ */
|
||||
|
||||
void
|
||||
xaccSetPriceCellMonetary (PriceCell * cell, gncBoolean monetary)
|
||||
{
|
||||
cell->monetary = monetary;
|
||||
}
|
||||
|
||||
/* ================================================ */
|
||||
|
||||
void xaccSetDebCredCellValue (PriceCell * deb,
|
||||
PriceCell * cred, double amt)
|
||||
{
|
||||
@ -241,7 +253,7 @@ static void
|
||||
PriceSetValue (BasicCell *_cell, const char *str)
|
||||
{
|
||||
PriceCell *cell = (PriceCell *) _cell;
|
||||
double amt = xaccParseUSAmount (str);
|
||||
double amt = xaccParseAmount (str, cell->monetary);
|
||||
|
||||
xaccSetPriceCellValue (cell, amt);
|
||||
}
|
||||
|
@ -51,12 +51,14 @@
|
||||
#define __XACC_PRICE_CELL_C__
|
||||
|
||||
#include "basiccell.h"
|
||||
#include "gnc-common.h"
|
||||
|
||||
typedef struct _PriceCell {
|
||||
BasicCell cell;
|
||||
double amount; /* the amount associated with this cell */
|
||||
short blank_zero; /* controls printing of zero values */
|
||||
char *prt_format; /* controls display of value; printf format */
|
||||
double amount; /* the amount associated with this cell */
|
||||
short blank_zero; /* controls printing of zero values */
|
||||
char *prt_format; /* controls display of value; printf format */
|
||||
gncBoolean monetary; /* controls parsing of values */
|
||||
} PriceCell;
|
||||
|
||||
/* installs a callback to handle price recording */
|
||||
@ -71,10 +73,17 @@ void xaccSetPriceCellValue (PriceCell *, double amount);
|
||||
* the cell contents are displayed. It accepts as an argument
|
||||
* a printf-style format. The format must control the display
|
||||
* of a double-precision float. See the printf() command for
|
||||
* allowed syntax. The default format is "%.2f".
|
||||
* allowed syntax. The default format is "%m" for a monetary
|
||||
* style format.
|
||||
*/
|
||||
void xaccSetPriceCellFormat (PriceCell *, char * fmt);
|
||||
|
||||
/* The xaccSetPriceCellMonetary() sets a flag which determines
|
||||
* how string amounts are parsed, either as monetary or
|
||||
* non-monetary amounts. The default is monetary.
|
||||
*/
|
||||
void xaccSetPriceCellMonetary (PriceCell *, gncBoolean);
|
||||
|
||||
/* updates two cells; the deb cell if amt is negative,
|
||||
* the credit cell if amount is positive, and makes the other cell
|
||||
* blank. */
|
||||
|
@ -108,7 +108,6 @@ static short module = MOD_REGISTER;
|
||||
* Perhaps this should be changed to store precision selection
|
||||
* in a config file. */
|
||||
#define SHRS_CELL_FORMAT "%0.4f"
|
||||
#define PRICE_CELL_FORMAT "%0.4f"
|
||||
#define DEBIT_CELL_FORMAT "%0.4f"
|
||||
#define CREDIT_CELL_FORMAT "%0.4f"
|
||||
|
||||
@ -921,7 +920,7 @@ xaccInitSplitRegister (SplitRegister *reg, int type)
|
||||
/* The format for share-related info is a printf-style
|
||||
* format string for a double. */
|
||||
xaccSetPriceCellFormat (reg->shrsCell, SHRS_CELL_FORMAT);
|
||||
xaccSetPriceCellFormat (reg->priceCell, PRICE_CELL_FORMAT);
|
||||
xaccSetPriceCellMonetary (reg->shrsCell, GNC_F);
|
||||
|
||||
/* number format for share quantities in stock ledgers */
|
||||
switch (type & REG_TYPE_MASK) {
|
||||
@ -930,6 +929,8 @@ xaccInitSplitRegister (SplitRegister *reg, int type)
|
||||
case CURRENCY_REGISTER:
|
||||
xaccSetPriceCellFormat (reg->debitCell, DEBIT_CELL_FORMAT);
|
||||
xaccSetPriceCellFormat (reg->creditCell, CREDIT_CELL_FORMAT);
|
||||
xaccSetPriceCellMonetary (reg->debitCell, GNC_F);
|
||||
xaccSetPriceCellMonetary (reg->creditCell, GNC_F);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@ -6,8 +6,30 @@
|
||||
(use-modules (ice-9 slib))
|
||||
(require 'printf)
|
||||
|
||||
;hack alert - is this line necessary?
|
||||
(gnc:depend "text-export.scm")
|
||||
|
||||
;; hack alert - possibly unecessary globals
|
||||
|
||||
|
||||
;; functions for manipulating total inflow and outflow counts.
|
||||
|
||||
(define gnc:total-inflow 0)
|
||||
(define gnc:total-outflow 0)
|
||||
|
||||
|
||||
(define (gnc:set-total-inflow! x)
|
||||
(set! gnc:total-inflow x))
|
||||
|
||||
(define (gnc:set-total-outflow! x)
|
||||
(set! gnc:total-outflow x))
|
||||
|
||||
(define gnc:tr-report-initialize-inflow-and-outflow!
|
||||
(begin
|
||||
(set! gnc:total-inflow 0)
|
||||
(set! gnc:total-outflow 0)
|
||||
#f))
|
||||
|
||||
(define gnc:*transaction-report-options* '())
|
||||
|
||||
;;returns a list contains elements of the-list for which predictate is
|
||||
@ -21,6 +43,20 @@
|
||||
(gnc:filter-list (cdr the-list) predicate)))
|
||||
(else (gnc:filter-list (cdr the-list) predicate))))
|
||||
|
||||
;; like map, but restricted to one dimension, and
|
||||
;; guaranteed to have inorder semantics.
|
||||
|
||||
(define (gnc:inorder-map the-list fn)
|
||||
(cond ((not (list? the-list))
|
||||
(gnc:error("Attempted to map a non-list object")))
|
||||
((not (procedure? fn))
|
||||
(gnc:error("Attempted to map a non-function object to a list")))
|
||||
((eq? the-list '()) '())
|
||||
(else (cons (fn (car the-list))
|
||||
(gnc:inorder-map (cdr the-list) fn)))))
|
||||
|
||||
;; register a configuration option for the transaction report
|
||||
|
||||
(define (gnc:register-trep-option new-option)
|
||||
(set! gnc:*transaction-report-options*
|
||||
(gnc:register-option gnc:*transaction-report-options* new-option))
|
||||
@ -93,7 +129,7 @@
|
||||
(define (gnc:tr-report-get-value split-scm)
|
||||
(vector-ref split-scm 8))
|
||||
|
||||
(define (gnc:tr-report-get-docref split-scm)
|
||||
(define (gnc:tr-report-get-num split-scm)
|
||||
(vector-ref split-scm 9))
|
||||
|
||||
(define (gnc:tr-report-get-other-splits split-scm)
|
||||
@ -112,39 +148,47 @@
|
||||
(gnc:for-loop (lambda (x) (thunk (gnc:account-get-split account x)))
|
||||
0 (gnc:account-get-split-count account) 1))
|
||||
|
||||
;; get transactions date from split - needs to be done indirectly
|
||||
;; as it's stored in the parent transaction
|
||||
|
||||
(define (gnc:split-get-transaction-date split)
|
||||
(gnc:transaction-get-date-posted (gnc:split-get-parent split)))
|
||||
|
||||
;; ditto descriptions
|
||||
(define (gnc:split-get-description-from-parent split)
|
||||
(gnc:transaction-get-description (gnc:split-get-parent split)))
|
||||
|
||||
|
||||
;; get the account name of a split
|
||||
(define (gnc:split-get-account-name split)
|
||||
(gnc:account-get-name (gnc:split-get-account split)))
|
||||
|
||||
;; builds a list of the account name and values for the other
|
||||
;; splits in a transaction
|
||||
;; hack alert - lots of debugging cruft in here
|
||||
|
||||
(define (gnc:split-get-corresponding-account-name-and-values split)
|
||||
(let* ((my-sign (positive? (gnc:split-get-value split)))
|
||||
(diff-list '())
|
||||
(parent-transaction (gnc:split-get-parent split))
|
||||
(num-splits (gnc:transaction-get-split-count parent-transaction)))
|
||||
(gnc:for-loop
|
||||
(lambda (n)
|
||||
(let ((split-in-trans
|
||||
(gnc:transaction-get-split parent-transaction n)))
|
||||
(if (not (eq? my-sign
|
||||
(positive? (gnc:split-get-value split-in-trans))))
|
||||
(set! diff-list
|
||||
(cons
|
||||
(list
|
||||
(gnc:split-get-account-name split-in-trans)
|
||||
(gnc:split-get-value split-in-trans))
|
||||
diff-list)))))
|
||||
0 num-splits 1)
|
||||
(reverse diff-list)))
|
||||
(cond
|
||||
((= num-splits 1) '())
|
||||
(else
|
||||
|
||||
|
||||
(gnc:for-loop
|
||||
(lambda (n)
|
||||
(let ((split-in-trans
|
||||
(gnc:transaction-get-split parent-transaction n)))
|
||||
(if (not (eq? my-sign
|
||||
(positive? (gnc:split-get-value split-in-trans))))
|
||||
(set! diff-list
|
||||
(cons
|
||||
(list
|
||||
(gnc:split-get-account-name split-in-trans)
|
||||
(gnc:split-get-value split-in-trans))
|
||||
diff-list)))))
|
||||
0 num-splits 1)
|
||||
(reverse diff-list)))))
|
||||
|
||||
;; takes a C split, extracts relevant data and converts to a scheme
|
||||
;; representation
|
||||
@ -159,9 +203,13 @@
|
||||
(gnc:split-get-share-amount split)
|
||||
(gnc:split-get-share-price split)
|
||||
(gnc:split-get-value split)
|
||||
(gnc:split-get-docref split)
|
||||
(gnc:transaction-get-num (gnc:split-get-parent split))
|
||||
(gnc:split-get-corresponding-account-name-and-values split)))
|
||||
|
||||
;; timepair manipulation functions
|
||||
;; hack alert - these should probably be put somewhere else
|
||||
;; and be implemented PROPERLY rather than hackily
|
||||
|
||||
(define (gnc:timepair-to-datestring tp)
|
||||
(let ((bdtime (localtime (car tp))))
|
||||
(strftime "%x" bdtime)))
|
||||
@ -171,9 +219,17 @@
|
||||
(time2 (car t2)))
|
||||
(<= time1 time2)))
|
||||
|
||||
(define (gnc:timepair-later t1 t2)
|
||||
(let ((time1 (car t1))
|
||||
(time2 (car t2)))
|
||||
(< time1 time2)))
|
||||
|
||||
(define (gnc:timepair-later-or-eq t1 t2)
|
||||
(gnc:timepair-earlier-or-eq t2 t1))
|
||||
|
||||
;; returns a predicate that returns true only if a split-scm is
|
||||
;; between early-date and late-date
|
||||
|
||||
(define (gnc:tr-report-make-filter-predicate early-date late-date)
|
||||
(lambda (split-scm)
|
||||
(let ((split-date (gnc:tr-report-get-date split-scm)))
|
||||
@ -183,8 +239,9 @@
|
||||
;; converts a scheme split representation to a line of HTML,
|
||||
;; updates the values of total-inflow and total-outflow based
|
||||
;; on the split value
|
||||
;; hack alert - no i8n on amount printing yet - must fix!
|
||||
|
||||
(define (gnc:tr-report-split-to-html split-scm total-inflow total-outflow
|
||||
(define (gnc:tr-report-split-to-html split-scm
|
||||
starting-balance)
|
||||
(let ((other-splits (gnc:tr-report-get-other-splits split-scm)))
|
||||
(string-append
|
||||
@ -192,32 +249,61 @@
|
||||
(gnc:timepair-to-datestring
|
||||
(gnc:tr-report-get-date split-scm))
|
||||
"</TD><TD>"
|
||||
(gnc:tr-report-get-docref split-scm)
|
||||
(gnc:tr-report-get-num split-scm)
|
||||
"</TD><TD>"
|
||||
(gnc:tr-report-get-description split-scm)
|
||||
"</TD><TD>"
|
||||
(gnc:tr-report-get-memo split-scm)
|
||||
"</TD><TD>"
|
||||
(cond ((null? other-splits) "")
|
||||
((= (length other-splits) 1) (caar other-splits))
|
||||
(else "Multi-split (not implemented yet)"))
|
||||
(cond ((null? other-splits) "")
|
||||
((= (length other-splits) 1)
|
||||
(cond ((eqv? (caar other-splits) #f)
|
||||
"-")
|
||||
(else (caar other-splits))))
|
||||
(else "Multi-split (not implemented yet)"))
|
||||
"</TD><TD>"
|
||||
(cond ((> (gnc:tr-report-get-value split-scm) 0)
|
||||
(set! total-inflow (+ total-inflow
|
||||
(cond ((> (gnc:tr-report-get-value split-scm) 0)
|
||||
(begin
|
||||
(gnc:set-total-inflow! (+ gnc:total-inflow
|
||||
(gnc:tr-report-get-value split-scm)))
|
||||
(sprintf #f "%.2f" (gnc:tr-report-get-value split-scm)))
|
||||
(string-append
|
||||
(sprintf #f "%.2f" (gnc:tr-report-get-value split-scm))
|
||||
"</TD><TD>")))
|
||||
|
||||
(else
|
||||
(set! total-outflow (+ total-outflow
|
||||
(begin
|
||||
(gnc:set-total-outflow! (+ gnc:total-outflow
|
||||
(- (gnc:tr-report-get-value split-scm))))
|
||||
(string-append
|
||||
"</TD><TD>"
|
||||
(sprintf #f "%.2f"
|
||||
(- (gnc:tr-report-get-value split-scm))))))
|
||||
(- (gnc:tr-report-get-value split-scm)))))))
|
||||
"</TD><TD>"
|
||||
|
||||
(sprintf #f "%.2f" (- (+ starting-balance gnc:total-inflow)
|
||||
gnc:total-outflow))
|
||||
|
||||
"</TD></TR>")))
|
||||
|
||||
;; hack alert - stub for testing
|
||||
;; gets the balance for a list of splits before beginning-date
|
||||
;; hack alert -
|
||||
;; we are doing multiple passes over the list - if it becomes a performance
|
||||
;; problem some code optimisation will become necessary
|
||||
|
||||
(define (gnc:tr-report-get-starting-balance scm-split-list beginning-date)
|
||||
0)
|
||||
(cond ((or
|
||||
(eq? scm-split-list '())
|
||||
(gnc:timepair-later
|
||||
(gnc:tr-report-get-date (car scm-split-list))
|
||||
beginning-date))
|
||||
0)
|
||||
(+
|
||||
(gnc:tr-report-get-value
|
||||
(car scm-split-list))
|
||||
(gnc:tr-report-get-starting-balance
|
||||
(cdr scm-split-list) beginning-date))))
|
||||
|
||||
|
||||
|
||||
(gnc:define-report
|
||||
;; version
|
||||
@ -228,26 +314,31 @@
|
||||
gnc:*transaction-report-options*
|
||||
;; renderer
|
||||
(lambda (options)
|
||||
(let* ((prefix (list "<HTML>" "<BODY bgcolor=#99ccff>" "<TABLE>"))
|
||||
(let* ((prefix (list "<HTML>" "<BODY bgcolor=#99ccff>" "<TABLE>"
|
||||
"<TH>Date</TH>"
|
||||
"<TH>Num</TH>"
|
||||
"<TH>Description</TH>"
|
||||
"<TH>Memo</TH>"
|
||||
"<TH>Category</TH>"
|
||||
"<TH>Credit</TH>"
|
||||
"<TH>Debit</TH>"
|
||||
"<TH>Balance<TH>"))
|
||||
(suffix (list "</TABLE>" "</BODY>" "</HTML>"))
|
||||
(balance-line '())
|
||||
(inflow-outflow-line '())
|
||||
(net-inflow-line '())
|
||||
(report-lines '())
|
||||
(date-filter-pred (gnc:tr-report-make-filter-predicate
|
||||
(op-value begindate)
|
||||
(op-value enddate)))
|
||||
(total-inflow 0)
|
||||
(total-outflow 0)
|
||||
(starting-balance 0)
|
||||
(accounts (op-value tr-report-account-op))
|
||||
(html-mapper (lambda (split-scm) (gnc:tr-report-split-to-html
|
||||
split-scm
|
||||
total-inflow
|
||||
total-outflow
|
||||
starting-balance))))
|
||||
|
||||
(accounts (op-value tr-report-account-op)))
|
||||
gnc:tr-report-initialize-inflow-and-outflow!
|
||||
(if (null? accounts)
|
||||
(set! report-lines
|
||||
(list "<TR><TD>You have not selected an account.</TD></TR>"))
|
||||
(begin
|
||||
(begin
|
||||
|
||||
(gnc:for-each-split-in-account
|
||||
(car accounts)
|
||||
(lambda (split)
|
||||
@ -257,6 +348,50 @@
|
||||
(set! starting-balance
|
||||
(gnc:tr-report-get-starting-balance
|
||||
report-lines (op-value begindate)))
|
||||
|
||||
(set! report-lines (gnc:filter-list report-lines date-filter-pred))
|
||||
(set! report-lines (map html-mapper report-lines))))
|
||||
(append prefix report-lines suffix))))
|
||||
(let ((html-mapper (lambda (split-scm) (gnc:tr-report-split-to-html
|
||||
split-scm
|
||||
starting-balance))))
|
||||
(set! report-lines (gnc:inorder-map report-lines html-mapper)))
|
||||
(set!
|
||||
balance-line
|
||||
(list "<TR><TD><STRONG>Balance at: "
|
||||
(gnc:timepair-to-datestring (op-value begindate))
|
||||
"</STRONG></TD>"
|
||||
"<TD></TD>"
|
||||
"<TD></TD>"
|
||||
"<TD></TD>"
|
||||
"<TD></TD>"
|
||||
"<TD></TD>"
|
||||
"<TD></TD>"
|
||||
"<TD><STRONG>"
|
||||
(sprintf #f "%.2f" starting-balance)
|
||||
"</STRONG></TD></TR>"))
|
||||
(set!
|
||||
inflow-outflow-line
|
||||
(list "<TR><TD><STRONG>Totals:</STRONG></TD>"
|
||||
"<TD></TD>"
|
||||
"<TD></TD>"
|
||||
"<TD></TD>"
|
||||
"<TD></TD>"
|
||||
"<TD><STRONG>"
|
||||
(sprintf #f "%.2f" gnc:total-inflow)
|
||||
"</TD></STRONG>"
|
||||
"<TD><STRONG>"
|
||||
(sprintf #f "%.2f" gnc:total-outflow)
|
||||
"</TD></STRONG>"
|
||||
"<TD></TD></TR>"))
|
||||
(set!
|
||||
net-inflow-line
|
||||
(list "<TR><TD><STRONG>Net Inflow</STRONG></TD>"
|
||||
"<TD></TD>"
|
||||
"<TD></TD>"
|
||||
"<TD></TD>"
|
||||
"<TD></TD>"
|
||||
"<TD></TD>"
|
||||
"<TD></TD>"
|
||||
"<TD><STRONG>"
|
||||
(sprintf #f "%.2f" (- gnc:total-inflow gnc:total-outflow))
|
||||
"</TD></STRONG></TR>"))
|
||||
(append prefix balance-line report-lines inflow-outflow-line net-inflow-line suffix))))))
|
||||
|
@ -1,69 +0,0 @@
|
||||
;; -*-scheme-*-
|
||||
|
||||
|
||||
;; something like
|
||||
;; for(i = first; i < last; i+= step) { thunk(i);}
|
||||
|
||||
(define (gnc:for-loop thunk first last step)
|
||||
(cond ((< first last) (thunk first)
|
||||
(gnc:for-loop thunk (+ first step) last step))
|
||||
(else #f)))
|
||||
|
||||
;; applies thunk to each split in account account
|
||||
(define (gnc:for-each-split-in-account account thunk)
|
||||
(gnc:for-loop (lambda (x) (thunk (gnc:account-get-split account x)))
|
||||
0 (gnc:account-get-split-count account) 1))
|
||||
|
||||
|
||||
(define (gnc:split-get-corresponding-account-name-and-values split)
|
||||
(list (cons "Not implemented yet." 0)))
|
||||
|
||||
(define (gnc:split-get-transaction-date split)
|
||||
(gnc:transaction-get-date-posted (gnc:split-get-parent split)))
|
||||
|
||||
(define (gnc:split-get-description-from-parent split)
|
||||
(gnc:transaction-get-description (gnc:split-get-parent split)))
|
||||
|
||||
(define (gnc:make-split-scheme-data split)
|
||||
(vector (gnc:split-get-memo split)
|
||||
(gnc:split-get-action split)
|
||||
(gnc:split-get-description-from-parent split)
|
||||
(gnc:split-get-transaction-date split)
|
||||
(gnc:split-get-reconcile-state split)
|
||||
(gnc:split-get-reconciled-date split)
|
||||
(gnc:split-get-share-amount split)
|
||||
(gnc:split-get-share-amount split)
|
||||
(gnc:split-get-share-price split)
|
||||
(gnc:split-get-value split)
|
||||
(gnc:split-get-docref split)
|
||||
(gnc:split-get-corresponding-account-name-and-values split)))
|
||||
|
||||
(define (gnc:split-represent-scheme-data-textually split)
|
||||
(call-with-output-string (lambda (x) (write (gnc:make-split-scheme-data split) x))))
|
||||
|
||||
(gnc:define-report
|
||||
;; version
|
||||
1
|
||||
;; Name
|
||||
"Account Transactions"
|
||||
;; Options
|
||||
#f
|
||||
;; renderer
|
||||
(lambda (options)
|
||||
(let ( (test-account (gnc:group-get-account (gnc:get-current-group) 0))
|
||||
(prefix (list "<HTML>" "<BODY bgcolor=#99ccff>" "<PRE>"))
|
||||
(suffix (list "</PRE>" "</BODY>" "</HTML>"))
|
||||
(report-lines (list)))
|
||||
|
||||
(gnc:for-each-split-in-account
|
||||
test-account
|
||||
(lambda (split)
|
||||
; (newline)
|
||||
; (write report-lines)
|
||||
(set! report-lines (append! report-lines (list (gnc:split-represent-scheme-data-textually split))))))
|
||||
; (write prefix)
|
||||
; (newline)
|
||||
; (write suffix)
|
||||
; (newline)
|
||||
; (write report-lines)
|
||||
(append prefix report-lines suffix))))
|
Loading…
Reference in New Issue
Block a user