mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-13 03:12:35 +01:00
FIX resolve conflicts
This commit is contained in:
@@ -602,6 +602,8 @@ abstract class CommonObject
|
||||
|
||||
|
||||
// No constructor as it is an abstract class
|
||||
|
||||
|
||||
/**
|
||||
* Check an object id/ref exists
|
||||
* If you don't need/want to instantiate object and just need to know if object exists, use this method instead of fetch
|
||||
@@ -648,6 +650,7 @@ abstract class CommonObject
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Method to output saved errors
|
||||
*
|
||||
@@ -4983,7 +4986,7 @@ abstract class CommonObject
|
||||
}
|
||||
|
||||
$text .= ' - '.(!empty($line->label) ? $line->label : $label);
|
||||
$description .= (!empty($conf->global->PRODUIT_DESC_IN_FORM) ? '' : dol_htmlentitiesbr($line->description)); // Description is what to show on popup. We shown nothing if already into desc.
|
||||
$description .= (!empty($conf->global->PRODUIT_DESC_IN_FORM) ? '' : (!empty($line->description) ? dol_htmlentitiesbr($line->description) : '')); // Description is what to show on popup. We shown nothing if already into desc.
|
||||
}
|
||||
|
||||
$line->pu_ttc = price2num((!empty($line->subprice) ? $line->subprice : 0) * (1 + ((!empty($line->tva_tx) ? $line->tva_tx : 0) / 100)), 'MU');
|
||||
@@ -5530,7 +5533,9 @@ abstract class CommonObject
|
||||
* Index a file into the ECM database
|
||||
*
|
||||
* @param string $destfull Full path of file to index
|
||||
* @param int $update_main_doc_field Update field main_doc file into table of object
|
||||
* @param int $update_main_doc_field Update field main_doc fied into the table of object.
|
||||
* This param is set when called for a document generation if document generator hase
|
||||
* ->update_main_doc_field set and returns ->result['fullpath'].
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
public function indexFile($destfull, $update_main_doc_field)
|
||||
@@ -5569,6 +5574,9 @@ abstract class CommonObject
|
||||
if ($this->element == 'bank_account' && !empty($conf->global->BANK_ACCOUNT_ALLOW_EXTERNAL_DOWNLOAD)) {
|
||||
$setsharekey = true;
|
||||
}
|
||||
if ($this->element == 'product' && !empty($conf->global->PRODUCT_ALLOW_EXTERNAL_DOWNLOAD)) {
|
||||
$setsharekey = true;
|
||||
}
|
||||
if ($this->element == 'contrat' && !empty($conf->global->CONTRACT_ALLOW_EXTERNAL_DOWNLOAD)) {
|
||||
$setsharekey = true;
|
||||
}
|
||||
@@ -7539,33 +7547,35 @@ abstract class CommonObject
|
||||
if ($resql) {
|
||||
if ($filter_categorie === false) {
|
||||
$value = ''; // value was used, so now we reste it to use it to build final output
|
||||
$numrows = $this->db->num_rows($resql);
|
||||
if ($numrows) {
|
||||
$obj = $this->db->fetch_object($resql);
|
||||
|
||||
$obj = $this->db->fetch_object($resql);
|
||||
// Several field into label (eq table:code|libelle:rowid)
|
||||
$fields_label = explode('|', $InfoFieldList[1]);
|
||||
|
||||
// Several field into label (eq table:code|libelle:rowid)
|
||||
$fields_label = explode('|', $InfoFieldList[1]);
|
||||
|
||||
if (is_array($fields_label) && count($fields_label) > 1) {
|
||||
foreach ($fields_label as $field_toshow) {
|
||||
$translabel = '';
|
||||
if (!empty($obj->$field_toshow)) {
|
||||
$translabel = $langs->trans($obj->$field_toshow);
|
||||
if (is_array($fields_label) && count($fields_label) > 1) {
|
||||
foreach ($fields_label as $field_toshow) {
|
||||
$translabel = '';
|
||||
if (!empty($obj->$field_toshow)) {
|
||||
$translabel = $langs->trans($obj->$field_toshow);
|
||||
}
|
||||
if ($translabel != $field_toshow) {
|
||||
$value .= dol_trunc($translabel, 18) . ' ';
|
||||
} else {
|
||||
$value .= $obj->$field_toshow . ' ';
|
||||
}
|
||||
}
|
||||
if ($translabel != $field_toshow) {
|
||||
$value .= dol_trunc($translabel, 18) . ' ';
|
||||
} else {
|
||||
$value .= $obj->$field_toshow . ' ';
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$translabel = '';
|
||||
if (!empty($obj->{$InfoFieldList[1]})) {
|
||||
$translabel = $langs->trans($obj->{$InfoFieldList[1]});
|
||||
}
|
||||
if ($translabel != $obj->{$InfoFieldList[1]}) {
|
||||
$value = dol_trunc($translabel, 18);
|
||||
} else {
|
||||
$value = $obj->{$InfoFieldList[1]};
|
||||
$translabel = '';
|
||||
if (!empty($obj->{$InfoFieldList[1]})) {
|
||||
$translabel = $langs->trans($obj->{$InfoFieldList[1]});
|
||||
}
|
||||
if ($translabel != $obj->{$InfoFieldList[1]}) {
|
||||
$value = dol_trunc($translabel, 18);
|
||||
} else {
|
||||
$value = $obj->{$InfoFieldList[1]};
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -7707,7 +7717,20 @@ abstract class CommonObject
|
||||
$result = $object->fetch($value);
|
||||
}
|
||||
if ($result > 0) {
|
||||
$value = $object->getNomUrl($getnomurlparam, $getnomurlparam2);
|
||||
if ($object->element === 'product') {
|
||||
$getnomurlparam3 = (!isset($InfoFieldList[5]) ? 0 : $InfoFieldList[5]);
|
||||
$getnomurlparam4 = (!isset($InfoFieldList[6]) ? -1 : $InfoFieldList[6]);
|
||||
$getnomurlparam5 = (!isset($InfoFieldList[7]) ? 0 : $InfoFieldList[7]);
|
||||
$getnomurlparam6 = (!isset($InfoFieldList[8]) ? '' : $InfoFieldList[8]);
|
||||
$getnomurlparam7 = (!isset($InfoFieldList[9]) ? 0 : $InfoFieldList[9]);
|
||||
|
||||
/**
|
||||
* @var Product $object
|
||||
*/
|
||||
$value = $object->getNomUrl($getnomurlparam, $getnomurlparam2, $getnomurlparam3, $getnomurlparam4, $getnomurlparam5, $getnomurlparam6, $getnomurlparam7);
|
||||
} else {
|
||||
$value = $object->getNomUrl($getnomurlparam, $getnomurlparam2);
|
||||
}
|
||||
} else {
|
||||
$value = '';
|
||||
}
|
||||
@@ -8976,7 +8999,7 @@ abstract class CommonObject
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$this->{$field} = !empty($obj->{$field}) ? $obj->{$field} : null;
|
||||
$this->{$field} = isset($obj->{$field}) ? $obj->{$field} : null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user