View | Details | Raw Unified | Return to bug 18736
Collapse All | Expand All

(-)a/C4/Acquisition.pm (-1 / +1 lines)
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
(-)a/C4/Budgets.pm (-2 / +1 lines)
Lines 1359-1365 returns the correct SQL routine based on OrderPriceRounding system preference. Link Here
1359
sub _get_rounding_sql {
1359
sub _get_rounding_sql {
1360
    my $to_round = shift;
1360
    my $to_round = shift;
1361
    my $rounding_pref = C4::Context->preference('OrderPriceRounding');
1361
    my $rounding_pref = C4::Context->preference('OrderPriceRounding');
1362
    if   ($rounding_pref eq 'nearest_cent') { return "CAST($to_round*100 AS INTEGER)/100"; }
1362
    if   ($rounding_pref eq 'nearest_cent') { return "CAST($to_round*100 AS UNSIGNED)/100"; }
1363
    else { return "$to_round"; }
1363
    else { return "$to_round"; }
1364
}
1364
}
1365
1365
1366
- 

Return to bug 18736