From f98b0fe4dea80d56398c4d8385e1c0195383ecd6 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Fri, 5 Nov 2021 14:53:39 +0000 Subject: [PATCH] Bug 28374: Update existing notices This patch updates the default slip to include KohaDates, Branches and Price plugins as required and prepends the same to existing notices at upgrade time. We also, switch the HTML flag on. --- installer/data/mysql/atomicupdate/bug_28374.pl | 15 +++++++++++++++ .../data/mysql/en/mandatory/sample_notices.yml | 5 ++++- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 installer/data/mysql/atomicupdate/bug_28374.pl diff --git a/installer/data/mysql/atomicupdate/bug_28374.pl b/installer/data/mysql/atomicupdate/bug_28374.pl new file mode 100644 index 0000000000..89f517dab5 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_28374.pl @@ -0,0 +1,15 @@ +use Modern::Perl; + +return { + bug_number => "28374", + description => "Update point of sale print receipt", + up => sub { + my ($args) = @_; + my ($dbh, $out) = @$args{qw(dbh out)}; + + $dbh->do(q{ + UPDATE letter SET content = CONCAT('[% USE KohaDates %][% USE Branches %][% USE Price %]', content), is_html = 1 WHERE code = 'RECEIPT'; + }); + say $out "Added KohaDates, Branches and Price plugins"; + }, +} diff --git a/installer/data/mysql/en/mandatory/sample_notices.yml b/installer/data/mysql/en/mandatory/sample_notices.yml index e95df89a87..ae969f6bb0 100644 --- a/installer/data/mysql/en/mandatory/sample_notices.yml +++ b/installer/data/mysql/en/mandatory/sample_notices.yml @@ -1113,11 +1113,14 @@ tables: code: RECEIPT branchcode: "" name: "Point of sale receipt" - is_html: 0 + is_html: 1 title: "Receipt" message_transport_type: print lang: default content: + - "[% USE KohaDates %]" + - "[% USE Branches %]" + - "[% USE Price %]" - "[% PROCESS \"accounts.inc\" %]" - "" - "[% IF ( LibraryName ) %]" -- 2.20.1