@@ -, +, @@ Recall pickup period to hours --- C4/Overdues.pm | 11 ++++++++++- .../bug_19532_-_alter_recalls_table_date_datatypes.sql | 3 +++ koha-tmpl/intranet-tmpl/prog/en/includes/recalls-reports.inc | 10 +++++----- koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt | 4 ++-- 4 files changed, 20 insertions(+), 8 deletions(-) create mode 100644 installer/data/mysql/atomicupdate/bug_19532_-_alter_recalls_table_date_datatypes.sql --- a/C4/Overdues.pm +++ a/C4/Overdues.pm @@ -38,6 +38,7 @@ use Koha::Account::Lines; use Koha::Account::Offsets; use Koha::IssuingRules; use Koha::Libraries; +use Koha::Recalls; use vars qw(@ISA @EXPORT); @@ -255,7 +256,15 @@ sub CalcFine { # If chargeperiod_charge_at = 1, we charge a fine at the start of each charge period # if chargeperiod_charge_at = 0, we charge at the end of each charge period $charge_periods = $issuing_rule->chargeperiod_charge_at == 1 ? ceil($charge_periods) : floor($charge_periods); - $amount = $charge_periods * $issuing_rule->fine; + + # check if item has been recalled. + my $currentrecall = Koha::Recalls->find({ itemnumber => $item->{itemnumber}, status => 'R' }); + if (defined $currentrecall) { + $amount = $charge_periods * $issuing_rule->recall_overdue_fine; + } else { + $amount = $charge_periods * $issuing_rule->fine; + } + } # else { # a zero (or null) chargeperiod or negative units_minus_grace value means no charge. } $amount = $issuing_rule->overduefinescap if $issuing_rule->overduefinescap && $amount > $issuing_rule->overduefinescap; --- a/installer/data/mysql/atomicupdate/bug_19532_-_alter_recalls_table_date_datatypes.sql +++ a/installer/data/mysql/atomicupdate/bug_19532_-_alter_recalls_table_date_datatypes.sql @@ -0,0 +1,3 @@ +ALTER TABLE recalls MODIFY column waitingdate datetime; +ALTER TABLE recalls MODIFY column expirationdate datetime; + --- a/koha-tmpl/intranet-tmpl/prog/en/includes/recalls-reports.inc +++ a/koha-tmpl/intranet-tmpl/prog/en/includes/recalls-reports.inc @@ -58,18 +58,18 @@ - [% IF recall.waitingdate %][% recall.waitingdate | $KohaDates %][% ELSE %]Not waiting[% END %] + [% IF recall.waitingdate %][% recall.waitingdate %][% ELSE %]Not waiting[% END %] [% IF ( recall.is_waiting ) %] [% IF ( recall.expirationdate ) %] - [% recall.expirationdate | $KohaDates %] + [% recall.expirationdate %] [% ELSE %] Never expires [% END %] [% ELSIF ( recall.has_expired && recall.expirationdate ) %] - [% recall.expirationdate | $KohaDates %] + [% recall.expirationdate %] [% ELSE %] - [% END %] @@ -97,9 +97,9 @@ [% IF ( recall.is_requested ) %] - Due to be returned by [% recall.checkout.date_due | $KohaDates %] + Due to be returned by [% recall.checkout.date_due %] [% ELSIF ( recall.is_waiting && recall.expirationdate ) %] - Pick up by [% recall.expirationdate | $KohaDates %] + Pick up by [% recall.expirationdate %] [% ELSE %] - [% END %] --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt @@ -95,9 +95,9 @@ Holds per record (count) On shelf holds allowed Item level holds - Recall due date interval (days) + Recall due date interval Recall overdue fine amount - Recall pickup period (days) + Recall pickup period Article requests Rental discount (%) Actions --