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

(-)a/Koha/Schema/Result/AccountDebitType.pm (-2 / +16 lines)
Lines 71-76 boolean flag to denote if this debit type is available at point of sale Link Here
71
71
72
boolean flag to denote if this till is archived or not
72
boolean flag to denote if this till is archived or not
73
73
74
=head2 no_issues_charge
75
76
  data_type: 'tinyint'
77
  default_value: 1
78
  is_nullable: 0
79
80
boolean flag to denote if the noissuescharge syspref for this debit type is active
81
74
=cut
82
=cut
75
83
76
__PACKAGE__->add_columns(
84
__PACKAGE__->add_columns(
Lines 88-93 __PACKAGE__->add_columns( Link Here
88
  { data_type => "tinyint", default_value => 0, is_nullable => 0 },
96
  { data_type => "tinyint", default_value => 0, is_nullable => 0 },
89
  "archived",
97
  "archived",
90
  { data_type => "tinyint", default_value => 0, is_nullable => 0 },
98
  { data_type => "tinyint", default_value => 0, is_nullable => 0 },
99
  "no_issues_charge",
100
  { data_type => "tinyint", default_value => 1, is_nullable => 0 },
91
);
101
);
92
102
93
=head1 PRIMARY KEY
103
=head1 PRIMARY KEY
Lines 135-142 __PACKAGE__->has_many( Link Here
135
);
145
);
136
146
137
147
138
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-01-21 13:39:29
148
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2023-01-06 13:08:15
139
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ulpJRbi7H40EXr1QG+URKg
149
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:4yfwGQzH8AzZYXfje3MH/A
140
150
141
__PACKAGE__->add_columns(
151
__PACKAGE__->add_columns(
142
    '+is_system' => { is_boolean => 1 }
152
    '+is_system' => { is_boolean => 1 }
Lines 150-155 __PACKAGE__->add_columns( Link Here
150
    "+can_be_invoiced" => { is_boolean => 1 }
160
    "+can_be_invoiced" => { is_boolean => 1 }
151
);
161
);
152
162
163
__PACKAGE__->add_columns(
164
    "+no_issues_charge" => { is_boolean => 1 }
165
);
166
153
sub koha_objects_class {
167
sub koha_objects_class {
154
    'Koha::Account::DebitTypes';
168
    'Koha::Account::DebitTypes';
155
}
169
}
(-)a/installer/data/mysql/atomicupdate/bug_32450-add_debit_type_flag.pl (+29 lines)
Line 0 Link Here
1
use Modern::Perl;
2
3
return {
4
    bug_number => "32450",
5
    description => "Create a database flag for whether a debit type should be included in the noissuescharge block on circulation and remove redundant sysprefs.",
6
    up => sub {
7
        my ($args) = @_; 
8
        my ($dbh, $out) = @$args{qw(dbh out)};
9
10
        if( !column_exists( 'account_debit_types', 'no_issues_charge' ) ) { 
11
          $dbh->do(q{
12
              ALTER TABLE account_debit_types ADD COLUMN `no_issues_charge` tinyint(1) NOT NULL DEFAULT 1 AFTER `archived`
13
          });
14
15
          say $out "Added column 'account_debit_types.no_issues_charge'";
16
        }
17
18
        $dbh->do(q{
19
            DELETE FROM systempreferences WHERE variable = 'ManInvInNoissuesCharge'
20
        });
21
22
        $dbh->do(q{
23
            DELETE FROM systempreferences WHERE variable = 'RentalsInNoissuesCharge'
24
        });
25
        $dbh->do(q{
26
            DELETE FROM systempreferences WHERE variable = 'HoldsInNoissuesCharge'
27
        });
28
    },
29
};
(-)a/installer/data/mysql/kohastructure.sql (+1 lines)
Lines 65-70 CREATE TABLE `account_debit_types` ( Link Here
65
  `default_amount` decimal(28,6) DEFAULT NULL,
65
  `default_amount` decimal(28,6) DEFAULT NULL,
66
  `is_system` tinyint(1) NOT NULL DEFAULT 0,
66
  `is_system` tinyint(1) NOT NULL DEFAULT 0,
67
  `archived` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'boolean flag to denote if this till is archived or not',
67
  `archived` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'boolean flag to denote if this till is archived or not',
68
  `no_issues_charge` tinyint(1) NOT NULL DEFAULT 1 COMMENT 'boolean flag to denote if the noissuescharge syspref for this debit type is active',
68
  PRIMARY KEY (`code`)
69
  PRIMARY KEY (`code`)
69
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
70
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
70
/*!40101 SET character_set_client = @saved_cs_client */;
71
/*!40101 SET character_set_client = @saved_cs_client */;
(-)a/installer/data/mysql/mandatory/sysprefs.sql (-2 lines)
Lines 354-360 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
354
('LockExpiredDelay','','','Delay for locking expired patrons (empty means no locking)','Integer'),
354
('LockExpiredDelay','','','Delay for locking expired patrons (empty means no locking)','Integer'),
355
('makePreviousSerialAvailable','0','','make previous serial automatically available when collecting a new serial. Please note that the item-level_itypes syspref must be set to specific item.','YesNo'),
355
('makePreviousSerialAvailable','0','','make previous serial automatically available when collecting a new serial. Please note that the item-level_itypes syspref must be set to specific item.','YesNo'),
356
('Mana','2',NULL,'request to Mana Webservice. Mana centralize common information between other Koha to facilitate the creation of new subscriptions, vendors, report queries etc... You can search, share, import and comment the content of Mana.','Choice'),
356
('Mana','2',NULL,'request to Mana Webservice. Mana centralize common information between other Koha to facilitate the creation of new subscriptions, vendors, report queries etc... You can search, share, import and comment the content of Mana.','Choice'),
357
('ManInvInNoissuesCharge','1',NULL,'MANUAL_INV charges block checkouts (added to noissuescharge).','YesNo'),
358
('MARCAuthorityControlField008','|| aca||aabn           | a|a     d',NULL,'Define the contents of MARC21 authority control field 008 position 06-39','Textarea'),
357
('MARCAuthorityControlField008','|| aca||aabn           | a|a     d',NULL,'Define the contents of MARC21 authority control field 008 position 06-39','Textarea'),
359
('MarcFieldDocURL', NULL, NULL, 'URL used for MARC field documentation. Following substitutions are available: {MARC} = marc flavour, eg. "MARC21" or "UNIMARC". {FIELD} = field number, eg. "000" or "048". {LANG} = user language, eg. "en" or "fi-FI"', 'free'),
358
('MarcFieldDocURL', NULL, NULL, 'URL used for MARC field documentation. Following substitutions are available: {MARC} = marc flavour, eg. "MARC21" or "UNIMARC". {FIELD} = field number, eg. "000" or "048". {LANG} = user language, eg. "en" or "fi-FI"', 'free'),
360
('MarcFieldForCreatorId','',NULL,'Where to store the borrowernumber of the record''s creator','Free'),
359
('MarcFieldForCreatorId','',NULL,'Where to store the borrowernumber of the record''s creator','Free'),
Lines 599-605 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
599
('RenewalSendNotice','0','',NULL,'YesNo'),
598
('RenewalSendNotice','0','',NULL,'YesNo'),
600
('RenewSerialAddsSuggestion','0',NULL,'If ON, adds a new suggestion at serial subscription renewal','YesNo'),
599
('RenewSerialAddsSuggestion','0',NULL,'If ON, adds a new suggestion at serial subscription renewal','YesNo'),
601
('RentalFeesCheckoutConfirmation', '0', NULL , 'Allow user to confirm when checking out an item with rental fees.', 'YesNo'),
600
('RentalFeesCheckoutConfirmation', '0', NULL , 'Allow user to confirm when checking out an item with rental fees.', 'YesNo'),
602
('RentalsInNoissuesCharge','1',NULL,'Rental charges block checkouts (added to noissuescharge).','YesNo'),
603
('ReplyToDefault','',NULL,'Use this email address as the replyto in emails','Free'),
601
('ReplyToDefault','',NULL,'Use this email address as the replyto in emails','Free'),
604
('ReportsLog','0',NULL,'If ON, log information about reports.','YesNo'),
602
('ReportsLog','0',NULL,'If ON, log information about reports.','YesNo'),
605
('RequireCashRegister','0',NULL,'Require a cash register when collecting a payment','YesNo'),
603
('RequireCashRegister','0',NULL,'Require a cash register when collecting a payment','YesNo'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref (-19 lines)
Lines 375-398 Circulation: Link Here
375
            - pref: NoIssuesChargeGuarantorsWithGuarantees
375
            - pref: NoIssuesChargeGuarantorsWithGuarantees
376
              class: integer
376
              class: integer
377
            - '[% local_currency %] in fines.'
377
            - '[% local_currency %] in fines.'
378
        -
379
            - pref: RentalsInNoissuesCharge
380
              choices:
381
                  1: Include
382
                  0: "Don't include"
383
            - rental charges when summing up charges for limit set in the <a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=noissuescharge">noissuescharge</a> system preference.
384
        -
385
            - pref: ManInvInNoissuesCharge
386
              choices:
387
                  1: Include
388
                  0: "Don't include"
389
            - custom debit type charges when summing up charges for limit set in the <a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=noissuescharge">noissuescharge</a> system preference.
390
        -
391
            - pref: HoldsInNoissuesCharge
392
              choices:
393
                  1: Include
394
                  0: "Don't include"
395
            - hold charges when summing up charges for limit set in the <a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=noissuescharge">noissuescharge</a> system preference.
396
        -
378
        -
397
            - pref: ReturnBeforeExpiry
379
            - pref: ReturnBeforeExpiry
398
              choices:
380
              choices:
399
- 

Return to bug 32450