Koha-clms/t/db_dependent/Circulation
Kyle M Hall b1517ddac4 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>
(cherry picked from commit 1763b136d1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 662da18be2)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
(cherry picked from commit 7cb0a706cc)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2023-09-13 20:58:19 +00:00
..
Branch.t Bug 30714: Unit test 2022-05-18 17:22:08 -10:00
CalcDateDue.t Bug 31120: Add unit tests 2022-09-02 20:17:54 +00:00
CalcFine.t Bug 34279: Don't enforce overduefinescap unless it is greater than 0 2023-09-13 20:58:19 +00:00
CheckIfIssuedToPatron.t Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
CheckValidBarcode.t Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
GetHardDueDate.t Bug 28931: Use EXPORT_OK from Koha::DateUtils 2021-10-07 11:01:05 +02:00
GetPendingOnSiteCheckouts.t Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
GetTopIssues.t Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
IsItemIssued.t Bug 29788: Make Koha::Item->safe_to_delete use Koha::Result::Boolean 2022-01-11 12:38:35 -10:00
MarkIssueReturned.t Bug 30023: Make MarkIssueReturned use ->anonymize 2022-03-01 22:47:47 -10:00
NoIssuesChargeGuarantees.t Bug 22435: Update unit tests 2021-08-04 14:06:43 +02:00
OfflineCirculation.t Bug 30114: Add Unit Tests 2022-04-04 16:23:45 +02:00
OfflineOperation.t Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
ReturnClaims.t Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Returns.t Bug 28931: Use EXPORT_OK from Koha::DateUtils 2021-10-07 11:01:05 +02:00
StoreLastBorrower.t Bug 28931: Use EXPORT_OK from Koha::DateUtils 2021-10-07 11:01:05 +02:00
SwitchOnSiteCheckouts.t Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
TooMany.t Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
dateexpiry.t Bug 28931: Use EXPORT_OK from Koha::DateUtils 2021-10-07 11:01:05 +02:00
issue.t Bug 30668: Unit tests 2022-05-09 10:02:35 -10:00
maxsuspensiondays.t Bug 29705: In test suite merge IssuingRules with CirculationRules 2022-05-06 10:33:10 -10:00
transferbook.t Bug 30291: Changes to tests 2022-05-05 11:17:36 -10:00
transfers.t Bug 28931: Use EXPORT_OK from Koha::DateUtils 2021-10-07 11:01:05 +02:00