Fix LP1177916, Cannot activate PO which contains only direct charges collab/dyrcona/lp1177916
authorSteven Chan <schan@sitka.bclibraries.ca>
Sat, 15 Jun 2013 17:06:43 +0000 (13:06 -0400)
committerJason Stephenson <jstephenson@mvlc.org>
Sat, 15 Jun 2013 17:24:25 +0000 (13:24 -0400)
commit0f090c3049545e335885aa8e7ff76742aa157ed9
tree1a1a5841540c98270144dcbf4bd48f5d25d74486
parent693ed63d2f3f92ef1be6d474c6d5b732e3b65912
Fix LP1177916, Cannot activate PO which contains only direct charges
We add a safety check in the function
Application/Acq/Order.pm/create_lineitem_list_assets(), which is called
by create_po_assets(), which is the service call initiated by the user
trying to activate a PO.

The safety check prevents the function from processing if there are no
line items specified in the arguments.

P.S. It would be better to stop the sequence of events earlier in the
client, but that will need more coding, which can been done in another
fix.

Signed-off-by: Steven Chan <schan@sitka.bclibraries.ca>
Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Order.pm