Bug 22762: Fix items.collection display on receiving
Caused by commit31c29fd31fBug 21206: Replace C4::Items::GetItem The log says: The method Koha::Item->collection is not covered by tests! It has highlighted an older problem: Since commitbb1e9c500cBug 17248 - Koha::AuthorisedValues - Remove GetKohaAuthorisedValueLib the "Collection code" is not filled correctly (items.collection vs items.ccode). Test plan: - Set acqcreateitem to "when placing an order" - Receive an order with items => The "Collection code" column must be filled with the items.ccode value - Edit an item - Change the collection code value => The "Collection code" column must be filled with the new value Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> (cherry picked from commit49c99ced88) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
parent
a2d45b1cb4
commit
c0c0303fcc
|
|
@ -143,7 +143,7 @@ if ($AcqCreateItem eq 'receiving') {
|
|||
$descriptions = Koha::AuthorisedValues->get_description_by_koha_field({frameworkcode => $fw, kohafield => 'items.location', authorised_value => $item->{location} });
|
||||
$item->{location} = $descriptions->{lib} // '';
|
||||
|
||||
$descriptions = Koha::AuthorisedValues->get_description_by_koha_field({frameworkcode => $fw, kohafield => 'items.collection', authorised_value => $item->{collection} });
|
||||
$descriptions = Koha::AuthorisedValues->get_description_by_koha_field({frameworkcode => $fw, kohafield => 'items.ccode', authorised_value => $item->{ccode} });
|
||||
$item->{collection} = $descriptions->{lib} // '';
|
||||
|
||||
$descriptions = Koha::AuthorisedValues->get_description_by_koha_field({frameworkcode => $fw, kohafield => 'items.materials', authorised_value => $item->{materials} });
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ if($itemnumber) {
|
|||
$descriptions = Koha::AuthorisedValues->get_description_by_koha_field({ frameworkcode => $fw, kohafield => 'items.location', authorised_value => $item->{location} });
|
||||
$item->{location} = $descriptions->{lib} // '';
|
||||
|
||||
$descriptions = Koha::AuthorisedValues->get_description_by_koha_field({ frameworkcode => $fw, kohafield => 'items.collection', authorised_value => $item->{collection} });
|
||||
$descriptions = Koha::AuthorisedValues->get_description_by_koha_field({ frameworkcode => $fw, kohafield => 'items.ccode', authorised_value => $item->{ccode} });
|
||||
$item->{collection} = $descriptions->{lib} // '';
|
||||
|
||||
$descriptions = Koha::AuthorisedValues->get_description_by_koha_field({ frameworkcode => $fw, kohafield => 'items.materials', authorised_value => $item->{materials} });
|
||||
|
|
|
|||
Loading…
Reference in New Issue