Reference update after SO edition.
[fa-stable.git] / sales / includes / db / sales_order_db.inc
index 4ccc0fe810f327f0d3b2459079ec77169c49ef80..9a284032d8a680a26b89640ba13cc4bd3c28125c 100644 (file)
@@ -242,8 +242,7 @@ function update_sales_order($order)
        } /* inserted line items into sales order details */
 
        add_audit_trail($order->trans_type, $order_no, $order->document_date, _("Updated."));
-       $Refs->delete($order->trans_type, $order_no);
-       $Refs->save($order->trans_type, $order_no, $order->reference);
+       $Refs->update($order->trans_type, $order_no, $order->reference);
        commit_transaction();
        if ($loc_notification == 1 && count($st_ids) > 0)
        {