From 94c1639ad4594b8459ea79981c4fb31158ab7ac1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20V=C3=A9ron?= Date: Sun, 15 Mar 2015 17:02:53 +0100 Subject: [PATCH] Bug 13813 - Remove C4::Dates from cataloguing/value_builder/barcode.pl To test: Set syspref autoBarcode to -001, -002 and yymm001 Edit items or add item, click in empty barcode field, verify that barcodes are filled in as appropriate. --- cataloguing/value_builder/barcode.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cataloguing/value_builder/barcode.pl b/cataloguing/value_builder/barcode.pl index 5aeae9f..b652875 100755 --- a/cataloguing/value_builder/barcode.pl +++ b/cataloguing/value_builder/barcode.pl @@ -23,7 +23,7 @@ no warnings 'redefine'; # otherwise loading up multiple plugins fills the log wi use C4::Context; require C4::Barcodes::ValueBuilder; -require C4::Dates; +use Koha::DateUtils; use Algorithm::CheckDigits; @@ -61,7 +61,7 @@ sub plugin_javascript { my %args; # find today's date - ($args{year}, $args{mon}, $args{day}) = split('-', C4::Dates->today('iso')); + ($args{year}, $args{mon}, $args{day}) = split('-', output_pref({ dt => DateTime->now(), dateformat => 'iso', dateonly => 1 })); ($args{tag},$args{subfield}) = GetMarcFromKohaField("items.barcode", ''); ($args{loctag},$args{locsubfield}) = GetMarcFromKohaField("items.homebranch", ''); -- 1.7.10.4