ref_cells(_("Reference:"), 'OrderNumber', '',null, '', true);
-number_list_cells(_("Type"), 'type_', null, 0, 2);
+number_list_cells(_("Type"), 'type_', null, 1, 2, _("All"));
date_cells(_("From:"), 'FromDate', '', null, 0, 0, -5);
date_cells(_("To:"), 'ToDate');
$sql = "SELECT SUM(amount) FROM ".TB_PREF."gl_trans WHERE tran_date >= '" .
date2sql($_POST['FromDate']) . "' AND
tran_date <= '" . date2sql($_POST['ToDate']) . "' AND (dimension_id = " .
- $myrow['id']." OR dimension2_id = " .$myrow['id']);
+ $myrow['id']." OR dimension2_id = " .$myrow['id'].")";
$res = db_query($sql, "Transactions could not be calculated");
$row = db_fetch_row($res);