Bug 26540 - Issue Credit with Cash Registers
Summary: Issue Credit with Cash Registers
Status: Needs Signoff
Alias: None
Product: Koha
Classification: Unclassified
Component: Fines and fees (show other bugs)
Version: 20.05
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Martin Renvoize
QA Contact: Testopia
URL:
Keywords:
Depends on: 24786
Blocks: 13985
  Show dependency treegraph
 
Reported: 2020-09-25 17:39 UTC by Kelly McElligott
Modified: 2020-11-05 14:04 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 26540: Remove 'CASH' type from 'refund' and 'payout' (6.37 KB, patch)
2020-10-02 11:49 UTC, Martin Renvoize
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Kelly McElligott 2020-09-25 17:39:22 UTC
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.
Comment 1 Martin Renvoize 2020-09-29 19:35:44 UTC
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.
Comment 2 Kelly McElligott 2020-09-30 18:28:22 UTC
Martin,
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.
Comment 3 Martin Renvoize 2020-10-02 11:49:38 UTC
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.
Comment 4 Martin Renvoize 2020-10-02 11:52:44 UTC
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.