https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18736 --- Comment #19 from M. Tompsett <mtompset@hotmail.com> --- Comment on attachment 70188 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=70188 Bug 18736 - Use rounding syspref to determine correct prices in calculations Review of attachment 70188: --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=18736&attachment=70188) ----------------------------------------------------------------- ::: C4/Acquisition.pm @@ +2010,5 @@
+ +sub _get_rounding_sql { + my $round_string = @_; + my $rounding_pref = C4::Context->preference('OrderPriceRounding'); + if ( $rounding_pref eq "nearest_cent" ) { return ("ROUND($round_string,2)"); }
ROUND() is not ANSI SQL. CEIL($round_string*100)/100 would be ANSI SQL 2003, I believe. ::: C4/Budgets.pm @@ +1291,5 @@
+ +sub _get_rounding_sql { + my $to_round = shift; + my $rounding_pref = C4::Context->preference('OrderPriceRounding'); + if ($rounding_pref eq 'nearest_cent') { return "ROUND($to_round,2)"; }
Same problem here. Not ANSI SQL. -- You are receiving this mail because: You are watching all bug changes.