Merge branch '16.0' of git@github.com:Dolibarr/dolibarr.git into 16.0
This commit is contained in:
commit
100b572aa3
@ -82,6 +82,8 @@ class CGenericDic
|
|||||||
$fieldlabel = 'label';
|
$fieldlabel = 'label';
|
||||||
if ($this->table_element == 'c_stcomm') {
|
if ($this->table_element == 'c_stcomm') {
|
||||||
$fieldlabel = 'libelle';
|
$fieldlabel = 'libelle';
|
||||||
|
} elseif ($this->table_element == 'c_type_fees') {
|
||||||
|
$fieldrowid = 'id';
|
||||||
}
|
}
|
||||||
|
|
||||||
$error = 0;
|
$error = 0;
|
||||||
@ -162,6 +164,8 @@ class CGenericDic
|
|||||||
if ($this->table_element == 'c_stcomm') {
|
if ($this->table_element == 'c_stcomm') {
|
||||||
$fieldrowid = 'id';
|
$fieldrowid = 'id';
|
||||||
$fieldlabel = 'libelle';
|
$fieldlabel = 'libelle';
|
||||||
|
} elseif ($this->table_element == 'c_type_fees') {
|
||||||
|
$fieldrowid = 'id';
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = "SELECT";
|
$sql = "SELECT";
|
||||||
@ -233,6 +237,8 @@ class CGenericDic
|
|||||||
if ($this->table_element == 'c_stcomm') {
|
if ($this->table_element == 'c_stcomm') {
|
||||||
$fieldrowid = 'id';
|
$fieldrowid = 'id';
|
||||||
$fieldlabel = 'libelle';
|
$fieldlabel = 'libelle';
|
||||||
|
} elseif ($this->table_element == 'c_type_fees') {
|
||||||
|
$fieldrowid = 'id';
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = "SELECT";
|
$sql = "SELECT";
|
||||||
@ -303,6 +309,8 @@ class CGenericDic
|
|||||||
if ($this->table_element == 'c_stcomm') {
|
if ($this->table_element == 'c_stcomm') {
|
||||||
$fieldrowid = 'id';
|
$fieldrowid = 'id';
|
||||||
$fieldlabel = 'libelle';
|
$fieldlabel = 'libelle';
|
||||||
|
} elseif ($this->table_element == 'c_type_fees') {
|
||||||
|
$fieldrowid = 'id';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Clean parameters
|
// Clean parameters
|
||||||
|
|||||||
@ -334,15 +334,19 @@ class doc_generic_invoice_odt extends ModelePDFFactures
|
|||||||
$object->fetchObjectLinked('', '', '', '');
|
$object->fetchObjectLinked('', '', '', '');
|
||||||
//print_r($object->linkedObjects['propal']); exit;
|
//print_r($object->linkedObjects['propal']); exit;
|
||||||
|
|
||||||
$propal_object = $object->linkedObjects['propal'][0];
|
if (isset($object->linkedObjects['propal'][0])) {
|
||||||
|
$propal_object = $object->linkedObjects['propal'][0];
|
||||||
|
} else {
|
||||||
|
$propal_object = null;
|
||||||
|
}
|
||||||
|
|
||||||
// Make substitution
|
// Make substitution
|
||||||
$substitutionarray = array(
|
$substitutionarray = array(
|
||||||
'__FROM_NAME__' => $this->emetteur->name,
|
'__FROM_NAME__' => $this->emetteur->name,
|
||||||
'__FROM_EMAIL__' => $this->emetteur->email,
|
'__FROM_EMAIL__' => $this->emetteur->email,
|
||||||
'__TOTAL_TTC__' => $object->total_ttc,
|
'__TOTAL_TTC__' => $object->total_ttc,
|
||||||
'__TOTAL_HT__' => $object->total_ht,
|
'__TOTAL_HT__' => $object->total_ht,
|
||||||
'__TOTAL_VAT__' => $object->total_tva
|
'__TOTAL_VAT__' => $object->total_tva
|
||||||
);
|
);
|
||||||
complete_substitutions_array($substitutionarray, $langs, $object);
|
complete_substitutions_array($substitutionarray, $langs, $object);
|
||||||
// Call the ODTSubstitution hook
|
// Call the ODTSubstitution hook
|
||||||
@ -433,8 +437,8 @@ class doc_generic_invoice_odt extends ModelePDFFactures
|
|||||||
} else {
|
} else {
|
||||||
$odfHandler->setVars($key, 'ErrorFileNotFound', true, 'UTF-8');
|
$odfHandler->setVars($key, 'ErrorFileNotFound', true, 'UTF-8');
|
||||||
}
|
}
|
||||||
} else // Text
|
} else {
|
||||||
{
|
// Text
|
||||||
$odfHandler->setVars($key, $value, true, 'UTF-8');
|
$odfHandler->setVars($key, $value, true, 'UTF-8');
|
||||||
}
|
}
|
||||||
} catch (OdfException $e) {
|
} catch (OdfException $e) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user