Merge branch '15.0' of git@github.com:Dolibarr/dolibarr.git into 16.0

This commit is contained in:
Laurent Destailleur 2023-08-27 15:58:48 +02:00
commit 5c03db3b05
2 changed files with 5 additions and 4 deletions

View file

@ -237,7 +237,7 @@ class doc_generic_reception_odt extends ModelePdfReception
$outputlangs->loadLangs(array("main", "dict", "companies", "bills"));
if ($conf->reception->dir_output."/reception") {
if ($conf->reception->dir_output) {
// If $object is id instead of object
if (!is_object($object)) {
$id = $object;
@ -251,7 +251,7 @@ class doc_generic_reception_odt extends ModelePdfReception
$object->fetch_thirdparty();
$dir = $conf->reception->dir_output."/reception";
$dir = !empty($conf->reception->multidir_output[$object->entity]) ? $conf->reception->multidir_output[$object->entity] : $conf->reception->dir_output;
$objectref = dol_sanitizeFileName($object->ref);
if (!preg_match('/specimen/i', $objectref)) {
$dir .= "/".$objectref;
@ -424,7 +424,7 @@ class doc_generic_reception_odt extends ModelePdfReception
$linenumber = 0;
foreach ($object->lines as $line) {
$linenumber++;
$tmparray = $this->get_substitutionarray_reception_lines($line, $outputlangs);
$tmparray = $this->get_substitutionarray_lines($line, $outputlangs);
complete_substitutions_array($tmparray, $outputlangs, $object, $line, "completesubstitutionarray_lines");
// Call the ODTSubstitutionLine hook
$parameters = array('odfHandler'=>&$odfHandler, 'file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs, 'substitutionarray'=>&$tmparray, 'line'=>$line);

View file

@ -377,7 +377,7 @@ class Reception extends CommonObject
return -1;
}
$sql = "SELECT e.rowid, e.ref, e.fk_soc as socid, e.date_creation, e.ref_supplier, e.ref_ext, e.fk_user_author, e.fk_statut";
$sql = "SELECT e.rowid, e.entity, e.ref, e.fk_soc as socid, e.date_creation, e.ref_supplier, e.ref_ext, e.fk_user_author, e.fk_statut";
$sql .= ", e.weight, e.weight_units, e.size, e.size_units, e.width, e.height";
$sql .= ", e.date_reception as date_reception, e.model_pdf, e.date_delivery";
$sql .= ", e.fk_shipping_method, e.tracking_number";
@ -409,6 +409,7 @@ class Reception extends CommonObject
$obj = $this->db->fetch_object($result);
$this->id = $obj->rowid;
$this->entity = $obj->entity;
$this->ref = $obj->ref;
$this->socid = $obj->socid;
$this->ref_supplier = $obj->ref_supplier;