From 8eecc3772aa459fe804f20a90b89ce153f06eccc Mon Sep 17 00:00:00 2001 From: Lucas Gass Date: Thu, 9 Oct 2025 16:10:11 +0000 Subject: [PATCH] Bug 40659: Add new notice VIRTUALCARD --- .../data/mysql/atomicupdate/bug_40659.pl | 22 +++++++++++++++++++ .../mysql/en/mandatory/sample_notices.yml | 21 ++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100755 installer/data/mysql/atomicupdate/bug_40659.pl diff --git a/installer/data/mysql/atomicupdate/bug_40659.pl b/installer/data/mysql/atomicupdate/bug_40659.pl new file mode 100755 index 00000000000..74999a3100e --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_40659.pl @@ -0,0 +1,22 @@ +use Modern::Perl; +use Koha::Installer::Output qw(say_warning say_success say_info); + +return { + bug_number => "40659", + description => "Add VIRTUALCARD default letter", + up => sub { + my ($args) = @_; + my ( $dbh, $out ) = @$args{qw(dbh out)}; + + $dbh->do( + q{ + INSERT IGNORE INTO letter + (module, code, branchcode, name, is_html, title, content, message_transport_type, lang) + VALUES ('members','VIRTUALCARD','','OPAC virtual card',1,'OPAC virtual card','[% my_image %]
[% my_barcode %]

Library: [% branch.branchname %]

Card number: [% borrower.cardnumber %]

Expiration date: [% borrower.dateexpiry | $KohaDates %]

+','email','default'); + } + ); + + say_success( $out, "Added VIRTUALCARD default letter" ); + }, +}; diff --git a/installer/data/mysql/en/mandatory/sample_notices.yml b/installer/data/mysql/en/mandatory/sample_notices.yml index 5d3048b8f84..a40f53899cb 100644 --- a/installer/data/mysql/en/mandatory/sample_notices.yml +++ b/installer/data/mysql/en/mandatory/sample_notices.yml @@ -1576,6 +1576,27 @@ tables: - "

This link will be valid for 5 days from this email's reception, then you must reapply if you do not change your password.

" - "

Thank you.

" + - module: members + code: VIRTUALCARD + branchcode: "" + name: "OPAC virtual card" + is_html: 1 + title: "OPAC virtual card" + message_transport_type: email + lang: default + content: + - "[% my_image %]" + - "[% my_barcode %]" + - "
" + - "

Library: [% branch.branchname %]

" + - "
" + - "
" + - "

Card number: [% borrower.cardnumber %]

" + - "" + - "

Expiration date: [% borrower.dateexpiry | $KohaDates %]

" + - "