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

(-)a/Koha/Account.pm (-3 / +3 lines)
Lines 446-452 my $debit_line = Koha::Account->new({ patron_id => $patron_id })->add_debit( Link Here
446
$debit_type can be any of:
446
$debit_type can be any of:
447
  - ACCOUNT
447
  - ACCOUNT
448
  - ACCOUNT_RENEW
448
  - ACCOUNT_RENEW
449
  - hold_expired
449
  - RESERVE_EXPIRED
450
  - lost_item
450
  - lost_item
451
  - sundry
451
  - sundry
452
  - new_card
452
  - new_card
Lines 720-726 our $offset_type = { Link Here
720
    'RENT_DAILY_RENEW' => 'Rental Fee',
720
    'RENT_DAILY_RENEW' => 'Rental Fee',
721
    'overdue'          => 'OVERDUE',
721
    'overdue'          => 'OVERDUE',
722
    'manual_debit'     => 'Manual Debit',
722
    'manual_debit'     => 'Manual Debit',
723
    'hold_expired'     => 'Hold Expired'
723
    'RESERVE_EXPIRED'  => 'Hold Expired'
724
};
724
};
725
725
726
=head3 $account_type_credit
726
=head3 $account_type_credit
Lines 742-748 our $account_type_credit = { Link Here
742
our $account_type_debit = {
742
our $account_type_debit = {
743
    'ACCOUNT'          => 'ACCOUNT',
743
    'ACCOUNT'          => 'ACCOUNT',
744
    'ACCOUNT_RENEW'    => 'ACCOUNT_RENEW',
744
    'ACCOUNT_RENEW'    => 'ACCOUNT_RENEW',
745
    'hold_expired'     => 'HE',
745
    'RESERVE_EXPIRED'  => 'RESERVE_EXPIRED',
746
    'lost_item'        => 'LOST',
746
    'lost_item'        => 'LOST',
747
    'sundry'           => 'M',
747
    'sundry'           => 'M',
748
    'new_card'         => 'N',
748
    'new_card'         => 'N',
(-)a/Koha/Hold.pm (-1 / +1 lines)
Lines 373-379 sub cancel { Link Here
373
                        user_id    => C4::Context->userenv ? C4::Context->userenv->{'number'} : undef,
373
                        user_id    => C4::Context->userenv ? C4::Context->userenv->{'number'} : undef,
374
                        interface  => C4::Context->interface,
374
                        interface  => C4::Context->interface,
375
                        library_id => C4::Context->userenv ? C4::Context->userenv->{'branch'} : undef,
375
                        library_id => C4::Context->userenv ? C4::Context->userenv->{'branch'} : undef,
376
                        type       => 'hold_expired',
376
                        type       => 'RESERVE_EXPIRED',
377
                        item_id    => $self->itemnumber
377
                        item_id    => $self->itemnumber
378
                    }
378
                    }
379
                );
379
                );
(-)a/installer/data/mysql/account_debit_types.sql (-2 / +2 lines)
Lines 1-7 Link Here
1
INSERT INTO account_debit_types ( code, description, can_be_added_manually, default_amount, is_system ) VALUES
1
INSERT INTO account_debit_types ( code, description, can_be_added_manually, default_amount, is_system ) VALUES
2
('ACCOUNT', 'Account creation fee', 0, NULL, 1),
2
('ACCOUNT', 'Account creation fee', 0, NULL, 1),
3
('ACCOUNT_RENEW', 'Account renewal fee', 0, NULL, 1),
3
('ACCOUNT_RENEW', 'Account renewal fee', 0, NULL, 1),
4
('HE', 'Hold waiting too long', 0, NULL, 1),
5
('LOST', 'Lost item', 1, NULL, 1),
4
('LOST', 'Lost item', 1, NULL, 1),
6
('M', 'Manual fee', 1, NULL, 0),
5
('M', 'Manual fee', 1, NULL, 0),
7
('N', 'New card fee', 1, NULL, 1),
6
('N', 'New card fee', 1, NULL, 1),
Lines 11-14 INSERT INTO account_debit_types ( code, description, can_be_added_manually, defa Link Here
11
('RENT_DAILY', 'Daily rental fee', 0, NULL, 1),
10
('RENT_DAILY', 'Daily rental fee', 0, NULL, 1),
12
('RENT_RENEW', 'Renewal of rental item', 0, NULL, 1),
11
('RENT_RENEW', 'Renewal of rental item', 0, NULL, 1),
13
('RENT_DAILY_RENEW', 'Rewewal of daily rental item', 0, NULL, 1),
12
('RENT_DAILY_RENEW', 'Rewewal of daily rental item', 0, NULL, 1),
14
('RESERVE', 'Hold fee', 0, NULL, 1);
13
('RESERVE', 'Hold fee', 0, NULL, 1),
14
('RESERVE_EXPIRED', 'Hold waiting too long', 0, NULL, 1);
(-)a/installer/data/mysql/atomicupdate/bug_23049_debit.perl (-1 / +8 lines)
Lines 40-46 if ( CheckVersion($DBversion) ) { Link Here
40
            VALUES
40
            VALUES
41
              ('ACCOUNT', 'Account creation fee', 0, NULL, 1),
41
              ('ACCOUNT', 'Account creation fee', 0, NULL, 1),
42
              ('ACCOUNT_RENEW', 'Account renewal fee', 0, NULL, 1),
42
              ('ACCOUNT_RENEW', 'Account renewal fee', 0, NULL, 1),
43
              ('HE', 'Hold waiting too long', 0, NULL, 1),
43
              ('RESERVE_EXPIRED', 'Hold waiting too long', 0, NULL, 1),
44
              ('LOST', 'Lost item', 1, NULL, 1),
44
              ('LOST', 'Lost item', 1, NULL, 1),
45
              ('M', 'Manual fee', 1, NULL, 0),
45
              ('M', 'Manual fee', 1, NULL, 0),
46
              ('N', 'New card fee', 1, NULL, 1),
46
              ('N', 'New card fee', 1, NULL, 1),
Lines 68-73 if ( CheckVersion($DBversion) ) { Link Here
68
        }
68
        }
69
    );
69
    );
70
70
71
    # Update accountype 'HE' to 'RESERVE_EXPIRED'
72
    $dbh->do(
73
        qq{
74
          UPDATE accountlines SET accounttype = 'RESERVE_EXPIRED' WHERE accounttype = 'HE'
75
        }
76
    );
77
71
    # Moving MANUAL_INV to account_debit_types
78
    # Moving MANUAL_INV to account_debit_types
72
    $dbh->do(
79
    $dbh->do(
73
        qq{
80
        qq{
(-)a/installer/data/mysql/en/mandatory/account_debit_types.sql (-2 / +2 lines)
Lines 1-7 Link Here
1
INSERT INTO account_debit_types ( code, description, can_be_added_manually, default_amount, is_system ) VALUES
1
INSERT INTO account_debit_types ( code, description, can_be_added_manually, default_amount, is_system ) VALUES
2
('ACCOUNT', 'Account creation fee', 0, NULL, 1),
2
('ACCOUNT', 'Account creation fee', 0, NULL, 1),
3
('ACCOUNT_RENEW', 'Account renewal fee', 0, NULL, 1),
3
('ACCOUNT_RENEW', 'Account renewal fee', 0, NULL, 1),
4
('HE', 'Hold waiting too long', 0, NULL, 1),
5
('LOST', 'Lost item', 1, NULL, 1),
4
('LOST', 'Lost item', 1, NULL, 1),
6
('M', 'Manual fee', 1, NULL, 0),
5
('M', 'Manual fee', 1, NULL, 0),
7
('N', 'New card fee', 1, NULL, 1),
6
('N', 'New card fee', 1, NULL, 1),
Lines 11-14 INSERT INTO account_debit_types ( code, description, can_be_added_manually, defa Link Here
11
('RENT_DAILY', 'Daily rental fee', 0, NULL, 1),
10
('RENT_DAILY', 'Daily rental fee', 0, NULL, 1),
12
('RENT_RENEW', 'Renewal of rental item', 0, NULL, 1),
11
('RENT_RENEW', 'Renewal of rental item', 0, NULL, 1),
13
('RENT_DAILY_RENEW', 'Rewewal of daily rental item', 0, NULL, 1),
12
('RENT_DAILY_RENEW', 'Rewewal of daily rental item', 0, NULL, 1),
14
('RESERVE', 'Hold fee', 0, NULL, 1);
13
('RESERVE', 'Hold fee', 0, NULL, 1),
14
('RESERVE_EXPIRED', 'Hold waiting too long', 0, NULL, 1);
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/accounts.inc (-1 / +1 lines)
Lines 15-21 Link Here
15
       [%- SWITCH account.debit_type -%]
15
       [%- SWITCH account.debit_type -%]
16
           [%- CASE 'ACCOUNT'          -%]Account creation fee
16
           [%- CASE 'ACCOUNT'          -%]Account creation fee
17
           [%- CASE 'ACCOUNT_RENEW'    -%]Account renewal fee
17
           [%- CASE 'ACCOUNT_RENEW'    -%]Account renewal fee
18
           [%- CASE 'HE'               -%]Hold waiting too long
19
           [%- CASE 'LOST'             -%]Lost item
18
           [%- CASE 'LOST'             -%]Lost item
20
           [%- CASE 'M'                -%]Sundry
19
           [%- CASE 'M'                -%]Sundry
21
           [%- CASE 'N'                -%]New card
20
           [%- CASE 'N'                -%]New card
Lines 26-31 Link Here
26
           [%- CASE 'RENT_RENEW'       -%]Renewal of rental item
25
           [%- CASE 'RENT_RENEW'       -%]Renewal of rental item
27
           [%- CASE 'RENT_DAILY_RENEW' -%]Rewewal of daily rental item
26
           [%- CASE 'RENT_DAILY_RENEW' -%]Rewewal of daily rental item
28
           [%- CASE 'RESERVE'          -%]Hold fee
27
           [%- CASE 'RESERVE'          -%]Hold fee
28
           [%- CASE 'RESERVE_EXPIRED'  -%]Hold waiting too long
29
           [%- CASE                    -%][% account.debit_type.description | html %]
29
           [%- CASE                    -%][% account.debit_type.description | html %]
30
       [%- END -%]
30
       [%- END -%]
31
    [%- END -%]
31
    [%- END -%]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/account-table.inc (-2 / +1 lines)
Lines 186-192 Link Here
186
       [%- SWITCH account.debit_type -%]
186
       [%- SWITCH account.debit_type -%]
187
           [%- CASE 'ACCOUNT'          -%]Account creation fee
187
           [%- CASE 'ACCOUNT'          -%]Account creation fee
188
           [%- CASE 'ACCOUNT_RENEW'    -%]Account renewal fee
188
           [%- CASE 'ACCOUNT_RENEW'    -%]Account renewal fee
189
           [%- CASE 'HE'               -%]Hold waiting too long
190
           [%- CASE 'LOST'             -%]Lost item
189
           [%- CASE 'LOST'             -%]Lost item
191
           [%- CASE 'M'                -%]Sundry
190
           [%- CASE 'M'                -%]Sundry
192
           [%- CASE 'N'                -%]New card
191
           [%- CASE 'N'                -%]New card
Lines 197-202 Link Here
197
           [%- CASE 'RENT_RENEW'       -%]Renewal of rental item
196
           [%- CASE 'RENT_RENEW'       -%]Renewal of rental item
198
           [%- CASE 'RENT_DAILY_RENEW' -%]Rewewal of daily rental item
197
           [%- CASE 'RENT_DAILY_RENEW' -%]Rewewal of daily rental item
199
           [%- CASE 'RESERVE'          -%]Hold fee
198
           [%- CASE 'RESERVE'          -%]Hold fee
199
           [%- CASE 'RESERVE_EXPIRED'  -%]Hold waiting too long
200
           [%- CASE                    -%][% account.debit_type.description | html %]
200
           [%- CASE                    -%][% account.debit_type.description | html %]
201
       [%- END -%]
201
       [%- END -%]
202
    [%- END -%]
202
    [%- END -%]
203
- 

Return to bug 23049