Bug 10664: fix error in overdue_notices.pl if there is no active currency

If there is no active currency, when running overdue_notices.pl
you get a sofware error "Can't use an undefined value as a HASH
reference" on GetCurrency() function call.

With this patch, if there is no active currency, fines are formated
by default 0.00 and notices are correctly generated.

Test plan :
- have at least one borrower with overdue that should trigger a notice
- verify that there is no active currency (Adminitration > Currency &
  Exchange rates)
- run misc/cronjobs/overdue_notices.pl -v -n (to get the notice directly
  on output)

=> without the patch you get the software error
=> with the patch, notices are correctly generated

If an active currency is defined, the script overdue_notices.pl runs
the same with or without patch

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10664 [QA Followup] - fix error in overdue_notices.pl if there is no active currency

Fixes the following koha-qa.pl error:
 FAIL   misc/cronjobs/overdue_notices.pl
    OK     pod
    OK     forbidden patterns
    OK     valid
    FAIL   critic
               # Variables::ProhibitConditionalDeclarations:

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10703: Add db documentation for biblioimages table

This patch adds db documentation to the biblioimages table.

To test:

Apply patch
Review kohastructure.sql to be sure that the documentation is there

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

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10703: Document quotes table

Add db documentation for the quotes table

To test:

apply patch
review kohastructure.sql to be sure documentation is there

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

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10703: Document borrower_files table

Add db documentation to borrower_files table.

To test:

apply
review kohastructure.sql to be sure documentation is there

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Comment: No errors. Tested loading on new database.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10716: fix JavaScript error on basket groups page

To test:

Go on acqui/basketgroup.tt and verify a js error occurred
(ReferenceError: CONFIG_EXCLUDE_ARTICLES_FROM_SORT is not defined).
Apply the patch and verify the error does not appear anymore.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10481: FIX No enrollment fee when changing patron category.

When a patron changes to a category with enrollment fee, they
are not generated.

Test plan:
- Choose a category without fee (e.g. Kid)
- Add an enrollment fee for another category (e.g. Young adult)
- Choose a kid and change his category to "Young adult".
- Note the warning message "Fees & Charges: Patron has Outstanding fees
  & charges of XX" on the check out page.

This patch also moves all instances of adding the enrollment fee
to a new routine in C4::Members, AddEnrolmentFeeIfNeeded(), so
additional tests include:

- Register a new patron and give it a category that has
  an enrollment fee.  Verify that the fee is charged.
- Renew the patron.  Verify that the additional fee is charged.
- Register a new patron with a child patron category.
- Use the 'update child to adult' menu option to change the
  patron's category to one that is fee-bearing.  Verify that the
  enrollment fee was charged.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10481: Unit tests for C4::Members::AddEnrolmentFeeIfNeeded

prove t/db_dependent/Members/AddEnrolmentFeeIfNeeded.t
t/db_dependent/Members/AddEnrolmentFeeIfNeeded.t .. ok
All tests successful.
Files=1, Tests=3,  0 wallclock secs ( 0.02 usr  0.00 sys +  0.38 cusr
0.01 csys =  0.41 CPU)
Result: PASS

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10481: (follow-up) fix typo in POD

Signed-off-by: Galen Charlton <gmc@esilibrary.com>