The receipt printing logic was failing because it always expected a credit
but the "Print receipt" button was passing the payout debit line ID.
This fix:
- Updates pos/printreceipt.pl to use previously added PAYOUT template based
on account line type
- Uses RECEIPT template for credits, PAYOUT template for PAYOUT debits
- Throws proper error for unsupported transaction types
Test plan:
1. Make a purchase through Point of Sale
2. Go to transaction history for the register used
3. Issue a refund for the purchase
4. Click "Print receipt" button for the refund
5. Verify receipt prints correctly with payout details
Sponsored-by: OpenFifth <https://openfifth.co.uk/>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit
|
||
|---|---|---|
| .. | ||
| pay.pl | ||
| printreceipt.pl | ||
| register.pl | ||
| registers.pl | ||