Handles invoice, credit note, debit note, numbering, totals, and cancellation rules in this app. Use when implementing or reviewing invoice creation, status changes, note issuance, export, or invoice-related API routes and forms.
Use this skill for invoice-domain work in this repository.
src/app/api/invoices/route.ts.getServerSession(authOptions) and resolveSessionUser(session.user) instead of trusting raw session fields alone.subtotal, taxAmount, and total from the submitted line items on the server. Do not trust client-calculated totals.bulstatNumber, placeOfIssue, paymentMethod, supplyDate, isOriginal, and napStatus.