Koha-clms/t/db_dependent/Circulation
Jonathan Druart 5ca21e35c6 Bug 24138: Fix calculation of suspension days when a limit is set
If there is a limit for the number of suspension days
(maxsuspensiondays), the calculation is wrong. We are reducing the
number of days before taking into account the suspension charging
interval.

For instance, a checkin is 1 year late and the circ rules are defined to
charge 7 days every 15 days.
It results in 365 * 7 / 15 days of suspension => 170 days

Before this patch the calculation was:
365 * 7 limited to 333, 333 / 15 => 22 days

Test plan:
Given the examples in the commit messages and the description of the bug
report, setup complex circulation rules and confirm that the debarment
dates are calculated correctly

Signed-off-by: Hugo Agud <hagud@orex.es>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 17eabbf4bf)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-12-20 17:13:12 +00:00
..
IssuingRules Bug 24138: Fix calculation of suspension days when a limit is set 2019-12-20 17:13:12 +00:00
Branch.t Bug 18925: (follow-up) Change name of rule to fix ambiguity 2019-03-05 20:41:42 +00:00
CalcDateDue.t Bug 11580: Add one more test and clear the cache 2017-09-06 12:52:48 -03:00
CalcFine.t Bug 18344: Add unit tests 2019-06-11 17:29:46 +02:00
CheckIfIssuedToPatron.t Bug 14334: Remove AutoCommit from tests 2018-12-14 13:42:37 +00:00
CheckValidBarcode.t Bug 14334: Remove AutoCommit from tests 2018-12-14 13:42:37 +00:00
GetHardDueDate.t Bug 18925: (QA follow-up) Remove weird 'Null' values for integer column 2019-03-06 13:34:32 +00:00
GetPendingOnSiteCheckouts.t Bug 21133: Fix use statements order 2018-07-31 16:28:02 -03:00
GetTopIssues.t Bug 20287: Replace occurrences of AddMember with Koha::Patron->new->store->borrowernumber 2018-07-18 15:49:47 +00:00
IsItemIssued.t Bug 21206: Replace C4::Items::GetItem 2019-02-26 13:24:07 +00:00
MarkIssueReturned.t Bug 22049: Do not pass Koha::Patron to AddIssue 2019-02-22 14:56:32 +00:00
NoIssuesChargeGuarantees.t Bug 22600: Update Tests adding 'interface' as needed 2019-04-10 19:43:11 +00:00
OfflineOperation.t Bug 14334: Remove AutoCommit from tests 2018-12-14 13:42:37 +00:00
Returns.t Bug 14576: Unit tests 2019-04-25 11:36:24 +00:00
StoreLastBorrower.t Bug 14591: Update unit tests 2019-03-15 12:14:03 +00:00
SwitchOnSiteCheckouts.t Bug 18925: Move maxissueqty and maxonsiteissueqty to circulation_rules 2019-03-05 20:41:42 +00:00
TooMany.t Bug 23404: Change UT calls 2019-09-13 14:35:08 +02:00
dateexpiry.t Bug 19943: Fix dateexpiry.t - create the biblioitem entry 2018-03-23 13:24:15 -03:00
issue.t Bug 14576: Rebase fixes Fix test Rebase code 2019-04-25 11:36:24 +00:00
transferbook.t Bug 23679: add Unit Test t/db_dependent/Circulation/transferbook.t 2019-10-08 09:46:00 +02:00
transfers.t Bug 21133: Fix use statements order 2018-07-31 16:28:02 -03:00