Bug 24208 - Remove change calculation for writeoffs
Summary: Remove change calculation for writeoffs
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Fines and fees (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Maryse Simard
QA Contact: Testopia
URL:
Keywords:
: 24893 (view as bug list)
Depends on: 11373
Blocks: 22359
  Show dependency treegraph
 
Reported: 2019-12-10 19:39 UTC by Maryse Simard
Modified: 2020-11-30 21:46 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
20.05.00, 19.11.02


Attachments
Bug 24208: Remove change calculation for writeoffs (3.50 KB, patch)
2019-12-10 19:41 UTC, Maryse Simard
Details | Diff | Splinter Review
Bug 24208: Remove change calculation for writeoffs (3.56 KB, patch)
2019-12-22 13:31 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 24208: (follow-up) Change page title from payment to writeoff (1.40 KB, patch)
2019-12-22 13:31 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 24208: Remove change calculation for writeoffs (3.62 KB, patch)
2019-12-23 12:19 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 24208: (follow-up) Change page title from payment to writeoff (1.46 KB, patch)
2019-12-23 12:20 UTC, Martin Renvoize
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Maryse Simard 2019-12-10 19:39:57 UTC
Bug 11373 added change calculation to the payment page. This doesn't work very well when using the "Writeoff selected" button:

 - The "Amount paid" and "Change to give" fields don't make much sense in the case of writeoffs.
 - The amount for a partial writeoff has to be entered in the "Amount paid" field instead of the one labeled "Writeoff amount" just underneath.
Comment 1 Maryse Simard 2019-12-10 19:41:14 UTC
Created attachment 96173 [details] [review]
Bug 24208: Remove change calculation for writeoffs

Bug 11373 added change calculation to the payment page.

This doesn't work very well in the case of writeoffs:
    - The "Amount paid" and "Change to give" fields don't make much
    sense in the case of writeoffs.
    - The amount for a partial writeoff has to be entered in the
    "Amount paid" field instead of the one labeled "Writeoff amount"
    just underneath.

This patch removes these unwanted fields and use the "Writeoff amount"
label on the right input.

Test plan:
1) Choose a patron who has fees.
    You can add a manual invoice if necessary.
2) Go to Accounting > Make a payment.
3) Select some fines and click "Write off selected".
4) Note the form has a lot of inputs, not all are necessary for a
writeoff.
5) Make a partial writeoff by entering a different amount in the
"Writeoff amount" field.
    => The amount written off is the amount entered in the "Amount
    paid" field.
6) Apply patch.
7) Repeat steps 1-3.
8) Notice the form only has "Amount outstanding", "Writeoff amount"
and "Note" fields, which are enough for a writeoff.
9) Entering any amount lower than or equal to the amount outstanding
in the "Writeoff amount" field should create a writeoff of the selected
amount.
Comment 2 Martin Renvoize 2019-12-16 12:12:58 UTC
Comment on attachment 96173 [details] [review]
Bug 24208: Remove change calculation for writeoffs

Review of attachment 96173 [details] [review]:
-----------------------------------------------------------------

::: koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt
@@ +230,5 @@
>              <span class="debit">[% total | format('%.2f') %]</span>
>          </li>
>      <li>
> +        [% IF type == 'WRITEOFF' %]
> +            <label for="paid">Writeoff amount:</label>

You probably still need the trailing space here.
Comment 3 Martin Renvoize 2019-12-16 12:15:08 UTC
This looks good at a quick glance.. but perhaps we could improve it further whilst we're here.

It looks me like the form title is still 'Pay an amount toward selected fines'.. we could add a switch for this too `Writeoff an amount toward selected fines` perhaps?

We also still show the 'Payment types' selection dropdown unless I'm mistaken.. that could also go on a writeoff action I imagine.
Comment 4 Katrin Fischer 2019-12-22 13:31:17 UTC
Created attachment 96571 [details] [review]
Bug 24208: Remove change calculation for writeoffs

Bug 11373 added change calculation to the payment page.

This doesn't work very well in the case of writeoffs:
    - The "Amount paid" and "Change to give" fields don't make much
    sense in the case of writeoffs.
    - The amount for a partial writeoff has to be entered in the
    "Amount paid" field instead of the one labeled "Writeoff amount"
    just underneath.

This patch removes these unwanted fields and use the "Writeoff amount"
label on the right input.

Test plan:
1) Choose a patron who has fees.
    You can add a manual invoice if necessary.
2) Go to Accounting > Make a payment.
3) Select some fines and click "Write off selected".
4) Note the form has a lot of inputs, not all are necessary for a
writeoff.
5) Make a partial writeoff by entering a different amount in the
"Writeoff amount" field.
    => The amount written off is the amount entered in the "Amount
    paid" field.
6) Apply patch.
7) Repeat steps 1-3.
8) Notice the form only has "Amount outstanding", "Writeoff amount"
and "Note" fields, which are enough for a writeoff.
9) Entering any amount lower than or equal to the amount outstanding
in the "Writeoff amount" field should create a writeoff of the selected
amount.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 5 Katrin Fischer 2019-12-22 13:31:21 UTC
Created attachment 96572 [details] [review]
Bug 24208: (follow-up) Change page title from payment to writeoff

This makes a change requested by the first tester:
Also change the page title when a writeoff is done vs
a payment.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 6 Martin Renvoize 2019-12-23 12:19:59 UTC
Created attachment 96595 [details] [review]
Bug 24208: Remove change calculation for writeoffs

Bug 11373 added change calculation to the payment page.

This doesn't work very well in the case of writeoffs:
    - The "Amount paid" and "Change to give" fields don't make much
    sense in the case of writeoffs.
    - The amount for a partial writeoff has to be entered in the
    "Amount paid" field instead of the one labeled "Writeoff amount"
    just underneath.

This patch removes these unwanted fields and use the "Writeoff amount"
label on the right input.

Test plan:
1) Choose a patron who has fees.
    You can add a manual invoice if necessary.
2) Go to Accounting > Make a payment.
3) Select some fines and click "Write off selected".
4) Note the form has a lot of inputs, not all are necessary for a
writeoff.
5) Make a partial writeoff by entering a different amount in the
"Writeoff amount" field.
    => The amount written off is the amount entered in the "Amount
    paid" field.
6) Apply patch.
7) Repeat steps 1-3.
8) Notice the form only has "Amount outstanding", "Writeoff amount"
and "Note" fields, which are enough for a writeoff.
9) Entering any amount lower than or equal to the amount outstanding
in the "Writeoff amount" field should create a writeoff of the selected
amount.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 7 Martin Renvoize 2019-12-23 12:20:02 UTC
Created attachment 96596 [details] [review]
Bug 24208: (follow-up) Change page title from payment to writeoff

This makes a change requested by the first tester:
Also change the page title when a writeoff is done vs
a payment.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 8 Martin Renvoize 2019-12-23 12:20:52 UTC
Nice work, Passing QA
Comment 9 Martin Renvoize 2019-12-23 12:21:56 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 10 Joy Nelson 2020-01-12 20:46:35 UTC
Pushed to 19.11.x branch for 19.11.02
Comment 11 Lucas Gass 2020-01-15 18:19:13 UTC
patchset doesn't clean apply to 19.05.x, please rebase if needed
Comment 12 Nick Clemens 2020-03-18 14:18:43 UTC
*** Bug 24893 has been marked as a duplicate of this bug. ***