diff --git a/htdocs/commande/orderstoinvoice.php b/htdocs/commande/orderstoinvoice.php index 9a98b389bd0..905bcb8c211 100644 --- a/htdocs/commande/orderstoinvoice.php +++ b/htdocs/commande/orderstoinvoice.php @@ -6,6 +6,7 @@ * Copyright (C) 2012 Andreu Bisquerra Gaya * Copyright (C) 2012 David Rodriguez Martinez * Copyright (C) 2012 Juanjo Menent + * Copyright (C) 2015 Ferran Marcet * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -179,6 +180,7 @@ if (($action == 'create' || $action == 'add') && !$error) $object->origin_id = $orders_id[$ii]; $object->linked_objects = $orders_id; $id = $object->create($user); + $object->fetch_thirdparty(); if ($id>0) {