From ff96ed70722e3b462fbf6dff36a2d66a264615c3 Mon Sep 17 00:00:00 2001 From: Alex Buckley Date: Thu, 30 Mar 2023 21:56:15 +0000 Subject: [PATCH] Bug 33393: Add system preference Sponsored-by: Pymble Ladies' College Signed-off-by: David Nind Signed-off-by: Kyle M Hall --- .../bug_33393-add_1PageOrderPDFText.pl | 14 ++++++++++++++ installer/data/mysql/mandatory/sysprefs.sql | 1 + .../en/modules/admin/preferences/acquisitions.pref | 4 ++++ 3 files changed, 19 insertions(+) create mode 100755 installer/data/mysql/atomicupdate/bug_33393-add_1PageOrderPDFText.pl diff --git a/installer/data/mysql/atomicupdate/bug_33393-add_1PageOrderPDFText.pl b/installer/data/mysql/atomicupdate/bug_33393-add_1PageOrderPDFText.pl new file mode 100755 index 00000000000..3eef1d696df --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_33393-add_1PageOrderPDFText.pl @@ -0,0 +1,14 @@ +use Modern::Perl; + +return { + bug_number => "33393", + description => "Modify sentence above the order table in English 1-page order PDF", + up => sub { + my ($args) = @_; + my ($dbh, $out) = @$args{qw(dbh out)}; + + $dbh->do(q{INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) VALUES ('1PageOrderPDFText', 'Order number must appear on all related correspondence, shipping papers and invoices. Notify us immediately if \n you are unable to supply item(s).', NULL, 'Text to be used above the order table in the 1-page order PDF file', 'textarea') }); + + say $out "Added system preference '1PageOrderPDFText'"; + }, +}; diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql index 669074aa506..9d8656d1657 100644 --- a/installer/data/mysql/mandatory/sysprefs.sql +++ b/installer/data/mysql/mandatory/sysprefs.sql @@ -1,4 +1,5 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES +('1PageOrderPDFText', 'Order number must appear on all related correspondence, shipping papers and invoices. Notify us immediately if \n you are unable to supply item(s).', NULL, 'Text to be used above the order table in the 1-page order PDF file', 'textarea'), ('AccessControlAllowOrigin', '', NULL, 'Set the Access-Control-Allow-Origin header to the specified value', 'Free'), ('AccountAutoReconcile','0',NULL,'If enabled, patron balances will get reconciled automatically on each transaction.','YesNo'), ('AcqCreateItem','ordering','ordering|receiving|cataloguing','Define when the item is created : when ordering, when receiving, or in cataloguing module','Choice'), diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/acquisitions.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/acquisitions.pref index a29c7b9dd56..a5741444806 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/acquisitions.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/acquisitions.pref @@ -161,6 +161,10 @@ Acquisitions: "pdfformat::layout3pagesfr": French 3-page "pdfformat::layout2pagesde": German 2-page - layout when printing basket groups. + - + - "Text to be used above the order table in the 1-page order PDF file. Note: Press enter to add line breaks to your sentence" + - pref: 1PageOrderPDFText + type: textarea EDIFACT: - - pref: EDIFACT -- 2.30.2