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

This commit is contained in:
Laurent Destailleur 2023-04-04 21:26:19 +02:00
commit 9e5783ed4d
4 changed files with 17 additions and 4 deletions

View File

@ -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 '<a href="'.DOL_URL_ROOT.'/compta/facture/card.php?facid='.$obj->facid.'">'.$obj->ref."</a></td>\n";
}
print '<td><a href="'.DOL_URL_ROOT.'/comm/card.php?socid='.$obj->socid.'">';
if ($type == 'bank-transfer') {
print '<td><a href="'.DOL_URL_ROOT.'/fourn/card.php?socid='.$obj->socid.'">';
} else {
print '<td><a href="'.DOL_URL_ROOT.'/comm/card.php?socid='.$obj->socid.'">';
}
print img_object($langs->trans("ShowCompany"), "company").' '.$obj->name."</a></td>\n";
print '<td class="right"><span class="amount">'.price($obj->total_ttc)."</span></td>\n";

View File

@ -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);
}

View File

@ -1121,6 +1121,9 @@ class ExtraFields
continue;
}
$valarray = explode('|', $val);
$val = $valarray[0];
if ($langfile && $val) {
$options[$okey] = $langs->trans($val);
} else {

View File

@ -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