From 601b49e88fdb7079cf24113b99fa66929fd988c2 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Mon, 23 Jul 2018 13:28:13 +0000 Subject: [PATCH] Bug 19191: DBRev 18.06.00.010 Signed-off-by: Nick Clemens --- Koha.pm | 2 +- .../data/mysql/atomicupdate/bug_19191.sql | 9 --------- installer/data/mysql/updatedatabase.pl | 20 +++++++++++++++++-- 3 files changed, 19 insertions(+), 12 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/bug_19191.sql diff --git a/Koha.pm b/Koha.pm index 4b2d1abf69..f64b70e231 100644 --- a/Koha.pm +++ b/Koha.pm @@ -29,7 +29,7 @@ use vars qw{ $VERSION }; # - #4 : the developer version. The 4th number is the database subversion. # used by developers when the database changes. updatedatabase take care of the changes itself # and is automatically called by Auth.pm when needed. -$VERSION = "18.06.00.009"; +$VERSION = "18.06.00.010"; sub version { return $VERSION; diff --git a/installer/data/mysql/atomicupdate/bug_19191.sql b/installer/data/mysql/atomicupdate/bug_19191.sql deleted file mode 100644 index 8e54bb6e18..0000000000 --- a/installer/data/mysql/atomicupdate/bug_19191.sql +++ /dev/null @@ -1,9 +0,0 @@ -INSERT IGNORE INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, `title`, `content`, `message_transport_type`, `lang`) - VALUES - ('circulation', 'ACCOUNT_PAYMENT', '', 'Account payment', 0, 'Account payment', '[%- USE Price -%]\r\nA payment of [% credit.amount * -1 | $Price %] has been applied to your account.\r\n\r\nThis payment affected the following fees:\r\n[%- FOREACH o IN offsets %]\r\nDescription: [% o.debit.description %]\r\nAmount paid: [% o.amount * -1 | $Price %]\r\nAmount remaining: [% o.debit.amountoutstanding | $Price %]\r\n[% END %]', 'email', 'default'), - ('circulation', 'ACCOUNT_WRITEOFF', '', 'Account writeoff', 0, 'Account writeoff', '[%- USE Price -%]\r\nAn account writeoff of [% credit.amount * -1 | $Price %] has been applied to your account.\r\n\r\nThis writeoff affected the following fees:\r\n[%- FOREACH o IN offsets %]\r\nDescription: [% o.debit.description %]\r\nAmount paid: [% o.amount * -1 | $Price %]\r\nAmount remaining: [% o.debit.amountoutstanding | $Price %]\r\n[% END %]', 'email', 'default'); - -$dbh->do(q{ - INSERT IGNORE INTO systempreferences (`variable`, `value`, `options`, `explanation`, `type`) - VALUES ('UseEmailReceipts','0','','Send email receipts for payments and write-offs','YesNo') -}); diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 59ce0640d8..c4df140792 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -16155,14 +16155,14 @@ if( CheckVersion( $DBversion ) ) { print "Upgrade to $DBversion done (Bug 7651 - Add separate permission for managing currencies and exchange rates)\n"; } -$DBversion = '18.06.00.008'; # will be replaced by the RM +$DBversion = '18.06.00.008'; if( CheckVersion( $DBversion ) ) { $dbh->do( "ALTER IGNORE TABLE marc_modification_template_actions CHANGE action action ENUM('delete_field','add_field','update_field','move_field','copy_field','copy_and_replace_field')" ); SetVersion( $DBversion ); print "Upgrade to $DBversion done (Bug 13560 - need an add option in marc modification templates)\n"; } -$DBversion = '18.06.00.009'; # will be replaced by the RM +$DBversion = '18.06.00.009'; if( CheckVersion( $DBversion ) ) { $dbh->do( " CREATE TABLE IF NOT EXISTS aqinvoice_adjustments ( @@ -16184,6 +16184,22 @@ if( CheckVersion( $DBversion ) ) { print "Upgrade to $DBversion done (Bug 19166 - Add the ability to add adjustments to an invoice)\n"; } +$DBversion = '18.06.00.010'; +if( CheckVersion( $DBversion ) ) { + $dbh->do(q{ + INSERT IGNORE INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, `title`, `content`, `message_transport_type`, `lang`) + VALUES + ('circulation', 'ACCOUNT_PAYMENT', '', 'Account payment', 0, 'Account payment', '[%- USE Price -%]\r\nA payment of [% credit.amount * -1 | $Price %] has been applied to your account.\r\n\r\nThis payment affected the following fees:\r\n[%- FOREACH o IN offsets %]\r\nDescription: [% o.debit.description %]\r\nAmount paid: [% o.amount * -1 | $Price %]\r\nAmount remaining: [% o.debit.amountoutstanding | $Price %]\r\n[% END %]', 'email', 'default'), + ('circulation', 'ACCOUNT_WRITEOFF', '', 'Account writeoff', 0, 'Account writeoff', '[%- USE Price -%]\r\nAn account writeoff of [% credit.amount * -1 | $Price %] has been applied to your account.\r\n\r\nThis writeoff affected the following fees:\r\n[%- FOREACH o IN offsets %]\r\nDescription: [% o.debit.description %]\r\nAmount paid: [% o.amount * -1 | $Price %]\r\nAmount remaining: [% o.debit.amountoutstanding | $Price %]\r\n[% END %]', 'email', 'default'); + }); + $dbh->do(q{ + INSERT IGNORE INTO systempreferences (`variable`, `value`, `options`, `explanation`, `type`) + VALUES ('UseEmailReceipts','0','','Send email receipts for payments and write-offs','YesNo') + }); + SetVersion( $DBversion ); + print "Upgrade to $DBversion done (Bug 19191 - Add ability to email receipts for account payments and write-offs)\n"; +} + # SEE bug 13068 # if there is anything in the atomicupdate, read and execute it. -- 2.39.2