From 0d6483a7d5bf7a072eecaa5e83714b809aed921d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20V=C3=A9ron?= Date: Thu, 12 Mar 2015 14:37:28 +0100 Subject: [PATCH] Bug 13813 - Remove C4::Dates from C4/Acquisition.pm This patch removes depraceted C4::Dates from C4/Acquisition.pm To test: Apply patch Go to Home > Acquisitions Verify that receiving orders works as before (Receiving orders only affected by this patch) Amended because of mistake (otputpref should be dateformat), see comment #57/ MV Amended because of "use Koha::DateUtils;" instead of original, See comment #59 /MV Amended following comment #58 Signed-off-by: Jonathan Druart Amended to resolv conflict while applying / MV --- C4/Acquisition.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/C4/Acquisition.pm b/C4/Acquisition.pm index 01b815a..f346e47 100644 --- a/C4/Acquisition.pm +++ b/C4/Acquisition.pm @@ -23,6 +23,7 @@ use Carp; use C4::Context; use C4::Debug; use C4::Dates qw(format_date format_date_in_iso); +use MARC::Record; use C4::Suggestions; use C4::Biblio; use C4::Contract; @@ -1393,7 +1394,7 @@ sub ModReceiveOrder { my $order_vendornote = $params->{order_vendornote}; my $dbh = C4::Context->dbh; - $datereceived = C4::Dates->output('iso') unless $datereceived; + $datereceived = output_pref({ dt=>dt_from_string, dateonly=>1, dateformat=>'iso' }) unless $datereceived; my $suggestionid = GetSuggestionFromBiblionumber( $biblionumber ); if ($suggestionid) { ModSuggestion( {suggestionid=>$suggestionid, @@ -2719,7 +2720,7 @@ sub CloseInvoice { Reopen an invoice -Equivalent to ModInvoice(invoiceid => $invoiceid, closedate => C4::Dates->new()->output('iso')) +Equivalent to ModInvoice(invoiceid => $invoiceid, closedate => output_pref({ dt=>dt_from_string, dateonly=>1, otputpref=>'iso' })) =cut -- 1.7.10.4