Bug 25596: Identify overpayment refunds for translation
[koha-ffzg.git] / installer / data / mysql / atomicupdate / bug_25596.perl
1 $DBversion = 'XXX';    # will be replaced by the RM
2 if ( CheckVersion($DBversion) ) {
3
4     $dbh->do(
5         qq{
6             INSERT IGNORE INTO account_credit_types (code, description, can_be_added_manually, is_system)
7             VALUES
8               ('OVERPAYMENT', 'Overpayment refund', 0, 1)
9         }
10     );
11
12     $dbh->do(
13         qq{
14             INSERT IGNORE INTO account_offset_types ( type ) VALUES ('Overpayment');
15         }
16     );
17
18     $dbh->do(
19         qq{
20             UPDATE accountlines SET credit_type_code = 'OVERPAYMENT' WHERE credit_type_code = 'CREDIT' AND description = 'Overpayment refund'
21         }
22     );
23
24     NewVersion( $DBversion, 25596, "Add OVERPAYMENT credit type" );
25 }