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

(-)a/installer/data/mysql/atomicupdate/bug_40445.pl (+37 lines)
Line 0 Link Here
1
use Modern::Perl;
2
use Koha::Installer::Output qw(say_warning say_success say_info);
3
4
return {
5
    bug_number  => "40445",
6
    description => "Add cashup reconciliation support with surplus/deficit tracking",
7
    up          => sub {
8
        my ($args) = @_;
9
        my ( $dbh, $out ) = @$args{qw(dbh out)};
10
11
        # Add CASHUP_SURPLUS credit type
12
        $dbh->do(
13
            q{
14
            INSERT IGNORE INTO account_credit_types
15
            (code, description, can_be_added_manually, credit_number_enabled, is_system, archived)
16
            VALUES ('CASHUP_SURPLUS', 'Cash register surplus found during cashup', 0, 0, 1, 0)
17
        }
18
        );
19
20
        # Add CASHUP_DEFICIT debit type
21
        $dbh->do(
22
            q{
23
            INSERT IGNORE INTO account_debit_types
24
            (code, description, can_be_invoiced, can_be_sold, default_amount, is_system, archived, restricts_checkouts)
25
            VALUES ('CASHUP_DEFICIT', 'Cash register deficit found during cashup', 0, 0, NULL, 1, 0, 0)
26
        }
27
        );
28
29
        say $out "Added new account credit type 'CASHUP_SURPLUS'";
30
        say $out "Added new account debit type 'CASHUP_DEFICIT'";
31
        say_success( $out, "Cashup reconciliation account types created successfully" );
32
        say_info(
33
            $out,
34
            "Staff can now record actual cash amounts during cashup with automatic surplus/deficit tracking"
35
        );
36
    },
37
};
(-)a/installer/data/mysql/en/mandatory/account_credit_types.yml (+6 lines)
Lines 79-81 tables: Link Here
79
          description: "Lost item processing fee refund"
79
          description: "Lost item processing fee refund"
80
          can_be_added_manually: "0"
80
          can_be_added_manually: "0"
81
          is_system: "1"
81
          is_system: "1"
82
83
        - code: "CASHUP_SURPLUS"
84
          description: "Cash register surplus found during cashup"
85
          can_be_added_manually: "0"
86
          credit_number_enabled: "0"
87
          is_system: "1"
(-)a/installer/data/mysql/en/mandatory/account_debit_types.yml (-1 / +8 lines)
Lines 136-138 tables: Link Here
136
          can_be_sold: "0"
136
          can_be_sold: "0"
137
          default_amount: ~
137
          default_amount: ~
138
          is_system: "1"
138
          is_system: "1"
139
- 
139
140
        - code: "CASHUP_DEFICIT"
141
          description: "Cash register deficit found during cashup"
142
          can_be_invoiced: "0"
143
          can_be_sold: "0"
144
          default_amount: ~
145
          is_system: "1"
146
          restricts_checkouts: "0"

Return to bug 40445