Bugzilla – Attachment 108297 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: set the is_refunded flag as internal var
Bug-18501-set-the-isrefunded-flag-as-internal-var.patch (text/plain), 1.77 KB, created by
Martin Renvoize (ashimema)
on 2020-08-14 16:22:47 UTC
(
hide
)
Description:
Bug 18501: set the is_refunded flag as internal var
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2020-08-14 16:22:47 UTC
Size:
1.77 KB
patch
obsolete
>From 72db061b3c178e4faed9e49e966c518f47a3a144 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 14 Aug 2020 10:48:00 +0200 >Subject: [PATCH] Bug 18501: set the is_refunded flag as internal var > >After discussion with Martin we decided that it could be the correct way > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > C4/Circulation.pm | 5 ++--- > Koha/Item.pm | 1 + > 2 files changed, 3 insertions(+), 3 deletions(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index 2971360787..8cf115e4ee 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -2041,14 +2041,13 @@ sub AddReturn { > > my $item_was_lost = $item->itemlost; > my $leave_item_lost = C4::Context->preference("BlockReturnOfLostItems") ? 1 : 0; >- ModDateLastSeen( $item->itemnumber, $leave_item_lost ); # will unset itemlost if needed >+ my $updated_item = ModDateLastSeen( $item->itemnumber, $leave_item_lost ); # will unset itemlost if needed > > # fix up the accounts..... > if ( $item_was_lost ) { > $messages->{'WasLost'} = 1; > unless ( C4::Context->preference("BlockReturnOfLostItems") ) { >- #my $refunded = Koha::Account::Lines->search{(itemnumber => $item->itemnumber, type => 'LOST_FOUND', # FIXME which other parameters to know it has been refunded? >- $messages->{'LostItemFeeRefunded'} = 1; >+ $messages->{'LostItemFeeRefunded'} = $updated_item->{_refunded}; > } > } > >diff --git a/Koha/Item.pm b/Koha/Item.pm >index 9b9203d86f..a2976d2ce8 100644 >--- a/Koha/Item.pm >+++ b/Koha/Item.pm >@@ -870,6 +870,7 @@ sub _set_found_trigger { > ); > > $credit->apply( { debits => [$accountline] } ); >+ $self->{_refunded} = 1; > } > > # Update the account status >-- >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