Lines 2021-2027
returns the correct SQL routine based on OrderPriceRounding system preference.
Link Here
|
2021 |
sub _get_rounding_sql { |
2021 |
sub _get_rounding_sql { |
2022 |
my ( $round_string ) = @_; |
2022 |
my ( $round_string ) = @_; |
2023 |
my $rounding_pref = C4::Context->preference('OrderPriceRounding'); |
2023 |
my $rounding_pref = C4::Context->preference('OrderPriceRounding'); |
2024 |
if ( $rounding_pref eq "nearest_cent" ) { return ("CAST($round_string*100 AS INTEGER)/100"); } |
2024 |
if ( $rounding_pref eq "nearest_cent" ) { return ("CAST($round_string*100 AS UNSIGNED)/100"); } |
2025 |
else { return ("$round_string"); } |
2025 |
else { return ("$round_string"); } |
2026 |
} |
2026 |
} |
2027 |
|
2027 |
|