Files
opensourcepos/app/Controllers/Sales.php
Ollama 92ec321d08 fix: Clear sale session after completing sale
The clear_all() calls in postComplete() were placed after return
statements, making them unreachable dead code. This caused the
completed sale to remain in the session and appear in the Register
when navigating back.

The fix moves clear_all() and clear_mode() calls before the return
statements so they are actually executed, properly clearing the sale
cart, customer, and payments from the session after sale completion.

This fixes the regression reported by @odiea where users had to
manually cancel sales after each transaction.
2026-04-01 07:24:23 +00:00

73 KiB