Bugzilla – Attachment 172673 Details for
Bug 33292
Claim return doesn't refund lost item charge when MarkLostItemsAsReturned includes "When marking an item as a return claim" and "Refund lost item fee" is on
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33292: Add a checkbox to refund a lost fee on return claim
Bug-33292-Add-a-checkbox-to-refund-a-lost-fee-on-r.patch (text/plain), 3.12 KB, created by
Lucas Gass (lukeg)
on 2024-10-10 22:25:14 UTC
(
hide
)
Description:
Bug 33292: Add a checkbox to refund a lost fee on return claim
Filename:
MIME Type:
Creator:
Lucas Gass (lukeg)
Created:
2024-10-10 22:25:14 UTC
Size:
3.12 KB
patch
obsolete
>From 42c86f2a88eaa48e1abc715d2e9cdddecdd6a2ee Mon Sep 17 00:00:00 2001 >From: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> >Date: Thu, 26 Sep 2024 12:59:17 +0000 >Subject: [PATCH] Bug 33292: Add a checkbox to refund a lost fee on return > claim > >Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> >--- > Koha/UI/Form/Builder/Item.pm | 12 ++++++++---- > .../intranet-tmpl/prog/en/includes/modal-claims.inc | 12 ++++++++++-- > 2 files changed, 18 insertions(+), 6 deletions(-) > >diff --git a/Koha/UI/Form/Builder/Item.pm b/Koha/UI/Form/Builder/Item.pm >index 2ace11b4037..228ba982e66 100644 >--- a/Koha/UI/Form/Builder/Item.pm >+++ b/Koha/UI/Form/Builder/Item.pm >@@ -182,10 +182,14 @@ sub generate_subfield_form { > if ( $subfield->{authorised_value} eq "LOST" ) { > my $ClaimReturnedLostValue = > C4::Context->preference('ClaimReturnedLostValue'); >- my $item_is_return_claim = >- $ClaimReturnedLostValue >- && exists $item->{itemlost} >- && $ClaimReturnedLostValue eq $item->{itemlost}; >+ my $claim = Koha::Checkouts::ReturnClaims->find( >+ { >+ itemnumber => $item->{itemnumber}, >+ resolution => undef, >+ } >+ ); >+ my $item_is_return_claim = $ClaimReturnedLostValue >+ && $claim; > $subfield_data{IS_RETURN_CLAIM} = $item_is_return_claim; > > $subfield_data{IS_LOST_AV} = 1; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/modal-claims.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/modal-claims.inc >index 577c32d6720..8cfd36e6dff 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/modal-claims.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/modal-claims.inc >@@ -26,6 +26,12 @@ > Charge lost fee > </label> > </div> >+ <div class="checkbox"> >+ <label for="claims-returned-refund-lost-fee"> >+ <input id="claims-returned-refund-lost-fee" type="checkbox" value="1"> >+ Refund previous lost fee >+ </label> >+ </div> > </div> > [% END %] > >@@ -63,7 +69,8 @@ > $(document).on("click", '#claims-returned-modal-btn-submit', function(e){ > let itemnumber = $('#claims-returned-itemnumber').val(); > let notes = $('#claims-returned-notes').val(); >- let fee = $('#claims-returned-charge-lost-fee').prop('checked') ? true : false; >+ let charge_lost_fee = $('#claims-returned-charge-lost-fee').prop('checked') ? true : false; >+ let refund_lost_fee = $('#claims-returned-refund-lost-fee').prop('checked') ? true : false; > > $('#claims-returned-modal').modal('hide'); > >@@ -74,7 +81,8 @@ > params = { > item_id: itemnumber, > notes: notes, >- charge_lost_fee: fee, >+ charge_lost_fee, >+ refund_lost_fee, > created_by: logged_in_user_borrowernumber, > }; > >-- >2.39.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 33292
:
171966
|
171967
|
171968
|
172269
|
172270
|
172271
| 172673 |
172674
|
172675