From a7da92333d5a6d154f420dc76e843c9b799bbce2 Mon Sep 17 00:00:00 2001 From: Petro Vashchuk Date: Fri, 6 Aug 2021 14:37:07 +0300 Subject: [PATCH] Bug 25711: add comment to clarify how the method works --- Koha/CirculationRules.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Koha/CirculationRules.pm b/Koha/CirculationRules.pm index fd9ec35329..09a56b6adc 100644 --- a/Koha/CirculationRules.pm +++ b/Koha/CirculationRules.pm @@ -602,6 +602,9 @@ sub get_effective_expire_reserves_charge { } ); + # we return the value of the system preferencein case the circulation rule wasn't found + # (this should be the case when we saved empty field in a form for a circulation rule), + # and when the rule is found, it returns the value of it including 0 return $expire_reserves_charge_rule ? $expire_reserves_charge_rule->rule_value : C4::Context->preference("ExpireReservesMaxPickUpDelayCharge"); } -- 2.31.1