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

(-)a/C4/Reserves.pm (-1 / +1 lines)
Lines 578-584 sub ChargeReserveFee { Link Here
578
            library_id   => C4::Context->userenv ? C4::Context->userenv->{'branch'} : undef,
578
            library_id   => C4::Context->userenv ? C4::Context->userenv->{'branch'} : undef,
579
            interface    => C4::Context->interface,
579
            interface    => C4::Context->interface,
580
            invoice_type => undef,
580
            invoice_type => undef,
581
            type         => 'reserve',
581
            type         => 'RESERVE',
582
            item_id      => undef
582
            item_id      => undef
583
        }
583
        }
584
    );
584
    );
(-)a/Koha/Account.pm (-4 / +4 lines)
Lines 456-462 $debit_type can be any of: Link Here
456
  - rent_daily
456
  - rent_daily
457
  - rent_renew
457
  - rent_renew
458
  - rent_daily_renew
458
  - rent_daily_renew
459
  - reserve
459
  - RESERVE
460
  - manual_debit
460
  - manual_debit
461
461
462
=cut
462
=cut
Lines 632-638 sub non_issues_charges { Link Here
632
    #NOTE: With bug 23049 these preferences could be moved to being attached
632
    #NOTE: With bug 23049 these preferences could be moved to being attached
633
    #to individual debit types to give more flexability and specificity.
633
    #to individual debit types to give more flexability and specificity.
634
    my @not_fines;
634
    my @not_fines;
635
    push @not_fines, 'Res'
635
    push @not_fines, 'RESERVE'
636
      unless C4::Context->preference('HoldsInNoissuesCharge');
636
      unless C4::Context->preference('HoldsInNoissuesCharge');
637
    push @not_fines, ( 'RENT', 'RENT_DAILY', 'RENT_RENEW', 'RENT_DAILY_RENEW' )
637
    push @not_fines, ( 'RENT', 'RENT_DAILY', 'RENT_RENEW', 'RENT_DAILY_RENEW' )
638
      unless C4::Context->preference('RentalsInNoissuesCharge');
638
      unless C4::Context->preference('RentalsInNoissuesCharge');
Lines 711-717 our $offset_type = { Link Here
711
    'writeoff'         => 'Writeoff',
711
    'writeoff'         => 'Writeoff',
712
    'account'          => 'Account Fee',
712
    'account'          => 'Account Fee',
713
    'account_renew'    => 'Account Fee',
713
    'account_renew'    => 'Account Fee',
714
    'reserve'          => 'Reserve Fee',
714
    'RESERVE'          => 'Reserve Fee',
715
    'processing'       => 'Processing Fee',
715
    'processing'       => 'Processing Fee',
716
    'lost_item'        => 'Lost Item',
716
    'lost_item'        => 'Lost Item',
717
    'rent'             => 'Rental Fee',
717
    'rent'             => 'Rental Fee',
Lines 752-758 our $account_type_debit = { Link Here
752
    'rent_daily'       => 'RENT_DAILY',
752
    'rent_daily'       => 'RENT_DAILY',
753
    'rent_renew'       => 'RENT_RENEW',
753
    'rent_renew'       => 'RENT_RENEW',
754
    'rent_daily_renew' => 'RENT_DAILY_RENEW',
754
    'rent_daily_renew' => 'RENT_DAILY_RENEW',
755
    'reserve'          => 'Res',
755
    'RESERVE'          => 'RESERVE',
756
    'manual_debit'     => 'M'
756
    'manual_debit'     => 'M'
757
};
757
};
758
758
(-)a/installer/data/mysql/account_debit_types.sql (-1 / +1 lines)
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),
11
('RENT_DAILY', 'Daily rental fee', 0, NULL, 1),
12
('RENT_RENEW', 'Renewal of rental item', 0, NULL, 1),
12
('RENT_RENEW', 'Renewal of rental item', 0, NULL, 1),
13
('RENT_DAILY_RENEW', 'Rewewal of daily rental item', 0, NULL, 1),
13
('RENT_DAILY_RENEW', 'Rewewal of daily rental item', 0, NULL, 1),
14
('Res', 'Hold fee', 0, NULL, 1);
14
('RESERVE', 'Hold fee', 0, NULL, 1);
(-)a/installer/data/mysql/atomicupdate/bug_23049_debit.perl (-1 / +8 lines)
Lines 50-56 if ( CheckVersion($DBversion) ) { Link Here
50
              ('RENT_DAILY', 'Daily rental fee', 0, NULL, 1),
50
              ('RENT_DAILY', 'Daily rental fee', 0, NULL, 1),
51
              ('RENT_RENEW', 'Renewal of rental item', 0, NULL, 1),
51
              ('RENT_RENEW', 'Renewal of rental item', 0, NULL, 1),
52
              ('RENT_DAILY_RENEW', 'Rewewal of daily rental item', 0, NULL, 1),
52
              ('RENT_DAILY_RENEW', 'Rewewal of daily rental item', 0, NULL, 1),
53
              ('Res', 'Hold fee', 0, NULL, 1)
53
              ('RESERVE', 'Hold fee', 0, NULL, 1)
54
        }
55
    );
56
57
    # Update accountype 'Res' to 'RESERVE'
58
    $dbh->do(
59
        qq{
60
          UPDATE accountlines SET accounttype = 'RESERVE' WHERE accounttype = 'Res'
54
        }
61
        }
55
    );
62
    );
56
63
(-)a/installer/data/mysql/en/mandatory/account_debit_types.sql (-1 / +1 lines)
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),
11
('RENT_DAILY', 'Daily rental fee', 0, NULL, 1),
12
('RENT_RENEW', 'Renewal of rental item', 0, NULL, 1),
12
('RENT_RENEW', 'Renewal of rental item', 0, NULL, 1),
13
('RENT_DAILY_RENEW', 'Rewewal of daily rental item', 0, NULL, 1),
13
('RENT_DAILY_RENEW', 'Rewewal of daily rental item', 0, NULL, 1),
14
('Res', 'Hold fee', 0, NULL, 1);
14
('RESERVE', 'Hold fee', 0, NULL, 1);
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/accounts.inc (-1 / +1 lines)
Lines 25-31 Link Here
25
           [%- CASE 'RENT_DAILY'       -%]Daily rental fee
25
           [%- CASE 'RENT_DAILY'       -%]Daily rental fee
26
           [%- CASE 'RENT_RENEW'       -%]Renewal of rental item
26
           [%- CASE 'RENT_RENEW'       -%]Renewal of rental item
27
           [%- CASE 'RENT_DAILY_RENEW' -%]Rewewal of daily rental item
27
           [%- CASE 'RENT_DAILY_RENEW' -%]Rewewal of daily rental item
28
           [%- CASE 'Res'              -%]Hold fee
28
           [%- CASE 'RESERVE'          -%]Hold fee
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 (-1 / +1 lines)
Lines 196-202 Link Here
196
           [%- CASE 'RENT_DAILY'       -%]Daily rental fee
196
           [%- CASE 'RENT_DAILY'       -%]Daily rental fee
197
           [%- CASE 'RENT_RENEW'       -%]Renewal of rental item
197
           [%- CASE 'RENT_RENEW'       -%]Renewal of rental item
198
           [%- CASE 'RENT_DAILY_RENEW' -%]Rewewal of daily rental item
198
           [%- CASE 'RENT_DAILY_RENEW' -%]Rewewal of daily rental item
199
           [%- CASE 'Res'              -%]Hold fee
199
           [%- CASE 'RESERVE'          -%]Hold fee
200
           [%- CASE                    -%][% account.debit_type.description | html %]
200
           [%- CASE                    -%][% account.debit_type.description | html %]
201
       [%- END -%]
201
       [%- END -%]
202
    [%- END -%]
202
    [%- END -%]
(-)a/opac/sco/sco-main.pl (-1 / +1 lines)
Lines 241-247 elsif ( $patron && ( $op eq 'checkout' || $op eq 'renew' ) ) { Link Here
241
                    patron_has_hold_fee => Koha::Account::Lines->search(
241
                    patron_has_hold_fee => Koha::Account::Lines->search(
242
                        {
242
                        {
243
                            borrowernumber  => $borrower->{borrowernumber},
243
                            borrowernumber  => $borrower->{borrowernumber},
244
                            debit_type_code => 'Res',
244
                            debit_type_code => 'RESERVE',
245
                            description     => $item->biblio->title,
245
                            description     => $item->biblio->title,
246
                            date            => $dtf->format_date(dt_from_string)
246
                            date            => $dtf->format_date(dt_from_string)
247
                        }
247
                        }
(-)a/t/db_dependent/Accounts.t (-1 / +1 lines)
Lines 774-780 subtest "Koha::Account::non_issues_charges tests" => sub { Link Here
774
    $account->add_debit(
774
    $account->add_debit(
775
        {
775
        {
776
            description => 'a Res fee',
776
            description => 'a Res fee',
777
            type        => 'reserve',
777
            type        => 'RESERVE',
778
            amount      => $res,
778
            amount      => $res,
779
            interface   => 'commandline'
779
            interface   => 'commandline'
780
        }
780
        }
(-)a/t/db_dependent/Reserves.t (-2 / +1 lines)
Lines 739-745 subtest 'ChargeReserveFee tests' => sub { Link Here
739
739
740
    is( ref($line), 'Koha::Account::Line' , 'Returns a Koha::Account::Line object');
740
    is( ref($line), 'Koha::Account::Line' , 'Returns a Koha::Account::Line object');
741
    ok( $line->is_debit, 'Generates a debit line' );
741
    ok( $line->is_debit, 'Generates a debit line' );
742
    is( $line->debit_type_code, 'Res' , 'generates Res debit_type');
742
    is( $line->debit_type_code, 'RESERVE' , 'generates RESERVE debit_type');
743
    is( $line->borrowernumber, $patron->id , 'generated line belongs to the passed patron');
743
    is( $line->borrowernumber, $patron->id , 'generated line belongs to the passed patron');
744
    is( $line->amount, $fee , 'amount set correctly');
744
    is( $line->amount, $fee , 'amount set correctly');
745
    is( $line->amountoutstanding, $fee , 'amountoutstanding set correctly');
745
    is( $line->amountoutstanding, $fee , 'amountoutstanding set correctly');
746
- 

Return to bug 23049