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

(-)a/installer/data/mysql/account_credit_types.sql (+1 lines)
Lines 3-7 INSERT INTO account_credit_types ( code, description, can_be_added_manually, is_ Link Here
3
('WRITEOFF', 'Writeoff', 0, 1),
3
('WRITEOFF', 'Writeoff', 0, 1),
4
('FORGIVEN', 'Forgiven', 1, 1),
4
('FORGIVEN', 'Forgiven', 1, 1),
5
('CREDIT', 'Credit', 1, 1),
5
('CREDIT', 'Credit', 1, 1),
6
('DISCOUNT', 'A discount applied to a patrons fine', 0, 1),
6
('REFUND', 'A refund applied to a patrons fine', 0, 1),
7
('REFUND', 'A refund applied to a patrons fine', 0, 1),
7
('LOST_RETURN', 'Lost item fee refund', 0, 1);
8
('LOST_RETURN', 'Lost item fee refund', 0, 1);
(-)a/installer/data/mysql/account_offset_types.sql (+1 lines)
Lines 18-21 INSERT INTO account_offset_types ( type ) VALUES Link Here
18
('Void Payment'),
18
('Void Payment'),
19
('Credit Applied'),
19
('Credit Applied'),
20
('PAYOUT'),
20
('PAYOUT'),
21
('DISOUNT'),
21
('REFUND');
22
('REFUND');
(-)a/installer/data/mysql/atomicupdate/bug_24081.perl (+26 lines)
Line 0 Link Here
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
              ('DISCOUNT', 'A discount applied to a patrons fine', 0, 1)
9
        }
10
    );
11
12
    $dbh->do(qq{
13
        INSERT IGNORE INTO account_offset_types ( type ) VALUES ('DISCOUNT');
14
    });
15
16
    $dbh->do(qq{
17
        INSERT IGNORE permissions (module_bit, code, description)
18
        VALUES
19
        (10, 'discount', 'Perform account discount action')
20
    });
21
22
    SetVersion($DBversion);
23
    print "Upgrade to $DBversion done (Bug 24081 - Add DISCOUNT to account_credit_types)\n";
24
    print "Upgrade to $DBversion done (Bug 24081 - Add DISCOUNT to account_offset_types)\n";
25
    print "Upgrade to $DBversion done (Bug 24081 - Add accounts discount permission)\n";
26
}
(-)a/installer/data/mysql/userpermissions.sql (-1 / +1 lines)
Lines 45-50 INSERT INTO permissions (module_bit, code, description) VALUES Link Here
45
   ( 9, 'delete_all_items', 'Delete all items at once'),
45
   ( 9, 'delete_all_items', 'Delete all items at once'),
46
   (10, 'payout', 'Perform account payout action'),
46
   (10, 'payout', 'Perform account payout action'),
47
   (10, 'refund', 'Perform account refund action'),
47
   (10, 'refund', 'Perform account refund action'),
48
   (10, 'discount', 'Perform account discount action'),
48
   (10, 'writeoff', 'Write off fines and fees'),
49
   (10, 'writeoff', 'Write off fines and fees'),
49
   (10, 'remaining_permissions', 'Remaining permissions for managing fines and fees'),
50
   (10, 'remaining_permissions', 'Remaining permissions for managing fines and fees'),
50
   (11, 'currencies_manage', 'Manage currencies and exchange rates'),
51
   (11, 'currencies_manage', 'Manage currencies and exchange rates'),
51
- 

Return to bug 24081