* src/register/ledger-core/split-register-model.c:

* src/register/ledger-core/split-register-control.c:
	  Ignore certain splits with an "amount" of zero.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@7806 57a11ea4-9604-0410-9ed3-97b8803252fd
zzzoldfeatures/g2-gog-integ
Derek Atkins 24 years ago
parent deeb3fd2f3
commit ebc555fe43

@ -1,3 +1,9 @@
2003-01-09 Derek Atkins <derek@ihtfp.com>
* src/register/ledger-core/split-register-model.c:
* src/register/ledger-core/split-register-control.c:
Ignore certain splits with an "amount" of zero.
2003-01-09 Christian Stimming <stimming@tuhh.de>
* po/el.po: Updated translation, reviewed by

@ -1111,6 +1111,13 @@ gnc_split_register_handle_exchange (SplitRegister *reg, gboolean force_dialog)
/* Ok, we need to grab the exchange rate */
amount = gnc_split_register_debcred_cell_value (reg);
/*
* If "amount" is zero then we don't need an exchange-rate.. Return
* FALSE to let the user continue on.
*/
if (gnc_numeric_zero_p (amount))
return FALSE;
/* We know that "amount" is always in the reg_com currency.
* Unfortunately it is possible that neither xfer_com or txn_cur are
* the same as reg_com, in which case we need to convert to the txn

@ -1372,6 +1372,11 @@ gnc_split_register_get_conv_rate (Transaction *txn, Account *acc)
continue;
amount = xaccSplitGetAmount (s);
/* Ignore splits with "zero" amount */
if (gnc_numeric_zero_p (amount))
continue;
value = xaccSplitGetValue (s);
convrate = gnc_numeric_div (amount, value, GNC_DENOM_AUTO, GNC_DENOM_REDUCE);
return convrate;

Loading…
Cancel
Save