TRAX POS features an immutable Two-Way Linked Return Architecture. Rather than altering historical receipts, the system generates a linked Return Invoice (Storno-Beleg) with negative values. It offers barcode filtering, item-level quantity returns, condition grading (resalable vs. damaged), automated stock reversal, and fiscal compliance rollback.
1. Two-Way Linked Invoice Architecture #
Every refund maintains permanent transaction integrity through bidirectional database pointers:
- Original Invoice: Holds a flag
hasReturn = trueand points toreturnOrderId. In the archive table, it displays an amberHas Returnbadge linking directly to the return document. - Return Invoice (Storno): Displays status
returned, points toparentOrderId, and appears highlighted in rose (bg-rose-50) with negative bold totals (e.g.,-€18.50). Clicking its badge navigates back to the original sale. - Order Details Dialog: Features an informational banner at the top showing the linked document with a one-click navigation button.
Visual Reference: Return & Refund Processing Interface
(Upload and insert the generated refund_return_modal_ui image here)
2. Step-by-Step Return Processing Workflow #
To process a return:
- Navigate to the Returns Tab in the Store/POS module.
- Enter the original Order ID (e.g.,
YJRY01-26-000005) into the search bar and press Search (orEnter). - The invoice summary displays the original order date and original total amount.
- Isolate Returned Items:
- Barcode Scan Filter: For receipts containing dozens of items, scan the returned physical product’s barcode directly into the Barcode Scan Input. The table filters instantly to show only matching items.
- Or click Show All Items to browse line items manually.
3. Granular Quantity & Condition Grading #
For each returned line item, cashiers configure two critical parameters:
A. Return Quantity
- Adjust the returned amount using the
+and-step buttons or type a numeric value. - Safety Constraint: The return quantity cannot exceed the original purchased quantity (
max = getOriginalQty).
B. Condition Grading (Stock Reversal Logic)
- Resalable / Good Condition (
isDamaged = false):- Displayed with an active emerald green toggle.
- Product is intact and can be resold.
- TRAX automatically restores the returned quantity back to active store inventory (
inventoryService.calculateAndApplySoldQuantities()).
- Damaged / Defective Condition (
isDamaged = true):- Displayed with an active rose red toggle.
- Product is broken, expired, or unsellable.
- TRAX registers the return record with condition
'damaged', but does NOT re-add the quantity to sellable store stock, preventing defective goods from re-entering active inventory.
4. Real-Time Refund Calculation & Tax Rollback #
As return quantities are configured:
- Predicted Refund Amount: Highlighted prominently in an amber summary box.
- Tax Group Rollback: Recalculates exact tax amounts per VAT class (
Class A 7%,Class B 19%), net amounts, and gross figures to ensure accounting books balance accurately.
5. Finalizing the Return #
- Click Finalize Return & Issue Refund.
- Enter the Return Reason (e.g., Customer Remorse, Defective Goods, Wrong Size).
- The system executes atomic transactions:
- Generates a new sequential Return Order ID.
- Sets
orderTotalto negative currency value (-Math.abs(refundTotal)). - Restores inventory quantities for resalable goods.
- Links
parentOrderIdon the return order and updateshasReturn: trueon the original invoice. - Prints the official thermal Storno Return Receipt complete with KassenSichV TSE digital signature.
- Enables immediate generation of the official STORNO-BELEG / RETURN PDF document.

