db_query($sql, "The transaction tax details could not be voided");
}
+//----------------------------------------------------------------------------------------
+
+function clear_trans_tax_details($type, $type_no)
+{
+ $sql = "DELETE FROM ".TB_PREF."trans_tax_details
+ WHERE trans_no=".db_escape($type_no)
+ ." AND trans_type=".db_escape($type);
+
+ db_query($sql, "The transaction tax details could not be cleared");
+}
+
function get_tax_summary($from, $to)
{
$fromdate = date2sql($from);
commit_transaction();
}
+//--------------------------------------------------------------------------------------------------
+
+function clear_gl_trans($type, $trans_id, $nested=false)
+{
+ if (!$nested)
+ begin_transaction();
+
+ $sql = "DELETE FROM ".TB_PREF."gl_trans WHERE type=".db_escape($type)
+ ." AND type_no=".db_escape($trans_id);
+
+ db_query($sql, "could not clear gl transactions for type=$type and trans_no=$trans_id");
+
+ if (!$nested)
+ commit_transaction();
+}
+
//----------------------------------------------------------------------------------------
function void_journal_trans($type, $type_no, $use_transaction=true)
}
$sql .= " GROUP BY gl.type, gl.type_no";
*/
+
$sql = "SELECT IF(ISNULL(a.gl_seq),0,a.gl_seq) as gl_seq,
gl.tran_date,
gl.type,
if (isset($_POST['Ref']) && $_POST['Ref'] != "") {
$sql .= " AND reference LIKE '%". $_POST['Ref'] . "%'";
}
+ if (isset($_POST['Memo']) && $_POST['Memo'] != "") {
+ $sql .= " AND com.memo_ LIKE '%". $_POST['Memo'] . "%'";
+ }
if (get_post('filterType') != -1) {
$sql .= " AND gl.type=".get_post('filterType');
}