From: Josh Stompro Date: Fri, 24 Feb 2023 20:04:08 +0000 (+0000) Subject: Added in setting item properties for price, shelving_location, circ modifier and... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=4eaf41c18a276739ba403ac4f8a908ecb1293d05;p=working%2FNCIPServer.git Added in setting item properties for price, shelving_location, circ modifier and circ as type. Signed-off-by: Josh Stompro --- diff --git a/lib/NCIP/ILS/Evergreen.pm b/lib/NCIP/ILS/Evergreen.pm index e0f3cc4..c3325fe 100644 --- a/lib/NCIP/ILS/Evergreen.pm +++ b/lib/NCIP/ILS/Evergreen.pm @@ -2228,10 +2228,16 @@ sub create_fuller_copy { # create the copy if ($acn) { - $item = Fieldmapper::asset::copy->new(); + $item = Fieldmapper::asset::copy->new(); $item->barcode($item_info->{barcode}); $item->call_number($acn->id()); + if ($self->{config}->{items}->{circ_as_type}) { + $item->circ_as_type($self->{config}->{items}->{circ_as_type}); + } $item->circ_lib($self->{session}->{work_ou}->id); + if ($self->{config}->{items}->{circ_modifier}) { + $item->circ_modifier($self->{config}->{items}->{circ_modifier}); + } $item->circulate('t'); if ($self->{config}->{items}->{use_force_holds}) { $item->holdable('f'); @@ -2239,10 +2245,17 @@ sub create_fuller_copy { $item->holdable('t'); } $item->opac_visible('f'); + if ($self->{config}->{items}->{item_price}) { + $item->price($self->{config}->{items}->{item_price}); + } $item->deleted('f'); $item->fine_level(OILS_PRECAT_COPY_FINE_LEVEL); $item->loan_duration(OILS_PRECAT_COPY_LOAN_DURATION); - $item->location(1); + if ($self->{config}->{items}->{shelving_location}) { + $item->location($self->{config}->{items}->{shelving_location}->{sid}); + } else { + $item->location(1); + } $item->status(0); $item->editor($self->{session}->{user}->id); $item->creator($self->{session}->{user}->id);