It would be nice to be able to unreceive an item in acquisitions - or undo a receipt if you happen to have clicked the wrong title or a title by accident
There is a BibLibre development which do what you want, but it depends on Bug 5336 which depends on Bug 7294 which is waiting for signoff. BibLibre repository: http://git.biblibre.com/koha_biblibre.git Branch: itt/ft/MT8378 (commit ed0e9e7ebcdf61c6ab17f4f68f219577754d5a6b)
Created attachment 11439 [details] [review] Bug 7583: Cancel a receipt In acqui/parcel.pl, there is now the possibility to cancel a receipt. In "Already received" table, just click on "Cancel receipt" and the order line will go back to pending orders. If it was a partial receipt, order line is merged to its 'parent' line. Attached items are modified so that they become attached to the merged order line. If AcqCreateItem is 'receiving', attached items are deleted. If an order line was first partially received, and then completed, you must cancel the 'parent' order line before cancelling the 'child'.
Patch was modified so that it's not dependant anymore on other bugs.
Created attachment 11547 [details] [review] [SIGNED-OFF] Bug 7583: Cancel a receipt In acqui/parcel.pl, there is now the possibility to cancel a receipt. In "Already received" table, just click on "Cancel receipt" and the order line will go back to pending orders. If it was a partial receipt, order line is merged to its 'parent' line. Attached items are modified so that they become attached to the merged order line. If AcqCreateItem is 'receiving', attached items are deleted. If an order line was first partially received, and then completed. You must cancel the 'parent' order line before cancelling the 'child'. Signed-off-by: Marc Veron <veron@veron.ch> The patch behaves like expected, and the feature is really helpfull. Just a tiny remark about the following message: ------------- Cannot cancel receipt. Possible reasons : You are trying to cancel the receipt of an order line whose parent order line is already received. Cancel this parent order line and retry. ------------- Maybe it would be good - to explain a little bit more why it happend and re-word the message for non technical people (not everybody understands 'parent' the same way) - prevent the situation to happen (e.g. forbid order lines to be deleted if they are already received) - but that would be in the scope of an other bug, I think. I think such things could be fixed in the future during the ongoing work for Acquisitions module. Signing off.
Created attachment 11577 [details] [review] Bug 7583 follow-up: Prevent users to cancel receipt if they can't Disable the link for cancelling instead of displaying an error message after the click. This is only valid if parent order line is received, not if it's deleted. When the user gets his mouse over the disabled link, he gets a message telling him which order (ordernumber) blocks him so he knows immediately which receipt to cancel. Also improve error messages for non technical people
(In reply to comment 4) > I think such things could be fixed in the future during the ongoing work for > Acquisitions module. Signing off. I think this could be also fixed now ;-) This patch prevent the user to be confronted to an error message when parent order line is already received.
Nice work Julian, it works well
Created attachment 11590 [details] [review] Bug 7583 follow-up: Prevent users to cancel receipt if they can't Disable the link for cancelling instead of displaying an error message after the click. This is only valid if parent order line is received, not if it's deleted. When the user gets his mouse over the disabled link, he gets a message telling him which order (ordernumber) blocks him so he knows immediately which receipt to cancel. Also improve error messages for non technical people Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
QA Comments: All works great and the code is clean. Nothing to say. Marked as Passed QA.
Created attachment 12037 [details] [review] Bug 7583: Cancel a receipt In acqui/parcel.pl, there is now the possibility to cancel a receipt. In "Already received" table, just click on "Cancel receipt" and the order line will go back to pending orders. If it was a partial receipt, order line is merged to its 'parent' line. Attached items are modified so that they become attached to the merged order line. If AcqCreateItem is 'receiving', attached items are deleted. If an order line was first partially received, and then completed. You must cancel the 'parent' order line before cancelling the 'child'. Signed-off-by: Marc Veron <veron@veron.ch> The patch behaves like expected, and the feature is really helpfull. Just a tiny remark about the following message: ------------- Cannot cancel receipt. Possible reasons : You are trying to cancel the receipt of an order line whose parent order line is already received. Cancel this parent order line and retry. ------------- Maybe it would be good - to explain a little bit more why it happend and re-word the message for non technical people (not everybody understands 'parent' the same way) - prevent the situation to happen (e.g. forbid order lines to be deleted if they are already received) - but that would be in the scope of an other bug, I think. I think such things could be fixed in the future during the ongoing work for Acquisitions module. Signing off.
Created attachment 12038 [details] [review] Bug 7583 follow-up: Prevent users to cancel receipt if they can't Disable the link for cancelling instead of displaying an error message after the click. This is only valid if parent order line is received, not if it's deleted. When the user gets his mouse over the disabled link, he gets a message telling him which order (ordernumber) blocks him so he knows immediately which receipt to cancel. Also improve error messages for non technical people Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Rebased patches
(In reply to comment #12) > Rebased patches Epic fail: syntax error at acqui/parcel.pl line 84, near ");" Global symbol "$datereceived" requires explicit package name at acqui/parcel.pl line 85. Global symbol "$datereceived" requires explicit package name at acqui/parcel.pl line 85.
Created attachment 12169 [details] [review] Bug 7583: Cancel a receipt In acqui/parcel.pl, there is now the possibility to cancel a receipt. In "Already received" table, just click on "Cancel receipt" and the order line will go back to pending orders. If it was a partial receipt, order line is merged to its 'parent' line. Attached items are modified so that they become attached to the merged order line. If AcqCreateItem is 'receiving', attached items are deleted. If an order line was first partially received, and then completed. You must cancel the 'parent' order line before cancelling the 'child'. Signed-off-by: Marc Veron <veron@veron.ch> The patch behaves like expected, and the feature is really helpfull. Just a tiny remark about the following message: ------------- Cannot cancel receipt. Possible reasons : You are trying to cancel the receipt of an order line whose parent order line is already received. Cancel this parent order line and retry. ------------- Maybe it would be good - to explain a little bit more why it happend and re-word the message for non technical people (not everybody understands 'parent' the same way) - prevent the situation to happen (e.g. forbid order lines to be deleted if they are already received) - but that would be in the scope of an other bug, I think. I think such things could be fixed in the future during the ongoing work for Acquisitions module. Signing off.
Created attachment 12170 [details] [review] Bug 7583 follow-up: Prevent users to cancel receipt if they can't Disable the link for cancelling instead of displaying an error message after the click. This is only valid if parent order line is received, not if it's deleted. When the user gets his mouse over the disabled link, he gets a message telling him which order (ordernumber) blocks him so he knows immediately which receipt to cancel. Also improve error messages for non technical people Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
(In reply to comment #13) > Epic fail: > > syntax error at acqui/parcel.pl line 84, near ");" > Global symbol "$datereceived" requires explicit package name at > acqui/parcel.pl line 85. > Global symbol "$datereceived" requires explicit package name at > acqui/parcel.pl line 85. Outch sorry ! A parenthesis was missing after the conflict, I solved it like: -my $datereceived = ($op eq ('new' or 'search' ) +my $datereceived = ( $op eq ('new' or 'search' ) )
Patch pushed to master I've pushed the patch, but ask for a small follow-up = asking for a confirmation when you click on "cancel receipt". One would say that you can recieve again if you want. That's true. But you could inadvertently delete an existing item if AcqCreateItem is 'receiving' ! So a confirmation would be more safe.
Ok in master. Marked as RESOLVED