Fix extrafield copy receipt
This commit is contained in:
parent
13d5471dd0
commit
cec91ae837
@ -565,6 +565,14 @@ else
|
||||
}
|
||||
|
||||
// Other attributes
|
||||
if ($action = 'create_delivery') {
|
||||
// copy from expedition
|
||||
$expeditionExtrafields = new Extrafields($db);
|
||||
$expeditionExtrafieldLabels = $expeditionExtrafields->fetch_name_optionals_label($expedition->table_element);
|
||||
if ($expedition->fetch_optionals($object->origin_id, $expeditionExtrafieldLabels) > 0) {
|
||||
$object->array_options = array_merge($object->array_options, $expedition->array_options);
|
||||
}
|
||||
}
|
||||
$cols = 2;
|
||||
include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php';
|
||||
|
||||
@ -665,6 +673,13 @@ else
|
||||
$mode = ($object->statut == 0) ? 'edit' : 'view';
|
||||
$line = new LivraisonLigne($db);
|
||||
$line->fetch_optionals($object->lines[$i]->id,$extralabelslines);
|
||||
if ($action = 'create_delivery') {
|
||||
$srcLine = new ExpeditionLigne($db);
|
||||
$expeditionLineExtrafields = new Extrafields($db);
|
||||
$expeditionLineExtrafieldLabels = $expeditionLineExtrafields->fetch_name_optionals_label($srcLine->table_element);
|
||||
$srcLine->fetch_optionals($expedition->lines[$i]->id,$expeditionLineExtrafieldLabels);
|
||||
$line->array_options = array_merge($line->array_options, $srcLine->array_options);
|
||||
}
|
||||
print '<tr class="oddeven">';
|
||||
print $line->showOptionals($extrafieldsline, $mode, array('style'=>$bc[$var], 'colspan'=>$colspan),$i);
|
||||
print '</tr>';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user