Here is what I found in code regarding the division by zero. I'm not sure what to change it to. Can anyone help?

'customer_id'] . "'");

if ($group_query->fields['customers_group_pricing'] != '0') {

$group_discount = $db->Execute("select group_name, group_percentage from " . TABLE_GROUP_PRICING . "

where group_id = '" . (int)$group_query->fields['customers_group_pricing'] . "'");

$gift_vouchers = $_SESSION['cart']->gv_only();

$discount = ($order_total - $gift_vouchers) * $group_discount->fields['group_percentage'] / 100;

$od_amount['total'] = round($discount, 2);

$ratio = $od_amount['total']/$order_total;

/**

* when calculating the ratio add some insignificant values to stop divide by zero errors

*/