mirror of
https://github.com/aclindsa/moneygo.git
synced 2025-07-03 12:48:38 -04:00
Store currency/security values/prices using big.Rat natively
This adds 'shadow' types used only by the store/db internal package whch handle converting these types to their DB-equivalent values. This change should allow reports to be generated significantly faster since it allows a large portion of the computation to be shifted to the database engines.
This commit is contained in:
@ -114,11 +114,11 @@ func TestImportGnucash(t *testing.T) {
|
||||
}
|
||||
var p1787, p2894, p3170 bool
|
||||
for _, price := range *prices.Prices {
|
||||
if price.CurrencyId == d.securities[0].SecurityId && price.Value == "17.87" {
|
||||
if price.CurrencyId == d.securities[0].SecurityId && amountsMatch(price.Value, "17.87") {
|
||||
p1787 = true
|
||||
} else if price.CurrencyId == d.securities[0].SecurityId && price.Value == "28.94" {
|
||||
} else if price.CurrencyId == d.securities[0].SecurityId && amountsMatch(price.Value, "28.94") {
|
||||
p2894 = true
|
||||
} else if price.CurrencyId == d.securities[0].SecurityId && price.Value == "31.70" {
|
||||
} else if price.CurrencyId == d.securities[0].SecurityId && amountsMatch(price.Value, "31.70") {
|
||||
p3170 = true
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user