Bug 4502: Catch software error if no active budget defined
authorJonathan Druart <jonathan.druart@biblibre.com>
Tue, 24 Mar 2015 14:54:37 +0000 (15:54 +0100)
committerFrédéric Demians <f.demians@tamil.fr>
Sun, 29 Nov 2015 21:15:04 +0000 (22:15 +0100)
commite5d59cad73a4b6c16aca72bf478ce8df4e5f8f3e
treed114dcaeca7c3fe953b0ca54434df6486a4195d5
parent196eb9269b2ff963eff1528a4d8da5b2dac9c328
Bug 4502: Catch software error if no active budget defined

TEST PLAN
---------
0) Back up your database.
1) In mysql client:
   > DROP DATABASE {your koha database name};
   > CREATE DATABASE {your koha database name};
   > QUIT;
2) Go to the staff client, and install all the default
   and optional things -- except patrons. :)
3) Log into staff client.
4) Create a patron -> New Patron -> Staff
5) Enter data and Save
6) More -> Set Permissions
7) Make superlibrarian
8) Log out
9) Log in as new superlibrarian
10) Acquisitions -> Budgets -> New Budget
11) Enter a non-active budget with some funds.
    -- Once saved, it should list in the inactive budgets.
12) Click on the name.
13) Click on one of the Planning submenu options.
14) Click the 'Submit' button in the Filter area.
    -- This should trigger the blow up.
15) Apply the patch
16) Repeat steps 12-15
    -- The kaboom is avoided and a nice message given.

NOTE: This does not solve all the problems in this ugly, ugly
      module area. It does solve the one thing it is meant to:
      that nasty kaboom.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0a391237710aec779b000c3dff219e54b22fb76a)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
admin/aqplan.pl
koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqplan.tt