Fix: wrong type value

This commit is contained in:
Regis Houssin 2017-10-03 12:08:25 +02:00
parent 1fc292fa56
commit db8d27f0fe

View File

@ -319,7 +319,7 @@ else
// List of products or services (type is type of category) // List of products or services (type is type of category)
if ($object->type == Categorie::TYPE_PRODUCT) if ($type == Categorie::TYPE_PRODUCT)
{ {
$prods = $object->getObjectsInCateg("product"); $prods = $object->getObjectsInCateg("product");
if ($prods < 0) if ($prods < 0)
@ -391,7 +391,7 @@ if ($object->type == Categorie::TYPE_PRODUCT)
} }
} }
if ($object->type == Categorie::TYPE_SUPPLIER) if ($type == Categorie::TYPE_SUPPLIER)
{ {
$socs = $object->getObjectsInCateg("supplier"); $socs = $object->getObjectsInCateg("supplier");
if ($socs < 0) if ($socs < 0)
@ -440,7 +440,7 @@ if ($object->type == Categorie::TYPE_SUPPLIER)
} }
} }
if($object->type == Categorie::TYPE_CUSTOMER) if($type == Categorie::TYPE_CUSTOMER)
{ {
$socs = $object->getObjectsInCateg("customer"); $socs = $object->getObjectsInCateg("customer");
if ($socs < 0) if ($socs < 0)
@ -494,7 +494,7 @@ if($object->type == Categorie::TYPE_CUSTOMER)
} }
// List of members // List of members
if ($object->type == Categorie::TYPE_MEMBER) if ($type == Categorie::TYPE_MEMBER)
{ {
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
@ -547,7 +547,7 @@ if ($object->type == Categorie::TYPE_MEMBER)
} }
// Categorie contact // Categorie contact
if($object->type == Categorie::TYPE_CONTACT) if ($type == Categorie::TYPE_CONTACT)
{ {
$contacts = $object->getObjectsInCateg("contact"); $contacts = $object->getObjectsInCateg("contact");
if ($contacts < 0) if ($contacts < 0)
@ -600,7 +600,7 @@ if($object->type == Categorie::TYPE_CONTACT)
} }
// List of accounts // List of accounts
if ($object->type == Categorie::TYPE_ACCOUNT) if ($type == Categorie::TYPE_ACCOUNT)
{ {
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
@ -653,7 +653,7 @@ if ($object->type == Categorie::TYPE_ACCOUNT)
} }
// List of Project // List of Project
if ($object->type == Categorie::TYPE_PROJECT) if ($type == Categorie::TYPE_PROJECT)
{ {
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';