mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Invert the F::Q price if there's already one in the other direction.
We don't want to create prices in both directions on the same day.
This commit is contained in:
parent
890cfe2186
commit
157c7e30a5
@ -411,6 +411,12 @@
|
|||||||
(set! saved-price (gnc-pricedb-lookup-day pricedb
|
(set! saved-price (gnc-pricedb-lookup-day pricedb
|
||||||
commodity currency
|
commodity currency
|
||||||
gnc-time))
|
gnc-time))
|
||||||
|
(if (null? saved-price)
|
||||||
|
(begin
|
||||||
|
(set! saved-price (gnc-pricedb-lookup-day pricedb currency
|
||||||
|
commodity gnc-time))
|
||||||
|
(if (not (null? saved-price))
|
||||||
|
(set! price (gnc-numeric-invert(price))))))
|
||||||
(if (not (null? saved-price))
|
(if (not (null? saved-price))
|
||||||
(begin
|
(begin
|
||||||
(gnc-price-begin-edit saved-price)
|
(gnc-price-begin-edit saved-price)
|
||||||
|
Loading…
Reference in New Issue
Block a user