From: Maxime Bourget Date: Sat, 15 Jun 2013 20:11:38 +0000 (+0100) Subject: Fix hook not trigger on purchase order cart. X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=commitdiff_plain;h=0bb18b3a0afd89783bec25a1d73bb6107222ed21;p=order_line_extra.git Fix hook not trigger on purchase order cart. --- diff --git a/hooks.php b/hooks.php index 026f2d2..6922792 100644 --- a/hooks.php +++ b/hooks.php @@ -137,7 +137,7 @@ class hooks_order_line_extra extends hooks { } function db_postwrite($cart, $trans_type) { - if(is_a($cart, "Cart")) { + if(is_a($cart, "Cart") || is_a($cart, "purch_order")) { // It's a cart. Find all the stock_id and update the cache table foreach($cart->line_items as $line_no => $item) {