From 1f325e80d5e2693e84ba5dbd5e425b8b2d21bc0a Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Thu, 28 Dec 2017 15:11:11 +0000 Subject: [PATCH] Bug 18736: Add OrderPriceRounding syspref --- .../data/mysql/atomicupdate/bug18736_add_rounding_syspref.perl | 7 +++++++ installer/data/mysql/sysprefs.sql | 1 + .../prog/en/modules/admin/preferences/acquisitions.pref | 9 ++++++++- 3 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 installer/data/mysql/atomicupdate/bug18736_add_rounding_syspref.perl diff --git a/installer/data/mysql/atomicupdate/bug18736_add_rounding_syspref.perl b/installer/data/mysql/atomicupdate/bug18736_add_rounding_syspref.perl new file mode 100644 index 0000000..0f3c77f --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug18736_add_rounding_syspref.perl @@ -0,0 +1,7 @@ +$DBversion = 'XXX'; # will be replaced by the RM +if( CheckVersion( $DBversion ) ) { + # $dbh->do( "INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('OrderPriceRounding',NULL,'Local preference for rounding orders before calculations to ensure correct calculations','|nearest_cent','Choice')" ); + + SetVersion( $DBversion ); + print "Upgrade to $DBversion done (Bug 18736 - Add syspref to control order rounding)\n"; +} diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql index 868e603..7e4e11e 100644 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -409,6 +409,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('OpenLibraryCovers','0',NULL,'If ON Openlibrary book covers will be show','YesNo'), ('OpenLibrarySearch','0',NULL,'If Yes Open Library search results will show in OPAC','YesNo'), ('OrderPdfFormat','pdfformat::layout3pages','Controls what script is used for printing (basketgroups)','','free'), +('OrderPriceRounding','','|nearest_cent','Local preference for rounding orders before calculations to ensure correct calculations','Choice'), ('OverDriveCirculation','0','Enable client to see their OverDrive account','','YesNo'), ('OverDriveClientKey','','Client key for OverDrive integration','30','Free'), ('OverDriveClientSecret','','Client key for OverDrive integration','30','YesNo'), 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 bf5d4bb..70b6662 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 @@ -84,7 +84,14 @@ Acquisitions: -
WARNING - Leave this field empty if you don't want to activate this automatic feature. - "
Example: [30] Sets purgation of suggestions for those older than 30 days." -
(Used when the cronjob purge_suggestions.pl is active and called without a specific number of days) - + - + - pref: OrderPriceRounding + default: '' + choices: + '': Don't round + nearest_cent: Round + - to nearest cent.
+ - Determines whether full precision values or rounded values should be used in price calculations - - pref: UseACQFrameworkForBiblioRecords default: no -- 2.1.4