To reproduce: 1) In acquisitions, add a new order to a basket 2) Select "From an external source" 3) Add some search terms, and hit search 4) On one of the results, hit 'order' 5) Fill out the 'new order' page 6) Watch the system fail and say "Mandatory parameter budget_id missing at /usr/share/koha/lib/C4/Acquisition.pm line 903." Note: this only happens if you have no budgets defined. Expected result: You can't get past step 2, because koha pipes up and says "hey, add some budgets first."
Created attachment 2433 [details] [review] proposed patch
*** Bug 5061 has been marked as a duplicate of this bug. ***
Colin commented on bug 5061, that this bug is also related to 3616. Colin: 'The bug is related to 3616 but needs a separate fix. In Acquisitions.pm the error message is issued via a die. die is not a user friendly way to handle error conditions.'
While I haven't tested it, I suspect that #3616 is solved by this as well, as this corrects the workflow to prevent the user getting to the point of trying to enter a new order if it would fail further down the track.
Hi Robin, your patch contains changes to a .gitignore file. Can you please resubmit without it?
Created attachment 4802 [details] [review] Bug 5072 - prevent creating new orders if there are no valid budgets On the basket editing screen, the links to add orders to a basket are hidden unless a valid fund is available.
Created attachment 4803 [details] [review] Bug 5072 : Template changes
Created attachment 4804 [details] [review] [SIGNED-OFF] Bug 5072 : Template changes Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Created attachment 4805 [details] [review] [SIGNED-OFF] Bug 5072 - prevent creating new orders if there are no valid budgets On the basket editing screen, the links to add orders to a basket are hidden unless a valid fund is available. Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Retested this on current master. If you try to save a order in acquisitions you get an alert now that you have to choose a fund first. If you have no funds defined, you can't save, but you don't get a perl error message any longer. With patch you can not add order line to a basket before you have created a fund and a budget. The patch does not check if you are allowed to spend on that budget. But it's an improvement over current behaviour.
Created attachment 4818 [details] [review] proposed patch (passed QA)
Created attachment 4819 [details] [review] proposed patch (passed QA) QA comment: * patch addresses the problem * The 2nd patch also contains an undocumented fix in POD doc of the .pm. Thanks Katrin for fixing, shame for not saying it. Outside from this -very minor- comment, passed QA (+no DB change)
Pushed please test
*** Bug 4111 has been marked as a duplicate of this bug. ***
This works, but there is a small follow up to prevent the message from showing up on the 'order from suggestion' page (bug 6994)
There have been no further reports of problems so I am marking this bug resolved.