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

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

Return to bug 18736