+ $result = db_query($sql, "could not retreive quick entry $selected_id");
+
+ return db_fetch($result);
+}
+
+function get_quick_entry_lines($qid)
+{
+ $sql = "SELECT ".TB_PREF."quick_entry_lines.*, ".TB_PREF."chart_master.account_name
+ FROM ".TB_PREF."quick_entry_lines, ".TB_PREF."chart_master
+ WHERE ".TB_PREF."quick_entry_lines.account = ".TB_PREF."chart_master.account_code
+ AND qid=$qid";
+
+ return db_query($sql, "could not retreive quick entries");
+}
+
+function has_quick_entry_lines($qid)
+{
+ $sql = "SELECT id FROM ".TB_PREF."quick_entry_lines WHERE qid=$qid";
+
+ $result = db_query($sql, "could not retreive quick entries");
+ return db_num_rows($result) > 0;
+}
+
+//---------------------------------------------------------------------------------------------
+
+function get_quick_entry_line($selected_id)
+{
+ $sql = "SELECT * FROM ".TB_PREF."quick_entry_lines WHERE id=$selected_id";
+