Koha/t/db_dependent/Circulation
Kyle M Hall 1763b136d1
Bug 34279: Don't enforce overduefinescap unless it is greater than 0
When creating a circ rule, we can set overduefinescap to blank or 0 and no cap is enforced. If we edit that rule, the blank/0 is converted to "0.00" which perl considers true, thus zero-ing out any calculated fine.

Considering we've always ignored an overdue fines cap of 0, we should also ignore 0.00. However, perl is evaluating it as a string which makes it true instead of false as 0 is.

Test Plan:
1) Apply the first patch ( unit tests )
2) prove t/db_dependent/Circulation/CalcFine.t
3) Note the test fails
4) Apply the second patch as well
5) prove t/db_dependent/Circulation/CalcFine.t
6) Note the test passes

Test Plan 2:
1) Create an all/all/all rule with an overduefinescap of 0.00, with a
   daily fine. Enable CalculateFinesOnReturn
2) Backdate a checkout so it is overdue
3) Return this item, note the lack of a fine
4) Apply this patch set
5) Backdate a checkout and return it again
6) Note the fine is generated!

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-07-19 13:00:41 -03:00
..
_CalculateAndUpdateFine.t Bug 27259: Test HomeOrHoldingBranch usage in _CalculateAndUpdateFine() 2022-11-04 19:04:18 -03:00
Branch.t Bug 25426: (QA follow-up) Make subtest stand on its own 2022-10-18 09:35:17 -03:00
CalcDateDue.t
CalcFine.t Bug 34279: Don't enforce overduefinescap unless it is greater than 0 2023-07-19 13:00:41 -03:00
CheckIfIssuedToPatron.t
CheckValidBarcode.t
dateexpiry.t
GetHardDueDate.t Bug 29144: Remove opac_info from a few tests 2022-09-16 09:55:20 -03:00
GetPendingOnSiteCheckouts.t
GetTopIssues.t
IsItemIssued.t
issue.t Bug 33444: Update AddRenewal to take a hashref of params 2023-07-19 12:06:52 -03:00
MarkIssueReturned.t Bug 31095: Remove GetDebarments from MarkIssueReturned.t 2023-01-31 10:19:39 -03:00
maxsuspensiondays.t Bug 31095: Remove GetDebarments from maxsuspensiondays.t 2023-01-31 10:19:39 -03:00
NoIssuesChargeGuarantees.t Bug 32351: Fix t/db_dependent/Circulation/NoIssuesChargeGuarantees.t 2022-11-30 15:58:20 -03:00
OfflineCirculation.t
OfflineOperation.t Bug 29144: Remove opac_info from a few tests 2022-09-16 09:55:20 -03:00
ReturnClaims.t
Returns.t Bug 31735: Avoid re-fetcing objects from database by passing them directly instead of ids to various subroutines 2023-05-12 12:40:21 -03:00
StoreLastBorrower.t Bug 32894: (follow-up) Koha::Item->last_returned_by 2023-06-07 16:44:04 -03:00
SwitchOnSiteCheckouts.t
TooMany.t Bug 27259: Test HomeOrHoldingBranch usage in TooMany() 2022-11-04 19:04:17 -03:00
transferbook.t Bug 31735: Avoid re-fetcing objects from database by passing them directly instead of ids to various subroutines 2023-05-12 12:40:21 -03:00
transfers.t Bug 24295: Finally remove GetTransfers from C4/Circulation 2022-08-26 15:42:56 -03:00