diff --git a/htdocs/comm/card.php b/htdocs/comm/card.php index 8fb590d61b4..fa2af2dc3eb 100644 --- a/htdocs/comm/card.php +++ b/htdocs/comm/card.php @@ -211,7 +211,7 @@ if ($id > 0 && empty($object->id)) { // Load data of third party $res=$object->fetch($id); - if ($object->id <= 0) dol_print_error($db,$object->error,$object->errors); + if ($object->id < 0) dol_print_error($db, $object->error, $object->errors); } $title=$langs->trans("CustomerCard"); @@ -220,7 +220,7 @@ $help_url='EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas'; llxHeader('',$title,$help_url); -if ($id > 0) +if ($object->id > 0) { $head = societe_prepare_head($object); @@ -1271,7 +1271,8 @@ if ($id > 0) } else { - dol_print_error($db,'Bad value for socid parameter'); + $langs->load("errors"); + print $langs->trans('ErrorRecordNotFound'); } // End of page diff --git a/htdocs/societe/consumption.php b/htdocs/societe/consumption.php index c9c26326426..ffb4cac77fa 100644 --- a/htdocs/societe/consumption.php +++ b/htdocs/societe/consumption.php @@ -268,7 +268,7 @@ if ($type_element == 'supplier_order') $thirdTypeSelect='supplier'; } if ($type_element == 'contract') -{ // Supplier : Show products from orders. +{ // Order require_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php'; $documentstatic=new Contrat($db); $documentstaticline=new ContratLigne($db);