From b7eec01cfc73eaa49d822a0ed0396bcbc118a78e Mon Sep 17 00:00:00 2001 From: Matt Blenkinsop Date: Thu, 24 Apr 2025 14:52:55 +0100 Subject: [PATCH] Bug 39711: Update call to AddContract --- admin/aqcontract.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/admin/aqcontract.pl b/admin/aqcontract.pl index 228c532a21e..c2d830a7c05 100755 --- a/admin/aqcontract.pl +++ b/admin/aqcontract.pl @@ -26,13 +26,13 @@ use C4::Context; use C4::Auth qw( get_template_and_user ); use C4::Output qw( output_html_with_http_headers ); use C4::Contract qw( - AddContract DelContract ModContract ); use Koha::DateUtils qw( dt_from_string ); use Koha::Acquisition::Booksellers; +use Koha::Acquisition::Contract; use Koha::Acquisition::Contracts; my $input = CGI->new; @@ -114,7 +114,7 @@ elsif ( $op eq 'cud-add_validate' ) { } ); } else { - AddContract( + my $contract = Koha::Acquisition::Contract->new( { contractname => scalar $input->param('contractname'), contractdescription => scalar $input->param('contractdescription'), @@ -122,7 +122,7 @@ elsif ( $op eq 'cud-add_validate' ) { contractstartdate => scalar $input->param('contractstartdate'), contractenddate => scalar $input->param('contractenddate'), } - ); + )->store; } print $input->redirect("/cgi-bin/koha/acquisition/vendors/$booksellerid"); -- 2.48.1