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