Koha-clms/pos
Martin Renvoize 55a28aeb5f
Bug 37671: Fix POS receipt printing for refunds
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 e92dfc5ab0)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:21 +01:00
..
pay.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
printreceipt.pl Bug 37671: Fix POS receipt printing for refunds 2026-05-24 13:42:21 +01:00
register.pl Bug 41585: Fix cash refund payouts not appearing in register transactions 2026-05-24 13:42:10 +01:00
registers.pl Bug 40625: Fix duplicate cashup records via POST/REDIRECT/GET pattern 2025-09-26 10:37:00 -06:00