diff --git a/htdocs/compta/prelevement/line.php b/htdocs/compta/prelevement/line.php index b668880e9d3..7809e894af8 100644 --- a/htdocs/compta/prelevement/line.php +++ b/htdocs/compta/prelevement/line.php @@ -119,7 +119,13 @@ if ($action == 'confirm_rejet') { * View */ -$invoicestatic = new Facture($db); +if ($type == 'bank-transfer') { + require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php'; + $invoicestatic = new FactureFournisseur($db); +} else { + require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; + $invoicestatic = new Facture($db); +} $title = $langs->trans("WithdrawalsLine"); if ($type == 'bank-transfer') { @@ -318,7 +324,11 @@ if ($id) { print ''.$obj->ref."\n"; } - print ''; + if ($type == 'bank-transfer') { + print ''; + } else { + print ''; + } print img_object($langs->trans("ShowCompany"), "company").' '.$obj->name."\n"; print ''.price($obj->total_ttc)."\n"; diff --git a/htdocs/contact/consumption.php b/htdocs/contact/consumption.php index bbd5bf005d2..b6851fcce46 100644 --- a/htdocs/contact/consumption.php +++ b/htdocs/contact/consumption.php @@ -378,7 +378,7 @@ if ($sql_select) { $num = $db->num_rows($resql); - $param = "&socid=".urlencode($socid)."&type_element=".urlencode($type_element); + $param = "&socid=".urlencode($socid)."&type_element=".urlencode($type_element)."&id=".urlencode($id); if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { $param .= '&contextpage='.urlencode($contextpage); } diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index 5d91febc65d..cc8136b604e 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -1121,6 +1121,9 @@ class ExtraFields continue; } + $valarray = explode('|', $val); + $val = $valarray[0]; + if ($langfile && $val) { $options[$okey] = $langs->trans($val); } else { diff --git a/htdocs/reception/card.php b/htdocs/reception/card.php index 84a45822245..b220cbf276a 100644 --- a/htdocs/reception/card.php +++ b/htdocs/reception/card.php @@ -918,7 +918,7 @@ if ($action == 'create') { if ($objectsrc->fetch_optionals() > 0) { $recept->array_options = array_merge($recept->array_options, $objectsrc->array_options); } - print $object->showOptionals($extrafields, 'create', $parameters); + print $recept->showOptionals($extrafields, 'create', $parameters); } // Incoterms