From 40c08bc6e38e8cd6239ab88ea4cbe59fc8a99a55 Mon Sep 17 00:00:00 2001 From: Daniel Camargo Date: Mon, 30 Jun 2014 15:58:09 -0300 Subject: [PATCH] implement additional payment math in Settlement.php #2250 --- include/library/Crunchbutton/Settlement.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/library/Crunchbutton/Settlement.php b/include/library/Crunchbutton/Settlement.php index 9e273db03..23f684d68 100644 --- a/include/library/Crunchbutton/Settlement.php +++ b/include/library/Crunchbutton/Settlement.php @@ -112,10 +112,10 @@ class Crunchbutton_Settlement extends Cana_Model { } } foreach ( $pay as $key => $val ) { - $pay[ $key ] = Util::round_up( number_format( $val, 3 ), 2 ); + $pay[ $key ] = round( $val, 2 ); } // sum - $pay[ 'total_due' ] = Util::round_up( number_format( $this->orderCalculateTotalDue( $pay ), 3 ), 2 );; + $pay[ 'total_due' ] = round( $this->orderCalculateTotalDue( $pay ), 2 ); $this->log( 'restaurantsProcessOrders', array_merge( $restaurant, $pay ) ); return $pay;