evoly-invoice-lib
v4.2.8
Published
Components for invoicing shared between multiple projects - evoly-metering, and evoly-customer-portal.
Maintainers
Readme
Evoly Invoice Library
Components for invoicing shared between multiple projects - evoly-metering, and evoly-customer-portal.
Inframark workspace
Workspaces whose route starts with inframark, hc-mud-504, interstate-mud,
or mayde-creek-mud render the Inframark statement style
(src/app/invoice/inframark.tsx), a replica of the Starnik "Monthly Water Bill
Statement" (models in src/app/assets/inframark/). No special wiring is needed:
render <Invoice /> with workspaceRoute="inframark" (or any route with that
prefix) and the usual props, and the dispatch in invoice-content.tsx does the rest.
import { Invoice } from "evoly-invoice-lib";
<Invoice
workspaceRoute="inframark"
pricingZone={pricingZone} // zone name is printed as the district name
from={from}
to={to}
oldIndex={oldIndex}
newIndex={newIndex}
lastPeriodIndex={lastPeriodIndex}
address={address}
factoryNumber={factoryNumber}
clientNumber={clientNumber}
medium={medium}
multiplier={multiplier}
categoriesQueryData={categories}
conversionsQueryData={conversions}
lng="en"
// Optional, Inframark-specific enhancements:
monthlyUsage={monthlyUsage} // fills the 13-month usage chart
customerCity={customerCity} // city + ZIP line of the mailing block
/>Data requirements on the evoly-metering side:
- Units must have
clientNumberset — the pricing-data endpoint (/api/client-number/pricing-data) looks units up by it and returns every unit sharing the number. - Each pricing zone needs billing categories/services priced in
$per1000 gallons/ permonth(same as the other US workspaces).
Optional props (the invoice degrades gracefully without them):
monthlyUsage?: { month: Date; consumption: number }[]— up to 13 months of consumption history (display units, current period included). Without it the chart falls back to the two periods derivable from the indices.customerCity?: string— e.g."KATY, TX 77449"; printed under the street address in the mailing block, omitted when absent.
Known placeholders, until the corresponding data exists:
ACCOUNT NUMBERprintsxxxxxx(real Inframark account numbers are not imported yet),ACCOUNT NAMEprintsCustomer-Name,SECURITY CODEprintsX-XXXXX-XXXX.STATEMENT #is derived from the statement date (YYYYMMDD).- The remit-to address is Inframark corporate (17495 Village Green Drive,
Jersey Village, TX) — confirm the real payment PO box with Inframark before
production use (see the TODO on
InframarkInfo).
Derived billing rules (from the Inframark sample statement): statement date = read-period end + 12 days, due date = end + 35 days, late penalty 15%.
