Create card.php

This commit is contained in:
BENKE Charlene 2022-01-04 09:26:10 +01:00 committed by GitHub
parent 4e1d4ea1ca
commit 0bc33ef3b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);