diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index 4919e377c9c..0a812f5d6e2 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -513,7 +513,7 @@ $tabcond[25] = isModEnabled('website'); $tabcond[27] = isModEnabled("societe"); $tabcond[28] = isModEnabled('holiday'); $tabcond[29] = isModEnabled('project'); -$tabcond[30] = isModEnabled('label'); +$tabcond[30] = (isModEnabled('label') || isModEnabled('barcode') || isModEnabled('adherent')); // stickers format dictionary //$tabcond[31]= isModEnabled('accounting'); $tabcond[32] = (isModEnabled('holiday') || isModEnabled('hrm')); $tabcond[33] = isModEnabled('hrm'); diff --git a/htdocs/core/class/html.formticket.class.php b/htdocs/core/class/html.formticket.class.php index 48c9dfe31a9..fd83d4fbd45 100644 --- a/htdocs/core/class/html.formticket.class.php +++ b/htdocs/core/class/html.formticket.class.php @@ -179,6 +179,7 @@ class FormTicket print '
param["returnurl"] : $_SERVER['PHP_SELF']).'">'; print ''; print ''; + print ''; foreach ($this->param as $key => $value) { print ''; } diff --git a/htdocs/core/lib/pdf.lib.php b/htdocs/core/lib/pdf.lib.php index 21eda4431f3..206fbb7b1c4 100644 --- a/htdocs/core/lib/pdf.lib.php +++ b/htdocs/core/lib/pdf.lib.php @@ -2471,10 +2471,12 @@ function pdf_getLinkedObjects(&$object, $outputlangs) $linkedobjects[$objecttype]['ref_title'] = $outputlangs->transnoentities("RefSending"); if (!empty($linkedobjects[$objecttype]['ref_value'])) $linkedobjects[$objecttype]['ref_value'] .= ' / '; $linkedobjects[$objecttype]['ref_value'] .= $outputlangs->transnoentities($elementobject->ref); + $linkedobjects[$objecttype]['date_value'] = dol_print_date(empty($elementobject->date_shipping) ? $elementobject->date_delivery : $elementobject->date_shipping, 'day', '', $outputlangs); } else { $linkedobjects[$objecttype]['ref_title'] = $outputlangs->transnoentities("RefOrder").' / '.$outputlangs->transnoentities("RefSending"); if (empty($linkedobjects[$objecttype]['ref_value'])) $linkedobjects[$objecttype]['ref_value'] = $outputlangs->convToOutputCharset($order->ref).($order->ref_client ? ' ('.$order->ref_client.')' : ''); $linkedobjects[$objecttype]['ref_value'] .= ' / '.$outputlangs->transnoentities($elementobject->ref); + $linkedobjects[$objecttype]['date_value'] = dol_print_date(empty($elementobject->date_shipping) ? $elementobject->date_delivery : $elementobject->date_shipping, 'day', '', $outputlangs); } } } diff --git a/htdocs/core/tpl/objectline_view.tpl.php b/htdocs/core/tpl/objectline_view.tpl.php index be24a555a3c..0f7dc25152b 100644 --- a/htdocs/core/tpl/objectline_view.tpl.php +++ b/htdocs/core/tpl/objectline_view.tpl.php @@ -187,10 +187,11 @@ if (($line->info_bits & 2) == 2) { if ($line->date_start || $line->date_end) { print '
'.get_date_range($line->date_start, $line->date_end, $format).'
'; } + if (!$line->date_start || !$line->date_end) { // show warning under line // we need to fetch product associated to line for some test - if ($object->element == 'propal' || $object->element == 'order' || $object->element == 'propal_supplier' || $object->element == 'supplier_proposal' || $object->element == 'commande') { + if ($object->element == 'propal' || $object->element == 'order' || $object->element == 'facture' || $object->element == 'propal_supplier' || $object->element == 'supplier_proposal' || $object->element == 'commande') { $res = $line->fetch_product(); if ($res > 0 ) { if ($line->product->isService() && $line->product->isMandatoryPeriod()) { diff --git a/htdocs/ticket/card.php b/htdocs/ticket/card.php index 8af3a018eaa..7cbb23c75c4 100755 --- a/htdocs/ticket/card.php +++ b/htdocs/ticket/card.php @@ -276,7 +276,7 @@ if (empty($reshook)) { if (!$error) { // File transfer - $object->copyFilesForTicket(); + $object->copyFilesForTicket(''); // trackid is forced to '' because files were uploaded when no id for ticket exists yet and trackid was '' } if (!$error) { @@ -726,6 +726,7 @@ if ($action == 'create' || $action == 'presend') { print load_fiche_titre($langs->trans('NewTicket'), '', 'ticket'); + $formticket->trackid = ''; // TODO Use a unique key to avoid conflict in upload file feature $formticket->withfromsocid = $socid ? $socid : $user->socid; $formticket->withfromcontactid = $contactid ? $contactid : ''; $formticket->withtitletopic = 1; diff --git a/htdocs/ticket/class/ticket.class.php b/htdocs/ticket/class/ticket.class.php index 284f2ee63b8..d0005533ee0 100644 --- a/htdocs/ticket/class/ticket.class.php +++ b/htdocs/ticket/class/ticket.class.php @@ -2248,9 +2248,10 @@ class Ticket extends CommonObject * Used for files linked into messages. * Files may be renamed during copy to avoid overwriting existing files. * - * @return array Array with final path/name/mime of files. + * @param string $forcetrackid Force trackid + * @return array Array with final path/name/mime of files. */ - public function copyFilesForTicket() + public function copyFilesForTicket($forcetrackid = null) { global $conf; @@ -2265,7 +2266,7 @@ class Ticket extends CommonObject $maxheightmini = 72; $formmail = new FormMail($this->db); - $formmail->trackid = 'tic'.$this->id; + $formmail->trackid = (is_null($forcetrackid) ? 'tic'.$this->id : ''); $attachedfiles = $formmail->get_attached_files(); $filepath = $attachedfiles['paths'];