Invoices Collection for Billing #35
Labels
No labels
CI/CD
MongoDB
PostgreSQL
api
authentication
bug
documentation
duplicate
enhancement
example issue
fix
good first issue
help wanted
high-level requirement
infrastructure
invalid
low-level requirement
medium-level requirement
question
security
test
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
AndreFerreira5/starranja#35
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This task is to design the
invoicescollection, which will store finalized billing records. This collection must be separate fromworkOrdersto ensure fiscal integrity (RNF05) and immutability.Key Strategy: We will "snapshot" data. When an invoice is created, all relevant details (client info, vehicle info, line items, totals) will be copied from the
workOrderinto theinvoicedocument. This ensures the invoice record never changes, even if the original client or work order details are modified later.Requirements Covered
Tasks
invoicesschema (e.g.,invoiceNumber,invoiceDate,status['Emitted', 'Paid']).clientDetailsandvehicleDetailssnapshots.itemsarray.workOrderIdreference to link back to the source work order for traceability.workOrders.statusis 'Completed').The scheme is looking like this now:

Invoices are a "snapshot"