Merge remote-tracking branch 'Dolibarr/11.0' into 11
This commit is contained in:
parent
145caacbea
commit
232f201007
@ -1156,6 +1156,14 @@ class Facture extends CommonInvoice
|
||||
$line->date_start = $object->lines[$i]->date_start;
|
||||
$line->date_end = $object->lines[$i]->date_end;
|
||||
|
||||
// Multicurrency
|
||||
$line->fk_multicurrency = $object->lines[$i]->fk_multicurrency;
|
||||
$line->multicurrency_code = $object->lines[$i]->multicurrency_code;
|
||||
$line->multicurrency_subprice = $object->lines[$i]->multicurrency_subprice;
|
||||
$line->multicurrency_total_ht = $object->lines[$i]->multicurrency_total_ht;
|
||||
$line->multicurrency_total_tva = $object->lines[$i]->multicurrency_total_tva;
|
||||
$line->multicurrency_total_ttc = $object->lines[$i]->multicurrency_total_ttc;
|
||||
|
||||
$line->fk_fournprice = $object->lines[$i]->fk_fournprice;
|
||||
$marginInfos = getMarginInfos($object->lines[$i]->subprice, $object->lines[$i]->remise_percent, $object->lines[$i]->tva_tx, $object->lines[$i]->localtax1_tx, $object->lines[$i]->localtax2_tx, $object->lines[$i]->fk_fournprice, $object->lines[$i]->pa_ht);
|
||||
$line->pa_ht = $marginInfos[0];
|
||||
@ -1170,6 +1178,7 @@ class Facture extends CommonInvoice
|
||||
|
||||
$this->socid = $object->socid;
|
||||
$this->fk_project = $object->fk_project;
|
||||
$this->fk_account = $object->fk_account;
|
||||
$this->cond_reglement_id = $object->cond_reglement_id;
|
||||
$this->mode_reglement_id = $object->mode_reglement_id;
|
||||
$this->availability_id = $object->availability_id;
|
||||
|
||||
@ -1401,7 +1401,7 @@ function pdf_getlinedesc($object, $i, $outputlangs, $hideref = 0, $hidedesc = 0,
|
||||
foreach ($tblcateg as $cate)
|
||||
{
|
||||
// Adding the descriptions if they are filled
|
||||
$desccateg = $cate->add_description;
|
||||
$desccateg = $cate->description;
|
||||
if ($desccateg)
|
||||
$libelleproduitservice .= '__N__'.$desccateg;
|
||||
}
|
||||
|
||||
@ -1320,9 +1320,9 @@ class Cronjob extends CommonObject
|
||||
if ($processing) $moretext = ' ('.$langs->trans("Running").')';
|
||||
elseif ($lastresult) $moretext .= ' ('.$langs->trans("Error").')';
|
||||
|
||||
$this->labelStatus[self::STATUS_DISABLED] = $langs->trans('Draft').$moretext;
|
||||
$this->labelStatus[self::STATUS_DISABLED] = $langs->trans('Disabled').$moretext;
|
||||
$this->labelStatus[self::STATUS_ENABLED] = $langs->trans('Enabled').$moretext;
|
||||
$this->labelStatusShort[self::STATUS_DISABLED] = $langs->trans('Draft');
|
||||
$this->labelStatusShort[self::STATUS_DISABLED] = $langs->trans('Disabled');
|
||||
$this->labelStatusShort[self::STATUS_ENABLED] = $langs->trans('Enabled');
|
||||
}
|
||||
|
||||
|
||||
@ -263,13 +263,7 @@ class AutoLoader
|
||||
* @return bool false unless className now exists
|
||||
*/
|
||||
private function loadLastResort($className, $loader = null) {
|
||||
// @CHANGE LDR Add protection to avoid conflict with other autoloader
|
||||
/*print 'Try to load '.$className."\n";
|
||||
if (in_array($className, array('Google_Client')))
|
||||
{
|
||||
return false;
|
||||
}*/
|
||||
$loaders = array_unique(static::$rogueLoaders);
|
||||
$loaders = array_unique(static::$rogueLoaders);
|
||||
if (isset($loader)) {
|
||||
if (false === array_search($loader, $loaders))
|
||||
static::$rogueLoaders[] = $loader;
|
||||
|
||||
@ -159,7 +159,7 @@ class CommentParser
|
||||
$addNewline = true;
|
||||
}
|
||||
continue;
|
||||
} elseif ($line{0} == '@') {
|
||||
} elseif ($line[0] == '@') {
|
||||
$mode = 2;
|
||||
$newParam = true;
|
||||
}
|
||||
@ -353,7 +353,7 @@ class CommentParser
|
||||
$data = $format->decode($str);
|
||||
}
|
||||
} else { // auto detect
|
||||
if ($str{0} == '{') {
|
||||
if ($str[0] == '{') {
|
||||
$d = json_decode($str, true);
|
||||
if (json_last_error() != JSON_ERROR_NONE) {
|
||||
throw new Exception('Error parsing embedded JSON data'
|
||||
@ -445,7 +445,7 @@ class CommentParser
|
||||
{
|
||||
$r = array();
|
||||
$email = end($value);
|
||||
if ($email{0} == '<') {
|
||||
if ($email[0] == '<') {
|
||||
$email = substr($email, 1, -1);
|
||||
array_pop($value);
|
||||
$r['email'] = $email;
|
||||
@ -470,7 +470,7 @@ class CommentParser
|
||||
$data = array_shift($value);
|
||||
if (empty($data)) {
|
||||
$r['type'] = 'mixed';
|
||||
} elseif ($data{0} == '$') {
|
||||
} elseif ($data[0] == '$') {
|
||||
$r['name'] = substr($data, 1);
|
||||
$r['type'] = 'mixed';
|
||||
} else {
|
||||
@ -478,7 +478,7 @@ class CommentParser
|
||||
$r['type'] = count($data) == 1 ? $data[0] : $data;
|
||||
|
||||
$data = array_shift($value);
|
||||
if (!empty($data) && $data{0} == '$') {
|
||||
if (!empty($data) && $data[0] == '$') {
|
||||
$r['name'] = substr($data, 1);
|
||||
}
|
||||
}
|
||||
@ -498,7 +498,7 @@ class CommentParser
|
||||
$data = array_shift($value);
|
||||
if (empty($data)) {
|
||||
$r['type'] = 'mixed';
|
||||
} elseif ($data{0} == '$') {
|
||||
} elseif ($data[0] == '$') {
|
||||
$r['name'] = substr($data, 1);
|
||||
$r['type'] = 'mixed';
|
||||
} else {
|
||||
|
||||
@ -221,7 +221,7 @@ class XmlFormat extends Format
|
||||
$namespaces = $xml->getNamespaces();
|
||||
if (count($namespaces)) {
|
||||
$p = strpos($data, $xml->getName());
|
||||
if ($p && $data{$p - 1} == ':') {
|
||||
if ($p && $data[$p - 1] == ':') {
|
||||
$s = strpos($data, '<') + 1;
|
||||
$prefix = substr($data, $s, $p - $s - 1);
|
||||
static::$namespacedProperties[static::$rootName] = $prefix;
|
||||
|
||||
@ -198,7 +198,7 @@ class Resources implements iUseAuthentication, iProvideMultiVersionApi
|
||||
} elseif (false !== ($pos = strpos($id, '-v'))) {
|
||||
//$version = intval(substr($id, $pos + 2));
|
||||
$id = substr($id, 0, $pos);
|
||||
} elseif ($id{0} == 'v' && is_numeric($v = substr($id, 1))) {
|
||||
} elseif ($id[0] == 'v' && is_numeric($v = substr($id, 1))) {
|
||||
$id = '';
|
||||
//$version = $v;
|
||||
} elseif ($id == 'root' || $id == 'index') {
|
||||
@ -233,7 +233,7 @@ class Resources implements iUseAuthentication, iProvideMultiVersionApi
|
||||
if ($tSlash) {
|
||||
if ($fLen != $tLen && !Text::beginsWith($fullPath, $target . '/'))
|
||||
continue;
|
||||
} elseif ($fLen > $tLen + 1 && $fullPath{$tLen + 1} != '{' && !Text::beginsWith($fullPath, '{')) {
|
||||
} elseif ($fLen > $tLen + 1 && $fullPath[$tLen + 1] != '{' && !Text::beginsWith($fullPath, '{')) {
|
||||
//when mapped to root exclude paths that have static parts
|
||||
//they are listed else where under that static part name
|
||||
continue;
|
||||
@ -275,7 +275,7 @@ class Resources implements iUseAuthentication, iProvideMultiVersionApi
|
||||
if (count($parts) == 1 && $httpMethod == 'GET') {
|
||||
} else {
|
||||
for ($i = 0; $i < count($parts); $i++) {
|
||||
if (strlen($parts[$i]) && $parts[$i]{0} == '{') {
|
||||
if (strlen($parts[$i]) && $parts[$i][0] == '{') {
|
||||
$pos = $i - 1;
|
||||
break;
|
||||
}
|
||||
|
||||
@ -533,7 +533,7 @@ class Restler extends EventDispatcher
|
||||
rtrim($path, '/') //remove trailing slash if found
|
||||
);
|
||||
|
||||
if (Defaults::$useUrlBasedVersioning && strlen($path) && $path{0} == 'v') {
|
||||
if (Defaults::$useUrlBasedVersioning && strlen($path) && $path[0] == 'v') {
|
||||
$version = intval(substr($path, 1));
|
||||
if ($version && $version <= $this->apiVersion) {
|
||||
$this->requestedApiVersion = $version;
|
||||
@ -1599,7 +1599,7 @@ class Restler extends EventDispatcher
|
||||
*/
|
||||
public function __get($name)
|
||||
{
|
||||
if ($name{0} == '_') {
|
||||
if ($name[0] == '_') {
|
||||
$hiddenProperty = substr($name, 1);
|
||||
if (isset($this->$hiddenProperty)) {
|
||||
return $this->$hiddenProperty;
|
||||
|
||||
@ -87,7 +87,7 @@ class Routes
|
||||
foreach ($methods as $method) {
|
||||
$methodUrl = strtolower($method->getName());
|
||||
//method name should not begin with _
|
||||
if ($methodUrl{0} == '_') {
|
||||
if ($methodUrl[0] == '_') {
|
||||
continue;
|
||||
}
|
||||
$doc = $method->getDocComment();
|
||||
@ -330,7 +330,7 @@ class Routes
|
||||
if (!$type) {
|
||||
return 's';
|
||||
}
|
||||
switch ($type{0}) {
|
||||
switch ($type[0]) {
|
||||
case 'i':
|
||||
case 'f':
|
||||
return 'n';
|
||||
@ -428,7 +428,7 @@ class Routes
|
||||
}
|
||||
$index = intval(substr($k, 1));
|
||||
$details = $value[$httpMethod]['metadata']['param'][$index];
|
||||
if ($k{0} == 's' || strpos($k, static::pathVarTypeOf($v)) === 0) {
|
||||
if ($k[0] == 's' || strpos($k, static::pathVarTypeOf($v)) === 0) {
|
||||
//remove the newlines
|
||||
$data[$details['name']] = trim($v, PHP_EOL);
|
||||
} else {
|
||||
|
||||
@ -203,7 +203,7 @@ class Scope
|
||||
|
||||
$divider = '\\';
|
||||
$qualified = false;
|
||||
if ($className{0} == $divider) {
|
||||
if ($className[0] == $divider) {
|
||||
$qualified = trim($className, $divider);
|
||||
} elseif (array_key_exists($className, $scope)) {
|
||||
$qualified = $scope[$className];
|
||||
|
||||
@ -356,7 +356,7 @@ class Emmet
|
||||
$pos = strpos($string, $f, $start);
|
||||
$tokens = array();
|
||||
for ($i = $start; $i < $pos; $i++) {
|
||||
$token = $string{$i};
|
||||
$token = $string[$i];
|
||||
if (('#' == $token || '.' == $token) &&
|
||||
(!empty($tokens) || $i == 0)
|
||||
) {
|
||||
@ -368,7 +368,7 @@ class Emmet
|
||||
$r[] = $f;
|
||||
} while (false != ($f = strtok(static::DELIMITERS)));
|
||||
for ($i = $pos; $i < strlen($string); $i++) {
|
||||
$token = $string{$i};
|
||||
$token = $string[$i];
|
||||
$r[] = $tokens[] = $token;
|
||||
}
|
||||
return $r;
|
||||
|
||||
@ -606,7 +606,7 @@ foreach ($listofreferent as $key => $value)
|
||||
|
||||
$elementarray = $object->get_element_list($key, $tablename, $datefieldname, $dates, $datee, !empty($project_field)?$project_field:'fk_projet');
|
||||
|
||||
if (count($elementarray)>0 && is_array($elementarray))
|
||||
if (is_array($elementarray) && count($elementarray) > 0)
|
||||
{
|
||||
$total_ht = 0;
|
||||
$total_ttc = 0;
|
||||
|
||||
@ -1297,7 +1297,7 @@ div.fichetwothirdright {
|
||||
<?php if ($conf->browser->layout == 'phone') { print "padding-bottom: 6px\n"; } ?>
|
||||
}
|
||||
div.fichetwothirdright div.ficheaddleft {
|
||||
padding-left: 20px;
|
||||
padding-<?php echo $left; ?>: 20px;
|
||||
}
|
||||
div.fichehalfleft {
|
||||
<?php if ($conf->browser->layout != 'phone') { print "float: ".$left.";\n"; } ?>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user