Lines 2011-2017
returns the correct SQL routine based on OrderPriceRounding system preference.
Link Here
|
2011 |
sub _get_rounding_sql { |
2011 |
sub _get_rounding_sql { |
2012 |
my ( $round_string ) = @_; |
2012 |
my ( $round_string ) = @_; |
2013 |
my $rounding_pref = C4::Context->preference('OrderPriceRounding'); |
2013 |
my $rounding_pref = C4::Context->preference('OrderPriceRounding'); |
2014 |
if ( $rounding_pref eq "nearest_cent" ) { return ("CAST($round_string*100 AS INTEGER)/100"); } |
2014 |
if ( $rounding_pref eq "nearest_cent" ) { return ("CAST($round_string*100 AS UNSIGNED)/100"); } |
2015 |
else { return ("$round_string"); } |
2015 |
else { return ("$round_string"); } |
2016 |
} |
2016 |
} |
2017 |
|
2017 |
|