Skip to content

Commit

Permalink
Add supplier order/invoice to elementproperties
Browse files Browse the repository at this point in the history
  • Loading branch information
IonAgorria committed Jan 20, 2017
1 parent 227b616 commit 9270b2c
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions htdocs/core/lib/functions2.lib.php
Expand Up @@ -1923,10 +1923,6 @@ function getElementProperties($element_type)
$subelement = $regs[2];
}

$classfile = strtolower($subelement);
$classname = ucfirst($subelement);
$classpath = $module.'/class';

// For compat
if($element_type == "action") {
$classpath = 'comm/action/class';
Expand Down Expand Up @@ -1991,8 +1987,22 @@ function getElementProperties($element_type)
$module='propal';
$subelement='propaleligne';
}
$classfile = strtolower($subelement);
$classname = ucfirst($subelement);
if ($element_type == 'order_supplier') {
$classpath = 'fourn/class';
$module='fournisseur';
$subelement='commandefournisseur';
$classfile='fournisseur.commande';
}
if ($element_type == 'invoice_supplier') {
$classpath = 'fourn/class';
$module='fournisseur';
$subelement='facturefournisseur';
$classfile='fournisseur.facture';
}

if (!isset($classfile)) $classfile = strtolower($subelement);
if (!isset($classname)) $classname = ucfirst($subelement);
if (!isset($classpath)) $classpath = $module.'/class';

$element_properties = array(
'module' => $module,
Expand Down

0 comments on commit 9270b2c

Please sign in to comment.