Bug 20426: Fix default fund value when adding orders from iso2709 file
commit62c99195157829ce31e87f7b05eb294c297d43b5
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 2 Apr 2018 15:56:21 +0000 (2 12:56 -0300)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 12 Apr 2018 13:50:38 +0000 (12 10:50 -0300)
treeeed5dfa02e8e2e21b3e01122fc98bb954cf27920
parentb4b558fc2242b0a10e30ad7ec57d2c1f9d66d1f5
Bug 20426: Fix default fund value when adding orders from iso2709 file

A new bug has been highlighted since:
  commit b830349f45007629f141a9835e05b95f90ee4b92
  Bug 19453: Incorrect jQuery selector for fund drop down validation

Prior to bug 19453 the check on the existence of the fund did not work
as expected, no select with name='budget_code' existed and the error was
never raised.
Now it works but expect a fund to be selected for every record to
import.
This check must only be done if there is no default value selected.

Test plan:
- Create an order from a staged file
- Do not select any funds
=> You must get a warning
- Select a specific fund for some of the records
=> You must get a warning
- Select a default fund in the last tab
=> You must not get a warning and the records must be imported and
inserted with the correct fund

Signed-off-by: Sonia Bouis <sonia.bouis@univ-lyon3.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt