From d8f77abf31dd56f8d3f7a071115466bafd8aad5a Mon Sep 17 00:00:00 2001 From: Regis Houssin <regis.houssin@capnetworks.com> Date: Mon, 25 Jul 2016 14:36:20 +0200 Subject: [PATCH] Fix: missing sourcetype can create fault positive --- htdocs/compta/facture.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index e805d1ecac9..d19f3a7925b 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -405,7 +405,7 @@ if (empty($reshook)) } } } - + $qualified_for_stock_change = 0; if (empty($conf->global->STOCK_SUPPORTS_SERVICES)) { $qualified_for_stock_change = $object->hasProductsOrServices(2); @@ -2389,7 +2389,7 @@ if ($action == 'create') print '<tr><td>' . $langs->trans($newclassname) . '</td><td colspan="2">' . $objectsrc->getNomUrl(1); //We check if Origin document has already an invoice attached to it - $objectsrc->fetchObjectLinked($originid,'','','facture'); + $objectsrc->fetchObjectLinked($originid,$origin,'','facture'); $cntinvoice=count($objectsrc->linkedObjects['facture']); if ($cntinvoice>=1) { -- GitLab