From 4ca4c5868ee3a7768c9ec7c239ed8e8df3ce26de Mon Sep 17 00:00:00 2001 From: Martin Kobetic Date: Wed, 18 Dec 2024 18:10:50 -0500 Subject: [PATCH] fix conversion issues --- .vscode/settings.json | 3 +- TODO.md | 1 + cmd/coin2html/js/spec/commodity.spec.ts | 76 +- cmd/coin2html/js/src/account.ts | 20 +- cmd/coin2html/js/src/chart.ts | 4 +- cmd/coin2html/js/src/commodity.ts | 214 +++- cmd/coin2html/js/src/register.ts | 6 +- cmd/coin2html/js/src/ui.ts | 9 +- cmd/coin2html/js/src/utils.ts | 2 +- examples/yearly/viewer/index.html | 1368 +++++++++++++++++------ 10 files changed, 1284 insertions(+), 419 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 0eb9a50..eceb80e 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -14,5 +14,6 @@ }, "files.insertFinalNewline": true, "files.trimFinalNewlines": true, - "files.trimTrailingWhitespace": true + "files.trimTrailingWhitespace": true, + "makefile.configureOnOpen": false } diff --git a/TODO.md b/TODO.md index 4f2555b..eee4861 100644 --- a/TODO.md +++ b/TODO.md @@ -25,6 +25,7 @@ ### coin2html - make commodity conversions more robust, they blow up too easily +- chart shows plain numeric values regardless of commodity! - replace dateToString with d3.format - tooltips for columns, inputs and wherever useful - show details of selected posting diff --git a/cmd/coin2html/js/spec/commodity.spec.ts b/cmd/coin2html/js/spec/commodity.spec.ts index 208e15d..e7d3b7a 100644 --- a/cmd/coin2html/js/spec/commodity.spec.ts +++ b/cmd/coin2html/js/spec/commodity.spec.ts @@ -1,10 +1,22 @@ -import { Amount, Commodity } from "../src/commodity"; +import { + Amount, + Commodities, + commodity, + Commodity, + composeConversions, + newConversion, + Price, +} from "../src/commodity"; -test("create commodity", () => - expect(new Commodity("CAD", "Canadian Dollar", 2, "")).toBeTruthy()); +for (const [id, decimals] of Object.entries({ + USD: 2, + CAD: 2, + EUR: 2, +})) + if (!Commodities[id]) Commodities[id] = new Commodity(id, id, decimals, ""); describe("amount", () => { - const CAD = new Commodity("CAD", "Canadian Dollar", 2, ""); + const CAD = commodity`CAD`; test.each([ [0, "0.00 CAD"], [1, "0.01 CAD"], @@ -13,8 +25,62 @@ describe("amount", () => { [-50, "-0.50 CAD"], [123456789, "1,234,567.89 CAD"], [-12345678, "-123,456.78 CAD"], - ])(`%#: %i`, (i, expected) => { + ])(`%#: toString %i`, (i, expected) => { const amt = new Amount(i, CAD); expect(amt.toString()).toBe(expected); }); + + test.each([ + ["25.00 CAD", "25.00 CAD"], + ["25.0 CAD", "25.00 CAD"], + ["25 CAD", "25.00 CAD"], + ["-25 CAD", "-25.00 CAD"], + ["0.1 CAD", "0.10 CAD"], + ["-0.02834 CAD", "-0.02 CAD"], + ["25.0330 CAD", "25.03 CAD"], + ["25,033.5 CAD", "25,033.50 CAD"], + ])(`%#: parse %s`, (input, expected) => { + expect(Amount.parse(input).toString()).toBe(expected); + }); + + test.each([ + ["4 CAD", 4, 2500], + ["0.25 CAD", 4, 40000], + ["4 CAD", 2, 25], + ["0.25 CAD", 2, 400], + ])(`%#: reciprocal %s/%d`, (input, decimals, expected) => { + expect(Amount.parse(input).reciprocal(decimals)).toBe(expected); + }); +}); + +describe("price", () => { + test.each([ + ["CAD: 0.75 USD @ 2000-01-01"], + ["USD: 1.33 CAD @ 2000-01-01"], + ["USD: 0.99 EUR @ 2010-01-01"], + ])("toString %s", (input) => { + const price = Price.parse(input); + expect(price.toString()).toBe(input); + }); + test.each([ + ["CAD: 0.75 USD", "USD: 1.33 CAD"], + ["USD: 1.33 CAD", "CAD: 0.75 USD"], + ])("reverse %s", (input, expected) => { + const price = Price.parse(input); + const reversed = price.reverse().toString().split("@")[0].trim(); + expect(reversed).toBe(expected); + }); +}); + +describe("conversions", () => { + test("composition", () => { + const day = new Date("2000-01-01"); + const dayString = day.toISOString().split("T")[0]; + const cu = newConversion([Price.parse(`CAD: 0.75 USD @ ${dayString}`)]); + const ue = newConversion([Price.parse(`USD: 0.90 EUR @ ${dayString}`)]); + const ce = composeConversions(cu, ue); + expect(ce.direction).toBe("CAD => USD => EUR"); + expect(ce(day).toString()).toBe("CAD: 0.68 EUR @ 2000-01-01"); + expect(() => composeConversions(ue, cu)).toThrow(); + }); }); diff --git a/cmd/coin2html/js/src/account.ts b/cmd/coin2html/js/src/account.ts index 73103ee..41030ff 100644 --- a/cmd/coin2html/js/src/account.ts +++ b/cmd/coin2html/js/src/account.ts @@ -1,4 +1,4 @@ -import { Amount, Commodities, Commodity } from "./commodity"; +import { Amount, Commodity } from "./commodity"; import { State } from "./views"; import { AccountPostingGroups, @@ -7,6 +7,10 @@ import { trimToDateRange, } from "./utils"; +/** + * Account, Posting and Transaction + */ + export class Account { children: Account[] = []; postings: Posting[] = []; @@ -166,17 +170,15 @@ export let MaxDate = new Date(0); export const Accounts: Record = {}; export const Roots: Account[] = []; -export function loadAccounts() { - const importedAccounts = JSON.parse( - document.getElementById("importedAccounts")!.innerText - ) as importedAccounts; +export function loadAccounts(source: string) { + const importedAccounts = JSON.parse(source) as importedAccounts; for (const impAccount of Object.values(importedAccounts)) { if (impAccount.name == "Root") continue; const parent = Accounts[impAccount.parent]; const account = new Account( impAccount.name, impAccount.fullName, - Commodities[impAccount.commodity], + Commodity.find(impAccount.commodity), parent, impAccount.location, impAccount.closed ? new Date(impAccount.closed) : undefined @@ -186,10 +188,10 @@ export function loadAccounts() { Roots.push(account); } } +} - const importedTransactions = JSON.parse( - document.getElementById("importedTransactions")!.innerText - ) as importedTransactions; +export function loadTransactions(source: string) { + const importedTransactions = JSON.parse(source) as importedTransactions; for (const impTransaction of Object.values(importedTransactions)) { const posted = new Date(impTransaction.posted); if (posted < MinDate) MinDate = posted; diff --git a/cmd/coin2html/js/src/chart.ts b/cmd/coin2html/js/src/chart.ts index 325c585..b15e5e6 100644 --- a/cmd/coin2html/js/src/chart.ts +++ b/cmd/coin2html/js/src/chart.ts @@ -8,7 +8,7 @@ import { AggregationStyle, addAggregationStyleInput, } from "./views"; -import { groupWithSubAccounts, PostingGroup } from "./utils"; +import { groupByWithSubAccounts, PostingGroup } from "./utils"; import { Account } from "./account"; import { axisLeft, axisTop } from "d3-axis"; import { scaleLinear, scaleOrdinal, scaleTime } from "d3-scale"; @@ -33,7 +33,7 @@ export function viewChart(options?: { const groupKey = Aggregation[State.View.Aggregate] as d3.TimeInterval; const dates = groupKey.range(State.StartDate, State.EndDate); const maxAccounts = State.View.AggregatedSubAccountMax; - const accountGroups = groupWithSubAccounts(account, groupKey, maxAccounts, { + const accountGroups = groupByWithSubAccounts(account, groupKey, maxAccounts, { negated: opts.negated, }); const labelFromAccount = (a: Account | undefined) => diff --git a/cmd/coin2html/js/src/commodity.ts b/cmd/coin2html/js/src/commodity.ts index 09c6df7..4503c53 100644 --- a/cmd/coin2html/js/src/commodity.ts +++ b/cmd/coin2html/js/src/commodity.ts @@ -5,40 +5,89 @@ import { dateToString, last } from "./utils"; // Commodity, Amount and Price // Conversion produces price from date. -type Conversion = (d: Date) => Amount; +type Conversion = { + (d: Date): Price; + from: Commodity; + to: Commodity; + direction: string; +}; -function newConversion(prices: Price[]): Conversion { - if (prices.length == 0) +export function newConversion(knownPrices: Price[]): Conversion { + // knownPrices are assumed to be sorted by time + if (knownPrices.length == 0) throw new Error("cannot create conversion from empty price list"); - const from = prices[0].date; - const to = last(prices)!.date; + const from = knownPrices[0].date; + const to = last(knownPrices)!.date; const dates = timeWeek.range(from, to); - if (dates.length == 0) return (d: Date) => prices[0].value; - // scale from dates to the number of weeks/price points + const params = { + from: knownPrices[0].commodity, + to: knownPrices[0].value.commodity, + dates, + direction: knownPrices[0].direction, + }; + if (dates.length == 0) { + return Object.assign((d: Date) => knownPrices[0], params); + } + // scale from dates to the index of the week in the date range const scale = scaleTime([from, to], [0, dates.length - 1]).clamp(true); - // generate array of prices per week + // generate array of weekly prices let cpi = 0; - const weeks = dates.map((d) => { - while (prices[cpi].date < d) cpi++; - return prices[cpi].value; + const weeklyPrices = dates.map((d) => { + while (knownPrices[cpi].date < d) cpi++; + return knownPrices[cpi]; }); // conversion function, add closed over elements as properties for debugging - const conversion = (d: Date) => weeks[Math.round(scale(d))]; - conversion.scale = scale; - conversion.weeks = weeks; - conversion.dates = dates; - return conversion; + const conversion = (d: Date) => weeklyPrices[Math.round(scale(d))]; + + return Object.assign(conversion, { + scale, + weeks: weeklyPrices, + ...params, + }); +} + +export function composeConversions( + conversion: Conversion, + conversion2: Conversion +) { + if (conversion.to != conversion2.from) + throw new Error( + `cannot compose conversions ${conversion.direction} and ${conversion2.direction}` + ); + return Object.assign( + (d: Date) => + new Price( + conversion.from, + d, + conversion(d).value.convertTo(conversion2(d)), + "" + ), + { + from: conversion.from, + to: conversion2.to, + direction: conversion.from.toString() + " => " + conversion2.direction, + conversion, + conversion2, + } + ); } export class Commodity { prices: Price[] = []; _conversions?: Map; + constructor( readonly id: string, readonly name: string, readonly decimals: number, readonly location: string ) {} + + static find(id: string): Commodity { + const c = Commodities[id]; + if (!c) throw new Error(`unknown commodity ${id}`); + return c; + } toString(): string { return this.id; } @@ -47,25 +96,44 @@ export class Commodity { get conversions() { if (this._conversions) return this._conversions; // group prices by price commodity - const prices = new Map(); + const pricesByCommodity = new Map(); + // make sure the prices are sorted correctly + this.prices.sort((a, b) => a.date.getTime() - b.date.getTime()); this.prices.forEach((p) => { - const cps = prices.get(p.value.commodity); + const cps = pricesByCommodity.get(p.value.commodity); if (cps) cps.push(p); - else prices.set(p.value.commodity, [p]); + else pricesByCommodity.set(p.value.commodity, [p]); }); // build a conversion function for each price commodity this._conversions = new Map(); - for (const [commodity, cps] of prices) { + for (const [commodity, cps] of pricesByCommodity) { const conversion = newConversion(cps); this._conversions.set(commodity, conversion); } return this._conversions; } + findConversion(to: Commodity, tried: Set): Conversion | undefined { + tried.add(this); + const conversion = this.conversions.get(to); + if (conversion) return conversion; + const candidates = [...this.conversions.keys()].filter( + (c) => !tried.has(c) + ); + for (const commodity of candidates) { + const conversion2 = commodity.findConversion(to, tried); + if (!conversion2) continue; + const conversion = this.conversions.get(commodity)!; + const composed = composeConversions(conversion, conversion2); + this._conversions!.set(to, composed); + return composed; + } + return undefined; + } + // convert amount to this commodity using price on given date convert(amount: Amount, date: Date): Amount { - if (amount.isZero) return new Amount(0, this); - if (amount.commodity == this) return amount; - const conversion = amount.commodity.conversions.get(this); + if (amount.commodity == this || amount.isZero) return new Amount(0, this); + const conversion = this.findConversion(amount.commodity, new Set()); if (!conversion) throw new Error( `Cannot convert ${amount.toString()} to ${this.toString()}` @@ -75,6 +143,14 @@ export class Commodity { } } +export const Commodities: Record = {}; +// template parser, e.g. commodity`CAD` +export function commodity(strings: TemplateStringsArray): Commodity { + if (strings.length != 1) + throw new Error(`invalid commodity template ${strings}`); + return Commodity.find(strings[0]); +} + export class Amount { constructor(private value: number, readonly commodity: Commodity) {} static clone(amount: Amount) { @@ -85,12 +161,20 @@ export class Amount { if (parts.length != 2) { throw new Error("Invalid amount: " + input); } - const commodity = Commodities[parts[1]]; - if (!commodity) { - throw new Error("Unknown commodity: " + parts[1]); + const commodity = Commodity.find(parts[1]); + + // drop the decimal point, make sure value aligns with commodity.decimals. + let [int, dec] = parts[0].split("."); + if (commodity.decimals > 0) { + if (!dec) dec = ""; + dec = + dec.length > commodity.decimals + ? dec.slice(0, commodity.decimals) + : dec + "0".repeat(commodity.decimals - dec.length); + // drop thousands separators if present + int = int.replace(",", "") + dec; } - // drop the decimal point, commodity.decimals should indicate where it is. - const value = Number(parts[0].replace(".", "")); + const value = parseInt(int); return new Amount(value, commodity); } toString(thousandsSeparator = true): string { @@ -120,11 +204,12 @@ export class Amount { } return this.addIn(this.commodity.convert(amount, date), date); } - convertTo(price: Amount): Amount { + convertTo(price: Price): Amount { // the product decimals is a sum of this and price decimals, so divide by this decimals - const float = (this.value * price.value) / 10 ** this.commodity.decimals; + const float = + (this.value * price.value.value) / 10 ** this.commodity.decimals; // accounting rounding should round 0.5 up - return new Amount(Math.round(float), price.commodity); + return new Amount(Math.round(float), price.value.commodity); } cmp(amount: Amount) { const decimalDiff = this.commodity.decimals - amount.commodity.decimals; @@ -132,6 +217,10 @@ export class Amount { ? this.value * 10 ** -decimalDiff - amount.value : this.value - amount.value * 10 ** decimalDiff; } + reciprocal(decimals: number): number { + const reciprocal = 10 ** this.commodity.decimals / this.value; + return Math.round(reciprocal * 10 ** decimals); + } get sign() { return Math.sign(this.value); } @@ -140,24 +229,61 @@ export class Amount { } } +// template parser, e.g. amount`10.00 CAD` +export function amount(strings: TemplateStringsArray): Amount { + if (strings.length != 1) + throw new Error(`invalid amount template ${strings}`); + return Amount.parse(strings[0]); +} + export class Price { constructor( readonly commodity: Commodity, readonly date: Date, readonly value: Amount, readonly location: string - ) { - commodity.prices.push(this); + ) {} + static parse(input: string): Price { + const parts = input.split(":"); + if (parts.length != 2) { + throw new Error("Invalid price: " + input); + } + const commodity = Commodity.find(parts[0].trim()); + const [value, dateString] = parts[1].split("@"); + const date = dateString ? new Date(dateString.trim()) : new Date(); + return new Price(commodity, date, Amount.parse(value.trim()), "unknown"); } + toString(): string { return ( this.commodity.toString() + ": " + this.value.toString() + - "@" + + " @ " + dateToString(this.date) ); } + reverse(): Price { + return new Price( + this.value.commodity, + this.date, + new Amount( + this.value.reciprocal(this.commodity.decimals), + this.commodity + ), + this.location + ); + } + get direction() { + return this.commodity.toString() + " => " + this.value.commodity.toString(); + } +} + +// template parser, e.g. price`USD: 1.33 CAD` +export function price(strings: TemplateStringsArray): Price { + if (strings.length != 1) + throw new Error(`invalid amount template ${strings}`); + return Price.parse(strings[0]); } type importedCommodities = Record< @@ -166,17 +292,13 @@ type importedCommodities = Record< >; type importedPrices = { commodity: string; - currency: string; time: string; value: string; location: string; }[]; -export const Commodities: Record = {}; -export function loadCommodities() { - const importedCommodities = JSON.parse( - document.getElementById("importedCommodities")!.innerText - ) as importedCommodities; +export function loadCommodities(source: string) { + const importedCommodities = JSON.parse(source) as importedCommodities; for (const impCommodity of Object.values(importedCommodities)) { const commodity = new Commodity( impCommodity.id, @@ -186,16 +308,13 @@ export function loadCommodities() { ); Commodities[commodity.id] = commodity; } +} - const importedPrices = JSON.parse( - document.getElementById("importedPrices")!.innerText - ) as importedPrices; +export function loadPrices(source: string) { + const importedPrices = JSON.parse(source) as importedPrices; if (importedPrices) { for (const imported of importedPrices) { - const commodity = Commodities[imported.commodity]; - if (!commodity) { - throw new Error("Unknown commodity: " + imported.commodity); - } + const commodity = Commodity.find(imported.commodity); const amount = Amount.parse(imported.value); if (amount.toString(false) != imported.value) { throw new Error( @@ -209,6 +328,7 @@ export function loadCommodities() { imported.location ); commodity.prices.push(price); + amount.commodity.prices.push(price.reverse()); } } } diff --git a/cmd/coin2html/js/src/register.ts b/cmd/coin2html/js/src/register.ts index c9bcf97..a4c65f7 100644 --- a/cmd/coin2html/js/src/register.ts +++ b/cmd/coin2html/js/src/register.ts @@ -15,7 +15,7 @@ import { Account, Posting } from "./account"; import { dateToString, groupBy, - groupWithSubAccounts, + groupByWithSubAccounts, last, trimToDateRange, } from "./utils"; @@ -125,13 +125,13 @@ function viewRegisterAggregatedWithSubAccounts( } ) { const dates = groupKey.range(State.StartDate, State.EndDate); - const groups = groupWithSubAccounts( + const groups = groupByWithSubAccounts( account, groupKey, State.View.AggregatedSubAccountMax, options ); - // transpose the groups into row data + // convert the vertical groups into horizontal row data const total = new Amount(0, account.commodity); const data = dates.map((date, i) => { const balance = new Amount(0, account.commodity); diff --git a/cmd/coin2html/js/src/ui.ts b/cmd/coin2html/js/src/ui.ts index 992fa8d..6093ad5 100644 --- a/cmd/coin2html/js/src/ui.ts +++ b/cmd/coin2html/js/src/ui.ts @@ -2,12 +2,13 @@ import { Account, Accounts, loadAccounts, + loadTransactions, MaxDate, MinDate, Roots, } from "./account"; import { dateToString } from "./utils"; -import { loadCommodities } from "./commodity"; +import { loadCommodities, loadPrices } from "./commodity"; import { EndDateInput, RootAccountSelect, @@ -22,8 +23,10 @@ import { select } from "d3-selection"; function initializeUI() { // Need to load before initializing the UI state. - loadCommodities(); - loadAccounts(); + loadCommodities(document.getElementById("importedCommodities")!.innerText); + loadPrices(document.getElementById("importedPrices")!.innerText); + loadAccounts(document.getElementById("importedAccounts")!.innerText); + loadTransactions(document.getElementById("importedTransactions")!.innerText); State.SelectedAccount = Accounts.Assets; State.SelectedView = Object.keys(Views.Assets)[0]; State.StartDate = MinDate; diff --git a/cmd/coin2html/js/src/utils.ts b/cmd/coin2html/js/src/utils.ts index 218511f..65bae20 100644 --- a/cmd/coin2html/js/src/utils.ts +++ b/cmd/coin2html/js/src/utils.ts @@ -81,7 +81,7 @@ function addIntoFirst(groups: AccountPostingGroups[]): AccountPostingGroups { return total; } -export function groupWithSubAccounts( +export function groupByWithSubAccounts( account: Account, groupKey: d3.TimeInterval, maxAccounts: number, diff --git a/examples/yearly/viewer/index.html b/examples/yearly/viewer/index.html index 684ff7d..2e5a5c2 100644 --- a/examples/yearly/viewer/index.html +++ b/examples/yearly/viewer/index.html @@ -48907,7 +48907,7 @@

const groupKey = _views__WEBPACK_IMPORTED_MODULE_0__.Aggregation[_views__WEBPACK_IMPORTED_MODULE_0__.State.View.Aggregate]; const dates = groupKey.range(_views__WEBPACK_IMPORTED_MODULE_0__.State.StartDate, _views__WEBPACK_IMPORTED_MODULE_0__.State.EndDate); const maxAccounts = _views__WEBPACK_IMPORTED_MODULE_0__.State.View.AggregatedSubAccountMax; - const accountGroups = (0,_utils__WEBPACK_IMPORTED_MODULE_1__.groupWithSubAccounts)(account, groupKey, maxAccounts, { + const accountGroups = (0,_utils__WEBPACK_IMPORTED_MODULE_1__.groupByWithSubAccounts)(account, groupKey, maxAccounts, { negated: opts.negated, }); const labelFromAccount = (a) => a ? account.relativeName(a) : "Other"; @@ -49018,7 +49018,13 @@

/* harmony export */ Commodities: () => (/* binding */ Commodities), /* harmony export */ Commodity: () => (/* binding */ Commodity), /* harmony export */ Price: () => (/* binding */ Price), -/* harmony export */ loadCommodities: () => (/* binding */ loadCommodities) +/* harmony export */ amount: () => (/* binding */ amount), +/* harmony export */ commodity: () => (/* binding */ commodity), +/* harmony export */ composeConversions: () => (/* binding */ composeConversions), +/* harmony export */ loadCommodities: () => (/* binding */ loadCommodities), +/* harmony export */ loadPrices: () => (/* binding */ loadPrices), +/* harmony export */ newConversion: () => (/* binding */ newConversion), +/* harmony export */ price: () => (/* binding */ price) /* harmony export */ }); /* harmony import */ var d3_scale__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! d3-scale */ "./node_modules/d3-scale/src/time.js"); /* harmony import */ var d3_time__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-time */ "./node_modules/d3-time/src/week.js"); @@ -49026,29 +49032,49 @@

-function newConversion(prices) { - if (prices.length == 0) +function newConversion(knownPrices) { + // knownPrices are assumed to be sorted by time + if (knownPrices.length == 0) throw new Error("cannot create conversion from empty price list"); - const from = prices[0].date; - const to = (0,_utils__WEBPACK_IMPORTED_MODULE_0__.last)(prices).date; + const from = knownPrices[0].date; + const to = (0,_utils__WEBPACK_IMPORTED_MODULE_0__.last)(knownPrices).date; const dates = d3_time__WEBPACK_IMPORTED_MODULE_1__.timeSunday.range(from, to); - if (dates.length == 0) - return (d) => prices[0].value; - // scale from dates to the number of weeks/price points + const params = { + from: knownPrices[0].commodity, + to: knownPrices[0].value.commodity, + dates, + direction: knownPrices[0].direction, + }; + if (dates.length == 0) { + return Object.assign((d) => knownPrices[0], params); + } + // scale from dates to the index of the week in the date range const scale = (0,d3_scale__WEBPACK_IMPORTED_MODULE_2__["default"])([from, to], [0, dates.length - 1]).clamp(true); - // generate array of prices per week + // generate array of weekly prices let cpi = 0; - const weeks = dates.map((d) => { - while (prices[cpi].date < d) + const weeklyPrices = dates.map((d) => { + while (knownPrices[cpi].date < d) cpi++; - return prices[cpi].value; + return knownPrices[cpi]; }); // conversion function, add closed over elements as properties for debugging - const conversion = (d) => weeks[Math.round(scale(d))]; - conversion.scale = scale; - conversion.weeks = weeks; - conversion.dates = dates; - return conversion; + const conversion = (d) => weeklyPrices[Math.round(scale(d))]; + return Object.assign(conversion, { + scale, + weeks: weeklyPrices, + ...params, + }); +} +function composeConversions(conversion, conversion2) { + if (conversion.to != conversion2.from) + throw new Error(`cannot compose conversions ${conversion.direction} and ${conversion2.direction}`); + return Object.assign((d) => new Price(conversion.from, d, conversion(d).value.convertTo(conversion2(d)), ""), { + from: conversion.from, + to: conversion2.to, + direction: conversion.from.toString() + " => " + conversion2.direction, + conversion, + conversion2, + }); } class Commodity { constructor(id, name, decimals, location) { @@ -49058,6 +49084,12 @@

this.location = location; this.prices = []; } + static find(id) { + const c = Commodities[id]; + if (!c) + throw new Error(`unknown commodity ${id}`); + return c; + } toString() { return this.id; } @@ -49067,35 +49099,59 @@

if (this._conversions) return this._conversions; // group prices by price commodity - const prices = new Map(); + const pricesByCommodity = new Map(); + // make sure the prices are sorted correctly + this.prices.sort((a, b) => a.date.getTime() - b.date.getTime()); this.prices.forEach((p) => { - const cps = prices.get(p.value.commodity); + const cps = pricesByCommodity.get(p.value.commodity); if (cps) cps.push(p); else - prices.set(p.value.commodity, [p]); + pricesByCommodity.set(p.value.commodity, [p]); }); // build a conversion function for each price commodity this._conversions = new Map(); - for (const [commodity, cps] of prices) { + for (const [commodity, cps] of pricesByCommodity) { const conversion = newConversion(cps); this._conversions.set(commodity, conversion); } return this._conversions; } + findConversion(to, tried) { + tried.add(this); + const conversion = this.conversions.get(to); + if (conversion) + return conversion; + const candidates = [...this.conversions.keys()].filter((c) => !tried.has(c)); + for (const commodity of candidates) { + const conversion2 = commodity.findConversion(to, tried); + if (!conversion2) + continue; + const conversion = this.conversions.get(commodity); + const composed = composeConversions(conversion, conversion2); + this._conversions.set(to, composed); + return composed; + } + return undefined; + } // convert amount to this commodity using price on given date convert(amount, date) { - if (amount.isZero) + if (amount.commodity == this || amount.isZero) return new Amount(0, this); - if (amount.commodity == this) - return amount; - const conversion = amount.commodity.conversions.get(this); + const conversion = this.findConversion(amount.commodity, new Set()); if (!conversion) throw new Error(`Cannot convert ${amount.toString()} to ${this.toString()}`); const price = conversion(date); return amount.convertTo(price); } } +const Commodities = {}; +// template parser, e.g. commodity`CAD` +function commodity(strings) { + if (strings.length != 1) + throw new Error(`invalid commodity template ${strings}`); + return Commodity.find(strings[0]); +} class Amount { constructor(value, commodity) { this.value = value; @@ -49109,12 +49165,20 @@

if (parts.length != 2) { throw new Error("Invalid amount: " + input); } - const commodity = Commodities[parts[1]]; - if (!commodity) { - throw new Error("Unknown commodity: " + parts[1]); + const commodity = Commodity.find(parts[1]); + // drop the decimal point, make sure value aligns with commodity.decimals. + let [int, dec] = parts[0].split("."); + if (commodity.decimals > 0) { + if (!dec) + dec = ""; + dec = + dec.length > commodity.decimals + ? dec.slice(0, commodity.decimals) + : dec + "0".repeat(commodity.decimals - dec.length); + // drop thousands separators if present + int = int.replace(",", "") + dec; } - // drop the decimal point, commodity.decimals should indicate where it is. - const value = Number(parts[0].replace(".", "")); + const value = parseInt(int); return new Amount(value, commodity); } toString(thousandsSeparator = true) { @@ -49146,9 +49210,9 @@

} convertTo(price) { // the product decimals is a sum of this and price decimals, so divide by this decimals - const float = (this.value * price.value) / 10 ** this.commodity.decimals; + const float = (this.value * price.value.value) / 10 ** this.commodity.decimals; // accounting rounding should round 0.5 up - return new Amount(Math.round(float), price.commodity); + return new Amount(Math.round(float), price.value.commodity); } cmp(amount) { const decimalDiff = this.commodity.decimals - amount.commodity.decimals; @@ -49156,6 +49220,10 @@

? this.value * 10 ** -decimalDiff - amount.value : this.value - amount.value * 10 ** decimalDiff; } + reciprocal(decimals) { + const reciprocal = 10 ** this.commodity.decimals / this.value; + return Math.round(reciprocal * 10 ** decimals); + } get sign() { return Math.sign(this.value); } @@ -49163,42 +49231,68 @@

return this.value == 0; } } +// template parser, e.g. amount`10.00 CAD` +function amount(strings) { + if (strings.length != 1) + throw new Error(`invalid amount template ${strings}`); + return Amount.parse(strings[0]); +} class Price { constructor(commodity, date, value, location) { this.commodity = commodity; this.date = date; this.value = value; this.location = location; - commodity.prices.push(this); + } + static parse(input) { + const parts = input.split(":"); + if (parts.length != 2) { + throw new Error("Invalid price: " + input); + } + const commodity = Commodity.find(parts[0].trim()); + const [value, dateString] = parts[1].split("@"); + const date = dateString ? new Date(dateString.trim()) : new Date(); + return new Price(commodity, date, Amount.parse(value.trim()), "unknown"); } toString() { return (this.commodity.toString() + ": " + this.value.toString() + - "@" + + " @ " + (0,_utils__WEBPACK_IMPORTED_MODULE_0__.dateToString)(this.date)); } + reverse() { + return new Price(this.value.commodity, this.date, new Amount(this.value.reciprocal(this.commodity.decimals), this.commodity), this.location); + } + get direction() { + return this.commodity.toString() + " => " + this.value.commodity.toString(); + } } -const Commodities = {}; -function loadCommodities() { - const importedCommodities = JSON.parse(document.getElementById("importedCommodities").innerText); +// template parser, e.g. price`USD: 1.33 CAD` +function price(strings) { + if (strings.length != 1) + throw new Error(`invalid amount template ${strings}`); + return Price.parse(strings[0]); +} +function loadCommodities(source) { + const importedCommodities = JSON.parse(source); for (const impCommodity of Object.values(importedCommodities)) { const commodity = new Commodity(impCommodity.id, impCommodity.name, impCommodity.decimals, impCommodity.location); Commodities[commodity.id] = commodity; } - const importedPrices = JSON.parse(document.getElementById("importedPrices").innerText); +} +function loadPrices(source) { + const importedPrices = JSON.parse(source); if (importedPrices) { for (const imported of importedPrices) { - const commodity = Commodities[imported.commodity]; - if (!commodity) { - throw new Error("Unknown commodity: " + imported.commodity); - } + const commodity = Commodity.find(imported.commodity); const amount = Amount.parse(imported.value); if (amount.toString(false) != imported.value) { throw new Error(`Parsed amount "${amount}" doesn't match imported "${imported.value}"`); } const price = new Price(commodity, new Date(imported.time), amount, imported.location); commodity.prices.push(price); + amount.commodity.prices.push(price.reverse()); } } } @@ -49312,8 +49406,8 @@

} function viewRegisterAggregatedWithSubAccounts(containerSelector, groupKey, account, options) { const dates = groupKey.range(_views__WEBPACK_IMPORTED_MODULE_0__.State.StartDate, _views__WEBPACK_IMPORTED_MODULE_0__.State.EndDate); - const groups = (0,_utils__WEBPACK_IMPORTED_MODULE_1__.groupWithSubAccounts)(account, groupKey, _views__WEBPACK_IMPORTED_MODULE_0__.State.View.AggregatedSubAccountMax, options); - // transpose the groups into row data + const groups = (0,_utils__WEBPACK_IMPORTED_MODULE_1__.groupByWithSubAccounts)(account, groupKey, _views__WEBPACK_IMPORTED_MODULE_0__.State.View.AggregatedSubAccountMax, options); + // convert the vertical groups into horizontal row data const total = new _commodity__WEBPACK_IMPORTED_MODULE_2__.Amount(0, account.commodity); const data = dates.map((date, i) => { const balance = new _commodity__WEBPACK_IMPORTED_MODULE_2__.Amount(0, account.commodity); @@ -49501,7 +49595,7 @@

/* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ dateToString: () => (/* binding */ dateToString), /* harmony export */ groupBy: () => (/* binding */ groupBy), -/* harmony export */ groupWithSubAccounts: () => (/* binding */ groupWithSubAccounts), +/* harmony export */ groupByWithSubAccounts: () => (/* binding */ groupByWithSubAccounts), /* harmony export */ last: () => (/* binding */ last), /* harmony export */ trimToDateRange: () => (/* binding */ trimToDateRange) /* harmony export */ }); @@ -49565,7 +49659,7 @@

total.account = undefined; return total; } -function groupWithSubAccounts(account, groupKey, maxAccounts, options) { +function groupByWithSubAccounts(account, groupKey, maxAccounts, options) { const opts = { negated: false }; // default Object.assign(opts, options); // get all account group lists @@ -55633,7 +55727,7 @@

/******/ /******/ })() ; -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29tbW9kaXR5LmpzIiwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFTaUI7QUFDNEM7QUFFakI7QUFDb0I7QUFDVjtBQUNoQjtBQUUvQixTQUFTLFNBQVMsQ0FBQyxPQUV6QjtJQUNDLE1BQU0saUJBQWlCLEdBQUcsNENBQVEsQ0FBQztJQUNuQyxNQUFNLE9BQU8sR0FBRyx5Q0FBSyxDQUFDLGVBQWUsQ0FBQztJQUN0QyxNQUFNLElBQUksR0F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NzXCIsIFwidGlja1wiKSxcbiAgICAgICAgbGluZSA9IHRpY2suc2VsZWN0KFwibGluZVwiKSxcbiAgICAgICAgdGV4dCA9IHRpY2suc2VsZWN0KFwidGV4dFwiKTtcblxuICAgIHBhdGggPSBwYXRoLm1lcmdlKHBhdGguZW50ZXIoKS5pbnNlcnQoXCJwYXRoXCIsIFwiLnRpY2tcIilcbiAgICAgICAgLmF0dHIoXCJjbGFzc1wiLCBcImRvbWFpblwiKVxuICAgICAgICAuYXR0cihcInN0cm9rZVwiLCBcImN1cnJlbnRDb2xvclwiKSk7XG5cbiAgICB0aWNrID0gdGljay5tZXJnZSh0aWNrRW50ZXIpO1xuXG4gICAgbGluZSA9IGxpbmUubWVyZ2UodGlja0VudGVyLmFwcGVuZChcImxpbmVcIilcbiAgICAgICAgLmF0dHIoXCJzdHJva2VcIiwgXCJjdXJyZW50Q29sb3JcIilcbiAgICAgICAgLmF0dHIoeCArIFwiMlwiLCBrICogdGlja1NpemVJbm5lcikpO1xuXG4gICAgdGV4dCA9IHRleHQubWVyZ2UodGlja0VudGVyLmFwcGVuZChcInRleHRcIilcbiAgICAgICAgLmF0dHIoXCJmaWxsXCIsIFwiY3VycmVudENvbG9yXCIpXG4gICAgICAgIC5hdHRyKHgsIGsgKiBzcGFjaW5nKVxuICAgICAgICAuYXR0cihcImR5XCIsIG9yaWVudCA9PT0gdG9wID8gXCIwZW1cIiA6IG9yaWVudCA9PT0gYm90dG9tID8gXCIwLjcxZW1cIiA6IFwiMC4zMmVtXCIpKTtcblxuICAgIGlmIChjb250ZXh0ICE9PSBzZWxlY3Rpb24pIHtcbiAgICAgIHBhdGggPSBwYXRoLnRyYW5zaXRpb24oY29udGV4dCk7XG4gICAgICB0aWNrID0gdGljay50cmFuc2l0aW9uKGNvbnRleHQpO1xuICAgICAgbGluZSA9IGxpbmUudHJhbnNpdGlvbihjb250ZXh0KTtcbiAgICAgIHRleHQgPSB0ZXh0LnRyYW5zaXRpb24oY29udGV4dCk7XG5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LCBvZmZzZXQpLFxuICAgICAgICBzZWxlY3Rpb24gPSBjb250ZXh0LnNlbGVjdGlvbiA/IGNvbnRleHQuc2VsZWN0aW9uKCkgOiBjb250ZXh0LFxuICAgICAgICBwYXRoID0gc2VsZWN0aW9uLnNlbGVjdEFsbChcIi5kb21haW5cIikuZGF0YShbbnVsbF0pLFxuICAgICAgICB0aWNrID0gc2VsZWN0aW9uLnNlbGVjdEFsbChcIi50aWNrXCIpLmRhdGEodmFsdWVzLCBzY2FsZSkub3JkZXIoKSxcbiAgICAgICAgdGlja0V4aXQgPSB0aWNrLmV4aXQoKSxcbiAgICAgICAgdGlja0VudGVyID0gdGljay5lbnRlcigpLmFwcGVuZChcImdcIikuYXR0cihcImNsYXNzXCIsIFwidGlja1wiKSxcbiAgICAgICAgbGluZSA9IHRpY2suc2VsZWN0KFwibGluZVwiKSxcbiAgICAgICAgdGV4dCA9IHRpY2suc2VsZWN0KFwidGV4dFwiKTtcblxuICAgIHBhdGggPSBwYXRoLm1lcmdlKHBhdGguZW50ZXIoKS5pbnNlcnQoXCJwYXRoXCIsIFwiLnRpY2tcIilcbiAgICAgICAgLmF0dHIoXCJjbGFzc1wiLCBcImRvbWFpblwiKVxuICAgICAgICAuYXR0cihcInN0cm9rZVwiLCBcImN1cnJlbnRDb2xvclwiKSk7XG5cbiAgICB0aWNrID0gdGljay5tZXJnZSh0aWNrRW50ZXIpO1xuXG4gICAgbGluZSA9IGxpbmUubWVyZ2UodGlja0VudGVyLmFwcGVuZChcImxpbmVcIilcbiAgICAgICAgLmF0dHIoXCJzdHJva2VcIiwgXCJjdXJyZW50Q29sb3JcIilcbiAgICAgICAgLmF0dHIoeCArIFwiMlwiLCBrICogdGlja1NpemVJbm5lcikpO1xuXG4gICAgdGV4dCA9IHRleHQubWVyZ2UodGlja0VudGVyLmFwcGVuZChcInRleHRcIilcbiAgICAgICAgLmF0dHIoXCJmaWxsXCIsIFwiY3VycmVudENvbG9yXCIpXG4gICAgICAgIC5hdHRy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Bvc2VDb252ZXJzaW9ucyhcbiAgY29udmVyc2lvbjogQ29udmVyc2lvbixcbiAgY29udmVyc2lvbjI6IENvbnZlcnNpb25cbikge1xuICBpZiAoY29udmVyc2lvbi50byAhPSBjb252ZXJzaW9uMi5mcm9tKVxuICAgIHRocm93IG5ldyBFcnJvcihcbiAgICAgIGBjYW5ub3QgY29tcG9zZSBjb252ZXJzaW9ucyAke2NvbnZlcnNpb24uZGlyZWN0aW9ufSBhbmQgJHtjb252ZXJzaW9uMi5kaXJlY3Rpb259YFxuICAgICk7XG4gIHJldHVybiBPYmplY3QuYXNzaWduKFxuICAgIChkOiBEYXRlKSA9PlxuICAgICAgbmV3IFByaWNlKFxuICAgICAgICBjb252ZXJzaW9uLmZyb20sXG4gICAgICAgIGQsXG4gICAgICAgIGNvbnZlcnNpb24oZCkudmFsdWUuY29udmVydFRvKGNvbnZlcnNpb24yKGQpKSxcbiAgICAgICAgXCJcIlxuICAgICAgKSxcbiAgICB7XG4gICAgICBmcm9tOiBjb252ZXJzaW9uLmZyb20sXG4gICAgICB0bzogY29udmVyc2lvbjIudG8sXG4gICAgICBkaXJlY3Rpb246IGNvbnZlcnNpb24uZnJvbS50b1N0cmluZygpICsgXCIgPT4gXCIgKyBjb252ZXJzaW9uMi5kaXJlY3Rpb24sXG4gICAgICBjb252ZXJzaW9uLFxuICAgICAgY29udmVyc2lvbjIsXG4gICAgfVxuICApO1xufVxuXG5leHBvcnQgY2xhc3MgQ29tbW9kaXR5IHtcbiAgcHJpY2VzOiBQcmljZVtdID0gW107XG4gIF9jb252ZXJzaW9ucz86IE1hcDxDb21tb2RpdHksIENvbnZlcnNpb24+O1xuXG4gIGNvbnN0cnVjdG9yKFxuICAgIHJlYWRvbmx5IGlkOiBzdHJpbmcsXG4gICAgcmVhZG9ubHkgbmFtZTogc3RyaW5nLFxuICAgIHJlYWRvbmx5IGRlY2ltYWxzOiBudW1iZXIsXG4gICAgcmVhZG9ubHkgbG9jYXRpb246IHN0cmluZ1x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