|
Lines 38-43
use Koha::UploadedFiles;
Link Here
|
| 38 |
use Koha::Account; |
38 |
use Koha::Account; |
| 39 |
use Koha::Checkouts; |
39 |
use Koha::Checkouts; |
| 40 |
use Koha::Patrons; |
40 |
use Koha::Patrons; |
|
|
41 |
use Koha::Plugins; |
| 41 |
|
42 |
|
| 42 |
use Date::Calc qw( Add_Delta_Days Date_to_Days ); |
43 |
use Date::Calc qw( Add_Delta_Days Date_to_Days ); |
| 43 |
|
44 |
|
|
Lines 246-251
sub kocIssueItem {
Link Here
|
| 246 |
my $circ = shift; |
247 |
my $circ = shift; |
| 247 |
|
248 |
|
| 248 |
$circ->{ 'barcode' } = barcodedecode($circ->{'barcode'}) if( $circ->{'barcode'} && C4::Context->preference('itemBarcodeInputFilter')); |
249 |
$circ->{ 'barcode' } = barcodedecode($circ->{'barcode'}) if( $circ->{'barcode'} && C4::Context->preference('itemBarcodeInputFilter')); |
|
|
250 |
|
| 251 |
my ( $new_barcode ) = Koha::Plugins->call( 'barcode_transform', 'item', $circ->{barcode} ) || $circ->{barcode}; |
| 252 |
$circ->{barcode} = $new_barcode; |
| 253 |
|
| 249 |
my $branchcode = C4::Context->userenv->{branch}; |
254 |
my $branchcode = C4::Context->userenv->{branch}; |
| 250 |
my $patron = Koha::Patrons->find( { cardnumber => $circ->{cardnumber} } ); |
255 |
my $patron = Koha::Patrons->find( { cardnumber => $circ->{cardnumber} } ); |
| 251 |
my $borrower = $patron->unblessed; |
256 |
my $borrower = $patron->unblessed; |
|
Lines 326-331
sub kocIssueItem {
Link Here
|
| 326 |
sub kocReturnItem { |
331 |
sub kocReturnItem { |
| 327 |
my ( $circ ) = @_; |
332 |
my ( $circ ) = @_; |
| 328 |
$circ->{'barcode'} = barcodedecode($circ->{'barcode'}) if( $circ->{'barcode'} && C4::Context->preference('itemBarcodeInputFilter')); |
333 |
$circ->{'barcode'} = barcodedecode($circ->{'barcode'}) if( $circ->{'barcode'} && C4::Context->preference('itemBarcodeInputFilter')); |
|
|
334 |
|
| 335 |
my ( $new_barcode ) = Koha::Plugins->call( 'barcode_transform', 'item', $circ->{barcode} ) || $circ->{barcode}; |
| 336 |
$circ->{barcode} = $new_barcode; |
| 337 |
|
| 329 |
my $item = Koha::Items->find({ barcode => $circ->{barcode} }); |
338 |
my $item = Koha::Items->find({ barcode => $circ->{barcode} }); |
| 330 |
my $biblio = $item->biblio; |
339 |
my $biblio = $item->biblio; |
| 331 |
my $borrowernumber = _get_borrowernumber_from_barcode( $circ->{'barcode'} ); |
340 |
my $borrowernumber = _get_borrowernumber_from_barcode( $circ->{'barcode'} ); |