Bugzilla – Attachment 120637 Details for
Bug 28294
C4::Circulation::updateWrongTransfer should be moved into Koha::
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28294: WIP
Bug-28294-WIP.patch (text/plain), 1.33 KB, created by
Martin Renvoize (ashimema)
on 2021-05-06 15:32:09 UTC
(
hide
)
Description:
Bug 28294: WIP
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2021-05-06 15:32:09 UTC
Size:
1.33 KB
patch
obsolete
>From 5716dd043f1d44b016f08c1f848fa224d96fb14f Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Thu, 6 May 2021 16:31:39 +0100 >Subject: [PATCH] Bug 28294: WIP > >--- > Koha/Item/Transfer.pm | 32 ++++++++++++++++++++++++++++++++ > 1 file changed, 32 insertions(+) > >diff --git a/Koha/Item/Transfer.pm b/Koha/Item/Transfer.pm >index 4112b3fab9..5300ba23e3 100644 >--- a/Koha/Item/Transfer.pm >+++ b/Koha/Item/Transfer.pm >@@ -171,6 +171,38 @@ sub cancel { > return $self; > } > >+=head3 correction >+ >+ $transfer->correction(); >+ >+Correct a mistaken transfer by cancelling the original and replacing it. >+ >+=cut >+ >+sub correction { >+ my ( $self, $params ) = @_; >+ >+ # Update the cancelled date >+ $self->set( >+ { datecancelled => dt_from_string, cancellation_reason => 'WrongTransfer' } ) >+ ->store; >+ >+ # Add new in_transet transfer >+ my $transfer = Koha::Item::Transfer->new( >+ { >+ itemnumber => $self->itemnumber, >+ daterequested => dt_from_string, >+ datesent => dt_from_string, >+ frombranch => $self->item->holdingbranch, >+ tobranch => $self->tobranch, >+ reason => $self->reason, >+ comments => $self->comment >+ } >+ )->store(); >+ >+ return $transfer; >+} >+ > =head3 type > > =cut >-- >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 28294
:
120637
|
121062
|
121063
|
121064
|
121077
|
121078
|
121079
|
121095
|
121096
|
121097
|
121714
|
121715
|
121716
|
130082
|
130083
|
130084
|
130085
|
130086
|
130087
|
132212
|
132213
|
132214
|
132215
|
132216
|
132217
|
160516
|
160517
|
160518
|
160519
|
160520
|
160521
|
160536
|
160692
|
168281
|
172778
|
172781
|
173856
|
174805