View | Details | Raw Unified | Return to bug 36305
Collapse All | Expand All

(-)a/tools/inventory.pl (-6 / +7 lines)
Lines 55-61 my $ignore_waiting_holds = $input->param('ignore_waiting_holds'); Link Here
55
my $datelastseen = $input->param('datelastseen'); # last inventory date
55
my $datelastseen = $input->param('datelastseen'); # last inventory date
56
my $branchcode = $input->param('branchcode') || '';
56
my $branchcode = $input->param('branchcode') || '';
57
my $branch     = $input->param('branch');
57
my $branch     = $input->param('branch');
58
my $op         = $input->param('op');
58
my $op         = $input->param('op') // q{};
59
my $compareinv2barcd = $input->param('compareinv2barcd');
59
my $compareinv2barcd = $input->param('compareinv2barcd');
60
my $dont_checkin = $input->param('dont_checkin');
60
my $dont_checkin = $input->param('dont_checkin');
61
my $out_of_order = $input->param('out_of_order');
61
my $out_of_order = $input->param('out_of_order');
Lines 162-168 my $results = {}; Link Here
162
my @scanned_items;
162
my @scanned_items;
163
my @errorloop;
163
my @errorloop;
164
my $moddatecount = 0;
164
my $moddatecount = 0;
165
if ( ($uploadbarcodes && length($uploadbarcodes) > 0) || ($barcodelist && length($barcodelist) > 0) ) {
165
if ( $op eq 'cud-inventory'
166
    && ( ( $uploadbarcodes && length($uploadbarcodes) > 0 ) || ( $barcodelist && length($barcodelist) > 0 ) ) )
167
{
166
    my $dbh = C4::Context->dbh;
168
    my $dbh = C4::Context->dbh;
167
    my $date = $input->param('setdate');
169
    my $date = $input->param('setdate');
168
    my $date_dt = dt_from_string($date);
170
    my $date_dt = dt_from_string($date);
Lines 228-235 if ( ($uploadbarcodes && length($uploadbarcodes) > 0) || ($barcodelist && length Link Here
228
            $moddatecount++;
230
            $moddatecount++;
229
            unless ( $dont_checkin ) {
231
            unless ( $dont_checkin ) {
230
                if ( $item->onloan ){
232
                if ( $item->onloan ){
231
                    #FIXME Is this correct? Shouldn't the item be checked in at the branch we are signed in at?
233
                    #TODO Assuming item homebranch for return here. Might allow current branch too?
232
                    my ($doreturn, $messages, $iteminformation, $borrower) =AddReturn($barcode, $item->homebranch);
234
                    my ($doreturn, $messages, $iteminformation, $borrower) = AddReturn($barcode, $item->homebranch);
233
                    if( $doreturn ) {
235
                    if( $doreturn ) {
234
                        $item_unblessed->{onloan} = undef;
236
                        $item_unblessed->{onloan} = undef;
235
                        $item_unblessed->{datelastseen} = dt_from_string;
237
                        $item_unblessed->{datelastseen} = dt_from_string;
Lines 250-256 if ( ($uploadbarcodes && length($uploadbarcodes) > 0) || ($barcodelist && length Link Here
250
# Build inventorylist: used as result list when you do not pass barcodes
252
# Build inventorylist: used as result list when you do not pass barcodes
251
# This list is also used when you want to compare with barcodes
253
# This list is also used when you want to compare with barcodes
252
my ( $inventorylist, $rightplacelist );
254
my ( $inventorylist, $rightplacelist );
253
if ( $op && ( !$uploadbarcodes || $compareinv2barcd )) {
255
if ( $op eq 'cud-inventory' && ( !$uploadbarcodes || $compareinv2barcd )) {
254
    ( $inventorylist ) = GetItemsForInventory({
256
    ( $inventorylist ) = GetItemsForInventory({
255
      minlocation  => $minlocation,
257
      minlocation  => $minlocation,
256
      maxlocation  => $maxlocation,
258
      maxlocation  => $maxlocation,
257
- 

Return to bug 36305