Bugzilla – Attachment 10413 Details for
Bug 7684
inventory : datatable fix actions etc.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[FOLLOW-UP] Bug 7684: multiple fixes for inventory
FOLLOW-UP-Bug-7684-multiple-fixes-for-inventory.patch (text/plain), 2.46 KB, created by
Matthias Meusburger
on 2012-06-21 15:21:38 UTC
(
hide
)
Description:
[FOLLOW-UP] Bug 7684: multiple fixes for inventory
Filename:
MIME Type:
Creator:
Matthias Meusburger
Created:
2012-06-21 15:21:38 UTC
Size:
2.46 KB
patch
obsolete
>From 2e7ed6d39a7cc78f96cfa64adae52f421fe2e1d8 Mon Sep 17 00:00:00 2001 >From: Matthias Meusburger <matthias.meusburger@biblibre.com> >Date: Thu, 21 Jun 2012 17:20:53 +0200 >Subject: [PATCH] [FOLLOW-UP] Bug 7684: multiple fixes for inventory > > - Adds not found barcodes list into csv report >--- > tools/inventory.pl | 16 ++++++++++++++-- > 1 file changed, 14 insertions(+), 2 deletions(-) > >diff --git a/tools/inventory.pl b/tools/inventory.pl >index ba484f9..0c2e92c 100755 >--- a/tools/inventory.pl >+++ b/tools/inventory.pl >@@ -139,6 +139,7 @@ $template->param(branchloop => \@branch_loop, > datelastseen => $datelastseen, > ); > my @brcditems; >+my @errorloop; > if ($uploadbarcodes && length($uploadbarcodes)>0){ > my $dbh=C4::Context->dbh; > my $date = format_date_in_iso($input->param('setdate')) || C4::Dates->today('iso'); >@@ -147,7 +148,6 @@ if ($uploadbarcodes && length($uploadbarcodes)>0){ > my $qonloan = $dbh->prepare($strsth); > $strsth="select * from items where items.barcode =? and items.wthdrawn = 1"; > my $qwthdrawn = $dbh->prepare($strsth); >- my @errorloop; > my $count=0; > while (my $barcode=<$uploadbarcodes>){ > $barcode =~ s/\r?\n$//; >@@ -225,9 +225,10 @@ if (defined $input->param('CSVexport') && $input->param('CSVexport') eq 'on'){ > ); > $csv->combine(qw / title author barcode itemnumber homebranch location itemcallnumber notforloan lost damaged /); > print $csv->string, "\n"; >+ my @keys = qw / title author barcode itemnumber homebranch location itemcallnumber notforloan lost damaged /; > for my $re (@$res){ > my @line; >- for my $key ( qw / title author barcode itemnumber homebranch location itemcallnumber notforloan itemlost damaged / ) { >+ for my $key (@keys) { > given ( $key ) { > when ( /notforloan/ ) { > push @line, GetAuthorisedValueDesc('', '', $re->{$key}, '', '', 'NOT_LOAN', ''); >@@ -248,6 +249,17 @@ if (defined $input->param('CSVexport') && $input->param('CSVexport') eq 'on'){ > $csv->combine(@line); > print $csv->string, "\n"; > } >+ # Adding not found barcodes >+ foreach my $error (@errorloop) { >+ my @line; >+ if ($error->{'ERR_BARCODE'}) { >+ push @line, map { $_ eq 'barcode' ? $error->{'barcode'} : ''} @keys; >+ push @line, "barcode not found"; >+ $csv->combine(@line); >+ print $csv->string, "\n"; >+ } >+ } >+ > exit; > } > >-- >1.7.9.5
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 7684
:
9412
|
10413
|
11793
|
11843
|
12387
|
13097
|
16212
|
16483
|
16484
|
16524
|
16541
|
16594
|
16598
|
17841
|
17844
|
18705
|
18706
|
19215
|
20467
|
20468
|
21112
|
21113
|
21206
|
21331
|
21332
|
21440
|
21441
|
21968
|
21970
|
21971
|
21972
|
22208
|
22209
|
22210