From 0bc33ef3b3b5acab6ec02bd00ae2f0c2c667f9d4 Mon Sep 17 00:00:00 2001 From: BENKE Charlene <1179011+defrance@users.noreply.github.com> Date: Tue, 4 Jan 2022 09:26:10 +0100 Subject: [PATCH] Create card.php --- htdocs/fourn/commande/card.php | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php index eab53861f34..aa31178d546 100644 --- a/htdocs/fourn/commande/card.php +++ b/htdocs/fourn/commande/card.php @@ -1216,10 +1216,12 @@ if (empty($reshook)) { $classname = ucfirst($subelement); if ($origin == 'propal' || $origin == 'proposal') { $element = 'comm/propal'; $subelement = 'propal'; - } + $classname = 'Propal'; + } if ($origin == 'order' || $origin == 'commande') { $element = $subelement = 'commande'; - } + $classname = 'Commande'; + } if ($origin == 'supplier_proposal') { $classname = 'SupplierProposal'; $element = 'supplier_proposal'; @@ -1541,15 +1543,19 @@ if ($action == 'create') { if ($origin == 'propal' || $origin == 'proposal') { $classname = 'Propal'; $element = 'comm/propal'; $subelement = 'propal'; - } elseif ($origin == 'order' || $origin == 'commande') { + } + if ($origin == 'order' || $origin == 'commande') { $classname = 'Commande'; $element = $subelement = 'commande'; - } else { + } + if ($origin == 'supplier_proposal') { $classname = 'SupplierProposal'; $element = 'supplier_proposal'; $subelement = 'supplier_proposal'; } + + dol_include_once('/'.$element.'/class/'.$subelement.'.class.php'); $objectsrc = new $classname($db);