Add a new tab to the details page of a patron to show, in a table, the fines of the patron's guarantees. A warning appears in the "Guarantees" section of the patron to make it obvious that fines exists. Note: This was first introduced as part of Bug 12446, but ultimately was split into it's own bug.
Created attachment 111055 [details] [review] Bug 26598: Display guarantee's fines on guarantor's details page A new tab is added to the details page of a patron to show, in a table, the fines of the patron's guarantees. A warning appears in the "Guarantees" section of the patron to make it obvious that fines exists. To test: 1) Apply patch 2) Choose a patron that has guarantees and navigate to the patron's details page 3) If the guarantees don't have any fines, the display should be unchanged 4) Add fines to the guarantee 5) Go back to the guarantor's details page => A warning should appear in the "Guarantees" section with the total due 6) Clicking on the link accompanying the warning focuses on the new "Guarantees' fines" tab containing a table of all guarantee's and their fines.
Created attachment 111320 [details] [review] Bug 26598: Display guarantee's fines on guarantor's details page A new tab is added to the details page of a patron to show, in a table, the fines of the patron's guarantees. A warning appears in the "Guarantees" section of the patron to make it obvious that fines exists. To test: 1) Apply patch 2) Choose a patron that has guarantees and navigate to the patron's details page 3) If the guarantees don't have any fines, the display should be unchanged 4) Add fines to the guarantee 5) Go back to the guarantor's details page => A warning should appear in the "Guarantees" section with the total due 6) Clicking on the link accompanying the warning focuses on the new "Guarantees' fines" tab containing a table of all guarantee's and their fines. Signed-off-by: David Nind <david@davidnind.com>
We might want to rethink the display a little later as we are getting a lot of tabs, but I like this a lot better than the table at the top that was proposed first. Thank you Maryse for all your patience!
Created attachment 112110 [details] [review] Bug 26598: Display guarantee's fines on guarantor's details page A new tab is added to the details page of a patron to show, in a table, the fines of the patron's guarantees. A warning appears in the "Guarantees" section of the patron to make it obvious that fines exists. To test: 1) Apply patch 2) Choose a patron that has guarantees and navigate to the patron's details page 3) If the guarantees don't have any fines, the display should be unchanged 4) Add fines to the guarantee 5) Go back to the guarantor's details page => A warning should appear in the "Guarantees" section with the total due 6) Clicking on the link accompanying the warning focuses on the new "Guarantees' fines" tab containing a table of all guarantee's and their fines. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Nice enhancement, works as expected and code is clear. Passing QA
1. I think you should call Koha::Patron->relationships_debt to get the guarantees' fines 2. Why did you put the new tab between "checkouts" and "holds"? I don't think it's the more appropriate. Maybe just before "Restrictions"?
(In reply to Jonathan Druart from comment #6) > 2. Why did you put the new tab between "checkouts" and "holds"? I don't > think it's the more appropriate. Maybe just before "Restrictions"? Not that I want to get in the middle of the fire here, but I noticed the new tab is right next to the patron's own charge tab. I don't think it would be appropriate to separate the charges tab and the guarantee's charges tab, just like we didn't separate the patron's own checkout tab and the relative's checkout tab and put the latter before the patron's own holds tab. Anyway, just my grain of salt, I don't think the placement of the tab is a problem that should stall this bug. (I don't comment on the other thing about Koha::something bc I don't know what it means.) Caroline
Created attachment 139712 [details] [review] Bug 26598: Display guarantee's fines on guarantor's details page A new tab is added to the details page of a patron to show, in a table, the fines of the patron's guarantees. A warning appears in the "Guarantees" section of the patron to make it obvious that fines exists. To test: 1) Apply patch 2) Choose a patron that has guarantees and navigate to the patron's details page 3) If the guarantees don't have any fines, the display should be unchanged 4) Add fines to the guarantee 5) Go back to the guarantor's details page => A warning should appear in the "Guarantees" section with the total due 6) Clicking on the link accompanying the warning focuses on the new "Guarantees' fines" tab containing a table of all guarantee's and their fines. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This change must be made to both the patron detail page (moremember) and the checkout page (circulation). Since the guarantees' checkouts tab is labeled "Relatives' checkouts" I think the new tab should be labeled "Relatives' charges". I would also like to see the format of the patron name under the new tab look the same as under the relatives' checkouts tab, i.e. "surname, firstname (cardnumber)". The patron-title.inc include file might be appropriate to use here.
Created attachment 140376 [details] [review] Bug 26598: Display guarantee's fines on guarantor's details page A new tab is added to the details page of a patron to show, in a table, the fines of the patron's guarantees. A warning appears in the "Guarantees" section of the patron to make it obvious that fines exists. To test: 1) Apply patch 2) Choose a patron that has guarantees and navigate to the patron's details page 3) If the guarantees don't have any fines, the display should be unchanged 4) Add fines to the guarantee 5) Go back to the guarantor's details page => A warning should appear in the "Guarantees" section with the total due 6) Clicking on the link accompanying the warning focuses on the new "Guarantees' fines" tab containing a table of all guarantee's and their fines. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(In reply to Owen Leonard from comment #9) > This change must be made to both the patron detail page (moremember) and the > checkout page (circulation). > > Since the guarantees' checkouts tab is labeled "Relatives' checkouts" I > think the new tab should be labeled "Relatives' charges". > > I would also like to see the format of the patron name under the new tab > look the same as under the relatives' checkouts tab, i.e. "surname, > firstname (cardnumber)". The patron-title.inc include file might be > appropriate to use here. The patron checkout page does not have fines tab so it would be weird to add guarantees' fines tab there. "Relatives' checkouts" tab can be accessed by both the guarantee and the guarantor to view each others checkouts. "Guarantees' charges" tab can only be viewed by the guarantor so it would be more accurate to keep the name as it is. Changed the format to make it the same as relatives' checkouts tab.
(In reply to Shi Yao Wang from comment #11) > (In reply to Owen Leonard from comment #9) > > This change must be made to both the patron detail page (moremember) and the > > checkout page (circulation). > > > > Since the guarantees' checkouts tab is labeled "Relatives' checkouts" I > > think the new tab should be labeled "Relatives' charges". > > > > I would also like to see the format of the patron name under the new tab > > look the same as under the relatives' checkouts tab, i.e. "surname, > > firstname (cardnumber)". The patron-title.inc include file might be > > appropriate to use here. > > The patron checkout page does not have fines tab so it would be weird to add > guarantees' fines tab there. > > "Relatives' checkouts" tab can be accessed by both the guarantee and the > guarantor to view each others checkouts. "Guarantees' charges" tab can only > be viewed by the guarantor so it would be more accurate to keep the name as > it is. > > Changed the format to make it the same as relatives' checkouts tab. Maybe instead of as a tab it could be an alert under messages like it is when the patron has fines? Additionally Surname, Firstname (cardnumber) is more consisent, especially since there is a system preferences that asks if name should be shown or only patron barcode, which I believe looks at he patron-title.inc include file.
Created attachment 142655 [details] [review] Bug 26598: Display guarantee's fines on guarantor's details page A new tab is added to the details page of a patron to show, in a table, the fines of the patron's guarantees. A warning appears in the "Guarantees" section of the patron to make it obvious that fines exists. + resolve a git merge conflict To test: 1) Apply patch 2) Choose a patron that has guarantees and navigate to the patron's details page 3) If the guarantees don't have any fines, the display should be unchanged 4) Add fines to the guarantee 5) Go back to the guarantor's details page => A warning should appear in the "Guarantees" section with the total due 6) Clicking on the link accompanying the warning focuses on the new "Guarantees' fines" tab containing a table of all guarantee's and their fines. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 144110 [details] [review] Bug 26598: Display guarantee's fines on guarantor's details page A new tab is added to the details page of a patron to show, in a table, the fines of the patron's guarantees. A warning appears in the "Guarantees" section of the patron to make it obvious that fines exists. + resolve a git merge conflict To test: 1) Apply patch 2) Choose a patron that has guarantees and navigate to the patron's details page 3) If the guarantees don't have any fines, the display should be unchanged 4) Add fines to the guarantee 5) Go back to the guarantor's details page => A warning should appear in the "Guarantees" section with the total due 6) Clicking on the link accompanying the warning focuses on the new "Guarantees' fines" tab containing a table of all guarantee's and their fines. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Hammat Wele <hammat.wele@inlibro.com>
The new guarantee's charges table is showing up on every tab.
Created attachment 144696 [details] [review] Bug 26598: Display guarantee's fines on guarantor's details page A new tab is added to the details page of a patron to show, in a table, the fines of the patron's guarantees. A warning appears in the "Guarantees" section of the patron to make it obvious that fines exists. + resolve a git merge conflict To test: 1) Apply patch 2) Choose a patron that has guarantees and navigate to the patron's details page 3) If the guarantees don't have any fines, the display should be unchanged 4) Add fines to the guarantee 5) Go back to the guarantor's details page => A warning should appear in the "Guarantees" section with the total due 6) Clicking on the link accompanying the warning focuses on the new "Guarantees' fines" tab containing a table of all guarantee's and their fines. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Hammat Wele <hammat.wele@inlibro.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 144697 [details] [review] Bug 26598: (QA follow-up) Fix up tab for guarantees' charges Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Pushed to master for 23.05. Nice work everyone, thanks!
Enhancement - not backporting to 22.11.x Nice work everyone!
Created attachment 151499 [details] [review] Bug 33774: Loading club table in every tab in patron details This patch corrects a minor regression in template markup caused by Bug 33774. The Bootstrap tab attributes were lost (presumably in a merge) causing the whole tab structure to break. To test, you should have at least one club defined. Apply the patch and view the patron details page. Each tab should load its contents correctly. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Comment on attachment 151499 [details] [review] Bug 33774: Loading club table in every tab in patron details oops, wrong ticket