implement additional payment math in Settlement.php #2250

This commit is contained in:
Daniel Camargo 2014-06-30 15:58:09 -03:00
parent 3d965ea77c
commit 40c08bc6e3

View File

@ -112,10 +112,10 @@ class Crunchbutton_Settlement extends Cana_Model {
} }
} }
foreach ( $pay as $key => $val ) { foreach ( $pay as $key => $val ) {
$pay[ $key ] = Util::round_up( number_format( $val, 3 ), 2 ); $pay[ $key ] = round( $val, 2 );
} }
// sum // 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 ) ); $this->log( 'restaurantsProcessOrders', array_merge( $restaurant, $pay ) );
return $pay; return $pay;