my $authorisedvalue_categories = '';
my $frameworks = getframeworks();
+$frameworks->{''} = {frameworkcode => ''}; # Add the default framework
+
for my $fwk (keys %$frameworks){
my $fwkcode = $frameworks->{$fwk}->{'frameworkcode'};
my $authcode = GetAuthValCode('items.location', $fwkcode);
}
my $statuses = [];
-for my $statfield (qw/items.notforloan items.itemlost items.wthdrawn items.damaged/){
+for my $statfield (qw/items.notforloan items.itemlost items.withdrawn items.damaged/){
my $hash = {};
$hash->{fieldname} = $statfield;
$hash->{authcode} = GetAuthValCode($statfield);
$template->param(branchloop => \@branch_loop,
authorised_values=>\@authorised_value_list,
- DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(),
today => C4::Dates->today(),
minlocation => $minlocation,
maxlocation => $maxlocation,
# warn "$date";
my $strsth="select * from issues, items where items.itemnumber=issues.itemnumber and items.barcode =?";
my $qonloan = $dbh->prepare($strsth);
- $strsth="select * from items where items.barcode =? and items.wthdrawn = 1";
- my $qwthdrawn = $dbh->prepare($strsth);
+ $strsth="select * from items where items.barcode =? and items.withdrawn = 1";
+ my $qwithdrawn = $dbh->prepare($strsth);
my @errorloop;
my $count=0;
while (my $barcode=<$uploadbarcodes>){
$barcode =~ s/\r?\n$//;
- if ($qwthdrawn->execute($barcode) &&$qwthdrawn->rows){
+ if ($qwithdrawn->execute($barcode) &&$qwithdrawn->rows){
push @errorloop, {'barcode'=>$barcode,'ERR_WTHDRAWN'=>1};
}else{
my $item = GetItem('', $barcode);
}
}
$qonloan->finish;
- $qwthdrawn->finish;
+ $qwithdrawn->finish;
$template->param(date=>format_date($date),Number=>$count);
# $template->param(errorfile=>$errorfile) if ($errorfile);
$template->param(errorloop=>\@errorloop) if (@errorloop);
if ( defined $input->param('compareinv2barcd') && ( ( $input->param('compareinv2barcd') eq 'on' ) && ( scalar @brcditems != scalar @$res ) ) && length($uploadbarcodes) > 0 ){
if ( scalar @brcditems > scalar @$res ){
for my $brcditem (@brcditems) {
- if (! grep(/$brcditem->{barcode}/, @$res) ){
+ if (! grep( $_->{barcode} =~ /$brcditem->{barcode}/ , @$res) ){
$brcditem->{notfoundkoha} = 1;
push @$res, $brcditem;
}
} else {
my @notfound;
for my $item (@$res) {
- if ( ! grep(/$item->{barcode}/, @brcditems) ){
+ if ( ! grep( $_->{barcode} =~ /$item->{barcode}/ , @brcditems) ){
$item->{notfoundbarcode} = 1;
push @notfound, $item;
}