From: Maxime Bourget Date: Wed, 5 Jun 2013 21:07:37 +0000 (+0100) Subject: Add db_prevoid X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=commitdiff_plain;h=e9d31826b7bbb2bbc18e5e5339f3bd0a4f5cb328;p=order_line_extra.git Add db_prevoid --- diff --git a/hooks.php b/hooks.php index 0bf5ad1..1773852 100644 --- a/hooks.php +++ b/hooks.php @@ -92,5 +92,16 @@ class hooks_order_line_extra extends hooks { } } + + + function db_prevoid($cart, $trans_type) { + // Simple version, rebuild everything + $types = array(ST_CUSTCREDIT, ST_CUSTDELIVERY, ST_INVADJUST, ST_PURCHORDER, ST_WORKORDER, ST_MANUISSUE, + ST_SALESORDER, ST_SALESQUOTE, ST_MANURECEIVE); + if(in_array($trans_type, $types)) { + update_queue_quantities(); + update_qoh_for_item(); + } + } } ?>