From 884fc5d249ac28a8c3216635ee32071aab5231ce Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 2 Oct 2017 01:25:00 +0200 Subject: [PATCH] Update facture.class.php --- htdocs/compta/facture/class/facture.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 3c4bfec6a45..60970b5b1e2 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -486,7 +486,8 @@ class Facture extends CommonInvoice foreach ($exp->linkedObjectsIds['commande'] as $key => $value) { $originforcontact = 'commande'; - $originidforcontact = $value; + if (is_object($value)) $originidforcontact = $value->id; + else $originidforcontact = $value; break; // We take first one } }