Bugzilla – Attachment 181458 Details for
Bug 39711
Migrate C4::Contract to object classes
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 39711: Update call to DelContract
Bug-39711-Update-call-to-DelContract.patch (text/plain), 2.04 KB, created by
Matt Blenkinsop
on 2025-04-24 14:41:08 UTC
(
hide
)
Description:
Bug 39711: Update call to DelContract
Filename:
MIME Type:
Creator:
Matt Blenkinsop
Created:
2025-04-24 14:41:08 UTC
Size:
2.04 KB
patch
obsolete
>From 601ea7e58de8606abce5dc8a47c96e71519cc6c5 Mon Sep 17 00:00:00 2001 >From: Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> >Date: Thu, 24 Apr 2025 15:07:25 +0100 >Subject: [PATCH] Bug 39711: Update call to DelContract > >--- > admin/aqcontract.pl | 19 +++++++++++-------- > 1 file changed, 11 insertions(+), 8 deletions(-) > >diff --git a/admin/aqcontract.pl b/admin/aqcontract.pl >index 5009a022cf3..cf4cdf12025 100755 >--- a/admin/aqcontract.pl >+++ b/admin/aqcontract.pl >@@ -23,11 +23,8 @@ > use Modern::Perl; > use CGI qw ( -utf8 ); > use C4::Context; >-use C4::Auth qw( get_template_and_user ); >-use C4::Output qw( output_html_with_http_headers ); >-use C4::Contract qw( >- DelContract >-); >+use C4::Auth qw( get_template_and_user ); >+use C4::Output qw( output_html_with_http_headers ); > use Koha::DateUtils qw( dt_from_string ); > > use Koha::Acquisition::Booksellers; >@@ -102,8 +99,7 @@ elsif ( $op eq 'cud-add_validate' ) { > } > > if ($is_a_modif) { >- my $contractnumber = $input->param('contractnumber'); >- my $contract = Koha::Acquisition::Contracts->find($contractnumber); >+ my $contract = Koha::Acquisition::Contracts->find($contractnumber); > if ( !$contract ) { > $template->param( blocking_error => "Contract $contractnumber not found" ); > output_html_with_http_headers $input, $cookie, $template->output; >@@ -154,7 +150,14 @@ elsif ( $op eq 'delete_confirm' ) { > > #DELETE_CONFIRMED: called by delete_confirm, used to effectively confirm deletion of data in DB > elsif ( $op eq 'cud-delete_confirmed' ) { >- my $deleted = DelContract( { contractnumber => $contractnumber } ); >+ >+ my $contract = Koha::Acquisition::Contracts->find($contractnumber); >+ if ( !$contract ) { >+ $template->param( blocking_error => "Contract $contractnumber not found" ); >+ output_html_with_http_headers $input, $cookie, $template->output; >+ } >+ >+ my $deleted = $contract->delete; > > if ($deleted) { > print $input->redirect("/cgi-bin/koha/acquisition/vendors/$booksellerid"); >-- >2.48.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 39711
:
181453
|
181454
|
181455
|
181456
|
181457
| 181458 |
181459
|
181460
|
181461
|
181580
|
181581
|
181582
|
181583
|
181584
|
181586
|
181587
|
181588