#invoice sub total excl tax
$sql ="SELECT SUM(gross_total) AS sub_total, SUM(total) AS total FROM {$tb_prefix}invoice_items WHERE invoice_id =$id";
$query = mysqlQuery($sql) or die(mysql_error());
$result = mysql_fetch_array($query);
//$invoice['total'] = number_format($result['total'],2);
$invoice['sub_total'] = number_format($result['sub_total'],2);1 to 5 of 5