From: Maxime Bourget Date: Sun, 23 Jun 2013 20:13:01 +0000 (+0100) Subject: Added missing db_write_hook in update sales order. X-Git-Tag: 2.3-final~223 X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=commitdiff_plain;h=0534ae2c9397863e2d7c7cbcf296a84c5e9ed716;p=fa-stable.git Added missing db_write_hook in update sales order. --- diff --git a/sales/includes/db/sales_order_db.inc b/sales/includes/db/sales_order_db.inc index 430c7309..d72f10c8 100644 --- a/sales/includes/db/sales_order_db.inc +++ b/sales/includes/db/sales_order_db.inc @@ -165,6 +165,7 @@ function update_sales_order($order) $total = $order->get_trans_total(); begin_transaction(); + hook_db_prewrite($order, $order->trans_type); $sql = "UPDATE ".TB_PREF."sales_orders SET type =".db_escape($order->so_type)." , debtor_no = " . db_escape($order->customer_id) . ", @@ -248,6 +249,8 @@ function update_sales_order($order) add_audit_trail($order->trans_type, $order_no, $order->document_date, _("Updated.")); $Refs->save($order->trans_type, $order_no, $order->reference); + + hook_db_postwrite($order, $order->trans_type); commit_transaction(); if ($loc_notification == 1 && count($st_ids) > 0) {