X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=gl%2Fincludes%2Fdb%2Fgl_db_trans.inc;h=fe9599afb10d6bc804d5ff4b3d9d5c8c436494b9;hb=79e9eb93c8f4f1cde88161253494626466ba7a50;hp=80663e0bcbf42afdc47ec22add83f73579613638;hpb=275c4751c146ec40b4afd2e119f968b290f21517;p=fa-stable.git diff --git a/gl/includes/db/gl_db_trans.inc b/gl/includes/db/gl_db_trans.inc index 80663e0b..fe9599af 100644 --- a/gl/includes/db/gl_db_trans.inc +++ b/gl/includes/db/gl_db_trans.inc @@ -154,6 +154,7 @@ function get_gl_trans($type, $trans_id) LEFT JOIN ".TB_PREF."refs as refs ON (gl.type=refs.type AND gl.type_no=refs.id)" ." WHERE gl.type= ".db_escape($type) ." AND gl.type_no = ".db_escape($trans_id) + ." AND gl.amount <> 0" ." ORDER BY counter"; return db_query($sql, "The gl transactions could not be retrieved"); } @@ -583,22 +584,6 @@ function void_gl_trans($type, $trans_id, $nested=false) 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)