Bug 23507

Summary: Add ability to show and print change given on fee receipt from FinePaymentAutoPopup
Product: Koha Reporter: Kyle M Hall <kyle>
Component: CirculationAssignee: Kyle M Hall <kyle>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: gmcharlt, jonathan.druart, katrin.fischer, kyle.m.hall, martin.renvoize, tomascohen
Version: master   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission: https://gitlab.com/koha-community/koha-manual/-/merge_requests/423
Text to go in the release notes:
Version(s) released in:
19.11.00
Bug Depends on: 23228    
Bug Blocks: 26915    
Attachments: Bug 23507: Add ability to show change given on auto-popup fee reciept from FinePaymentAutoPopup
Bug 23507: Add ability to show change given on auto-popup fee reciept from FinePaymentAutoPopup
Bug 23507: Add ability to show change given on auto-popup fee reciept from FinePaymentAutoPopup
Bug 23507: Add ability to show change given on auto-popup fee reciept from FinePaymentAutoPopup
Bug 23507: Add ability to show change given on auto-popup fee receipt from FinePaymentAutoPopup

Description Kyle M Hall 2019-08-26 18:44:03 UTC
Some libraries would like to show the amount of change given on print reciepts triggered by FinePaymentAutoPopup so the patron can verify he or she has recieved the correct amount of change.
Comment 1 Kyle M Hall 2019-08-26 18:50:05 UTC
Created attachment 92477 [details] [review]
Bug 23507: Add ability to show change given on auto-popup fee reciept from FinePaymentAutoPopup

Some libraries would like to show the amount of change given on print reciepts triggered by FinePaymentAutoPopup
so the patron can verify he or she has recieved the correct amount of change.

1) Apply this patch
2) Edit ACCOUNT_CREDIT slip and add "[% IF change_given %]<h1>CHANGE: [% change_given %]</h1>[% END %]" at the top
3) Enable FinePaymentAutoPopup
4) Make a payment
5) Note the change given is shown on the popup receipt
6) Note the change given is *not* shown on subsequent prints of the same receipt using the "print" button for the payment
Comment 2 ByWater Sandboxes 2019-08-27 18:02:13 UTC
Created attachment 92483 [details] [review]
Bug 23507: Add ability to show change given on auto-popup fee reciept from FinePaymentAutoPopup

Some libraries would like to show the amount of change given on print reciepts triggered by FinePaymentAutoPopup
so the patron can verify he or she has recieved the correct amount of change.

1) Apply this patch
2) Edit ACCOUNT_CREDIT slip and add "[% IF change_given %]<h1>CHANGE: [% change_given %]</h1>[% END %]" at the top
3) Enable FinePaymentAutoPopup
4) Make a payment
5) Note the change given is shown on the popup receipt
6) Note the change given is *not* shown on subsequent prints of the same receipt using the "print" button for the payment

Signed-off-by: Kyle Hall <kyle@bywatersolutions.com>
Comment 3 Kyle M Hall 2019-08-27 18:05:15 UTC
Created attachment 92484 [details] [review]
Bug 23507: Add ability to show change given on auto-popup fee reciept from FinePaymentAutoPopup

Some libraries would like to show the amount of change given on print reciepts triggered by FinePaymentAutoPopup
so the patron can verify he or she has recieved the correct amount of change.

1) Apply this patch
2) Edit ACCOUNT_CREDIT slip and add "[% IF change_given %]<h1>CHANGE: [% change_given %]</h1>[% END %]" at the top
3) Enable FinePaymentAutoPopup
4) Make a payment
5) Note the change given is shown on the popup receipt
6) Note the change given is *not* shown on subsequent prints of the same receipt using the "print" button for the payment

Signed-off-by: Kyle Hall <kyle@bywatersolutions.com>

Signed-off-by: Hasina Akhte <hasinaa@pascolibraries.org>
Comment 4 Kyle M Hall 2019-09-09 21:09:35 UTC
Created attachment 92673 [details] [review]
Bug 23507: Add ability to show change given on auto-popup fee reciept from FinePaymentAutoPopup

Some libraries would like to show the amount of change given on print reciepts triggered by FinePaymentAutoPopup
so the patron can verify he or she has recieved the correct amount of change.

1) Apply this patch
2) Edit ACCOUNT_CREDIT slip and add "[% IF change_given %]<h1>CHANGE: [% change_given %]</h1>[% END %]" at the top
3) Enable FinePaymentAutoPopup
4) Make a payment
5) Note the change given is shown on the popup receipt
6) Note the change given is *not* shown on subsequent prints of the same receipt using the "print" button for the payment

Signed-off-by: Kyle Hall <kyle@bywatersolutions.com>

Signed-off-by: Hasina Akhte <hasinaa@pascolibraries.org>
Comment 5 Katrin Fischer 2019-10-07 18:43:22 UTC
Created attachment 93830 [details] [review]
Bug 23507: Add ability to show change given on auto-popup fee receipt from FinePaymentAutoPopup

Some libraries would like to show the amount of change given on print reciepts triggered by FinePaymentAutoPopup
so the patron can verify he or she has recieved the correct amount of change.

1) Apply this patch
2) Edit ACCOUNT_CREDIT slip and add "[% IF change_given %]<h1>CHANGE: [% change_given %]</h1>[% END %]" at the top
3) Enable FinePaymentAutoPopup
4) Make a payment
5) Note the change given is shown on the popup receipt
6) Note the change given is *not* shown on subsequent prints of the same receipt using the "print" button for the payment

Signed-off-by: Kyle Hall <kyle@bywatersolutions.com>

Signed-off-by: Hasina Akhte <hasinaa@pascolibraries.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 6 Katrin Fischer 2019-10-07 18:43:59 UTC
I am wondering if we should not always print the change given on the receipt instead of just the first time. Having it added to the template and only printing sometimes could turn out confusing (or be the next bug report :) )
Comment 7 Martin Renvoize 2019-10-08 13:47:20 UTC
(In reply to Katrin Fischer from comment #6)
> I am wondering if we should not always print the change given on the receipt
> instead of just the first time. Having it added to the template and only
> printing sometimes could turn out confusing (or be the next bug report :) )

We don't store that information Katrin, so we can't print it after the initial transaction at the moment.
Comment 8 Martin Renvoize 2019-10-08 13:53:28 UTC
Nice work!

Pushed to master for 19.11.00
Comment 9 Katrin Fischer 2019-10-08 15:49:27 UTC
(In reply to Martin Renvoize from comment #7)
> (In reply to Katrin Fischer from comment #6)
> > I am wondering if we should not always print the change given on the receipt
> > instead of just the first time. Having it added to the template and only
> > printing sometimes could turn out confusing (or be the next bug report :) )
> 
> We don't store that information Katrin, so we can't print it after the
> initial transaction at the moment.

Can't argue that point!
Comment 10 Jonathan Druart 2020-08-03 09:57:27 UTC
     $redirect .= '&remote_user=';
+    $redirect .= "change_given=$change_given";

Looks like there is a "&" missing before change_given.