- $total = array();
- $total[0] = $total[1] = $total[2] = $total[3] = $total[4] = 0.0;
-
- $sql = "SELECT debtor_no, name, curr_code FROM ".TB_PREF."debtors_master
- WHERE debtor_no>=$fromcust AND debtor_no<=$tocust ORDER BY name";
+ $total = array(0,0,0,0, 0);
+
+ $sql = "SELECT debtor_no, name, curr_code FROM ".TB_PREF."debtors_master ";
+ if ($fromcust != reserved_words::get_all_numeric())
+ $sql .= "WHERE debtor_no=$fromcust ";
+ $sql .= "ORDER BY name";