X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=admin%2Fdb%2Fvoiding_db.inc;h=62165c1fbf2206d48a1bb7c10dfb22291f40a80e;hb=69fde1eed360af911850c868e86fb2f63700195b;hp=6bda4029584ec4eb5512211a5c018f7d0e0e1434;hpb=c895b045c679a5295f40881f918114cfbd3ccf3f;p=fa-stable.git diff --git a/admin/db/voiding_db.inc b/admin/db/voiding_db.inc index 6bda4029..62165c1f 100644 --- a/admin/db/voiding_db.inc +++ b/admin/db/voiding_db.inc @@ -45,13 +45,10 @@ 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. { - $delivery = get_customer_trans($type_no, $type); - if ($delivery['trans_link'] != 0) - { - if (get_voided_entry(ST_SALESINVOICE, $delivery['trans_link']) === false) + $childs = get_sales_child_trans($type_no, $type); + if ($childs && db_num_rows($childs)) return false; - } - } + } post_void_customer_trans($type, $type_no); break;