When adding an order the option to select a fund is limited to active funds, with the option to show inactive ones. The receive shipment form has a similar option to choose a fund. It should be consistent with the other page, with the same default and options.
Created attachment 12507 [details] [review] Bug 8821 - Receive shipment page should hide inactive funds like new order form This patch adapts the fund-handling code from neworderempty.pl in order to limit the display of funds by default to active ones, with the option to check a box to display all funds. To test, make sure you have both active and inactive funds. Start the process of receiving a shipment. The "fund" option in the receive shipment form should show only active funds. Checking the "show all" checkbox should allow you to choose from both active and inactive funds.
Forgot about the changes which had been pending to neworderempty.pl in Bug 8659. I need to integrate those into this patch.
I just ran into this on master.
Created attachment 19793 [details] [review] Bug 8821 - Receive shipment page should hide inactive funds like new order form This patch adapts the fund-handling code from neworderempty.pl in order to limit the display of funds by default to active ones, with the option to check a box to display all funds. This patch also adds "(inactive)" to the display of funds on this and the neworderempty.tt template because it seemed like that was useful information. To test, make sure you have both active and inactive funds. Start the process of receiving a shipment. The "fund" option in the receive shipment form should show only active funds. Checking the "show all" checkbox should allow you to choose from both active and inactive funds.
Hi Owen, Can I assume that the first patch is obsolete?
Created attachment 20074 [details] [review] Bug 8821 - Receive shipment page should hide inactive funds like new order form This patch adapts the fund-handling code from neworderempty.pl in order to limit the display of funds by default to active ones, with the option to check a box to display all funds. This patch also adds "(inactive)" to the display of funds on this and the neworderempty.tt template because it seemed like that was useful information. To test, make sure you have both active and inactive funds. Start the process of receiving a shipment. The "fund" option in the receive shipment form should show only active funds. Checking the "show all" checkbox should allow you to choose from both active and inactive funds. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
QA comment: Same code from neworderempty.pl is used on parcels.pl but not easy to refactore. The JS code should certainly be simplified. But it works. Marked as Passed QA.
Created attachment 20630 [details] [review] Bug 8821 - Receive shipment page should hide inactive funds like new order form This patch adapts the fund-handling code from neworderempty.pl in order to limit the display of funds by default to active ones, with the option to check a box to display all funds. This patch also adds "(inactive)" to the display of funds on this and the neworderempty.tt template because it seemed like that was useful information. To test, make sure you have both active and inactive funds. Start the process of receiving a shipment. The "fund" option in the receive shipment form should show only active funds. Checking the "show all" checkbox should allow you to choose from both active and inactive funds. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Hi Jonathan - should this be passed QA?
Yes of course, I forgot to change the status.
Pushed to master. Thanks, Owen!
This patch has been pushed to 3.12.x, will be in 3.12.7. Thanks Owen!