Bugzilla – Attachment 108599 Details for
Bug 18501
Automatic refunds need protection from failure
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18501: Auto refund if mark as found from cataloguing
Bug-18501-Auto-refund-if-mark-as-found-from-catalo.patch (text/plain), 2.01 KB, created by
Martin Renvoize
on 2020-08-19 12:28:34 UTC
(
hide
)
Description:
Bug 18501: Auto refund if mark as found from cataloguing
Filename:
MIME Type:
Creator:
Martin Renvoize
Created:
2020-08-19 12:28:34 UTC
Size:
2.01 KB
patch
obsolete
>From 25a33e37b88f09c2ddc0e9698a2cf4e50307c096 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 10 Aug 2020 16:51:11 +0200 >Subject: [PATCH] Bug 18501: Auto refund if mark as found from cataloguing > >If an item is marked as found (ie. not itemlost) we need to refund the >patron. > >Test plan: >Mark an item as lost to create a fee for the patron >Mark it as found from the cataloguing module and confirm that the patron >is refunded > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > catalogue/updateitem.pl | 3 +++ > cataloguing/additem.pl | 7 +++++-- > 2 files changed, 8 insertions(+), 2 deletions(-) > >diff --git a/catalogue/updateitem.pl b/catalogue/updateitem.pl >index f8295a0314..43f076c3d2 100755 >--- a/catalogue/updateitem.pl >+++ b/catalogue/updateitem.pl >@@ -68,6 +68,9 @@ elsif ( $op eq "set_public_note" ) { # i.e., itemnotes parameter passed from for > $item->itemnotes($itemnotes); > } > } elsif ( $op eq "set_lost" && $itemlost ne $item_data_hashref->{'itemlost'}) { >+ $item->set_found >+ if !$itemlost && $item->itemlost && $item->itemlost ge '1'; >+ > $item->itemlost($itemlost); > } elsif ( $op eq "set_withdrawn" && $withdrawn ne $item_data_hashref->{'withdrawn'}) { > $item->withdrawn($withdrawn); >diff --git a/cataloguing/additem.pl b/cataloguing/additem.pl >index bbdedf6d1d..9e15c436be 100755 >--- a/cataloguing/additem.pl >+++ b/cataloguing/additem.pl >@@ -749,8 +749,11 @@ if ($op eq "additem") { > $itemnumber = q{}; > my $olditemlost = $item->itemlost; > my $newitemlost = $newitem->{itemlost}; >- LostItem( $item->itemnumber, 'additem' ) >- if $newitemlost && $newitemlost ge '1' && !$olditemlost; >+ if ( $newitemlost && $newitemlost ge '1' && !$olditemlost ) { >+ LostItem( $item->itemnumber, 'additem' ) >+ } elsif ( !$newitemlost && $olditemlost && $olditemlost ge '1' ) { >+ $item->set_found; >+ } > } > $nextop="additem"; > } elsif ($op eq "delinkitem"){ >-- >2.20.1
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 18501
:
108004
|
108005
|
108006
|
108121
|
108122
|
108123
|
108167
|
108168
|
108169
|
108170
|
108193
|
108194
|
108195
|
108243
|
108248
|
108249
|
108291
|
108292
|
108293
|
108294
|
108295
|
108296
|
108297
|
108298
|
108299
|
108300
|
108301
|
108482
|
108483
|
108484
|
108485
|
108486
|
108487
|
108488
|
108489
|
108490
|
108491
|
108492
|
108493
|
108494
|
108575
|
108576
|
108577
|
108578
|
108579
|
108580
|
108581
|
108582
|
108583
|
108584
|
108585
|
108586
|
108596
|
108597
|
108598
|
108599
|
108600
|
108601
|
108602
|
108603
|
108604
|
108605
|
108606
|
108607
|
108608
|
108610
|
108611
|
108612
|
108613
|
108614
|
108615
|
108616
|
108617
|
108618
|
108619
|
108620
|
108621
|
108717
|
108732
|
108738
|
108739
|
108740
|
108741
|
108784
|
108785
|
108786
|
108787
|
108788
|
108795
|
111295