Changes up to 2.3.7 merged into unstable branch.
[fa-stable.git] / gl / includes / db / gl_db_trans.inc
index 078d3446dd779b04bd818660c62d7970537fb7ac..536143a3764be6ba2b470847190d01d7c3c6be8e 100644 (file)
@@ -157,6 +157,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");
 }
@@ -594,7 +595,7 @@ function void_gl_trans($type, $trans_id, $nested=false)
                commit_transaction();
 }
 
-//--------------------------------------------------------------------------------------------------
+//----------------------------------------------------------------------------------------
 
 function clear_gl_trans($type, $trans_id, $nested=false)
 {