Bug 12557: Add a way to revert the changes made on items on receving
authorJonathan Druart <jonathan.druart@biblibre.com>
Fri, 11 Jul 2014 10:09:32 +0000 (12:09 +0200)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Tue, 9 Sep 2014 13:10:07 +0000 (10:10 -0300)
commit55ca3c5581de4b794020c8d555f3f472be641b71
treed2aa75ae79db7833eeffa06a17c8b92b5aef1f53
parentd036b9a4d16eb1cda7c992ec54b9b36d7c86402d
Bug 12557: Add a way to revert the changes made on items on receving

Bug 8307 introduces the AcqItemSetSubfieldsWhenReceived pref.
You can now update an item field on receiving (if you create items on
ordering).
But if the receipt is cancel, there is no way to revert these changes.

This patch adds a new pref AcqItemSetSubfieldsWhenReceiptIsCancelled to
allow to revert changes previously done on receiving

Test plan:
0/ Set the AcqCreateItems to 'ordering'
1/ Fill AcqItemSetSubfieldsWhenReceived with o=1 (UNIMARC) or 7=1
(MARC21).
2/ Fill AcqItemSetSubfieldsWhenReceiptIsCancelled with o=2 (UNIMARC) or
7=2 (MARC21)
3/ Create an order with some items
4/ Receive the order and verify the notforloan value is set to 1
5/ Cancel the receipt and verify the notforloan value is set to 2

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
C4/Acquisition.pm
t/db_dependent/Acquisition/CancelReceipt.t