Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
digibib
koha-docker
Commits
8a5b8be3
Commit
8a5b8be3
authored
Jun 08, 2018
by
Petter Goksøyr Åsen
Browse files
ncip: handle compund barcode/rfid strings from bibliofil
parent
b0ad6343
Changes
1
Hide whitespace changes
Inline
Side-by-side
files/NCIPServer/lib/NCIP/ILS/Koha.pm
View file @
8a5b8be3
...
...
@@ -180,12 +180,21 @@ sub itemshipped {
my
@items
=
$biblio
->
items
();
@items
==
1
or
die
"
expected only 1 entry for
$biblio_id
, got:
"
.
scalar
(
@items
);
my
$item
=
$items
[
0
];
if
(
$request
->
{
$message
}
->
{
ItemId
}
->
{
ItemIdentifierType
}
eq
"
Barcode
")
{
my
$barcode
=
$request
->
{
$message
}
->
{
ItemId
}
->
{
ItemIdentifierValue
};
$saved_request
->
illrequestattributes
->
find
({
type
=>
'
ItemIdentifierType
'
})
->
value
('
Barcode
')
->
store
();
$saved_request
->
illrequestattributes
->
find
({
type
=>
'
ItemIdentifierValue
'
})
->
value
(
$barcode
)
->
store
();
$item
->
itemnotes
("
ILL barcode:
"
.
$barcode
);
my
@identifier_types
=
split
("
;
",
$request
->
{
$message
}
->
{
ItemId
}
->
{
ItemIdentifierType
});
my
@identifiers
=
split
("
;
",
$request
->
{
$message
}
->
{
ItemId
}
->
{
ItemIdentifierValue
});
for
(
$i
=
0
;
$i
<
@identifier_types
;
$i
++
)
{
my
$id_type
=
@identifier_types
[
$i
];
my
$id
=
@identifiers
[
$i
];
if
(
$id_type
eq
"
Barcode
")
{
$saved_request
->
illrequestattributes
->
find
({
type
=>
'
ItemIdentifierType
'
})
->
value
('
Barcode
')
->
store
();
$saved_request
->
illrequestattributes
->
find
({
type
=>
'
ItemIdentifierValue
'
})
->
value
(
$id
)
->
store
();
$item
->
itemnotes
("
ILL barcode:
"
.
$barcode
);
}
if
(
$id_type
eq
"
RFID
")
{
$saved_request
->
illrequestattributes
->
find_or_create
({
type
=>
'
RFID
'
})
->
value
(
$id
)
->
store
();
}
}
$item
->
store
;
warn
"
Setting status to H_ITEMSHIPPED
";
$saved_request
->
status
(
'
H_ITEMSHIPPED
'
)
->
store
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment