Bug 30563 - Add system preference to make the cash register field required when collecting a payment
Summary: Add system preference to make the cash register field required when collectin...
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Julian Maurice
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-04-19 10:01 UTC by Julian Maurice
Modified: 2023-12-28 20:42 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact: Caroline Cyr La Rose
Documentation submission: https://gitlab.com/koha-community/koha-manual/-/merge_requests/629
Text to go in the release notes:
Version(s) released in:
22.05.00
Circulation function:


Attachments
Bug 30563: Add syspref to make the "cash register" field mandatory (6.17 KB, patch)
2022-04-19 10:11 UTC, Julian Maurice
Details | Diff | Splinter Review
Bug 30563: Add syspref to make the "cash register" field mandatory (6.22 KB, patch)
2022-04-22 21:53 UTC, Lucas Gass (lukeg)
Details | Diff | Splinter Review
Bug 30563: Add syspref to make the "cash register" field mandatory (6.28 KB, patch)
2022-04-26 12:16 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 30563: (QA follow-up) Fix permission on atomicupdate file (713 bytes, patch)
2022-04-26 12:16 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 30563: (QA follow-up) Fix system preference values and add link to description (1.45 KB, patch)
2022-04-26 12:16 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Julian Maurice 2022-04-19 10:01:15 UTC
Currently, the cash register field is required only if the CASH payment type is selected.
Some users want to make it required no matter which payment type is selected.
Comment 1 Julian Maurice 2022-04-19 10:11:10 UTC
Created attachment 133393 [details] [review]
Bug 30563: Add syspref to make the "cash register" field mandatory

Test plan:
1. Apply patch and run updatedatabase
2. Enable 'UseCashRegisters' syspref and create at least one cash
   register for your library
3. Verify that you have several authorized values in the 'PAYMENT_TYPE'
   category. One of them should be 'CASH'
4. Go to a patron accounting tab, create a manual invoice and go to the
   payment form. Select payment type 'CASH' and verify that you cannot
   submit the form if no cash register is selected.
   Select another payment type and verify that you can submit the form
   even if no cash register is selected
5. Set syspref 'RequireCashRegister' to 'always require a cash register'
6. Repeat step 4 but this time you should not be able to submit the form
   if no cash register is selected, no matter which payment type is
   selected.
Comment 2 Lucas Gass (lukeg) 2022-04-22 21:53:51 UTC
Created attachment 133698 [details] [review]
Bug 30563: Add syspref to make the "cash register" field mandatory

Test plan:
1. Apply patch and run updatedatabase
2. Enable 'UseCashRegisters' syspref and create at least one cash
   register for your library
3. Verify that you have several authorized values in the 'PAYMENT_TYPE'
   category. One of them should be 'CASH'
4. Go to a patron accounting tab, create a manual invoice and go to the
   payment form. Select payment type 'CASH' and verify that you cannot
   submit the form if no cash register is selected.
   Select another payment type and verify that you can submit the form
   even if no cash register is selected
5. Set syspref 'RequireCashRegister' to 'always require a cash register'
6. Repeat step 4 but this time you should not be able to submit the form
   if no cash register is selected, no matter which payment type is
   selected.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 3 Katrin Fischer 2022-04-26 12:16:02 UTC
Created attachment 133878 [details] [review]
Bug 30563: Add syspref to make the "cash register" field mandatory

Test plan:
1. Apply patch and run updatedatabase
2. Enable 'UseCashRegisters' syspref and create at least one cash
   register for your library
3. Verify that you have several authorized values in the 'PAYMENT_TYPE'
   category. One of them should be 'CASH'
4. Go to a patron accounting tab, create a manual invoice and go to the
   payment form. Select payment type 'CASH' and verify that you cannot
   submit the form if no cash register is selected.
   Select another payment type and verify that you can submit the form
   even if no cash register is selected
5. Set syspref 'RequireCashRegister' to 'always require a cash register'
6. Repeat step 4 but this time you should not be able to submit the form
   if no cash register is selected, no matter which payment type is
   selected.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 4 Katrin Fischer 2022-04-26 12:16:06 UTC
Created attachment 133879 [details] [review]
Bug 30563: (QA follow-up) Fix permission on atomicupdate file

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 5 Katrin Fischer 2022-04-26 12:16:10 UTC
Created attachment 133880 [details] [review]
Bug 30563: (QA follow-up) Fix system preference values and add link to description

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 6 Fridolin Somers 2022-05-05 21:35:28 UTC
BTW we should rewrite koha-tmpl/intranet-tmpl/prog/en/includes/transaction_types.inc to use the same IF/ELSE syntax.
There is a lot of copy/paste in actual code.
Comment 7 Fridolin Somers 2022-05-06 20:34:40 UTC
Pushed to master for 22.05, thanks to everybody involved ﷐[U+1F984]﷑