Browse Source

Bug 23049: (QA follow-up) Correction for 'M' => 'MANUAL'

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
remotes/origin/19.11.x
Martin Renvoize 3 years ago
parent
commit
f91fafbbcb
Signed by: martin.renvoize GPG Key ID: 422B469130441A0F
  1. 4
      C4/Overdues.pm
  2. 2
      installer/data/mysql/account_debit_types.sql
  3. 9
      installer/data/mysql/atomicupdate/bug_23049_debit.perl
  4. 2
      installer/data/mysql/en/mandatory/account_debit_types.sql
  5. 2
      koha-tmpl/intranet-tmpl/prog/en/includes/accounts.inc
  6. 2
      koha-tmpl/opac-tmpl/bootstrap/en/includes/account-table.inc

4
C4/Overdues.pm

@ -523,7 +523,7 @@ sub UpdateFine {
my $overdues = Koha::Account::Lines->search(
{
borrowernumber => $borrowernumber,
debit_type_code => [ 'OVERDUE', 'M' ],
debit_type_code => 'OVERDUE',
amountoutstanding => { '<>' => 0 }
}
);
@ -637,7 +637,7 @@ sub GetFine {
my ( $itemnum, $borrowernumber ) = @_;
my $dbh = C4::Context->dbh();
my $query = q|SELECT sum(amountoutstanding) as fineamount FROM accountlines
WHERE debit_type_code LIKE 'OVERDUE'
WHERE debit_type_code = 'OVERDUE'
AND amountoutstanding > 0 AND borrowernumber=?|;
my @query_param;
push @query_param, $borrowernumber;

2
installer/data/mysql/account_debit_types.sql

@ -2,7 +2,7 @@ INSERT INTO account_debit_types ( code, description, can_be_added_manually, defa
('ACCOUNT', 'Account creation fee', 0, NULL, 1),
('ACCOUNT_RENEW', 'Account renewal fee', 0, NULL, 1),
('LOST', 'Lost item', 1, NULL, 1),
('M', 'Manual fee', 1, NULL, 0),
('MANUAL', 'Manual fee', 1, NULL, 0),
('NEW_CARD', 'New card fee', 1, NULL, 1),
('OVERDUE', 'Overdue fine', 0, NULL, 1),
('PROCESSING', 'Lost item processing fee', 0, NULL, 1),

9
installer/data/mysql/atomicupdate/bug_23049_debit.perl

@ -43,7 +43,7 @@ if ( CheckVersion($DBversion) ) {
('ACCOUNT_RENEW', 'Account renewal fee', 0, NULL, 1),
('RESERVE_EXPIRED', 'Hold waiting too long', 0, NULL, 1),
('LOST', 'Lost item', 1, NULL, 1),
('M', 'Manual fee', 1, NULL, 0),
('MANUAL', 'Manual fee', 1, NULL, 0),
('NEW_CARD', 'New card fee', 1, NULL, 1),
('OVERDUE', 'Overdue fine', 0, NULL, 1),
('PROCESSING', 'Lost item processing fee', 0, NULL, 1),
@ -83,6 +83,13 @@ if ( CheckVersion($DBversion) ) {
}
);
# Update accountype 'M' to 'MANUAL'
$dbh->do(
qq{
UPDATE accountlines SET accounttype = 'MANUAL' WHERE accounttype = 'M'
}
);
# Catch 'F' cases introduced since bug 22521
$dbh->do(qq{
UPDATE

2
installer/data/mysql/en/mandatory/account_debit_types.sql

@ -2,7 +2,7 @@ INSERT INTO account_debit_types ( code, description, can_be_added_manually, defa
('ACCOUNT', 'Account creation fee', 0, NULL, 1),
('ACCOUNT_RENEW', 'Account renewal fee', 0, NULL, 1),
('LOST', 'Lost item', 1, NULL, 1),
('M', 'Manual fee', 1, NULL, 0),
('MANUAL', 'Manual fee', 1, NULL, 0),
('NEW_CARD', 'New card fee', 1, NULL, 1),
('OVERDUE', 'Overdue fine', 0, NULL, 1),
('PROCESSING', 'Lost item processing fee', 0, NULL, 1),

2
koha-tmpl/intranet-tmpl/prog/en/includes/accounts.inc

@ -16,7 +16,7 @@
[%- CASE 'ACCOUNT' -%]Account creation fee
[%- CASE 'ACCOUNT_RENEW' -%]Account renewal fee
[%- CASE 'LOST' -%]Lost item
[%- CASE 'M' -%]Sundry
[%- CASE 'MANUAL' -%]Manual fee
[%- CASE 'NEW_CARD' -%]New card
[%- CASE 'OVERDUE' -%]Fine
[%- CASE 'PROCESSING' -%]Lost item processing fee

2
koha-tmpl/opac-tmpl/bootstrap/en/includes/account-table.inc

@ -187,7 +187,7 @@
[%- CASE 'ACCOUNT' -%]Account creation fee
[%- CASE 'ACCOUNT_RENEW' -%]Account renewal fee
[%- CASE 'LOST' -%]Lost item
[%- CASE 'M' -%]Sundry
[%- CASE 'MANUAL' -%]Manual fee
[%- CASE 'NEW_CARD' -%]New card
[%- CASE 'OVERDUE' -%]Fine
[%- CASE 'PROCESSING' -%]Lost item processing fee

Loading…
Cancel
Save