Bug 7639: add option to forgive overdue fines when declaring items lost

This patch adds functionality to forgive overdue fine when an item is
set to lost status.  Fines are forgiven only when the syspref
WhenLostForgiveFine is set to yes. Item can be set to lost status from:

- catalogue/moredetail.pl
- cataloguing/additem.pl
- tools/batchMod.pl
- misc/cronjobs/longoverdue.pl

Changed subroutine C4::Circulation::LostItem to forgive fines on the
item depending on the value of syspref WhenLostForgiveFine. This
routine is currently used to return an item and charge a replacement
cost.

Also added a new syspref in C4::Circulation::LostItem -
WhenLostChargeReplacementFee.  The replacement fee will now be charged
only if this syspref is set to yes.  The default value of the
WhenLostChargeReplacementFee is yes, meaning that current behavior
will not change during upgrade.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Alex Hatley <alexh@cctexas.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Testing notes on last patch in series.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 7639 - system preference to forgive fines on lost items - QA Followup

Test Plan:
 1) Apply the patch
 2) Run updatedatabase.pl
 3) Set WhenLostForgiveFine to Forgive & WhenLostChargeReplacementFee to Charge
 4) Issue an item to a borrower, then set to lost from catalogue/moredetail.pl
 5) Observe the replacement fee has been charged
 6) Return the item
 7) Observe the charged fee has been forgiven
 8) Set WhenLostForgiveFine to Don't Forgive
 9) Repeat 4-6
10) Observe the charged fee has not been forgiven
11) Set WhenLostChargeReplacementFee to Don't Charge
12) Repeat 4
13) Observe that a fee was not charged

Signed-off-by: Alex Hatley <alexh@cctexas.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 7639: tiny QA follow-up

no need to create a variable just to call to send it as parameter the line after

Signed off by: Alex Hatley <alexh@cctexas.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 7639: QA Followup - Fix update description

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
With these patches we now have 3 preferences that deal with
fines/fees and lost items:

Replacement price
- On marking lost:  WhenLostChargeReplacementFee
- On return: RefundLostItemFeeOnReturn (preexisting)

Overdue fines
- On marking lost: WhenLostForgiveFine

System preferences work according to their description.

Further notes:
- Patches pass all tests and QA script.
- LostItem is changed and needs unit tests.
  All occurrences of LostItem have been changed.
- Database update is ok. I had to fix the sysprefs.sql
  file that has been recently rewritten and alphabetized.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 7639: (follow-up) add Unit Tests

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
All tests and QA script pass.
I fixed a redundant 'my' that the QA script pointed out.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 7639: DBRev 3.13.00.020

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10897: remove test for module that has become DB-dependent

This is an alternative appraoch to fixing this bug; as the
compilation test for C4::ILSDI::Services also resides
in t/db_dependent/ILSDI_Services.t, we don't need t/ILSDI_Services.t
at present.

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