Development #7124
Updated by Kyle Chong 3 months ago
Refer to: docs/planning/modules/M03_POS_Terminal_Cart.md Implement final transaction persistence after successful payment. Scope: * Generate unique transaction identifier. * Record Store. * Record Terminal. * Record Cashier/User. * Record transaction date/time. * Record transaction header. * Record transaction lines. * Record quantity/unit price/base amounts. * Record payment information. * Record applicable audit/reference information. * Maintain fields/structure required for future M04 Tax POS Terminal & Cart (M03) (docs/planning/modules/M03_POS_Terminal_Cart.md). Create repeatable tests with setup data, steps, expected result and M05 Discount data. * Commit transaction atomically where possible. * Ensure incomplete/failed payment does not produce a completed sales transaction. * Mark attached evidence. Include the transaction ready/pending for Backend synchronization. The completed transaction must be stored in stated error/recovery cases. Done when the POS transaction database: transactions.db Once successfully persisted, the sale should no longer depend on immediate Backend availability. Done when: A successfully paid sale is safely committed into transactions.db with sufficient information for later synchronization acceptance behaviour passes and reporting. failures are recorded.