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

(-)a/installer/data/mysql/account_credit_types.sql (+1 lines)
Lines 3-8 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_FOUND', 'Lost item fee refund', 0, 1),
8
('LOST_FOUND', 'Lost item fee refund', 0, 1),
8
('PURCHASE', 'Purchase', 0, 1);
9
('PURCHASE', 'Purchase', 0, 1);
(-)a/installer/data/mysql/account_offset_types.sql (+1 lines)
Lines 20-23 INSERT INTO account_offset_types ( type ) VALUES Link Here
20
('Void Payment'),
20
('Void Payment'),
21
('Credit Applied'),
21
('Credit Applied'),
22
('PAYOUT'),
22
('PAYOUT'),
23
('DISOUNT'),
23
('REFUND');
24
('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 46-51 INSERT INTO permissions (module_bit, code, description) VALUES Link Here
46
   ( 9, 'delete_all_items', 'Delete all items at once'),
46
   ( 9, 'delete_all_items', 'Delete all items at once'),
47
   (10, 'payout', 'Perform account payout action'),
47
   (10, 'payout', 'Perform account payout action'),
48
   (10, 'refund', 'Perform account refund action'),
48
   (10, 'refund', 'Perform account refund action'),
49
   (10, 'discount', 'Perform account discount action'),
49
   (10, 'writeoff', 'Write off fines and fees'),
50
   (10, 'writeoff', 'Write off fines and fees'),
50
   (10, 'remaining_permissions', 'Remaining permissions for managing fines and fees'),
51
   (10, 'remaining_permissions', 'Remaining permissions for managing fines and fees'),
51
   (11, 'currencies_manage', 'Manage currencies and exchange rates'),
52
   (11, 'currencies_manage', 'Manage currencies and exchange rates'),
52
- 

Return to bug 24081