Skip to content

feat(routes-f): invoice total calculator #875

@davedumto

Description

@davedumto

Summary

Compute invoice totals from line items with tax and discount.

Requirements

  • POST { items: [{ description, qty, unit_price }], tax_percent?, discount_percent? }
  • Return { subtotal, discount, taxable, tax, total, line_totals }
  • Cent precision
  • Tests cover multi-line, discount, tax stacking

Scope Constraint - READ BEFORE STARTING

All files for this task must live inside app/api/routes-f/. This includes the route handler, helpers/utilities, types, and tests. Do NOT modify, import from, or add files to lib/, utils/, types/, components/, or anywhere else outside app/api/routes-f/. If you need shared logic, duplicate it inside your subfolder. Keeping everything scoped to this folder is intentional - it keeps these tasks independent and mergeable in any order.

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave program

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions