Fixed 0000097,0000098 and view of credit notes with empty lines.
[fa-stable.git] / dimensions / inquiry / search_dimensions.php
index 4dd105dcaf8ce2a182d7a157981f4d7cdbd194ba..6f689ec94002d5ae7c4b86f71536f3f53641985e 100644 (file)
@@ -63,7 +63,7 @@ start_row();
 
 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');
 
@@ -137,7 +137,7 @@ while ($myrow = db_fetch($result))
        $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);