Bug 21183: Replace C4::Items::GetItemnumberFromBarcode calls
commit2b1b168ec470da576c0a6c4aa8d458235a76018e
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 6 Aug 2018 18:53:33 +0000 (6 15:53 -0300)
committerNick Clemens <nick@bywatersolutions.com>
Thu, 30 Aug 2018 13:40:35 +0000 (30 13:40 +0000)
tree160c7f32d82ce1085c49b934930f06e85030e479
parentf52ba648e2c64293966eca820326e33873c54343
Bug 21183: Replace C4::Items::GetItemnumberFromBarcode calls

C4::Items::GetItemnumberFromBarcode calls can be replaced with
  Koha::Items->find({ barcode => $barcode });

We should make sure the barcode existed in DB and so that ->find
returns an object. Note that most of the time we just wanted to know if
the barcode existed.
The changes are very simple, the only one that need attention is
the one in batchMod.pl. It is basically reusing what we did on
bug 21141.

Test plan:
Use the batch item modification/deletion tools to modify/delete items
from their barcode (using the textarea or a file)

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
C4/ImportBatch.pm
C4/Items.pm
circ/returns.pl
labels/label-edit-batch.pl
members/mancredit.pl
members/maninvoice.pl
rotating_collections/addItems.pl
serials/serials-edit.pl
tools/batchMod.pl