What an invoice's own state means. Pure.
An invoice is a promise about an amount for a window. Once the window has passed the promise is void — but money is not, so this namespace answers what ARRIVING money means as well as whether the invoice may still be charged.
What an invoice's own state means. Pure. An invoice is a promise about an amount for a window. Once the window has passed the promise is void — but money is not, so this namespace answers what ARRIVING money means as well as whether the invoice may still be charged.
(chargeable? invoice now)True when invoice may still be presented to a customer as the thing to pay.
True when `invoice` may still be presented to a customer as the thing to pay.
(lapsed? invoice now)True when invoice declares an expiry that now has passed.
An invoice with no expiry never lapses: nothing was promised about a window.
True when `invoice` declares an expiry that `now` has passed. An invoice with no expiry never lapses: nothing was promised about a window.
(open? invoice)True when invoice can still take money and settle normally.
True when `invoice` can still take money and settle normally.
(remaining invoice paid)Minor units still owed on invoice given paid. Zero once covered.
Minor units still owed on `invoice` given `paid`. Zero once covered.
(resolution invoice now)What money seen against invoice at now means.
:applied — the invoice is open and unlapsed, so settlement proceeds.
:late — the invoice was already paid, or its quote lapsed. The money is
real and belongs to a known customer; it simply cannot be applied by machine.
It goes to the operator queue, because the alternative is swallowing it, and
a chain payment has no reversal primitive to undo that with.
What money seen against `invoice` at `now` means. `:applied` — the invoice is open and unlapsed, so settlement proceeds. `:late` — the invoice was already paid, or its quote lapsed. The money is real and belongs to a known customer; it simply cannot be applied by machine. It goes to the operator queue, because the alternative is swallowing it, and a chain payment has no reversal primitive to undo that with.
(stale? invoice now)True when an open invoice has lapsed and should be marked :expired.
True when an open `invoice` has lapsed and should be marked `:expired`.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |