2
0
forked from Wavyzz/dolibarr

Merge branch 'develop' into prod-attr

# Conflicts:
#	htdocs/core/class/html.form.class.php
#	htdocs/fourn/commande/card.php
#	htdocs/fourn/facture/card.php
#	htdocs/langs/en_US/products.lang
This commit is contained in:
Marcos García de La Fuente
2017-02-02 20:07:41 +01:00
1892 changed files with 6693 additions and 86908 deletions

View File

@@ -1056,13 +1056,13 @@ function get_next_value($db,$mask,$table,$field,$where='',$objsoc='',$date='',$m
{
$numFinal = preg_replace('/\{yyyy\}/i',date("Y",$date)+$yearoffset, $numFinal);
$numFinal = preg_replace('/\{yy\}/i', date("y",$date)+$yearoffset, $numFinal);
$numFinal = preg_replace('/\{y\}/i', substr(date("y",$date),2,1)+$yearoffset, $numFinal);
$numFinal = preg_replace('/\{y\}/i', substr(date("y",$date),1,1)+$yearoffset, $numFinal);
}
else // we want yyyy to be current year
{
$numFinal = preg_replace('/\{yyyy\}/i',date("Y",$date), $numFinal);
$numFinal = preg_replace('/\{yy\}/i', date("y",$date), $numFinal);
$numFinal = preg_replace('/\{y\}/i', substr(date("y",$date),2,1), $numFinal);
$numFinal = preg_replace('/\{y\}/i', substr(date("y",$date),1,1), $numFinal);
}
$numFinal = preg_replace('/\{mm\}/i', date("m",$date), $numFinal);
$numFinal = preg_replace('/\{dd\}/i', date("d",$date), $numFinal);
@@ -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';
@@ -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,