use C4::Biblio;
use C4::Items;
use C4::Koha;
-use C4::Branch; # GetBranches
use C4::Circulation;
use C4::Reports::Guided; #_get_column_defs
use C4::Charset;
my $branch = $input->param('branch');
my $op = $input->param('op');
my $compareinv2barcd = $input->param('compareinv2barcd');
+my $dont_checkin = $input->param('dont_checkin');
my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
{ template_name => "tools/inventory.tt",
}
);
-
-my $branches = GetBranches();
-my @branch_loop;
-for my $branch_hash (keys %$branches) {
- push @branch_loop, {value => "$branch_hash",
- branchname => $branches->{$branch_hash}->{'branchname'},
- selected => ($branch_hash eq $branchcode?1:0)};
-}
-
-@branch_loop = sort {$a->{branchname} cmp $b->{branchname}} @branch_loop;
my @authorised_value_list;
my $authorisedvalue_categories = '';
}
$statussth =~ s, and $,,g;
$template->param(
- branchloop => \@branch_loop,
authorised_values => \@authorised_value_list,
today => dt_from_string,
minlocation => $minlocation,
my @errorloop;
if ( $uploadbarcodes && length($uploadbarcodes) > 0 ) {
my $dbh = C4::Context->dbh;
- my $date = dt_from_string( $input->param('setdate') );
+ my $date = dt_from_string( scalar $input->param('setdate') );
$date = output_pref ( { dt => $date, dateformat => 'iso' } );
my $strsth = "select * from issues, items where items.itemnumber=issues.itemnumber and items.barcode =?";
ModItem( { datelastseen => $date }, undef, $item->{'itemnumber'} );
push @scanned_items, $item;
$count++;
- $qonloan->execute($barcode);
- if ($qonloan->rows){
- my $data = $qonloan->fetchrow_hashref;
- my ($doreturn, $messages, $iteminformation, $borrower) =AddReturn($barcode, $data->{homebranch});
- if ($doreturn){
- push @errorloop, {'barcode'=>$barcode,'ERR_ONLOAN_RET'=>1}
- } else {
- push @errorloop, {'barcode'=>$barcode,'ERR_ONLOAN_NOT_RET'=>1}
+ unless ( $dont_checkin ) {
+ $qonloan->execute($barcode);
+ if ($qonloan->rows){
+ my $data = $qonloan->fetchrow_hashref;
+ my ($doreturn, $messages, $iteminformation, $borrower) =AddReturn($barcode, $data->{homebranch});
+ if ($doreturn){
+ push @errorloop, {'barcode'=>$barcode,'ERR_ONLOAN_RET'=>1}
+ } else {
+ push @errorloop, {'barcode'=>$barcode,'ERR_ONLOAN_NOT_RET'=>1}
+ }
}
}
} else {