mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-06 17:48:25 +01:00
clean code
This commit is contained in:
@@ -11239,7 +11239,7 @@ function getElementProperties($element_type)
|
||||
$subelement = $regs[2];
|
||||
}
|
||||
|
||||
// For compat
|
||||
// For compat and To work with non standard path
|
||||
if ($element_type == "action") {
|
||||
$classpath = 'comm/action/class';
|
||||
$subelement = 'Actioncomm';
|
||||
@@ -11253,81 +11253,65 @@ function getElementProperties($element_type)
|
||||
$classpath = 'product/stock/class';
|
||||
$classfile = 'entrepot';
|
||||
$classname = 'Entrepot';
|
||||
}
|
||||
// To work with non standard path
|
||||
if ($element_type == 'facture' || $element_type == 'invoice') {
|
||||
} elseif ($element_type == 'facture' || $element_type == 'invoice') {
|
||||
$classpath = 'compta/facture/class';
|
||||
$module = 'facture';
|
||||
$subelement = 'facture';
|
||||
}
|
||||
if ($element_type == 'commande' || $element_type == 'order') {
|
||||
} elseif ($element_type == 'commande' || $element_type == 'order') {
|
||||
$classpath = 'commande/class';
|
||||
$module = 'commande';
|
||||
$subelement = 'commande';
|
||||
}
|
||||
if ($element_type == 'propal') {
|
||||
} elseif ($element_type == 'propal') {
|
||||
$classpath = 'comm/propal/class';
|
||||
}
|
||||
if ($element_type == 'supplier_proposal') {
|
||||
} elseif ($element_type == 'supplier_proposal') {
|
||||
$classpath = 'supplier_proposal/class';
|
||||
}
|
||||
if ($element_type == 'shipping') {
|
||||
} elseif ($element_type == 'shipping') {
|
||||
$classpath = 'expedition/class';
|
||||
$subelement = 'expedition';
|
||||
$module = 'expedition_bon';
|
||||
}
|
||||
if ($element_type == 'delivery') {
|
||||
} elseif ($element_type == 'delivery') {
|
||||
$classpath = 'delivery/class';
|
||||
$subelement = 'delivery';
|
||||
$module = 'delivery_note';
|
||||
}
|
||||
if ($element_type == 'contract') {
|
||||
} elseif ($element_type == 'contract') {
|
||||
$classpath = 'contrat/class';
|
||||
$module = 'contrat';
|
||||
$subelement = 'contrat';
|
||||
}
|
||||
if ($element_type == 'member') {
|
||||
} elseif ($element_type == 'member') {
|
||||
$classpath = 'adherents/class';
|
||||
$module = 'adherent';
|
||||
$subelement = 'adherent';
|
||||
}
|
||||
if ($element_type == 'cabinetmed_cons') {
|
||||
} elseif ($element_type == 'cabinetmed_cons') {
|
||||
$classpath = 'cabinetmed/class';
|
||||
$module = 'cabinetmed';
|
||||
$subelement = 'cabinetmedcons';
|
||||
}
|
||||
if ($element_type == 'fichinter') {
|
||||
} elseif ($element_type == 'fichinter') {
|
||||
$classpath = 'fichinter/class';
|
||||
$module = 'ficheinter';
|
||||
$subelement = 'fichinter';
|
||||
}
|
||||
if ($element_type == 'dolresource' || $element_type == 'resource') {
|
||||
} elseif ($element_type == 'dolresource' || $element_type == 'resource') {
|
||||
$classpath = 'resource/class';
|
||||
$module = 'resource';
|
||||
$subelement = 'dolresource';
|
||||
}
|
||||
if ($element_type == 'propaldet') {
|
||||
} elseif ($element_type == 'propaldet') {
|
||||
$classpath = 'comm/propal/class';
|
||||
$module = 'propal';
|
||||
$subelement = 'propaleligne';
|
||||
}
|
||||
if ($element_type == 'order_supplier') {
|
||||
} elseif ($element_type == 'order_supplier') {
|
||||
$classpath = 'fourn/class';
|
||||
$module = 'fournisseur';
|
||||
$classfile = 'fournisseur.commande';
|
||||
$element = 'commande';
|
||||
$subelement = '';
|
||||
$classname = 'CommandeFournisseur';
|
||||
}
|
||||
if ($element_type == 'invoice_supplier') {
|
||||
} elseif ($element_type == 'invoice_supplier') {
|
||||
$classpath = 'fourn/class';
|
||||
$module = 'fournisseur';
|
||||
$classfile = 'fournisseur.facture';
|
||||
$element = 'facture';
|
||||
$subelement = '';
|
||||
$classname = 'FactureFournisseur';
|
||||
}
|
||||
if ($element_type == "service") {
|
||||
} elseif ($element_type == "service") {
|
||||
$classpath = 'product/class';
|
||||
$subelement = 'product';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user