From 56b171f84bdf85116b57b5be609360ee6d97164d Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Tue, 14 May 2019 13:17:34 +0000 Subject: [PATCH] Bug 22802: Check item funds, order funds, and default funds when ordering from a file This patch tries to centralise the logic of order funds requirements into a single routine. If propogates defaults down into items/order as necessary, it also prevents unsetting lower values if a default is set. To test: 1 - Populate 'MarcItemFieldsToOrder' 2 - Add to a basket from a file 3 - Use a file containing some item records with funds defined or not 4 - Confirm if all items have funds defined, you can order 5 - Confirm that setting the default for an order populates items and you can order 6 - Confirm that setting the default for all orders populates items if present/ order if not 7 - Confirm that if defaults are set the lower levels cannot be unset 8 - Try various settings and confirm all work as expected Signed-off-by: Liz Rea Signed-off-by: Martin Renvoize --- .../prog/en/modules/acqui/addorderiso2709.tt | 9 +- .../intranet-tmpl/prog/js/addorderiso2709.js | 94 +++++++++++++------ 2 files changed, 68 insertions(+), 35 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt index 9947df5704..ebf19684b0 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt @@ -129,7 +129,7 @@ [% ELSE %]
  • -
  • + [% FOREACH budget_loo IN budget_loop %] [% IF ( budget_loo.b_id ) == ( item.budget_id ) %] [% ELSE %] [% END %] [% END %] + Required
  • @@ -339,7 +340,7 @@