https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41592
--- Comment #6 from Martin Renvoize (ashimema) <[email protected]> --- Created attachment 193262 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=193262&action=edit Bug 41592: Add cross-register refund search to Point of Sale This patch adds a "Process refund" feature to the Point of Sale page, allowing staff to search for and refund transactions made at any register. Changes: - Add toolbar with "Process refund" button to pos/pay.tt - Add transaction search modal that searches by receipt number or transaction ID - Implement AJAX-based search using new /api/v1/account/credits endpoint - Display transaction details including total, date, and associated debits - Show warning when refunding transactions from different registers - Create reusable refund modal component (refund_modal.inc) with: * Transaction details summary (description, original charge, amount paid) * Payment method display (Cash/Card) * Original register information * Refund amount input with validation * Transaction type selector * Cash register selector (when applicable) * Note field for refund reason - Add JavaScript lookups to display human-readable descriptions instead of codes for both debit types and payment types - Auto-focus search input when modal opens - Filter out PAYOUT debits and already REFUNDED items The refund modal is now shared and can be reused by other pages (e.g., patron account page). It intelligently shows/hides fields based on context and available data. Requires the 'anonymous_refund' cash_management permission. Test plan: 1. Apply patch and rebuild: yarn build 2. Enable UseCashRegisters system preference 3. Create at least two cash registers for a branch 4. Make a POS sale at register A 5. Navigate to POS page 6. Click "Process refund" button 7. Search for transaction by receipt number 8. Verify transaction details are displayed correctly with proper descriptions 9. Click "Issue refund" on a debit 10. Verify refund modal shows: - Debit description (not code) - Original charge amount - Amount paid - Payment method (Cash/Card, not CASH/SIP00) - Register warning if different 11. Complete refund and verify success -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
