Rulvar API reference / @rulvar/rulvar / invoiceFromJournal
Function: invoiceFromJournal()
ts
function invoiceFromJournal(
entries,
priceUsd,
options?): InvoiceExport;Defined in: packages/core/dist/index.d.ts
The pure invoice fold. Pass the same entries and price table you would pass costReportFromJournal; the totals are that report's gross/net split verbatim. To make the export historically stable against price-table updates, pass the priceUsd rebuilt by journalPricingSnapshot and declare it via options.pricing (RV407); without a snapshot the fold prices at the current table's rates, exactly as before.
Parameters
| Parameter | Type |
|---|---|
entries | readonly JournalEntry[] |
priceUsd | (servedBy, usage, seq?) => number | undefined |
options? | { pricing?: InvoicePricingProvenance; } |
options.pricing? | InvoicePricingProvenance |