Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preliminary PriceDB integration #39

Merged
merged 1 commit into from
Jan 8, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 21 additions & 26 deletions docs/tep/tep-1015.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,70 +6,65 @@ Implementation branch:
link:https://github.com/e257-fi/tackler-ng/tree/tep/tep-1015-price-data[/tep/tep-1015-price-data]

Github issue: https://github.com/e257-fi/tackler-ng/issues/36

Github PR: https://github.com/e257-fi/tackler-ng/pull/39

== Summary

Summary of changes

* Sub-change 1
* Sub-change 2

Longer description with high level explanation of this change

Add a representation of historical price data.

=== Sub-change 1
* Define `pricedb` format
* Describe which entry of price data applies to which set of transactions

Lorem ipsum ...
=== Price data application policy

1. If a posting has rate or equivalence noted, it gets applied.
2. Otherwise, price conversion only takes account of data noted in the nearest earlier entry price DB, disregarding not any rate or equivalent noted in any transaction taht is later than the price DB entry.
* This is to ensure that filtering out any transaction does not change a report for a given PriceDB.

=== Sub-change 2

Lorem ipsum ...

This TEP does not propose any method for calculating the conversion.

== Journal File Format

Journal file format changes, if any
No change would be made to the journal file format. A new file type would be added with a format similar to the default format of Ledger CLI as described https://ledger-cli.org/doc/ledger3.html[here].

```
'P' TIMESTAMP AMOUNT COMMODITY '=' AMOUNT COMMODITY OPTIONAL_COMMENT
```

== Implementation

=== CLI Changes

Changes to command line interface

* [ ] item

None

=== CONF Changes

Changes to conf-settings

* [ ] item
None

=== Filtering Changes

None

=== Machinery

Changes to machinery

* [ ] item

* [ ] Add a new model _PriceEntry_ with fields
- timestamp in UTC
- commodity 1 with optional amount (assumed 1 if missing)
- commodity 2 with amount
- optional comment

==== API Changes

Api changes to server or client interfaces.


===== Server API Changes

Changes to server API

* [ ] item


===== Client API Changes

Changes to client API or JSON model
Expand Down