$sql = "SELECT ".TB_PREF."gl_trans.*,".TB_PREF."chart_master.account_name FROM
".TB_PREF."gl_trans,".TB_PREF."chart_master WHERE
".TB_PREF."gl_trans.account = ".TB_PREF."chart_master.account_code AND
- dimension_id = $id OR dimension2_id = $id ORDER BY account,tran_date";
+ (dimension_id = $id OR dimension2_id = $id) ORDER BY account,tran_date";
$result = db_query($sql, "Transactions could not be calculated");
echo "<br>";
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');