From 483b8657469b3d11e035735c49a777d5cacc40db Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Mon, 27 Jan 2020 11:06:26 +0000 Subject: [PATCH] Bug 24338: Add 'CASH' to default 'PAYMENT_TYPE' AV Bug 23321 adds cash registers to the koha accounts system and as part of that work introduces the 'CASH' payment type as a required option to allow requirment of a 'CASH_REGISTER' when making cash payments. The original patchset, however, forgot to add this new authorised value during installation and upgrade. Signed-off-by: David Nind Signed-off-by: Jonathan Druart --- installer/data/mysql/atomicupdate/bug_24338.perl | 12 ++++++++++++ installer/data/mysql/en/mandatory/auth_values.sql | 1 + 2 files changed, 13 insertions(+) create mode 100644 installer/data/mysql/atomicupdate/bug_24338.perl diff --git a/installer/data/mysql/atomicupdate/bug_24338.perl b/installer/data/mysql/atomicupdate/bug_24338.perl new file mode 100644 index 0000000000..bf154169ae --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_24338.perl @@ -0,0 +1,12 @@ +$DBversion = 'XXX'; # will be replaced by the RM +if( CheckVersion( $DBversion ) ) { + $dbh->do(qq{ + INSERT INTO + authorised_values (category,authorised_value,lib, lib_opac) + VALUES + ('PAYMENT_TYPE','CASH','Cash','Cash') + }); + + SetVersion( $DBversion ); + print "Upgrade to $DBversion done (Bug 24338 - Add 'CASH' to default 'PAYMENT_TYPE')\n"; +} diff --git a/installer/data/mysql/en/mandatory/auth_values.sql b/installer/data/mysql/en/mandatory/auth_values.sql index 26328ef6c1..01c9df95bb 100644 --- a/installer/data/mysql/en/mandatory/auth_values.sql +++ b/installer/data/mysql/en/mandatory/auth_values.sql @@ -1,3 +1,4 @@ INSERT INTO authorised_values (category,authorised_value,lib,lib_opac) VALUES ('YES_NO','0','No','No'); INSERT INTO authorised_values (category,authorised_value,lib,lib_opac) VALUES ('YES_NO','1','Yes','Yes'); +INSERT INTO authorised_values (category,authorised_value,lib,lib_opac) VALUES ('PAYMENT_TYPE','CASH','Cash','Cash'); INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('HSBND_FREQ','EW','Every week'); -- 2.11.0