resolves: an as-of mode - the newest register row on or before the record's date (exchange rates, price changes), not only a covering validity period
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 48/100
Direzione di ricerca
Start by reading the existing resolves: implementation from issue #6712 and trace how it evaluates between matches, orders candidates, and reports ambiguous or notFound. Add an as-of mode that selects the newest row with start on or before the record date; done means equal start dates remain ambiguous and dates with no earlier row return notFound. The payload names no source files or tests, so locate the implementation and its tests before making changes.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Problem
resolves: (#6712) fills a to-one, and with copy: scalars, from the register row whose validity period covers a date of the record (between: { start, end, value }). Two register rows covering the same date are reported as ambiguous, never picked from.
A very common register has no end date: a dated quote series. Exchange rates (one CurrencyRate row per currency per publication day), price changes and tax-rate changes all work this way. Each row is valid from its date until the next row replaces it. Declared with between: { start: date, value: date } and no end, every older row is open-ended too, so all of them cover the record's date and every lookup is ambiguous. Declared with start: date, end: date, a record dated on a day with no quote (a weekend, a holiday, a day the bank published nothing) is notFound. The rule the business applies is simple: take the newest row whose date is on or before the record's date. The construct cannot say it.
Ask
An as-of mode on between:
resolves:
- name: invoiceRate
event: { onCreate: SalesInvoice }
from: CurrencyRate
match: { Currency: Currency }
between: { start: date, value: date, asOf: true } # newest row with start <= value
copy: { rate: rate } # snapshot onto SalesInvoice.rate
outcome: rateResolution
With asOf: true the lookup orders the candidates by start descending and takes the first row whose start <= value. ambiguous then means only two rows with the same start. notFound means no row on or before the date.
Where it is needed
BusinessIntents/base-journal#80, realised FX differences on settlement. The invoice and the payment each need the rate effective on their own date. The difference between the two, times the settled amount, is the 624 / 724 posting.
- Lingua principale
- Java
- Stelle
- 278
- Fork
- 97
- Merge medio
- 16h 46m
- PR unite (30g)
- 265
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di eclipse-dirigible/dirigible
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
eclipse-dirigible/dirigible#7958 ·
I maintainer di solito rispondono entro 1 giorno
-
intent: a create-from without fromStatus answers 200 on a missing or unknown source id (no 400/404)Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
eclipse-dirigible/dirigible#7945 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
eclipse-dirigible/dirigible#7891 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
eclipse-dirigible/dirigible#6538 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
eclipse-dirigible/dirigible#4812 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di eclipse-dirigible/dirigible
Issue simili
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 75/100
521xueweihan/HelloGitHub#4105 ·
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
I maintainer di solito rispondono entro 1 giorno
-
code-maintenance
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
krizaka/krizaka-notifications#32 ·
I maintainer di solito rispondono entro 1 giorno