Lines 118-130
if ($barcode) {
Link Here
|
118 |
my %item; |
118 |
my %item; |
119 |
my $frbranchcd = C4::Context->userenv->{'branch'}; |
119 |
my $frbranchcd = C4::Context->userenv->{'branch'}; |
120 |
# if ( not($found) ) { |
120 |
# if ( not($found) ) { |
121 |
$item{'biblionumber'} = $iteminformation->{'biblionumber'}; |
121 |
$item{'biblionumber'} = $iteminformation->{'biblionumber'}; |
122 |
$item{'title'} = $iteminformation->{'title'}; |
122 |
$item{'itemnumber'} = $iteminformation->{'itemnumber'}; |
123 |
$item{'author'} = $iteminformation->{'author'}; |
123 |
$item{'title'} = $iteminformation->{'title'}; |
124 |
$item{'itemtype'} = $iteminformation->{'itemtype'}; |
124 |
$item{'author'} = $iteminformation->{'author'}; |
125 |
$item{'ccode'} = $iteminformation->{'ccode'}; |
125 |
$item{'itemtype'} = $iteminformation->{'itemtype'}; |
126 |
$item{'frbrname'} = $branches->{$frbranchcd}->{'branchname'}; |
126 |
$item{'ccode'} = $iteminformation->{'ccode'}; |
127 |
$item{'tobrname'} = $branches->{$tobranchcd}->{'branchname'}; |
127 |
$item{'itemcallnumber'} = $iteminformation->{'itemcallnumber'}; |
|
|
128 |
$item{'location'} = GetKohaAuthorisedValueLib("LOC",$iteminformation->{'location'}); |
129 |
$item{'frbrname'} = $branches->{$frbranchcd}->{'branchname'}; |
130 |
$item{'tobrname'} = $branches->{$tobranchcd}->{'branchname'}; |
128 |
# } |
131 |
# } |
129 |
$item{counter} = 0; |
132 |
$item{counter} = 0; |
130 |
$item{barcode} = $barcode; |
133 |
$item{barcode} = $barcode; |
Lines 148-160
foreach ( $query->param ) {
Link Here
|
148 |
$item{frombrcd} = $frbcd; |
151 |
$item{frombrcd} = $frbcd; |
149 |
$item{tobrcd} = $tobcd; |
152 |
$item{tobrcd} = $tobcd; |
150 |
my ($iteminformation) = GetBiblioFromItemNumber( GetItemnumberFromBarcode($bc) ); |
153 |
my ($iteminformation) = GetBiblioFromItemNumber( GetItemnumberFromBarcode($bc) ); |
151 |
$item{'biblionumber'} = $iteminformation->{'biblionumber'}; |
154 |
$item{'biblionumber'} = $iteminformation->{'biblionumber'}; |
152 |
$item{'title'} = $iteminformation->{'title'}; |
155 |
$item{'itemnumber'} = $iteminformation->{'itemnumber'}; |
153 |
$item{'author'} = $iteminformation->{'author'}; |
156 |
$item{'title'} = $iteminformation->{'title'}; |
154 |
$item{'itemtype'} = $iteminformation->{'itemtype'}; |
157 |
$item{'author'} = $iteminformation->{'author'}; |
155 |
$item{'ccode'} = $iteminformation->{'ccode'}; |
158 |
$item{'itemtype'} = $iteminformation->{'itemtype'}; |
156 |
$item{'frbrname'} = $branches->{$frbcd}->{'branchname'}; |
159 |
$item{'ccode'} = $iteminformation->{'ccode'}; |
157 |
$item{'tobrname'} = $branches->{$tobcd}->{'branchname'}; |
160 |
$item{'itemcallnumber'} = $iteminformation->{'itemcallnumber'}; |
|
|
161 |
$item{'location'} = GetKohaAuthorisedValueLib("LOC",$iteminformation->{'location'}); |
162 |
$item{'frbrname'} = $branches->{$frbcd}->{'branchname'}; |
163 |
$item{'tobrname'} = $branches->{$tobcd}->{'branchname'}; |
158 |
push( @trsfitemloop, \%item ); |
164 |
push( @trsfitemloop, \%item ); |
159 |
} |
165 |
} |
160 |
|
166 |
|
Lines 187-221
if ( $codeType eq 'itemtype' ) {
Link Here
|
187 |
|
193 |
|
188 |
my @errmsgloop; |
194 |
my @errmsgloop; |
189 |
foreach my $code ( keys %$messages ) { |
195 |
foreach my $code ( keys %$messages ) { |
190 |
my %err; |
196 |
if ( $code ne 'WasTransfered' ) { |
191 |
if ( $code eq 'BadBarcode' ) { |
197 |
my %err; |
192 |
$err{msg} = $messages->{'BadBarcode'}; |
198 |
if ( $code eq 'BadBarcode' ) { |
193 |
$err{errbadcode} = 1; |
199 |
$err{msg} = $messages->{'BadBarcode'}; |
|
|
200 |
$err{errbadcode} = 1; |
201 |
} |
202 |
elsif ( $code eq "NotAllowed" ) { |
203 |
warn "NotAllowed: $messages->{'NotAllowed'} to " . $branches->{ $messages->{'NotAllowed'} }->{'branchname'}; |
204 |
# Do we really want a error log message here? --atz |
205 |
$err{errnotallowed} = 1; |
206 |
my ( $tbr, $typecode ) = split( /::/, $messages->{'NotAllowed'} ); |
207 |
$err{tbr} = $branches->{ $tbr }->{'branchname'}; |
208 |
$err{code} = $typecode; |
209 |
$err{codeType} = $codeTypeDescription; |
210 |
} |
211 |
elsif ( $code eq 'IsPermanent' ) { |
212 |
$err{errispermanent} = 1; |
213 |
$err{msg} = $branches->{ $messages->{'IsPermanent'} }->{'branchname'}; |
214 |
} |
215 |
elsif ( $code eq 'WasReturned' ) { |
216 |
$err{errwasreturned} = 1; |
217 |
$err{borrowernumber} = $messages->{'WasReturned'}; |
218 |
my $borrower = GetMember('borrowernumber'=>$messages->{'WasReturned'}); |
219 |
$err{title} = $borrower->{'title'}; |
220 |
$err{firstname} = $borrower->{'firstname'}; |
221 |
$err{surname} = $borrower->{'surname'}; |
222 |
$err{cardnumber} = $borrower->{'cardnumber'}; |
223 |
} |
224 |
$err{errdesteqholding} = ( $code eq 'DestinationEqualsHolding' ); |
225 |
push( @errmsgloop, \%err ); |
194 |
} |
226 |
} |
195 |
elsif ( $code eq "NotAllowed" ) { |
|
|
196 |
warn "NotAllowed: $messages->{'NotAllowed'} to " . $branches->{ $messages->{'NotAllowed'} }->{'branchname'}; |
197 |
# Do we really want a error log message here? --atz |
198 |
$err{errnotallowed} = 1; |
199 |
my ( $tbr, $typecode ) = split( /::/, $messages->{'NotAllowed'} ); |
200 |
$err{tbr} = $branches->{ $tbr }->{'branchname'}; |
201 |
$err{code} = $typecode; |
202 |
$err{codeType} = $codeTypeDescription; |
203 |
} |
204 |
elsif ( $code eq 'IsPermanent' ) { |
205 |
$err{errispermanent} = 1; |
206 |
$err{msg} = $branches->{ $messages->{'IsPermanent'} }->{'branchname'}; |
207 |
} |
208 |
elsif ( $code eq 'WasReturned' ) { |
209 |
$err{errwasreturned} = 1; |
210 |
$err{borrowernumber} = $messages->{'WasReturned'}; |
211 |
my $borrower = GetMember('borrowernumber'=>$messages->{'WasReturned'}); |
212 |
$err{title} = $borrower->{'title'}; |
213 |
$err{firstname} = $borrower->{'firstname'}; |
214 |
$err{surname} = $borrower->{'surname'}; |
215 |
$err{cardnumber} = $borrower->{'cardnumber'}; |
216 |
} |
217 |
$err{errdesteqholding} = ( $code eq 'DestinationEqualsHolding' ); |
218 |
push( @errmsgloop, \%err ); |
219 |
} |
227 |
} |
220 |
|
228 |
|
221 |
# use Data::Dumper; |
229 |
# use Data::Dumper; |