diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index 83ad4d0ce70bf..83bd4d2e1ec58 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -1165,9 +1165,9 @@ - if (! $error && ! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB) && $user->rights->commande->creer) + if (! $error && ! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB) && $user->rights->commande->creer) { - if ($action == 'addcontact') + if ($action == 'addcontact') { if ($object->id > 0) { $contactid = (GETPOST('userid') ? GETPOST('userid') : GETPOST('contactid')); @@ -1188,7 +1188,7 @@ } // bascule du statut d'un contact - else if ($action == 'swapstatut') + else if ($action == 'swapstatut') { if ($object->id > 0) { $result = $object->swapContactStatus(GETPOST('ligne')); @@ -1198,7 +1198,7 @@ } // Efface un contact - else if ($action == 'deletecontact') + else if ($action == 'deletecontact') { $result = $object->delete_contact($lineid); @@ -1241,7 +1241,7 @@ $projectid = 0; $remise_absolue = 0; - + if (! empty($origin) && ! empty($originid)) { // Parse element/subelement (ex: project_task) $element = $subelement = $origin; @@ -1252,7 +1252,7 @@ if ($element == 'project') { $projectid = $originid; - + if (!$cond_reglement_id) { $cond_reglement_id = $soc->cond_reglement_id; } @@ -1444,7 +1444,7 @@ print ''; // TODO How record was recorded OrderMode (llx_c_input_method) - + // Project if (! empty($conf->projet->enabled) && $socid > 0) { @@ -1542,7 +1542,7 @@ default: $newclassname = $classname; } - + print '' . $langs->trans($newclassname) . '' . $objectsrc->getNomUrl(1) . ''; print '' . $langs->trans('TotalHT') . '' . price($objectsrc->total_ht) . ''; print '' . $langs->trans('TotalVAT') . '' . price($objectsrc->total_tva) . ""; @@ -2021,7 +2021,7 @@ print ''; // TODO How record was recorded OrderMode (llx_c_input_method) - + // Project if (! empty($conf->projet->enabled)) { @@ -2377,6 +2377,7 @@ $ref = dol_sanitizeFileName($object->ref); include_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php'; + $fileparams = dol_most_recent_file($conf->commande->dir_output . '/' . $ref, preg_quote($ref, '/').'[^\-]+'); $file = $fileparams['fullname']; // Define output language