[0000644] Unable o void delivery note and [0000645] Error entering written off Credit...
[fa-stable.git] / admin / db / voiding_db.inc
index 62165c1fbf2206d48a1bb7c10dfb22291f40a80e..17d7a8daceb58b2ca57210f50b0abf76574ecc26 100644 (file)
@@ -45,7 +45,7 @@ function void_transaction($type, $type_no, $date_, $memo_)
                                return false;
                        if ($type == ST_CUSTDELIVERY)   // added 04 Oct 2008 by Joe Hunt. If delivery note has a not voided invoice, then NO.
                        {
-                               $childs = get_sales_child_trans($type_no, $type);
+                               $childs = get_sales_child_lines($type, $type_no, false); // 2011-03-17 This had been changed. Joe
                                if ($childs && db_num_rows($childs))
                                                return false;
                        }