Bugzilla – Attachment 47040 Details for
Bug 11405
Inventory tool enhancements [OMNIBUS]
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11405 [6] - Allow items with selected locations to be not be flagged as "Item should have been scanned" if not scanned
Bug-11405-6---Allow-items-with-selected-locations-.patch (text/plain), 4.22 KB, created by
Mark Tompsett
on 2016-01-20 19:34:54 UTC
(
hide
)
Description:
Bug 11405 [6] - Allow items with selected locations to be not be flagged as "Item should have been scanned" if not scanned
Filename:
MIME Type:
Creator:
Mark Tompsett
Created:
2016-01-20 19:34:54 UTC
Size:
4.22 KB
patch
obsolete
>From 3bcca3a62ffe775ca6c329caf842b37ff9a9db18 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Mon, 16 Dec 2013 13:23:34 -0500 >Subject: [PATCH] Bug 11405 [6] - Allow items with selected locations to be not > be flagged as "Item should have been scanned" if not scanned > >This patch allows items to be skipped over if >the item has one of the locations selected in >the new field set listing shelving locations. > >Test Plan: >1) Apply this patch >2) Generate a list of barcodes ordered by callnumber >3) Set one of those items to a shelving location >4) Remove that item from the list >5) Run the inventory tool with this list of barcodes >6) Note the item is listed as "should have been scanned" >7) Click back to return to the previous page >8) Select the shelving location from "If comparing barcodes list to >results, assume items with the following locations should note have been >scanned". >8) Re-run the inventory tool >9) Note the item is no longer listed as "should have been scanned" >--- > C4/Items.pm | 1 + > .../intranet-tmpl/prog/en/modules/tools/inventory.tt | 15 +++++++++++++++ > tools/inventory.pl | 9 ++++++--- > 3 files changed, 22 insertions(+), 3 deletions(-) > >diff --git a/C4/Items.pm b/C4/Items.pm >index 9c2bb8a..d8a9988 100644 >--- a/C4/Items.pm >+++ b/C4/Items.pm >@@ -1162,6 +1162,7 @@ sub GetItemsForInventory { > # Auth values > foreach (keys %$row) { > if (defined($avmapping->{"items.$_,".$row->{'frameworkcode'}.",".$row->{$_}})) { >+ $row->{"$_-code"} = $row->{$_}; > $row->{$_} = $avmapping->{"items.$_,".$row->{'frameworkcode'}.",".$row->{$_}}; > } > } >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt >index 7cffb4e..add4f88 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt >@@ -196,6 +196,21 @@ $(document).ready(function(){ > </fieldset> > [% END %] > >+ [% IF (authorised_values) %] >+ <fieldset class="rows"> >+ <legend>If comparing barcodes list to results, assume items with the following locations should not have been scanned</legend> >+ >+ <ol> >+ [% FOREACH value IN authorised_values %] >+ <li> >+ <label for="ignore_locations">[% value.lib %]</label> >+ <input type="checkbox" name="ignore_locations" value="[% value.authorised_value %]"> >+ </li> >+ [% END %] >+ </ol> >+ </fieldset> >+ [% END %] >+ > <fieldset class="rows wide"> > <ol> > <li><label for="datelastseen">Inventory date:</label> >diff --git a/tools/inventory.pl b/tools/inventory.pl >index 16574f5..896b750 100755 >--- a/tools/inventory.pl >+++ b/tools/inventory.pl >@@ -37,7 +37,7 @@ use C4::Circulation; > use C4::Reports::Guided; #_get_column_defs > use C4::Charset; > use Koha::DateUtils; >-use List::MoreUtils qw( none ); >+use List::MoreUtils qw( none any ); > > > my $minlocation=$input->param('minlocation') || ''; >@@ -55,6 +55,7 @@ my $op = $input->param('op'); > my $compareinv2barcd = $input->param('compareinv2barcd'); > my $dont_checkin = $input->param('dont_checkin'); > my $out_of_order = $input->param('out_of_order'); >+my @ignore_locations = $input->param('ignore_locations'); > > my ( $template, $borrowernumber, $cookie ) = get_template_and_user( > { template_name => "tools/inventory.tt", >@@ -367,8 +368,10 @@ if ( $compareinv2barcd ) { > for my $should_be_scanned ( @$inventorylist ) { > my $barcode = $should_be_scanned->{barcode}; > unless ( grep /^$barcode$/, @scanned_barcodes ) { >- $should_be_scanned->{problem} = 'not_scanned'; >- push @items_with_problems, { %$should_be_scanned }; >+ unless ( any { $should_be_scanned->{'location-code'} eq $_ } @ignore_locations ) { >+ $should_be_scanned->{problem} = 'not_scanned'; >+ push @items_with_problems, { %$should_be_scanned }; >+ } > } > } > } >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 11405
:
23582
|
23583
|
23584
|
23585
|
23586
|
23587
|
24173
|
24174
|
24175
|
24176
|
24177
|
24178
|
25037
|
31250
|
31251
|
31252
|
31253
|
31254
|
31255
|
31256
|
40572
|
40573
|
40574
|
40575
|
40576
|
40577
|
40578
|
47027
|
47028
|
47029
|
47030
|
47031
|
47032
|
47033
|
47035
|
47036
|
47037
|
47038
|
47039
| 47040 |
47041
|
47106