Modifying Supplier Credit: reverted GL postings - fixed.
[fa-stable.git] / purchasing / includes / db / suppalloc_db.inc
index ad83e7e4011224f03c381d0dfb532599f426e37b..cf996d602d0e72db63625d953053293cf3c60c11 100644 (file)
@@ -44,7 +44,7 @@ function get_supp_trans_allocation_balance($trans_type, $trans_no)
        $result = db_query($sql,"calculate the allocation");
        $myrow = db_fetch_row($result);
 
-       return $myrow[0];
+       return $myrow ? $myrow[0] : 0;
 }
 
 //----------------------------------------------------------------------------------------