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

(-)a/installer/data/mysql/account_offset_types.sql (+1 lines)
Lines 3-8 INSERT INTO account_offset_types ( type ) VALUES Link Here
3
('Payment'),
3
('Payment'),
4
('Lost Item'),
4
('Lost Item'),
5
('Processing Fee'),
5
('Processing Fee'),
6
('Manual Credit'),
6
('Manual Debit'),
7
('Manual Debit'),
7
('Reverse Payment'),
8
('Reverse Payment'),
8
('Forgiven'),
9
('Forgiven'),
(-)a/installer/data/mysql/atomicupdate/bug_20980.perl (+21 lines)
Line 0 Link Here
1
$DBversion = 'XXX';
2
if( CheckVersion( $DBversion ) ) {
3
4
    # Add 'Manual Credit' offset type
5
    $dbh->do(q{
6
        INSERT IGNORE INTO `account_offset_types` (`type`) VALUES ('Manual Credit');
7
    });
8
9
    # Fix wrong account offsets
10
    $dbh->do(q{
11
        UPDATE account_offsets
12
        SET credit_id=debit_id,
13
            debit_id=NULL,
14
            type='Manual Credit'
15
        WHERE amount < 0 AND
16
              type='Manual Debit';
17
    });
18
19
    SetVersion( $DBversion );
20
    print "Upgrade to $DBversion done (Bug 20980 - Manual credit offsets are stored as debits)\n";
21
}
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/account_offset_type.inc (-1 / +1 lines)
Lines 1-5 Link Here
1
[% SWITCH account_offset.type %]
1
[% SWITCH account_offset.type %]
2
    [% CASE 'Payment' %]Payment
2
    [% CASE 'Payment' %]Payment
3
    [% CASE 'Manual Credit' %]Manual credit
3
    [% CASE 'Manual Debit' %]Manual invoice
4
    [% CASE 'Manual Debit' %]Manual invoice
4
    [% CASE 'Lost Item Return' %]Lost item returned
5
    [% CASE 'Lost Item Return' %]Lost item returned
5
    [% CASE 'Writeoff' %]Writeoff
6
    [% CASE 'Writeoff' %]Writeoff
6
- 

Return to bug 20980