Bug 23214

Summary: Add ability to pay guarantees fines
Product: Koha Reporter: Agustín Moyano <agustinmoyano>
Component: OPACAssignee: Agustín Moyano <agustinmoyano>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: new feature    
Priority: P5 - low CC: arthur.bousquet, fridolin.somers, kyle, martin.renvoize, maryse.simard, tomascohen
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
This new feature gives guarantors the option to pay off their guarantees charges using online payments via the OPAC.
Version(s) released in:
19.11.00
Circulation function:
Bug Depends on: 20691    
Bug Blocks: 20211, 23213    
Attachments: Bug 23214: Modify account-table.inc to enable payment of guarantees fines
Bug 23214: Modify account-table.inc to enable payment of guarantees fines
Bug 23214: Modify account-table.inc to enable payment of guarantees fines
Bug 23214: Modify account-table.inc to enable payment of guarantees fines
Bug 23214: Modify account-table.inc to enable payment of guarantees fines

Description Agustín Moyano 2019-06-26 03:56:00 UTC
Add ability in OPAC to pay guarantees fines
Comment 1 Agustín Moyano 2019-06-26 04:53:53 UTC
Created attachment 91007 [details] [review]
Bug 23214: Modify account-table.inc to enable payment of guarantees fines

This patch enables a guarantor to pay guarantees fines in OPAC

To test:
1. Apply dependencies
2. On intranet, search for AllowStaffToSetFinesVisibilityForGuarantor preference and set to "Allow"
3. Enable some payment method
4. Find a patron with guarantor and edit
5. Change "Show fines to guarantor" select to "Yes" and save
6. Create a manual invoice for the patron (guarantee)
7. Enter OPAC with guarantor user
8. Go to "your fines" tab
SUCCESS => Guarantees fines appear, and is selectable to pay
9. Sign off
Comment 2 Arthur Bousquet 2019-07-05 18:23:20 UTC
I got these errors when trying to apply the patch

fatal: sha1 information is lacking or useless (koha-tmpl/opac-tmpl/bootstrap/en/includes/account-table.inc).
error: could not build fake ancestor
Patch failed at 0001 Bug 23214: Modify account-table.inc to enable payment of guarantees fines
Comment 3 Tomás Cohen Arazi (tcohen) 2019-07-05 18:24:50 UTC
Maybe because of bug 23115
Comment 4 Agustín Moyano 2019-07-10 13:47:51 UTC
(In reply to Arthur Bousquet from comment #2)
> I got these errors when trying to apply the patch
> 
> fatal: sha1 information is lacking or useless
> (koha-tmpl/opac-tmpl/bootstrap/en/includes/account-table.inc).
> error: could not build fake ancestor
> Patch failed at 0001 Bug 23214: Modify account-table.inc to enable payment
> of guarantees fines

Weird, patch applies for me with merge.. 

91007 - Bug 23214: Modify account-table.inc to enable payment of guarantees fines

Apply? [(y)es, (n)o, (i)nteractive] y
Aplicando: Bug 23214: Modify account-table.inc to enable payment of guarantees fines
Usando la información del índice para reconstruir un árbol base...
M	koha-tmpl/opac-tmpl/bootstrap/en/includes/account-table.inc
Retrocediendo para parchar base y fusión de 3-vías...
Auto-fusionando koha-tmpl/opac-tmpl/bootstrap/en/includes/account-table.inc

Maybe it's because I rebased 14570, and now applies nicely.

Please try again.
Comment 5 Maryse Simard 2019-08-09 18:01:48 UTC
I can't apply the patch :

Applying: Bug 23214: Modify account-table.inc to enable payment of guarantees fines
fatal: sha1 information is lacking or useless (koha-tmpl/opac-tmpl/bootstrap/en/includes/account-table.inc).
error: could not build fake ancestor
Patch failed at 0001 Bug 23214: Modify account-table.inc to enable payment of guarantees fines
Comment 6 Agustín Moyano 2019-08-09 18:13:36 UTC
(In reply to Maryse Simard from comment #5)
> I can't apply the patch :
> 
> Applying: Bug 23214: Modify account-table.inc to enable payment of
> guarantees fines
> fatal: sha1 information is lacking or useless
> (koha-tmpl/opac-tmpl/bootstrap/en/includes/account-table.inc).
> error: could not build fake ancestor
> Patch failed at 0001 Bug 23214: Modify account-table.inc to enable payment
> of guarantees fines

Hi Maryse, that's weird.. I just applied patches

root@48ecf79b6b40:koha(bug-23214)$ git bz apply 23214

Bug 23214 Depends on bug 20691
Follow? [(y)es, (n)o] y

Bug 20691 Depends on bug 14570
Follow? [(y)es, (n)o] y

Bug 14570 - Make it possible to add multiple guarantors to a record

91694 - Bug 14570: Make it possible to add multiple guarantors to a record
91695 - Bug 14570: (follow-up) fix table name in j2a.pl
91696 - Bug 14570: (follow-up) fix qa FAIL tests
91697 - Bug 14570: (follow-up) Fix tests
91698 - Bug 14570: (QA follow-up) fix sample borrowers, remove guarantorid)
91699 - Bug 14570: (follow-up) Fix patron type when "add child" button is pressed
91700 - Bug 14570: Update schema files [Do Not Push]

Apply? [(y)es, (n)o, (i)nteractive] y
Applying: Bug 14570: Make it possible to add multiple guarantors to a record
Applying: Bug 14570: (follow-up) fix table name in j2a.pl
Applying: Bug 14570: (follow-up) fix qa FAIL tests
Applying: Bug 14570: (follow-up) Fix tests
Applying: Bug 14570: (QA follow-up) fix sample borrowers, remove guarantorid)
Applying: Bug 14570: (follow-up) Fix patron type when "add child" button is pressed
Applying: Bug 14570: Update schema files [Do Not Push]
Bug 20691 - Add ability for guarantors to view guarantee's fines in OPAC

91159 - Bug 20691: Database update
91160 - Bug 20691: Add ability to turn feature on and off
91161 - Bug 20691: Implement fines view
91162 - Bug 20691: (follow-up) Fix qa fails

Apply? [(y)es, (n)o, (i)nteractive] y
Applying: Bug 20691: Database update
Applying: Bug 20691: Add ability to turn feature on and off
Applying: Bug 20691: Implement fines view
Using index info to reconstruct a base tree...
M       koha-tmpl/opac-tmpl/bootstrap/en/includes/account-table.inc
M       koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt
M       opac/opac-user.pl
Falling back to patching base and 3-way merge...
Auto-merging opac/opac-user.pl
Auto-merging koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt
Auto-merging koha-tmpl/opac-tmpl/bootstrap/en/includes/account-table.inc
Applying: Bug 20691: (follow-up) Fix qa fails
Bug 23214 - OPAC add ability to pay guarantees fines

91007 - Bug 23214: Modify account-table.inc to enable payment of guarantees fines

Apply? [(y)es, (n)o, (i)nteractive] y
Applying: Bug 23214: Modify account-table.inc to enable payment of guarantees fines
Using index info to reconstruct a base tree...
M       koha-tmpl/opac-tmpl/bootstrap/en/includes/account-table.inc
Falling back to patching base and 3-way merge...
Auto-merging koha-tmpl/opac-tmpl/bootstrap/en/includes/account-table.inc


Did you do it in a fresh koha/master copy?
Comment 7 Tomás Cohen Arazi (tcohen) 2019-09-16 19:35:43 UTC
Created attachment 92844 [details] [review]
Bug 23214: Modify account-table.inc to enable payment of guarantees fines

This patch enables a guarantor to pay guarantees fines in OPAC

To test:
1. Apply dependencies
2. On intranet, search for AllowStaffToSetFinesVisibilityForGuarantor preference and set to "Allow"
3. Enable some payment method
4. Find a patron with guarantor and edit
5. Change "Show fines to guarantor" select to "Yes" and save
6. Create a manual invoice for the patron (guarantee)
7. Enter OPAC with guarantor user
8. Go to "your fines" tab
SUCCESS => Guarantees fines appear, and is selectable to pay
9. Sign off

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

https://bugs.koha-community.org/show_bug.cgi?id=23584
Comment 8 Tomás Cohen Arazi (tcohen) 2019-09-16 19:37:24 UTC
Hi, all dependencies are now on master. I applied it cleanly and then tested using the KitchenSink plugin [1] which implements the payment methods (it won't do anything, but simulate an interaction with an external payments system).

It works!
Comment 9 Liz Rea 2019-09-16 21:16:29 UTC
Created attachment 92862 [details] [review]
Bug 23214: Modify account-table.inc to enable payment of guarantees fines

This patch enables a guarantor to pay guarantees fines in OPAC

To test:
1. Apply dependencies
2. On intranet, search for AllowStaffToSetFinesVisibilityForGuarantor preference and set to "Allow"
3. Enable some payment method
4. Find a patron with guarantor and edit
5. Change "Show fines to guarantor" select to "Yes" and save
6. Create a manual invoice for the patron (guarantee)
7. Enter OPAC with guarantor user
8. Go to "your fines" tab
SUCCESS => Guarantees fines appear, and is selectable to pay
9. Sign off

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

https://bugs.koha-community.org/show_bug.cgi?id=23584

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Comment 10 Liz Rea 2019-09-19 19:24:36 UTC
Created attachment 92985 [details] [review]
Bug 23214: Modify account-table.inc to enable payment of guarantees fines

This patch enables a guarantor to pay guarantees fines in OPAC

To test:
1. Apply dependencies
2. On intranet, search for AllowStaffToSetFinesVisibilityForGuarantor preference and set to "Allow"
3. Enable some payment method
4. Find a patron with guarantor and edit
5. Change "Show fines to guarantor" select to "Yes" and save
6. Create a manual invoice for the patron (guarantee)
7. Enter OPAC with guarantor user
8. Go to "your fines" tab
SUCCESS => Guarantees fines appear, and is selectable to pay
9. Sign off

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

https://bugs.koha-community.org/show_bug.cgi?id=23584

Signed-off-by: Liz Rea <wizzyrea@gmail.com>

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Comment 11 Martin Renvoize (ashimema) 2019-09-24 13:33:19 UTC
Created attachment 93139 [details] [review]
Bug 23214: Modify account-table.inc to enable payment of guarantees fines

This patch enables a guarantor to pay guarantees fines in OPAC

To test:
1. Apply dependencies
2. On intranet, search for AllowStaffToSetFinesVisibilityForGuarantor preference and set to "Allow"
3. Enable some payment method
4. Find a patron with guarantor and edit
5. Change "Show fines to guarantor" select to "Yes" and save
6. Create a manual invoice for the patron (guarantee)
7. Enter OPAC with guarantor user
8. Go to "your fines" tab
SUCCESS => Guarantees fines appear, and is selectable to pay
9. Sign off

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 12 Martin Renvoize (ashimema) 2019-09-24 13:34:39 UTC
Works well for me, no regressions found. Passing QA
Comment 13 Martin Renvoize (ashimema) 2019-09-27 13:07:08 UTC
Nice work!

Pushed to master for 19.11.00
Comment 14 Fridolin Somers 2019-10-08 07:19:45 UTC
Depends on Bug 23214 not in 19.05.x