Bug 27433 - Issue refund button appears after applying a discount
Summary: Issue refund button appears after applying a discount
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Fines and fees (show other bugs)
Version: 20.05
Hardware: All All
: P5 - low enhancement
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 14825
  Show dependency treegraph
 
Reported: 2021-01-14 15:11 UTC by Marjorie Barry-Vila
Modified: 2021-02-03 10:53 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
issue refund (233.10 KB, image/png)
2021-01-14 15:11 UTC, Marjorie Barry-Vila
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marjorie Barry-Vila 2021-01-14 15:11:28 UTC
Created attachment 115163 [details]
issue refund

Hi,

In the 20.05 version, after using the "Apply discount" button,  the "Issue refund" button appears. 

If there was a discount given on a fine, it shoudn't be possible to refund that amount. Only the fully or partially paid fines should.

Is this the right way to use the "Issue refund" button?

Regards,

Marjorie
Comment 1 Martin Renvoize (ashimema) 2021-02-03 10:40:50 UTC
Hmm, I see what you mean.

I'm not sure how to resolve this one.. we don't really have easy access to how the outstanding amount was offset at this level.

The current code looks for any debit lines that have been at least partially 'paid'.. but 'paid' in this case means 'offset' and a discount is an offset the same way a payment or credit it.

[% IF CAN_user_updatecharges_refund && account.is_debit && ( account.amountoutstanding != account.amount ) && !(account.status == 'REFUNDED') && !(account.debit_type_code == 'PAYOUT') %]

I'll have a think
Comment 2 Martin Renvoize (ashimema) 2021-02-03 10:53:05 UTC
I think perhaps we need to impliment some of the idea's in https://wiki.koha-community.org/wiki/Account_view_RFC prior to being able to fix this.. that way we add context to the display lines.