Build the software your business runs on
Web platforms, internal tools and integrations, designed, coded, tested and maintained by one engineering team.
export async function invoice(order) {
const total = sum(order.lines);
if (total <= 0) return null;
const doc = await finance.create(total);
// keep the invoice with the order
await link(order.id, doc.id);
return doc;
}