Bugzilla – Attachment 167268 Details for
Bug 36789
Transform a booking into checkout
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36789: Pass param to prevent notification on checkout transformation
Bug-36789-Pass-param-to-prevent-notification-on-ch.patch (text/plain), 2.79 KB, created by
Thibaud Guillot (thibaud_g)
on 2024-05-30 09:20:59 UTC
(
hide
)
Description:
Bug 36789: Pass param to prevent notification on checkout transformation
Filename:
MIME Type:
Creator:
Thibaud Guillot (thibaud_g)
Created:
2024-05-30 09:20:59 UTC
Size:
2.79 KB
patch
obsolete
>From c83fc95539ec86965dd8b17f93faf94c49bb679c Mon Sep 17 00:00:00 2001 >From: Thibaud Guillot <thibaud.guillot@biblibre.com> >Date: Thu, 30 May 2024 11:19:12 +0200 >Subject: [PATCH] Bug 36789: Pass param to prevent notification on checkout > transformation > >--- > Koha/Booking.pm | 33 ++++++++++++++++++--------------- > circ/circulation.pl | 2 +- > 2 files changed, 19 insertions(+), 16 deletions(-) > >diff --git a/Koha/Booking.pm b/Koha/Booking.pm >index 85b8616898f..c2170f8e54f 100644 >--- a/Koha/Booking.pm >+++ b/Koha/Booking.pm >@@ -336,28 +336,29 @@ $booking->delete(); > =cut > > sub delete { >- my ( $self ) = @_; >+ my ( $self, $params ) = @_; > > my $deleted = $self->SUPER::delete($self); > my $patron = Koha::Patrons->find( $self->patron_id ); > my $item = Koha::Items->find( $self->item_id ); > my $library = Koha::Libraries->find( $self->pickup_library_id ); > >+ if ( not defined( $params->{'transform_to_checkout'} ) ) { > my $letter = C4::Letters::GetPreparedLetter( >- module => 'bookings', >- letter_code => 'BOOKING_CANCELLATION', >- message_transport_type => 'email', >- branchcode => $patron->branchcode, >- lang => $patron->lang, >- tables => { >- branches => $library->branchcode, >- borrowers => $patron->borrowernumber, >- items => $item->itemnumber, >- biblio => $item->biblionumber, >- biblioitems => $item->biblionumber, >- bookings => $self->unblessed, >- } >- ); >+ module => 'bookings', >+ letter_code => 'BOOKING_CANCELLATION', >+ message_transport_type => 'email', >+ branchcode => $patron->branchcode, >+ lang => $patron->lang, >+ tables => { >+ branches => $library->branchcode, >+ borrowers => $patron->borrowernumber, >+ items => $item->itemnumber, >+ biblio => $item->biblionumber, >+ biblioitems => $item->biblionumber, >+ bookings => $self->unblessed, >+ } >+ ); > > if ($letter) { > C4::Letters::EnqueueLetter( >@@ -368,6 +369,8 @@ sub delete { > } > ); > } >+ } >+ > return $deleted; > } > >diff --git a/circ/circulation.pl b/circ/circulation.pl >index 6958c507278..c2ef6e56a2a 100755 >--- a/circ/circulation.pl >+++ b/circ/circulation.pl >@@ -558,7 +558,7 @@ if (@$barcodes && $op eq 'cud-checkout') { > } > if($from_booking){ > my $booking = Koha::Bookings->find( $query->param('booking_id') ); >- $booking->delete; >+ $booking->delete( { 'transform_to_checkout' => 1 } ); > } > } > >-- >2.30.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 36789
:
166213
|
167191
|
167242
|
167246
|
167268
|
167307
|
167309
|
167311
|
167368
|
167369
|
167602
|
167906
|
167907
|
170198
|
171553
|
171554
|
171555
|
172058
|
172059
|
172060
|
176452
|
176453
|
176489