Bug 24525

Summary: Hide SIP payment types from the Point of Sale page
Product: Koha Reporter: Martin Renvoize (ashimema) <martin.renvoize>
Component: Fines and feesAssignee: Martin Renvoize (ashimema) <martin.renvoize>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: 1joynelson, jonathan.druart, nick
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27796
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
20.05.00
Circulation function:
Bug Depends on: 23354, 24339    
Bug Blocks: 13985    
Attachments: Bug 24525: Remove SIP payment types from point of sale
Bug 24525: Remove SIP payment types from point of sale
Bug 24525: Remove SIP payment types from point of sale
Bug 24525: (follow-up) Factor out to an include
Bug 24525: Remove SIP payment types from point of sale
Bug 24525: (follow-up) Factor out to an include
Bug 24525: (QA follow-up) Make payment type required with cash registers

Description Martin Renvoize (ashimema) 2020-01-28 14:00:54 UTC
Bug 24339 adds the SIP2 payment_types to the default installed values for the payment type authorized values and also hides these values from appearing in the select boxes in paycollect.. however, the new Point of Sale screen was missed.

This bug will take care of removing the SIP payment type from the payment type select options on the point of sale screen.
Comment 1 Martin Renvoize (ashimema) 2020-01-28 14:06:53 UTC
Created attachment 98035 [details] [review]
Bug 24525: Remove SIP payment types from point of sale

This patch removes the SIP payments types from displaying in the select
options on the point of sale payment page.
Comment 2 David Nind 2020-01-30 21:26:05 UTC
Created attachment 98187 [details] [review]
Bug 24525: Remove SIP payment types from point of sale

This patch removes the SIP payments types from displaying in the select
options on the point of sale payment page.

Test plan:
1) Enable the point of sale feature
   (EnablePointOfSale + UseCashRegisters system preferences)
2) Add a cash register for a library
   (Home > Point of sale > Cash registers > New cash register)
3) Go to to the point of sale page and select the 'Payment type' 
   drop down list - you should see these payment types:
   - Cash
   - Cash via SIP
   - Creditcard via SIP2
   - Visa via SIP2
4) Apply the patch
5) Refresh the point of sale page
6) Now only Cash should be displayed in the drop down list
7) Sign-off the patch!

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 Jonathan Druart 2020-02-05 14:05:03 UTC
See bug 24339 comment 19.
Comment 4 Martin Renvoize (ashimema) 2020-02-07 09:29:58 UTC
Created attachment 98547 [details] [review]
Bug 24525: Remove SIP payment types from point of sale

This patch removes the SIP payments types from displaying in the select
options on the point of sale payment page.

Signed-off-by: David Nind <david@davidnind.com>
Comment 5 Martin Renvoize (ashimema) 2020-02-07 09:30:01 UTC
Created attachment 98548 [details] [review]
Bug 24525: (follow-up) Factor out to an include
Comment 6 Martin Renvoize (ashimema) 2020-02-07 09:31:07 UTC
Followup as requested.. I should just have done it this way in the first place :(
Comment 7 Nick Clemens (kidclamp) 2020-02-07 18:44:19 UTC
Created attachment 98580 [details] [review]
Bug 24525: Remove SIP payment types from point of sale

This patch removes the SIP payments types from displaying in the select
options on the point of sale payment page.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 8 Nick Clemens (kidclamp) 2020-02-07 18:44:22 UTC
Created attachment 98581 [details] [review]
Bug 24525: (follow-up) Factor out to an include

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 9 Nick Clemens (kidclamp) 2020-02-07 18:53:05 UTC
I don't know if you want to resolve here, or open a new bug. The dropdown for payment type contains an empty option. If you don't select a payment type you get an internal server error.

Either that field should be made required, or we shouldn't include a blank option, or a blank shouldn't crash Koha
Comment 10 Martin Renvoize (ashimema) 2020-02-07 19:35:18 UTC
Nice catch nick.. I think that may have come about from the factoring out but I should work out here anti correct it really.. payment type is required if cash registers are in use, otherwise they're optional.

I'm sure I can come up with a resolution for that.. will submit a follow-up after the weekend.
Comment 11 Martin Renvoize (ashimema) 2020-02-10 09:17:40 UTC
Created attachment 98641 [details] [review]
Bug 24525: (QA follow-up) Make payment type required with cash registers

The use of cash registers adds the requirement to enter a payment type,
this patch adds the required status when cash registers are configured.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 12 Martin Renvoize (ashimema) 2020-02-10 09:23:45 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 13 Joy Nelson 2020-02-11 00:25:43 UTC
dependencies not in 19.11.x
not backported