Fix for 1169, issuedate wasn't formatted properly, to compare with today's date. Fixed in rel_2_2
This commit is contained in:
parent
935fdae767
commit
df35ff4d3c
|
|
@ -86,7 +86,7 @@ $env{'queue'}=$printer;
|
|||
my @datearr = localtime(time());
|
||||
# FIXME - Could just use POSIX::strftime("%Y%m%d", localtime);
|
||||
my $todaysdate = (1900+$datearr[5]).sprintf ("%0.2d", ($datearr[4]+1)).sprintf ("%0.2d", ($datearr[3]));
|
||||
|
||||
warn $todaysdate;
|
||||
|
||||
# check and see if we should print
|
||||
if ($barcode eq '' && $print eq 'maybe'){
|
||||
|
|
@ -199,7 +199,9 @@ if ($borrower) {
|
|||
# split in 2 arrays for today & previous
|
||||
foreach my $it (keys %$issueslist) {
|
||||
my $issuedate = $issueslist->{$it}->{'timestamp'};
|
||||
$issuedate = substr($issuedate, 0, 8);
|
||||
$issuedate = substr($issuedate, 0, 10);
|
||||
$issuedate=~s/-//g;
|
||||
warn $issuedate;
|
||||
if ($todaysdate == $issuedate) {
|
||||
push @todaysissues, $issueslist->{$it};
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in New Issue