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

(-)a/Koha/Account.pm (-3 / +3 lines)
Lines 322-328 my $credit_line = Koha::Account->new({ patron_id => $patron_id })->add_credit( Link Here
322
);
322
);
323
323
324
$credit_type can be any of:
324
$credit_type can be any of:
325
  - 'credit'
325
  - 'CREDIT'
326
  - 'payment'
326
  - 'payment'
327
  - 'forgiven'
327
  - 'forgiven'
328
  - 'lost_item_return'
328
  - 'lost_item_return'
Lines 716-722 sub reconcile_balance { Link Here
716
=cut
716
=cut
717
717
718
our $offset_type = {
718
our $offset_type = {
719
    'credit'           => 'Manual Credit',
719
    'CREDIT'           => 'Manual Credit',
720
    'forgiven'         => 'Writeoff',
720
    'forgiven'         => 'Writeoff',
721
    'lost_item_return' => 'Lost Item',
721
    'lost_item_return' => 'Lost Item',
722
    'payment'          => 'Payment',
722
    'payment'          => 'Payment',
Lines 739-745 our $offset_type = { Link Here
739
=cut
739
=cut
740
740
741
our $account_type_credit = {
741
our $account_type_credit = {
742
    'credit'           => 'C',
742
    'CREDIT'           => 'CREDIT',
743
    'forgiven'         => 'FOR',
743
    'forgiven'         => 'FOR',
744
    'lost_item_return' => 'LOST_RETURN',
744
    'lost_item_return' => 'LOST_RETURN',
745
    'payment'          => 'Pay',
745
    'payment'          => 'Pay',
(-)a/Koha/Account/Line.pm (-1 / +1 lines)
Lines 338-344 sub adjust { Link Here
338
                    {
338
                    {
339
                        amount      => $new_outstanding * -1,
339
                        amount      => $new_outstanding * -1,
340
                        description => 'Overpayment refund',
340
                        description => 'Overpayment refund',
341
                        type        => 'credit',
341
                        type        => 'CREDIT',
342
                        interface   => $interface,
342
                        interface   => $interface,
343
                        ( $update_type eq 'overdue_update' ? ( item_id => $self->itemnumber ) : ()),
343
                        ( $update_type eq 'overdue_update' ? ( item_id => $self->itemnumber ) : ()),
344
                    }
344
                    }
(-)a/api/v1/swagger/definitions/patron_account_credit.json (-1 / +1 lines)
Lines 3-9 Link Here
3
  "properties": {
3
  "properties": {
4
    "credit_type": {
4
    "credit_type": {
5
      "type": "string",
5
      "type": "string",
6
      "description": "Type of credit ('credit', 'forgiven', 'lost_item_return', 'payment', 'writeoff' )"
6
      "description": "Type of credit ('CREDIT', 'forgiven', 'lost_item_return', 'payment', 'writeoff' )"
7
    },
7
    },
8
    "amount": {
8
    "amount": {
9
      "type": "number",
9
      "type": "number",
(-)a/installer/data/mysql/account_credit_types.sql (-1 / +1 lines)
Lines 4-8 INSERT INTO account_debit_types ( code, description, can_be_added_manually, is_s Link Here
4
('W', 'Writeoff', 0, 1),
4
('W', 'Writeoff', 0, 1),
5
('WO', 'Writeoff', 0, 1),
5
('WO', 'Writeoff', 0, 1),
6
('FOR', 'Forgiven', 1, 1),
6
('FOR', 'Forgiven', 1, 1),
7
('C', 'Credit', 1, 1),
7
('CREDIT', 'Credit', 1, 1),
8
('LOST_RETURN', 'Lost item fee refund', 0, 1);
8
('LOST_RETURN', 'Lost item fee refund', 0, 1);
(-)a/installer/data/mysql/atomicupdate/bug_23908_credit.perl (-1 / +8 lines)
Lines 41-47 if ( CheckVersion($DBversion) ) { Link Here
41
              ('W', 'Writeoff', 0, 1),
41
              ('W', 'Writeoff', 0, 1),
42
              ('WO', 'Writeoff', 0, 1),
42
              ('WO', 'Writeoff', 0, 1),
43
              ('FOR', 'Forgiven', 1, 1),
43
              ('FOR', 'Forgiven', 1, 1),
44
              ('C', 'Credit', 1, 1),
44
              ('CREDIT', 'Credit', 1, 1),
45
              ('LOST_RETURN', 'Lost item fee refund', 0, 1)
45
              ('LOST_RETURN', 'Lost item fee refund', 0, 1)
46
        }
46
        }
47
    );
47
    );
Lines 75-80 if ( CheckVersion($DBversion) ) { Link Here
75
        }
75
        }
76
    );
76
    );
77
77
78
    # Update accountype 'C' to 'CREDIT'
79
    $dbh->do(
80
        qq{
81
          UPDATE accountlines SET accounttype = 'CREDIT' WHERE accounttype = 'C' OR accounttype = 'CR'
82
        }
83
    );
84
78
    # Populating credit_type_code
85
    # Populating credit_type_code
79
    $dbh->do(
86
    $dbh->do(
80
        qq{
87
        qq{
(-)a/installer/data/mysql/en/mandatory/account_credit_types.sql (-1 / +1 lines)
Lines 4-8 INSERT INTO account_debit_types ( code, description, can_be_added_manually, is_s Link Here
4
('W', 'Writeoff', 0, 1),
4
('W', 'Writeoff', 0, 1),
5
('WO', 'Writeoff', 0, 1),
5
('WO', 'Writeoff', 0, 1),
6
('FOR', 'Forgiven', 1, 1),
6
('FOR', 'Forgiven', 1, 1),
7
('C', 'Credit', 1, 1),
7
('CREDIT', 'Credit', 1, 1),
8
('LOST_RETURN', 'Lost item fee refund', 0, 1);
8
('LOST_RETURN', 'Lost item fee refund', 0, 1);
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/accounts.inc (-1 / +1 lines)
Lines 7-13 Link Here
7
            [%- CASE 'FOR'              -%]Forgiven
7
            [%- CASE 'FOR'              -%]Forgiven
8
            [%- CASE 'PAY'              -%]Payment
8
            [%- CASE 'PAY'              -%]Payment
9
            [%- CASE 'WO'               -%]Writeoff
9
            [%- CASE 'WO'               -%]Writeoff
10
            [%- CASE 'C'                -%]Credit
10
            [%- CASE 'CREDIT'           -%]Credit
11
            [%- CASE 'LOST_RETURN'      -%]Lost item fee refund
11
            [%- CASE 'LOST_RETURN'      -%]Lost item fee refund
12
            [%- CASE                    -%][% account.credit_type.description | html %]
12
            [%- CASE                    -%][% account.credit_type.description | html %]
13
        [%- END -%]
13
        [%- END -%]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/account-table.inc (-1 / +1 lines)
Lines 178-184 Link Here
178
            [%- CASE 'FOR'              -%]Forgiven
178
            [%- CASE 'FOR'              -%]Forgiven
179
            [%- CASE 'PAY'              -%]Payment
179
            [%- CASE 'PAY'              -%]Payment
180
            [%- CASE 'WO'               -%]Writeoff
180
            [%- CASE 'WO'               -%]Writeoff
181
            [%- CASE 'C'                -%]Credit
181
            [%- CASE 'CREDIT'           -%]Credit
182
            [%- CASE 'LOST_RETURN'      -%]Lost item fee refund
182
            [%- CASE 'LOST_RETURN'      -%]Lost item fee refund
183
            [%- CASE                    -%][% account.credit_type.description | html %]
183
            [%- CASE                    -%][% account.credit_type.description | html %]
184
        [%- END -%]
184
        [%- END -%]
(-)a/reports/cash_register_stats.pl (-2 / +1 lines)
Lines 72-78 if ($do_it) { Link Here
72
    if ($transaction_type eq 'ALL') { #All Transactons
72
    if ($transaction_type eq 'ALL') { #All Transactons
73
        $whereTType = q{};
73
        $whereTType = q{};
74
    } elsif ($transaction_type eq 'ACT') { #Active
74
    } elsif ($transaction_type eq 'ACT') { #Active
75
        $whereTType = q{ AND credit_type_code IN ('Pay','C') };
75
        $whereTType = q{ AND credit_type_code IN ('Pay','CREDIT') };
76
    } elsif ($transaction_type eq 'FORW') {
76
    } elsif ($transaction_type eq 'FORW') {
77
        $whereTType = q{ AND credit_type_code IN ('FOR','W') };
77
        $whereTType = q{ AND credit_type_code IN ('FOR','W') };
78
    } else {
78
    } else {
79
- 

Return to bug 23805