Bug 13813: Remove deprecated module C4::Dates from system
Test plan: See Bugzilla. Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
This commit is contained in:
parent
01abfbd702
commit
5dceb851dd
|
|
@ -22,7 +22,6 @@ use Modern::Perl;
|
|||
use Carp;
|
||||
use C4::Context;
|
||||
use C4::Debug;
|
||||
use C4::Dates qw(format_date format_date_in_iso);
|
||||
use C4::Suggestions;
|
||||
use C4::Biblio;
|
||||
use C4::Contract;
|
||||
|
|
@ -1393,7 +1392,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 +2718,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
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,6 @@ use Carp;
|
|||
|
||||
use C4::Context;
|
||||
use C4::Debug;
|
||||
use C4::Dates;
|
||||
use C4::Barcodes::hbyymmincr;
|
||||
use C4::Barcodes::annual;
|
||||
use C4::Barcodes::incremental;
|
||||
|
|
|
|||
|
|
@ -24,7 +24,8 @@ use Carp;
|
|||
|
||||
use C4::Context;
|
||||
use C4::Debug;
|
||||
use C4::Dates;
|
||||
|
||||
use Koha::DateUtils qw( output_pref dt_from_string );
|
||||
|
||||
use vars qw($VERSION @ISA);
|
||||
use vars qw($debug $cgi_debug); # from C4::Debug, of course
|
||||
|
|
@ -44,13 +45,13 @@ sub db_max ($;$) {
|
|||
my ($iso);
|
||||
if (@_) {
|
||||
my $input = shift;
|
||||
$iso = C4::Dates->new($input,'iso')->output('iso'); # try to set the date w/ 2nd arg
|
||||
$iso = output_pref({ dt => dt_from_string( $input, 'iso' ), dateformat => 'iso', dateonly => 1 }); # try to set the date w/ 2nd arg
|
||||
unless ($iso) {
|
||||
warn "Failed to create 'iso' Dates object with input '$input'. Reverting to today's date.";
|
||||
$iso = C4::Dates->new->output('iso'); # failover back to today
|
||||
$iso = output_pref({ dt => dt_from_string, dateformat => 'iso', dateonly => 1 }); # failover back to today
|
||||
}
|
||||
} else {
|
||||
$iso = C4::Dates->new->output('iso');
|
||||
$iso = output_pref({ dt => dt_from_string, dateformat => 'iso', dateonly => 1 });
|
||||
}
|
||||
my $year = substr($iso,0,4); # YYYY
|
||||
$sth->execute("$year-%");
|
||||
|
|
@ -61,7 +62,7 @@ sub db_max ($;$) {
|
|||
|
||||
sub initial () {
|
||||
my $self = shift;
|
||||
return substr(C4::Dates->new->output('iso'),0,4) .'-'. sprintf('%'."$width.$width".'d', 1);
|
||||
return substr(output_pref({ dt => dt_from_string, dateformat => 'iso', dateonly => 1 }), 0, 4 ) .'-'. sprintf('%'."$width.$width".'d', 1);
|
||||
}
|
||||
|
||||
sub parse ($;$) {
|
||||
|
|
@ -82,7 +83,7 @@ sub width ($;$) {
|
|||
sub process_head($$;$$) { # (self,head,whole,specific)
|
||||
my ($self,$head,$whole,$specific) = @_;
|
||||
$specific and return $head; # if this is built off an existing barcode, just return the head unchanged.
|
||||
return substr(C4::Dates->new->output('iso'),0,4) . '-'; # else get new YYYY-
|
||||
return substr(output_pref({ dt => dt_from_string, dateformat => 'iso', dateonly => 1 }), 0, 4 ) . '-'; # else get new YYYY-
|
||||
}
|
||||
|
||||
sub new_object {
|
||||
|
|
|
|||
|
|
@ -24,7 +24,8 @@ use Carp;
|
|||
|
||||
use C4::Context;
|
||||
use C4::Debug;
|
||||
use C4::Dates;
|
||||
|
||||
use Koha::DateUtils qw( dt_from_string output_pref );
|
||||
|
||||
use vars qw($VERSION @ISA);
|
||||
use vars qw($debug $cgi_debug); # from C4::Debug, of course
|
||||
|
|
@ -48,16 +49,16 @@ sub db_max {
|
|||
$debug and print STDERR "(hbyymmincr) db_max query: $query\n";
|
||||
my $sth = C4::Context->dbh->prepare($query);
|
||||
my ($iso);
|
||||
if (@_) {
|
||||
my $input = shift;
|
||||
$iso = C4::Dates->new($input,'iso')->output('iso'); # try to set the date w/ 2nd arg
|
||||
unless ($iso) {
|
||||
warn "Failed to create 'iso' Dates object with input '$input'. Reverting to today's date.";
|
||||
$iso = C4::Dates->new->output('iso'); # failover back to today
|
||||
}
|
||||
} else {
|
||||
$iso = C4::Dates->new->output('iso');
|
||||
}
|
||||
if (@_) {
|
||||
my $input = shift;
|
||||
$iso = output_pref({ dt => dt_from_string( $input, 'iso' ), dateformat => 'iso', dateonly => 1 }); # try to set the date w/ 2nd arg
|
||||
unless ($iso) {
|
||||
warn "Failed to create 'iso' Dates object with input '$input'. Reverting to today's date.";
|
||||
$iso = output_pref({ dt => dt_from_string, dateformat => 'iso', dateonly => 1 }); # failover back to today
|
||||
}
|
||||
} else {
|
||||
$iso = output_pref({ dt => dt_from_string, dateformat => 'iso', dateonly => 1 });
|
||||
}
|
||||
my $year = substr($iso,2,2); # i.e. "08" for 2008
|
||||
my $andtwo = $width+2;
|
||||
$sth->execute("^[a-zA-Z]{1,}" . $year . "[0-9]{$andtwo}"); # the extra two digits are the month. we don't care what they are, just that they are there.
|
||||
|
|
@ -74,7 +75,7 @@ sub db_max {
|
|||
sub initial {
|
||||
my $self = shift;
|
||||
# FIXME: populated branch?
|
||||
my $iso = C4::Dates->new->output('iso'); # like "2008-07-02"
|
||||
my $iso = output_pref({ dt => dt_from_string, dateformat => 'iso', dateonly => 1 }); # like "2008-07-02"
|
||||
return $self->branch . substr($iso,2,2) . substr($iso,5,2) . sprintf('%' . "$width.$width" . 'd',1);
|
||||
}
|
||||
|
||||
|
|
@ -104,7 +105,7 @@ sub process_head { # (self,head,whole,specific)
|
|||
my ($self,$head,$whole,$specific) = @_;
|
||||
$specific and return $head; # if this is built off an existing barcode, just return the head unchanged.
|
||||
$head =~ s/\d{4}$//; # else strip the old yymm
|
||||
my $iso = C4::Dates->new->output('iso'); # like "2008-07-02"
|
||||
my $iso = output_pref({ dt => dt_from_string, dateformat => 'iso', dateonly => 1 }); # like "2008-07-02"
|
||||
return $head . substr($iso,2,2) . substr($iso,5,2);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -31,7 +31,6 @@ use POSIX qw(strftime);
|
|||
use Module::Load::Conditional qw(can_load);
|
||||
|
||||
use C4::Koha;
|
||||
use C4::Dates qw/format_date/;
|
||||
use C4::Log; # logaction
|
||||
use C4::Budgets;
|
||||
use C4::ClassSource;
|
||||
|
|
|
|||
|
|
@ -29,7 +29,6 @@ use C4::Branch;
|
|||
use C4::Circulation;
|
||||
use C4::Members;
|
||||
use C4::Biblio;
|
||||
use C4::Dates qw/format_date/;
|
||||
|
||||
use List::Util qw(shuffle);
|
||||
use List::MoreUtils qw(any);
|
||||
|
|
|
|||
16
C4/Items.pm
16
C4/Items.pm
|
|
@ -25,7 +25,7 @@ use Carp;
|
|||
use C4::Context;
|
||||
use C4::Koha;
|
||||
use C4::Biblio;
|
||||
use C4::Dates qw/format_date format_date_in_iso/;
|
||||
use Koha::DateUtils;
|
||||
use MARC::Record;
|
||||
use C4::ClassSource;
|
||||
use C4::Log;
|
||||
|
|
@ -648,8 +648,8 @@ C<$itemnum> is the item number
|
|||
sub ModDateLastSeen {
|
||||
my ($itemnumber) = @_;
|
||||
|
||||
my $today = C4::Dates->new();
|
||||
ModItem({ itemlost => 0, datelastseen => $today->output("iso") }, undef, $itemnumber);
|
||||
my $today = output_pref({ dt => dt_from_string, dateformat => 'iso', dateonly => 1 });
|
||||
ModItem({ itemlost => 0, datelastseen => $today }, undef, $itemnumber);
|
||||
}
|
||||
|
||||
=head2 DelItem
|
||||
|
|
@ -2128,7 +2128,7 @@ C<items.withdrawn>
|
|||
|
||||
sub _set_defaults_for_add {
|
||||
my $item = shift;
|
||||
$item->{dateaccessioned} ||= C4::Dates->new->output('iso');
|
||||
$item->{dateaccessioned} ||= output_pref({ dt => dt_from_string, dateformat => 'iso', dateonly => 1 });
|
||||
$item->{$_} ||= 0 for (qw( notforloan damaged itemlost withdrawn));
|
||||
}
|
||||
|
||||
|
|
@ -2162,7 +2162,7 @@ sub _koha_new_item {
|
|||
notforloan = ?,
|
||||
damaged = ?,
|
||||
itemlost = ?,
|
||||
withdrawn = ?,
|
||||
withdrawn = ?,
|
||||
itemcallnumber = ?,
|
||||
coded_location_qualifier = ?,
|
||||
restricted = ?,
|
||||
|
|
@ -2171,7 +2171,7 @@ sub _koha_new_item {
|
|||
holdingbranch = ?,
|
||||
paidfor = ?,
|
||||
location = ?,
|
||||
permanent_location = ?,
|
||||
permanent_location = ?,
|
||||
onloan = ?,
|
||||
issues = ?,
|
||||
renewals = ?,
|
||||
|
|
@ -2181,14 +2181,14 @@ sub _koha_new_item {
|
|||
ccode = ?,
|
||||
itype = ?,
|
||||
materials = ?,
|
||||
uri = ?,
|
||||
uri = ?,
|
||||
enumchron = ?,
|
||||
more_subfields_xml = ?,
|
||||
copynumber = ?,
|
||||
stocknumber = ?
|
||||
";
|
||||
my $sth = $dbh->prepare($query);
|
||||
my $today = C4::Dates->today('iso');
|
||||
my $today = output_pref({ dt => dt_from_string, dateformat => 'iso', dateonly => 1 });
|
||||
$sth->execute(
|
||||
$item->{'biblionumber'},
|
||||
$item->{'biblioitemnumber'},
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ use strict;
|
|||
use warnings;
|
||||
|
||||
use C4::Context;
|
||||
use C4::Dates qw(format_date);
|
||||
use Koha::DateUtils;
|
||||
|
||||
use vars qw($VERSION @ISA @EXPORT);
|
||||
|
||||
|
|
@ -220,8 +220,8 @@ sub GetLogs {
|
|||
my $object = shift;
|
||||
my $info = shift;
|
||||
|
||||
my $iso_datefrom = C4::Dates->new($datefrom,C4::Context->preference("dateformat"))->output('iso');
|
||||
my $iso_dateto = C4::Dates->new($dateto,C4::Context->preference("dateformat"))->output('iso');
|
||||
my $iso_datefrom = output_pref({ dt => dt_from_string( $datefrom ), dateformat => 'iso', dateonly => 1 });
|
||||
my $iso_dateto = output_pref({ dt => dt_from_string( $dateto ), dateformat => 'iso', dateonly => 1 });
|
||||
|
||||
my $dbh = C4::Context->dbh;
|
||||
my $query = "
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ package C4::NewsChannels;
|
|||
|
||||
use Modern::Perl;
|
||||
use C4::Context;
|
||||
use C4::Dates qw(format_date);
|
||||
use Koha::DateUtils;
|
||||
|
||||
use vars qw($VERSION @ISA @EXPORT);
|
||||
|
||||
|
|
@ -135,8 +135,8 @@ sub get_opac_new {
|
|||
$sth->execute($idnew);
|
||||
my $data = $sth->fetchrow_hashref;
|
||||
$data->{$data->{'lang'}} = 1 if defined $data->{lang};
|
||||
$data->{expirationdate} = format_date($data->{expirationdate});
|
||||
$data->{timestamp} = format_date($data->{timestamp});
|
||||
$data->{expirationdate} = output_pref({ dt => dt_from_string( $data->{expirationdate} ), dateonly => 1 });
|
||||
$data->{timestamp} = output_pref({ dt => dt_from_string( $data->{timestamp} ), dateonly => 1 }) ;
|
||||
return $data;
|
||||
}
|
||||
|
||||
|
|
@ -209,7 +209,7 @@ sub GetNewsToDisplay {
|
|||
$sth->execute($lang,$branch);
|
||||
my @results;
|
||||
while ( my $row = $sth->fetchrow_hashref ){
|
||||
$row->{newdate} = format_date($row->{newdate});
|
||||
$row->{newdate} = output_pref({ dt => dt_from_string( $row->{newdate} ), dateonly => 1 });
|
||||
push @results, $row;
|
||||
}
|
||||
return \@results;
|
||||
|
|
|
|||
|
|
@ -31,7 +31,6 @@ use strict;
|
|||
use URI::Escape;
|
||||
|
||||
use C4::Context;
|
||||
use C4::Dates qw(format_date);
|
||||
use C4::Templates;
|
||||
|
||||
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
|
||||
|
|
|
|||
|
|
@ -25,13 +25,11 @@ use CGI qw ( -utf8 );
|
|||
|
||||
use C4::Context;
|
||||
use C4::Output;
|
||||
use C4::Dates qw(format_date format_date_in_iso);
|
||||
use C4::Debug;
|
||||
use C4::Letters;
|
||||
use Koha::DateUtils qw( dt_from_string );
|
||||
use Koha::DateUtils;
|
||||
|
||||
use List::MoreUtils qw(any);
|
||||
use C4::Dates qw(format_date_in_iso);
|
||||
use base qw(Exporter);
|
||||
|
||||
our $VERSION = 3.07.00.049;
|
||||
|
|
@ -176,16 +174,15 @@ sub SearchSuggestion {
|
|||
}
|
||||
|
||||
# filter on date fields
|
||||
my $today = C4::Dates->today('iso');
|
||||
foreach my $field (qw( suggesteddate manageddate accepteddate )) {
|
||||
my $from = $field . "_from";
|
||||
my $to = $field . "_to";
|
||||
if ( $suggestion->{$from} || $suggestion->{$to} ) {
|
||||
push @query, qq{ AND suggestions.$field BETWEEN ? AND ? };
|
||||
push @sql_params,
|
||||
format_date_in_iso( $suggestion->{$from} ) || '0000-00-00';
|
||||
output_pref({ dt => dt_from_string( $suggestion->{$from} ), dateformat => 'iso', dateonly => 1 }) || '0000-00-00';
|
||||
push @sql_params,
|
||||
format_date_in_iso( $suggestion->{$to} ) || $today;
|
||||
output_pref({ dt => dt_from_string( $suggestion->{$to} ), dateformat => 'iso', dateonly => 1 }) || output_pref({ dt => dt_from_string, dateformat => 'iso', dateonly => 1 });
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@ use vars qw($VERSION);
|
|||
|
||||
use C4::Context;
|
||||
use C4::Output;
|
||||
use C4::Dates;
|
||||
use C4::Debug;
|
||||
|
||||
BEGIN {
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@ $VERSION = '0.25';
|
|||
|
||||
use C4::Context;
|
||||
use C4::Output;
|
||||
use C4::Dates;
|
||||
|
||||
=head1 NAME
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
@ -35,7 +35,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 => dt_from_string, dateformat => 'iso', dateonly => 1 }));
|
||||
($args{tag},$args{subfield}) = GetMarcFromKohaField("items.barcode", '');
|
||||
($args{loctag},$args{locsubfield}) = GetMarcFromKohaField("items.homebranch", '');
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
@ -35,7 +35,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 => dt_from_string, dateformat => 'iso', dateonly => 1 }));
|
||||
($args{tag},$args{subfield}) = GetMarcFromKohaField("items.barcode", '');
|
||||
($args{loctag},$args{locsubfield}) = GetMarcFromKohaField("items.homebranch", '');
|
||||
|
||||
|
|
|
|||
|
|
@ -18,15 +18,14 @@
|
|||
# along with Koha; if not, see <http://www.gnu.org/licenses>.
|
||||
|
||||
use Modern::Perl;
|
||||
|
||||
use Koha::DateUtils;
|
||||
no warnings 'redefine';
|
||||
|
||||
sub plugin_javascript {
|
||||
# my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
|
||||
my $function_name = "dateaccessioned".(int(rand(100000))+1);
|
||||
|
||||
require C4::Dates;
|
||||
my $date = C4::Dates->today('iso');
|
||||
my $date = output_pref({ dt => dt_from_string, dateformat => 'iso', dateonly => 1 });
|
||||
|
||||
# find the tag/subfield mapped to items.dateaccessioned
|
||||
my ($tag,$subfield) = GetMarcFromKohaField("items.dateaccessioned","");
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ use C4::Context;
|
|||
use C4::Output;
|
||||
use C4::Branch; # GetBranches
|
||||
use C4::Auth;
|
||||
use C4::Dates qw/format_date/;
|
||||
use Koha::DateUtils;
|
||||
use C4::Biblio;
|
||||
use C4::Circulation;
|
||||
use C4::Members;
|
||||
|
|
@ -119,7 +119,7 @@ foreach my $br ( keys %$branches ) {
|
|||
|
||||
$template->param(
|
||||
branchesloop => \@branchesloop,
|
||||
show_date => format_date(C4::Dates->today('iso')),
|
||||
show_date => output_pref({ dt => dt_from_string, dateonly => 1 }),
|
||||
TransfersMaxDaysWarning => C4::Context->preference('TransfersMaxDaysWarning'),
|
||||
latetransfers => $latetransfers ? 1 : 0,
|
||||
);
|
||||
|
|
|
|||
|
|
@ -25,12 +25,11 @@ use C4::Context;
|
|||
use C4::Output;
|
||||
use C4::Branch; # GetBranchName
|
||||
use C4::Auth;
|
||||
use C4::Dates qw/format_date/;
|
||||
use C4::Circulation;
|
||||
use C4::Members;
|
||||
use C4::Biblio;
|
||||
use C4::Items;
|
||||
|
||||
use Koha::DateUtils;
|
||||
use Date::Calc qw(
|
||||
Today
|
||||
Add_Delta_Days
|
||||
|
|
@ -158,7 +157,7 @@ $template->param(
|
|||
reservecount => $reservcount,
|
||||
overloop => \@overloop,
|
||||
overcount => $overcount,
|
||||
show_date => format_date(C4::Dates->today('iso')),
|
||||
show_date => output_pref({ dt => dt_from_string, dateonly => 1 }),
|
||||
ReservesMaxPickUpDelay => C4::Context->preference('ReservesMaxPickUpDelay')
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -29,7 +29,6 @@ use C4::Branch;
|
|||
use C4::Letters;
|
||||
use C4::Members::Attributes qw(GetBorrowerAttributes);
|
||||
|
||||
use C4::Dates qw/format_date/;
|
||||
my $input=new CGI;
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ use warnings;
|
|||
|
||||
use C4::Auth;
|
||||
use C4::Output;
|
||||
use C4::Dates qw/format_date/;
|
||||
use Koha::DateUtils;
|
||||
use CGI qw ( -utf8 );
|
||||
use C4::Members;
|
||||
use C4::Branch;
|
||||
|
|
@ -89,7 +89,7 @@ for ( my $i = 0 ; $i < $numaccts ; $i++ ) {
|
|||
}
|
||||
|
||||
my %row = (
|
||||
'date' => format_date( $accts->[$i]{'date'} ),
|
||||
'date' => output_pref({ dt => dt_from_string( $accts->[$i]{'date'}, 'iso' ), dateonly => 1 }),
|
||||
'amountcredit' => $accts->[$i]{'amountcredit'},
|
||||
'amountoutstandingcredit' => $accts->[$i]{'amountoutstandingcredit'},
|
||||
'toggle' => $accts->[$i]{'toggle'},
|
||||
|
|
|
|||
|
|
@ -31,8 +31,6 @@ use C4::Members;
|
|||
use C4::Branch qw(GetBranches);
|
||||
use List::MoreUtils qw/any uniq/;
|
||||
use Koha::DateUtils;
|
||||
|
||||
use C4::Dates qw/format_date/;
|
||||
use C4::Members::Attributes qw(GetBorrowerAttributes);
|
||||
|
||||
my $input = CGI->new;
|
||||
|
|
@ -77,8 +75,7 @@ my $branches = GetBranches();
|
|||
|
||||
# barcode export
|
||||
if ( $op eq 'export_barcodes' ) {
|
||||
my $today = C4::Dates->new();
|
||||
$today = $today->output('iso');
|
||||
my $today = output_pref({ dt => dt_from_string, dateformat => 'iso', dateonly => 1 });
|
||||
my @barcodes =
|
||||
map { $_->{barcode} } grep { $_->{returndate} =~ m/^$today/o } @{$issues};
|
||||
my $borrowercardnumber =
|
||||
|
|
|
|||
|
|
@ -27,7 +27,6 @@ use C4::Context;
|
|||
use C4::Koha;
|
||||
use C4::Circulation;
|
||||
use C4::Output;
|
||||
use C4::Dates qw/format_date/;
|
||||
use C4::Members;
|
||||
use C4::Members::Messaging;
|
||||
use C4::Branch;
|
||||
|
|
|
|||
|
|
@ -24,7 +24,6 @@ use C4::Context;
|
|||
use C4::Circulation;
|
||||
use C4::Members;
|
||||
use C4::Output;
|
||||
use C4::Dates;
|
||||
|
||||
my $query = new CGI;
|
||||
|
||||
|
|
|
|||
|
|
@ -292,7 +292,9 @@ foreach my $res (@reserves) {
|
|||
if ($show_priority) {
|
||||
$res->{'priority'} ||= '';
|
||||
}
|
||||
$res->{'suspend_until'} = C4::Dates->new( $res->{'suspend_until'}, "iso")->output("syspref") if ( $res->{'suspend_until'} );
|
||||
if ( $res->{'suspend_until'} ) {
|
||||
$res->{'suspend_until'} = output_pref({ dt => dt_from_string( $res->{'suspend_until'} , 'iso' ), dateonly => 1 });
|
||||
}
|
||||
}
|
||||
|
||||
# use Data::Dumper;
|
||||
|
|
|
|||
|
|
@ -24,7 +24,6 @@ use CGI qw ( -utf8 );
|
|||
use C4::Auth qw(:DEFAULT check_cookie_auth);
|
||||
use C4::Biblio;
|
||||
use C4::Context;
|
||||
use C4::Dates qw(format_date);
|
||||
use C4::Items;
|
||||
use C4::Koha;
|
||||
use C4::Tags qw(get_tags remove_tag get_tag_rows);
|
||||
|
|
|
|||
|
|
@ -28,20 +28,20 @@ use CGI qw ( -utf8 );
|
|||
use C4::Auth;
|
||||
use C4::Koha;
|
||||
use C4::Context;
|
||||
use C4::Dates qw(format_date_in_iso);
|
||||
use C4::Output;
|
||||
use C4::NewsChannels;
|
||||
use C4::Languages qw(getTranslatedLanguages);
|
||||
use Date::Calc qw/Date_to_Days Today/;
|
||||
use C4::Branch qw/GetBranches/;
|
||||
use Koha::DateUtils;
|
||||
|
||||
my $cgi = new CGI;
|
||||
|
||||
my $id = $cgi->param('id');
|
||||
my $title = $cgi->param('title');
|
||||
my $new = $cgi->param('new');
|
||||
my $expirationdate = format_date_in_iso($cgi->param('expirationdate'));
|
||||
my $timestamp = format_date_in_iso($cgi->param('timestamp'));
|
||||
my $expirationdate = output_pref({ dt => dt_from_string( $cgi->param('expirationdate') ), dateformat => 'iso', dateonly => 1 });
|
||||
my $timestamp = output_pref({ dt => dt_from_string( $cgi->param('timestamp') ), dateformat => 'iso', dateonly => 1 });
|
||||
my $number = $cgi->param('number');
|
||||
my $lang = $cgi->param('lang');
|
||||
my $branchcode = $cgi->param('branch');
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ use C4::Reports::Guided;
|
|||
use C4::Auth;
|
||||
use CGI qw ( -utf8 );
|
||||
use C4::Output;
|
||||
use C4::Dates;
|
||||
use Koha::DateUtils;;
|
||||
|
||||
use vars qw($debug);
|
||||
|
||||
|
|
@ -62,10 +62,10 @@ my $id = $input->param('id');
|
|||
if ( $mode eq 'job_add' ) {
|
||||
|
||||
# Retrieving the date according to the dateformat syspref
|
||||
my $c4date = C4::Dates->new($input->param('startdate'));
|
||||
my $c4date = output_pref({ dt => dt_from_string( $input->param('startdate') ), dateformat => 'iso', dateonly => 1 });
|
||||
|
||||
# Formatting it for Schedule::At
|
||||
my $startdate = join('', (split /-/, $c4date->output("iso")));
|
||||
my $startdate = join('', (split /-/, $c4date));
|
||||
|
||||
my $starttime = $input->param('starttime');
|
||||
$starttime =~ s/\://g;
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@ use CGI qw ( -utf8 );
|
|||
use Text::CSV::Encoded;
|
||||
use C4::Context;
|
||||
use C4::Koha;
|
||||
use C4::Dates;
|
||||
use C4::Output;
|
||||
use C4::Log;
|
||||
use C4::Items;
|
||||
|
|
|
|||
Loading…
Reference in New Issue