Lines 131-180
if ($barcode) {
Link Here
|
131 |
my $item = Koha::Items->find({ barcode => $barcode }); |
131 |
my $item = Koha::Items->find({ barcode => $barcode }); |
132 |
$found = $messages->{'ResFound'}; |
132 |
$found = $messages->{'ResFound'}; |
133 |
if ($transferred) { |
133 |
if ($transferred) { |
134 |
my %item; |
134 |
my %trsfitem; |
135 |
my $biblio = $item->biblio; |
|
|
136 |
my $frbranchcd = C4::Context->userenv->{'branch'}; |
135 |
my $frbranchcd = C4::Context->userenv->{'branch'}; |
137 |
$item{'biblionumber'} = $item->biblionumber; |
136 |
$trsfitem{item} = $item; |
138 |
$item{'itemnumber'} = $item->itemnumber; |
137 |
$trsfitem{counter} = 0; |
139 |
$item{'title'} = $biblio->title; |
138 |
$trsfitem{frombrcd} = $frbranchcd; |
140 |
$item{'author'} = $biblio->author; |
139 |
$trsfitem{tobrcd} = $tobranchcd; |
141 |
$item{'itemtype'} = $biblio->biblioitem->itemtype; |
140 |
push( @trsfitemloop, \%trsfitem ); |
142 |
$item{'ccode'} = $item->ccode; |
|
|
143 |
$item{'itemcallnumber'} = $item->itemcallnumber; |
144 |
my $av = Koha::AuthorisedValues->search({ category => 'LOC', authorised_value => $item->location }); |
145 |
$item{'location'} = $av->count ? $av->next->lib : ''; |
146 |
$item{counter} = 0; |
147 |
$item{barcode} = $barcode; |
148 |
$item{frombrcd} = $frbranchcd; |
149 |
$item{tobrcd} = $tobranchcd; |
150 |
push( @trsfitemloop, \%item ); |
151 |
} |
141 |
} |
152 |
} |
142 |
} |
153 |
|
143 |
|
154 |
foreach ( $query->param ) { |
144 |
foreach ( $query->param ) { |
155 |
(next) unless (/bc-(\d*)/); |
145 |
(next) unless (/bc-(\d*)/); |
156 |
my $counter = $1; |
146 |
my $counter = $1; |
157 |
my %item; |
147 |
my %trsfitem; |
158 |
my $bc = $query->param("bc-$counter"); |
148 |
my $bc = $query->param("bc-$counter"); |
159 |
my $frbcd = $query->param("fb-$counter"); |
149 |
my $frbcd = $query->param("fb-$counter"); |
160 |
my $tobcd = $query->param("tb-$counter"); |
150 |
my $tobcd = $query->param("tb-$counter"); |
161 |
$counter++; |
151 |
$counter++; |
162 |
$item{counter} = $counter; |
152 |
$trsfitem{counter} = $counter; |
163 |
$item{barcode} = $bc; |
153 |
$trsfitem{frombrcd} = $frbcd; |
164 |
$item{frombrcd} = $frbcd; |
154 |
$trsfitem{tobrcd} = $tobcd; |
165 |
$item{tobrcd} = $tobcd; |
|
|
166 |
my $item = Koha::Items->find({ barcode => $bc }); |
155 |
my $item = Koha::Items->find({ barcode => $bc }); |
167 |
my $biblio = $item->biblio; |
156 |
$trsfitem{item} = $item; |
168 |
$item{'biblionumber'} = $item->biblionumber; |
157 |
push( @trsfitemloop, \%trsfitem ); |
169 |
$item{'itemnumber'} = $item->itemnumber; |
|
|
170 |
$item{'title'} = $biblio->title; |
171 |
$item{'author'} = $biblio->author; |
172 |
$item{'itemtype'} = $biblio->biblioitem->itemtype; |
173 |
$item{'ccode'} = $item->ccode; |
174 |
$item{'itemcallnumber'} = $item->itemcallnumber; |
175 |
my $av = Koha::AuthorisedValues->search({ category => 'LOC', authorised_value => $item->location }); |
176 |
$item{'location'} = $av->count ? $av->next->lib : ''; |
177 |
push( @trsfitemloop, \%item ); |
178 |
} |
158 |
} |
179 |
|
159 |
|
180 |
my $itemnumber; |
160 |
my $itemnumber; |