From c92349d26c352be8fd0ed3b41ff394d5c606818d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20V=C3=A9ron?= Date: Sun, 15 Mar 2015 17:52:04 +0100 Subject: [PATCH] Bug 13813 - Remove C4::Dates from cataloguing/value_builder/barcode_manual.pl To test: Apply patch Set the plugin for 952$p (or UNIMARC equivalent to items.barcode) for one of your frameworks to barcode_manual.pl instead of barcode.pl Set syspref autoBarcode to -001, -002 and yymm001 Edit items or add item, verify that barcodes are filled in as appropriate by clicking on the value builder link (...) (Note: Description of barcode_manual.pl in Bug 8524) --- cataloguing/value_builder/barcode_manual.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cataloguing/value_builder/barcode_manual.pl b/cataloguing/value_builder/barcode_manual.pl index 7b2e465..c92f48b 100755 --- a/cataloguing/value_builder/barcode_manual.pl +++ b/cataloguing/value_builder/barcode_manual.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; my $DEBUG = 0; @@ -61,7 +61,7 @@ sub plugin_javascript { $args{dbh} = $dbh; # 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