View | Details | Raw Unified | Return to bug 19532
Collapse All | Expand All

(-)a/C4/Overdues.pm (-1 / +10 lines)
Lines 38-43 use Koha::Account::Lines; Link Here
38
use Koha::Account::Offsets;
38
use Koha::Account::Offsets;
39
use Koha::IssuingRules;
39
use Koha::IssuingRules;
40
use Koha::Libraries;
40
use Koha::Libraries;
41
use Koha::Recalls;
41
42
42
use vars qw(@ISA @EXPORT);
43
use vars qw(@ISA @EXPORT);
43
44
Lines 255-261 sub CalcFine { Link Here
255
        # If chargeperiod_charge_at = 1, we charge a fine at the start of each charge period
256
        # If chargeperiod_charge_at = 1, we charge a fine at the start of each charge period
256
        # if chargeperiod_charge_at = 0, we charge at the end of each charge period
257
        # if chargeperiod_charge_at = 0, we charge at the end of each charge period
257
        $charge_periods = $issuing_rule->chargeperiod_charge_at == 1 ? ceil($charge_periods) : floor($charge_periods);
258
        $charge_periods = $issuing_rule->chargeperiod_charge_at == 1 ? ceil($charge_periods) : floor($charge_periods);
258
        $amount = $charge_periods * $issuing_rule->fine;
259
260
        # check if item has been recalled.
261
        my $currentrecall = Koha::Recalls->find({ itemnumber => $item->{itemnumber}, status => 'R' });
262
        if (defined $currentrecall) {
263
            $amount = $charge_periods * $issuing_rule->recall_overdue_fine;
264
        } else {
265
            $amount = $charge_periods * $issuing_rule->fine;
266
        }
267
259
    } # else { # a zero (or null) chargeperiod or negative units_minus_grace value means no charge. }
268
    } # else { # a zero (or null) chargeperiod or negative units_minus_grace value means no charge. }
260
269
261
    $amount = $issuing_rule->overduefinescap if $issuing_rule->overduefinescap && $amount > $issuing_rule->overduefinescap;
270
    $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 (+3 lines)
Line 0 Link Here
1
ALTER TABLE recalls MODIFY column waitingdate datetime;
2
ALTER TABLE recalls MODIFY column expirationdate datetime;
3
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/recalls-reports.inc (-5 / +5 lines)
Lines 58-75 Link Here
58
                    </td>
58
                    </td>
59
59
60
                    <td class="recall-waiting">
60
                    <td class="recall-waiting">
61
                        [% IF recall.waitingdate %][% recall.waitingdate | $KohaDates %][% ELSE %]Not waiting[% END %]
61
                        [% IF recall.waitingdate %][% recall.waitingdate %][% ELSE %]Not waiting[% END %]
62
                    </td>
62
                    </td>
63
63
64
                    <td class="recall-expiry">
64
                    <td class="recall-expiry">
65
                        [% IF ( recall.is_waiting ) %]
65
                        [% IF ( recall.is_waiting ) %]
66
                            [% IF ( recall.expirationdate ) %]
66
                            [% IF ( recall.expirationdate ) %]
67
                                [% recall.expirationdate | $KohaDates %]
67
                                [% recall.expirationdate  %]
68
                            [% ELSE %]
68
                            [% ELSE %]
69
                                Never expires
69
                                Never expires
70
                            [% END %]
70
                            [% END %]
71
                        [% ELSIF ( recall.has_expired && recall.expirationdate ) %]
71
                        [% ELSIF ( recall.has_expired && recall.expirationdate ) %]
72
                            [% recall.expirationdate | $KohaDates %]
72
                            [% recall.expirationdate %]
73
                        [% ELSE %]
73
                        [% ELSE %]
74
                            -
74
                            -
75
                        [% END %]
75
                        [% END %]
Lines 97-105 Link Here
97
97
98
                    <td class="recall-due_date">
98
                    <td class="recall-due_date">
99
                        [% IF ( recall.is_requested ) %]
99
                        [% IF ( recall.is_requested ) %]
100
                            Due to be returned by [% recall.checkout.date_due | $KohaDates %]
100
                            Due to be returned by [% recall.checkout.date_due %]
101
                        [% ELSIF ( recall.is_waiting && recall.expirationdate ) %]
101
                        [% ELSIF ( recall.is_waiting && recall.expirationdate ) %]
102
                            Pick up by [% recall.expirationdate | $KohaDates %]
102
                            Pick up by [% recall.expirationdate %]
103
                        [% ELSE %]
103
                        [% ELSE %]
104
                            -
104
                            -
105
                        [% END %]
105
                        [% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt (-3 / +2 lines)
Lines 95-103 Link Here
95
                <th>Holds per record (count)</th>
95
                <th>Holds per record (count)</th>
96
                <th>On shelf holds allowed</th>
96
                <th>On shelf holds allowed</th>
97
                <th>Item level holds</th>
97
                <th>Item level holds</th>
98
                <th>Recall due date interval (days)</th>
98
                <th>Recall due date interval</th>
99
                <th>Recall overdue fine amount</th>
99
                <th>Recall overdue fine amount</th>
100
                <th>Recall pickup period (days)</th>
100
                <th>Recall pickup period</th>
101
                <th>Article requests</th>
101
                <th>Article requests</th>
102
                <th>Rental discount (%)</th>
102
                <th>Rental discount (%)</th>
103
                <th>Actions</th>
103
                <th>Actions</th>
104
- 

Return to bug 19532