mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Fix a rebalancing bug.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@2690 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
2000-08-22 Dave Peticolas <dave@krondo.com>
|
||||
|
||||
* src/engine/Transaction.c (xaccSplitSetBaseValue): check to
|
||||
make sure the security is not "" before allowing price changes.
|
||||
|
||||
* src/gnome/window-register.c (gnc_register_check_close): use
|
||||
xaccSRCancelCursorTransChanges to cancel any pending changes.
|
||||
|
||||
|
||||
@@ -674,12 +674,12 @@ xaccSplitSetBaseValue (Split *s, double value, const char * base_currency)
|
||||
}
|
||||
}
|
||||
|
||||
if(s->acc &&
|
||||
s->acc->security &&
|
||||
safe_strcmp(s->acc->security, s->acc->currency) &&
|
||||
!DEQEPS(s->damount, 0.0, ZERO_THRESH_VALUE)) {
|
||||
if (s->acc &&
|
||||
s->acc->security &&
|
||||
*s->acc->security &&
|
||||
safe_strcmp(s->acc->security, s->acc->currency) &&
|
||||
!DEQEPS(s->damount, 0.0, ZERO_THRESH_VALUE))
|
||||
adjust_price = 1;
|
||||
}
|
||||
|
||||
/* The value of a split depends on the currency we express the
|
||||
* value in. This may or may not require a divide.
|
||||
|
||||
Reference in New Issue
Block a user