X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=admin%2Fdb%2Fvoiding_db.inc;h=0f77cb20cec7104265024f39da6ead7d2547a193;hb=c5c02144e4d60928f888af90060318649e03cdec;hp=96e46a26bbd545b43adfc7950773e4e42ae3f313;hpb=b17df731b4bb055c2fdd568bc4be9e5caa0ee07b;p=fa-stable.git diff --git a/admin/db/voiding_db.inc b/admin/db/voiding_db.inc index 96e46a26..0f77cb20 100644 --- a/admin/db/voiding_db.inc +++ b/admin/db/voiding_db.inc @@ -49,9 +49,7 @@ function void_transaction($type, $type_no, $date_, $memo_) $delivery = get_customer_trans($type_no, $type); if ($delivery['trans_link'] != 0) { - $inv = get_customer_trans($delivery['trans_link'], 10); - if ($inv['ov_amount'] != 0 || $inv['ov_discount'] != 0 || $inv['ov_gst'] != 0 || - $inv['ov_freight'] != 0 || $inv['ov_freight_tax'] != 0 || $inv['alloc'] != 0) + if (get_voided_entry(10, $delivery['trans_link']) === false) return false; } }