If a library system has enabled Cash Registers but one branch does not use this. When using the Issue Credit - CASH option from the Accounting Module, an Internal Server Error will occur.
1. Turn on Cash Registers
2. Set up a Cash Register for branch A
3. Log into Branch B and try to issue credit with CASH - this will not work and give an ISE. Other options, such as Check, Credit card, etc will work but not the option for Cash.
Understandably, it is because there is not a place for the cash to come from if no cash register is enabled. But I can see this an issue for multi-branch systems where some want to use the Cash register option,but others do not.
Hmm, you are indeed correct and the error is partially deliberate to ensure a cash register is set if the preference is set to use registers.
So, are you suggesting that some branches may not want to use registers even though the global preference is set to require them.
I'm just trying to understand how to correctly catch when one is missing but should be present... Should one be able to pay out in cash without a register but at a branch that does have at least one register for example? Should the 'UseCashRegisters' preference be set at the branch level? Or, should we just check for the presence of at least one register at a branch and fall into the required mode then?
Happy to chat and code it up.
Thank you for commenting. I would say, making the 'UseCashRegisters' preference be set at the branch level would probably be ideal. Because I can see some branches not using cash registers and this would cause issues.
Created attachment 111137 [details] [review]
Bug 26540: Remove 'CASH' type from 'refund' and 'payout'
This patch removes the 'CASH' transaction typy, hides the register
selection and adds an alert to the Payout and Refund modals on the
boraccount page if there are no cash registers yet defined at the for
the current branch.
This first patch just adds appropriate alerts and disabled the CASH type from being selected if the branch does not yet have registers associated with it.
I'm still contemplating how to set the preference at a branch level..
Options: Set the preference at the branch level so if enabled for a branch but a branch is lacking register definitions we alert and require at least one register to be added... or.. leave the preference at system level but drop the error message for if no registers are defined at a branch yet.