diff --git a/dev/resources/iso-normes/Accountancy-format_Winfic-eWinfic-WinSisCompta.pdf b/dev/resources/iso-normes/Accountancy-format_Winfic-eWinfic-WinSisCompta.pdf new file mode 100644 index 00000000000..2fbaad04699 Binary files /dev/null and b/dev/resources/iso-normes/Accountancy-format_Winfic-eWinfic-WinSisCompta.pdf differ diff --git a/htdocs/accountancy/class/accountancyexport.class.php b/htdocs/accountancy/class/accountancyexport.class.php index 1e641564de4..3bf41e6326f 100644 --- a/htdocs/accountancy/class/accountancyexport.class.php +++ b/htdocs/accountancy/class/accountancyexport.class.php @@ -5,11 +5,12 @@ * Copyright (C) 2015 Florian Henry * Copyright (C) 2015 Raphaël Doursenaud * Copyright (C) 2016 Pierre-Henry Favre - * Copyright (C) 2016-2019 Alexandre Spangaro + * Copyright (C) 2016-2020 Alexandre Spangaro * Copyright (C) 2013-2017 Olivier Geffroy * Copyright (C) 2017 Elarifr. Ari Elbaz * Copyright (C) 2017-2019 Frédéric France * Copyright (C) 2017 André Schild + * Copyright (C) 2020 Guillaume Alexandre * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -52,6 +53,7 @@ class AccountancyExport public static $EXPORT_TYPE_SAGE50_SWISS = 45; public static $EXPORT_TYPE_CHARLEMAGNE = 50; public static $EXPORT_TYPE_QUADRATUS = 60; + public static $EXPORT_TYPE_WINFIC = 70; public static $EXPORT_TYPE_OPENCONCERTO = 100; public static $EXPORT_TYPE_LDCOMPTA = 110; public static $EXPORT_TYPE_LDCOMPTA10 = 120; @@ -105,6 +107,7 @@ class AccountancyExport self::$EXPORT_TYPE_BOB50 => $langs->trans('Modelcsv_bob50'), self::$EXPORT_TYPE_CIEL => $langs->trans('Modelcsv_ciel'), self::$EXPORT_TYPE_QUADRATUS => $langs->trans('Modelcsv_quadratus'), + self::$EXPORT_TYPE_WINFIC => $langs->trans('Modelcsv_winfic'), self::$EXPORT_TYPE_EBP => $langs->trans('Modelcsv_ebp'), self::$EXPORT_TYPE_COGILOG => $langs->trans('Modelcsv_cogilog'), self::$EXPORT_TYPE_AGIRIS => $langs->trans('Modelcsv_agiris'), @@ -136,6 +139,7 @@ class AccountancyExport self::$EXPORT_TYPE_BOB50 => 'bob50', self::$EXPORT_TYPE_CIEL => 'ciel', self::$EXPORT_TYPE_QUADRATUS => 'quadratus', + self::$EXPORT_TYPE_WINFIC => 'winfic', self::$EXPORT_TYPE_EBP => 'ebp', self::$EXPORT_TYPE_COGILOG => 'cogilog', self::$EXPORT_TYPE_AGIRIS => 'agiris', @@ -184,6 +188,10 @@ class AccountancyExport 'label' => $langs->trans('Modelcsv_quadratus'), 'ACCOUNTING_EXPORT_FORMAT' => 'txt', ), + self::$EXPORT_TYPE_WINFIC => array( + 'label' => $langs->trans('Modelcsv_winfic'), + 'ACCOUNTING_EXPORT_FORMAT' => 'txt', + ), self::$EXPORT_TYPE_EBP => array( 'label' => $langs->trans('Modelcsv_ebp'), ), @@ -246,7 +254,7 @@ class AccountancyExport $filename = 'general_ledger-'.$this->getFormatCode($formatexportset); $type_export = 'general_ledger'; - global $db; // The tpl file use $db + global $db; // The tpl file use $db include DOL_DOCUMENT_ROOT.'/accountancy/tpl/export_journal.tpl.php'; @@ -269,6 +277,9 @@ class AccountancyExport case self::$EXPORT_TYPE_QUADRATUS : $this->exportQuadratus($TData); break; + case self::$EXPORT_TYPE_WINFIC : + $this->exportWinfic($TData); + break; case self::$EXPORT_TYPE_EBP : $this->exportEbp($TData); break; @@ -548,6 +559,85 @@ class AccountancyExport } } + /** + * Export format : WinFic - eWinfic - WinSis Compta + * + * + * @param array $TData data + * @return void + */ + public function exportWinfic(&$TData) + { + global $conf; + + $end_line = "\r\n"; + + //We should use dol_now function not time however this is wrong date to transfert in accounting + //$date_ecriture = dol_print_date(dol_now(), $conf->global->ACCOUNTING_EXPORT_DATE); // format must be ddmmyy + //$date_ecriture = dol_print_date(time(), $conf->global->ACCOUNTING_EXPORT_DATE); // format must be ddmmyy + foreach ($TData as $data) { + $code_compta = $data->numero_compte; + if (!empty($data->subledger_account)) + $code_compta = $data->subledger_account; + + $Tab = array(); + //$Tab['type_ligne'] = 'M'; + $Tab['code_journal'] = str_pad(self::trunc($data->code_journal, 2), 2); + + //We use invoice date $data->doc_date not $date_ecriture which is the transfert date + //maybe we should set an option for customer who prefer to keep in accounting software the tranfert date instead of invoice date ? + //$Tab['date_ecriture'] = $date_ecriture; + $Tab['date_operation'] = dol_print_date($data->doc_date, '%d%m%Y'); + + $Tab['folio'] = ' 1'; + + $Tab['num_ecriture'] = str_pad(self::trunc($data->piece_num, 6), 6, ' ', STR_PAD_LEFT); + + $Tab['jour_ecriture'] = dol_print_date($data->doc_date, '%d%m%y'); + + $Tab['num_compte'] = str_pad(self::trunc($code_compta, 6), 6, '0'); + + if($data->sens == 'D'){ + $Tab['montant_debit'] = str_pad(number_format(abs($data->montant), 2, ',', ''), 13, ' ', STR_PAD_LEFT); + + $Tab['montant_crebit'] = str_pad(number_format(0, 2, ',', ''), 13, ' ', STR_PAD_LEFT); + } + else{ + $Tab['montant_debit'] = str_pad(number_format(0, 2, ',', ''), 13, ' ', STR_PAD_LEFT); + + $Tab['montant_crebit'] = str_pad(number_format(abs($data->montant), 2, ',', ''), 13, ' ', STR_PAD_LEFT); + } + + $Tab['libelle_ecriture'] = str_pad(self::trunc(dol_string_unaccent($data->doc_ref).' '.dol_string_unaccent($data->label_operation), 30), 30); + + $Tab['lettrage'] = str_repeat(' ', 2); + + $Tab['code_piece'] = str_repeat(' ', 5); + + $Tab['code_stat'] = str_repeat(' ', 4); + + if (!empty($data->date_echeance)) + //$Tab['date_echeance'] = dol_print_date($data->date_echeance, $conf->global->ACCOUNTING_EXPORT_DATE); + $Tab['date_echeance'] = dol_print_date($data->date_echeance, '%d%m%Y'); + else + $Tab['date_echeance'] = dol_print_date($data->doc_date, '%d%m%Y'); + + $Tab['monnaie'] = '1'; + + $Tab['filler'] = ' '; + + $Tab['ind_compteur'] = ' '; + + $Tab['quantite'] = '0,000000000'; + + $Tab['code_pointage'] = str_repeat(' ', 2); + + $Tab['end_line'] = $end_line; + + print implode('|', $Tab); + } + } + /** * Export format : EBP @@ -930,7 +1020,7 @@ class AccountancyExport } /** - * Export format : LD Compta version 9 & higher + * Export format : LD Compta version 9 * http://www.ldsysteme.fr/fileadmin/telechargement/np/ldcompta/Documentation/IntCptW9.pdf * * @param array $objectLines data diff --git a/htdocs/admin/translation.php b/htdocs/admin/translation.php index 520cee44913..c17c2bdcee6 100644 --- a/htdocs/admin/translation.php +++ b/htdocs/admin/translation.php @@ -365,9 +365,9 @@ if ($mode == 'overwrite') } else { - print ''.img_edit().''; + print ''.img_edit().''; print '   '; - print ''.img_delete().''; + print ''.img_delete().''; } print ''; @@ -531,8 +531,8 @@ if ($mode == 'searchkey') { $obj = $db->fetch_object($result); } - print ''.img_edit().''; - print '  '; + print ''.img_edit().''; + print ' '; print ''.img_delete().''; print '  '; $htmltext = $langs->trans("OriginalValueWas", $newlangfileonly->tab_translate[$key]); @@ -541,7 +541,7 @@ if ($mode == 'searchkey') elseif (!empty($conf->global->MAIN_ENABLE_OVERWRITE_TRANSLATION)) { //print $key.'-'.$val; - print ''.img_edit_add($langs->trans("Overwrite")).''; + print ''.img_edit_add($langs->trans("Overwrite")).''; } if (!empty($conf->global->MAIN_FEATURES_LEVEL)) diff --git a/htdocs/bom/class/bom.class.php b/htdocs/bom/class/bom.class.php index c2c18dae6e5..3e522b3c11f 100644 --- a/htdocs/bom/class/bom.class.php +++ b/htdocs/bom/class/bom.class.php @@ -1004,6 +1004,7 @@ class BOM extends CommonObject /** * BOM costs calculation based on cost_price or pmp of each BOM line + * * @return void */ public function calculateCosts() @@ -1022,7 +1023,9 @@ class BOM extends CommonObject } $this->total_cost = price2num($this->total_cost, 'MT'); - $this->unit_cost = price2num($this->total_cost / $this->qty, 'MU'); + if ($this->qty) { + $this->unit_cost = price2num($this->total_cost / $this->qty, 'MU'); + } } } diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index fac4dc45715..7141d875567 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -405,7 +405,6 @@ class ActionComm extends CommonObject $this->userassigned[$tmpid] = array('id'=>$tmpid, 'transparency'=>$this->transparency); } - $userownerid = $this->userownerid; $userdoneid = $this->userdoneid; @@ -484,7 +483,7 @@ class ActionComm extends CommonObject $sql .= (strval($this->datef) != '' ? "'".$this->db->idate($this->datef)."'" : "null").", "; $sql .= ((isset($this->durationp) && $this->durationp >= 0 && $this->durationp != '') ? "'".$this->db->escape($this->durationp)."'" : "null").", "; // deprecated $sql .= (isset($this->type_id) ? $this->type_id : "null").","; - $sql .= ($code ? ("'".$code."'") : "null").", "; + $sql .= ($code ? ("'".$this->db->escape($code)."'") : "null").", "; $sql .= ($this->ref_ext ? ("'".$this->db->idate($this->ref_ext)."'") : "null").", "; $sql .= ((isset($this->socid) && $this->socid > 0) ? $this->socid : "null").", "; $sql .= ((isset($this->fk_project) && $this->fk_project > 0) ? $this->fk_project : "null").", "; diff --git a/htdocs/comm/action/list.php b/htdocs/comm/action/list.php index a4b1a9618fb..e804213cdce 100644 --- a/htdocs/comm/action/list.php +++ b/htdocs/comm/action/list.php @@ -242,7 +242,7 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; $sql = "SELECT"; if ($usergroup > 0) $sql .= " DISTINCT"; $sql .= " s.nom as societe, s.rowid as socid, s.client, s.email as socemail,"; -$sql .= " a.id, a.label, a.note, a.datep as dp, a.datep2 as dp2, a.fulldayevent, a.location,"; +$sql .= " a.id, a.code, a.label, a.note, a.datep as dp, a.datep2 as dp2, a.fulldayevent, a.location,"; $sql .= ' a.fk_user_author,a.fk_user_action,'; $sql .= " a.fk_contact, a.note, a.percent as percent,"; $sql .= " a.fk_element, a.elementtype, a.datec, a.tms as datem,"; @@ -385,14 +385,8 @@ if ($resql) print ''; $nav = ''; - //if ($actioncode) $nav.=''; - //if ($resourceid) $nav.=''; if ($filter) $nav .= ''; - //if ($filtert) $nav.=''; - //if ($socid) $nav.=''; if ($showbirthday) $nav .= ''; - //if ($pid) $nav.=''; - //if ($usergroup) $nav.=''; print $nav; dol_fiche_head($head, $tabactive, $langs->trans('Agenda'), 0, 'action'); @@ -548,6 +542,7 @@ if ($resql) $actionstatic->id = $obj->id; $actionstatic->ref = $obj->id; + $actionstatic->code = $obj->code; $actionstatic->type_code = $obj->type_code; $actionstatic->type_label = $obj->type_label; $actionstatic->type_picto = $obj->type_picto; @@ -583,21 +578,31 @@ if ($resql) if (!empty($arrayfields['c.libelle']['checked'])) { print ''; + $actioncomm = $actionstatic; + // TODO Code common with code into showactions + $imgpicto = ''; if (!empty($conf->global->AGENDA_USE_EVENT_TYPE)) { - if ($actionstatic->type_picto) print img_picto('', $actionstatic->type_picto); - else { - if ($actionstatic->type_code == 'AC_RDV') print img_picto('', 'object_group', '', false, 0, 0, '', '').' '; - elseif ($actionstatic->type_code == 'AC_TEL') print img_picto('', 'object_phoning', '', false, 0, 0, '', '').' '; - elseif ($actionstatic->type_code == 'AC_FAX') print img_picto('', 'object_phoning_fax', '', false, 0, 0, '', '').' '; - elseif ($actionstatic->type_code == 'AC_EMAIL') print img_picto('', 'object_email', '', false, 0, 0, '', '').' '; - elseif ($actionstatic->type_code == 'AC_INT') print img_picto('', 'object_intervention', '', false, 0, 0, '', '').' '; - elseif (!preg_match('/_AUTO/', $actionstatic->type_code)) print img_picto('', 'object_other', '', false, 0, 0, '', '').' '; - } + if ($actioncomm->type_picto) { + $imgpicto = img_picto('', $actioncomm->type_picto); + } + else { + if ($actioncomm->type_code == 'AC_RDV') $imgpicto = img_picto('', 'object_group', '', false, 0, 0, '', 'paddingright').' '; + elseif ($actioncomm->type_code == 'AC_TEL') $imgpicto = img_picto('', 'object_phoning', '', false, 0, 0, '', 'paddingright').' '; + elseif ($actioncomm->type_code == 'AC_FAX') $imgpicto = img_picto('', 'object_phoning_fax', '', false, 0, 0, '', 'paddingright').' '; + elseif ($actioncomm->type_code == 'AC_EMAIL') $imgpicto = img_picto('', 'object_email', '', false, 0, 0, '', 'paddingright').' '; + elseif ($actioncomm->type_code == 'AC_INT') $imgpicto = img_picto('', 'object_intervention', '', false, 0, 0, '', 'paddingright').' '; + elseif ($actioncomm->type_code == 'AC_OTH' && $actioncomm->code == 'TICKET_MSG') $imgpicto = img_picto('', 'object_conversation', '', false, 0, 0, '', 'paddingright').' '; + elseif (!preg_match('/_AUTO/', $actioncomm->type_code)) $imgpicto = img_picto('', 'object_other', '', false, 0, 0, '', 'paddingright').' '; + } } + print $imgpicto; + $labeltype = $obj->type_code; if (empty($conf->global->AGENDA_USE_EVENT_TYPE) && empty($arraylist[$labeltype])) $labeltype = 'AC_OTH'; - if (!empty($arraylist[$labeltype])) $labeltype = $arraylist[$labeltype]; + if ($actioncomm->type_code == 'AC_OTH' && $actioncomm->code == 'TICKET_MSG') { + $labeltype = $langs->trans("Message"); + } elseif (!empty($arraylist[$labeltype])) $labeltype = $arraylist[$labeltype]; print dol_trunc($labeltype, 28); print ''; } @@ -620,7 +625,7 @@ if ($resql) $formatToUse = $obj->fulldayevent ? 'day' : 'dayhour'; // Start date if (!empty($arrayfields['a.datep']['checked'])) { - print ''; + print ''; print dol_print_date($db->jdate($obj->dp), $formatToUse); $late = 0; if ($obj->percent == 0 && $obj->dp && $db->jdate($obj->dp) < ($now - $delay_warning)) $late = 1; @@ -633,7 +638,7 @@ if ($resql) // End date if (!empty($arrayfields['a.datep2']['checked'])) { - print ''; + print ''; print dol_print_date($db->jdate($obj->dp2), $formatToUse); print ''; } diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 90ed560b3cf..fd6a6d32642 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -1177,6 +1177,30 @@ class Facture extends CommonInvoice { unset($object->lines[$i]); unset($object->products[$i]); // Tant que products encore utilise + } + // Bloc to update dates of service (month by month only if previously filled at 1d near start or end of month) + // If it's a service with start and end dates + if (!empty($line->date_start) && !empty($line->date_end) ) { + // Get the dates + $start = dol_getdate($line->date_start); + $end = dol_getdate($line->date_end); + + // Get the first and last day of the month + $first = dol_get_first_day($start['year'], $start['mon']); + $last = dol_get_first_day($end['year'], $end['mon']); + + // Get diff betweend start/end of month and previously filled + $diffFirst = num_between_day($first, dol_mktime($start['hours'], $start['minutes'], $start['seconds'], $start['mon'], $start['mday'], $start['year'], 'user')); + $diffLast = num_between_day(dol_mktime($end['hours'], $end['minutes'], $end['seconds'], $end['mon'], $end['mday'], $end['year'], 'user'), $last); + + // If there is <= 1d (or 2?) of start/or/end of month + if ($diffFirst <= 2 && $diffLast <= 2) { + $nextMonth = dol_get_next_month($end['mon'], $end['year']); + $newFirst = dol_get_first_day($nextMonth['year'], $nextMonth['month']); + $newLast = dol_get_last_day($nextMonth['year'], $nextMonth['month']); + $object->lines[$i]->date_start = $newFirst; + $object->lines[$i]->date_end = $newLast; + } } } diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index 52144d44d34..25857767e80 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -2227,13 +2227,12 @@ else $MAXEVENT = 10; - $morehtmlright = dolGetButtonTitle($langs->trans('SeeAll'), '', 'fa fa-list-alt', DOL_URL_ROOT.'/contrat/agenda.php?id='.$object->id); + $morehtmlcenter = dolGetButtonTitle($langs->trans('SeeAll'), '', 'fa fa-list-alt imgforviewmode', DOL_URL_ROOT.'/contrat/agenda.php?id='.$object->id); // List of actions on element include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; $formactions = new FormActions($db); - $somethingshown = $formactions->showactions($object, 'contract', $socid, 1, 'listactions', $MAXEVENT, '', $morehtmlright); - + $somethingshown = $formactions->showactions($object, 'contract', $socid, 1, 'listactions', $MAXEVENT, '', $morehtmlcenter); print ''; } diff --git a/htdocs/core/class/html.formactions.class.php b/htdocs/core/class/html.formactions.class.php index b06877c8c3b..352fcebb06b 100644 --- a/htdocs/core/class/html.formactions.class.php +++ b/htdocs/core/class/html.formactions.class.php @@ -165,13 +165,12 @@ class FormActions * @param string $morecss More css on table * @param int $max Max number of record * @param string $moreparambacktopage More param for the backtopage - * @param string $morehtmlright More html text on right of title line + * @param string $morehtmlcenter More html text on center of title line * @return int <0 if KO, >=0 if OK */ - public function showactions($object, $typeelement, $socid = 0, $forceshowtitle = 0, $morecss = 'listactions', $max = 0, $moreparambacktopage = '', $morehtmlright = '') + public function showactions($object, $typeelement, $socid = 0, $forceshowtitle = 0, $morecss = 'listactions', $max = 0, $moreparambacktopage = '', $morehtmlcenter = '') { global $langs, $conf, $user; - global $bc; require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php'; @@ -208,8 +207,9 @@ class FormActions $newcardbutton .= dolGetButtonTitle($langs->trans("AddEvent"), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/comm/action/card.php?action=create&datep='.dol_print_date(dol_now(), 'dayhourlog').'&origin='.$typeelement.'&originid='.$object->id.($object->socid > 0 ? '&socid='.$object->socid : ($socid > 0 ? '&socid='.$socid : '')).($projectid > 0 ? '&projectid='.$projectid : '').'&backtopage='.urlencode($urlbacktopage)); } + print ''."\n"; - print load_fiche_titre($title, $newcardbutton, '', 0, 0, '', $morehtmlright); + print load_fiche_titre($title, $newcardbutton, '', 0, 0, '', $morehtmlcenter); $page = 0; $param = ''; @@ -230,29 +230,29 @@ class FormActions $cacheusers = array(); $cursorevent = 0; - foreach ($listofactions as $action) + foreach ($listofactions as $actioncomm) { if ($max && $cursorevent >= $max) break; - $ref = $action->getNomUrl(1, -1); - $label = $action->getNomUrl(0, 38); + $ref = $actioncomm->getNomUrl(1, -1); + $label = $actioncomm->getNomUrl(0, 38); print ''; // Ref print ''.$ref.''; // Onwer print ''; - if (!empty($action->userownerid)) + if (!empty($actioncomm->userownerid)) { - if (is_object($cacheusers[$action->userownerid])) + if (is_object($cacheusers[$actioncomm->userownerid])) { - $tmpuser = $cacheusers[$action->userownerid]; + $tmpuser = $cacheusers[$actioncomm->userownerid]; } else { $tmpuser = new User($this->db); - $tmpuser->fetch($action->userownerid); - $cacheusers[$action->userownerid] = $tmpuser; + $tmpuser->fetch($actioncomm->userownerid); + $cacheusers[$actioncomm->userownerid] = $tmpuser; } if ($tmpuser->id > 0) { @@ -260,41 +260,50 @@ class FormActions } } print ''; + // Type print ''; + // TODO Code common with code into comm/action/list.php $imgpicto = ''; if (!empty($conf->global->AGENDA_USE_EVENT_TYPE)) { - if ($action->type_picto) $imgpicto = img_picto('', $action->type_picto); + if ($actioncomm->type_picto) { + $imgpicto = img_picto('', $actioncomm->type_picto); + } else { - if ($action->type_code == 'AC_RDV') $imgpicto = img_picto('', 'object_group', '', false, 0, 0, '', 'paddingright').' '; - elseif ($action->type_code == 'AC_TEL') $imgpicto = img_picto('', 'object_phoning', '', false, 0, 0, '', 'paddingright').' '; - elseif ($action->type_code == 'AC_FAX') $imgpicto = img_picto('', 'object_phoning_fax', '', false, 0, 0, '', 'paddingright').' '; - elseif ($action->type_code == 'AC_EMAIL') $imgpicto = img_picto('', 'object_email', '', false, 0, 0, '', 'paddingright').' '; - elseif ($action->type_code == 'AC_INT') $imgpicto = img_picto('', 'object_intervention', '', false, 0, 0, '', 'paddingright').' '; - elseif (!preg_match('/_AUTO/', $action->type_code)) $imgpicto = img_picto('', 'object_action', '', false, 0, 0, '', 'paddingright').' '; + if ($actioncomm->type_code == 'AC_RDV') $imgpicto = img_picto('', 'object_group', '', false, 0, 0, '', 'paddingright').' '; + elseif ($actioncomm->type_code == 'AC_TEL') $imgpicto = img_picto('', 'object_phoning', '', false, 0, 0, '', 'paddingright').' '; + elseif ($actioncomm->type_code == 'AC_FAX') $imgpicto = img_picto('', 'object_phoning_fax', '', false, 0, 0, '', 'paddingright').' '; + elseif ($actioncomm->type_code == 'AC_EMAIL') $imgpicto = img_picto('', 'object_email', '', false, 0, 0, '', 'paddingright').' '; + elseif ($actioncomm->type_code == 'AC_INT') $imgpicto = img_picto('', 'object_intervention', '', false, 0, 0, '', 'paddingright').' '; + elseif ($actioncomm->type_code == 'AC_OTH' && $actioncomm->code == 'TICKET_MSG') $imgpicto = img_picto('', 'object_conversation', '', false, 0, 0, '', 'paddingright').' '; + elseif (!preg_match('/_AUTO/', $actioncomm->type_code)) $imgpicto = img_picto('', 'object_action', '', false, 0, 0, '', 'paddingright').' '; } } print $imgpicto; - print $action->type_short ? $action->type_short : $action->type; + if ($actioncomm->type_code == 'AC_OTH' && $actioncomm->code == 'TICKET_MSG') { + print $langs->trans("Message"); + } else { + print $actioncomm->type_short ? $actioncomm->type_short : $actioncomm->type; + } print ''; // Label print ''.$label.''; // Date - print ''.dol_print_date($action->datep, 'dayhour', 'tzuserrel'); - if ($action->datef) + print ''.dol_print_date($actioncomm->datep, 'dayhour', 'tzuserrel'); + if ($actioncomm->datef) { - $tmpa = dol_getdate($action->datep); - $tmpb = dol_getdate($action->datef); + $tmpa = dol_getdate($actioncomm->datep); + $tmpb = dol_getdate($actioncomm->datef); if ($tmpa['mday'] == $tmpb['mday'] && $tmpa['mon'] == $tmpb['mon'] && $tmpa['year'] == $tmpb['year']) { - if ($tmpa['hours'] != $tmpb['hours'] || $tmpa['minutes'] != $tmpb['minutes'] && $tmpa['seconds'] != $tmpb['seconds']) print '-'.dol_print_date($action->datef, 'hour', 'tzuserrel'); + if ($tmpa['hours'] != $tmpb['hours'] || $tmpa['minutes'] != $tmpb['minutes'] && $tmpa['seconds'] != $tmpb['seconds']) print '-'.dol_print_date($actioncomm->datef, 'hour', 'tzuserrel'); } - else print '-'.dol_print_date($action->datef, 'dayhour', 'tzuserrel'); + else print '-'.dol_print_date($actioncomm->datef, 'dayhour', 'tzuserrel'); } print ''; print ''; - print $action->getLibStatut(3); + print $actioncomm->getLibStatut(3); print ''; print ''; diff --git a/htdocs/core/lib/agenda.lib.php b/htdocs/core/lib/agenda.lib.php index 8dc2e418cc8..474a4f03696 100644 --- a/htdocs/core/lib/agenda.lib.php +++ b/htdocs/core/lib/agenda.lib.php @@ -27,7 +27,7 @@ /** * Show filter form in agenda view * - * @param Object $form Form object + * @param Form $form Form object * @param int $canedit Can edit filter fields * @param int $status Status * @param int $year Year @@ -123,7 +123,7 @@ function print_actions_filter($form, $canedit, $status, $year, $month, $day, $sh print $langs->trans("ThirdParty").'   '; print ''; print img_picto('', 'company'); - print $form->select_company($socid, 'search_socid', '', 'SelectThirdParty', 0, 0, null, 0); + print $form->select_company($socid, 'search_socid', '', ' ', 0, 0, null, 0); print ''; } diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 43cee63c1ed..bcf47a58eef 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -3155,7 +3155,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ 'intervention', 'label', 'language', 'list', 'listlight', 'lot', 'map-marker-alt', 'money-bill-alt', 'mrp', 'note', 'object_accounting', 'object_action', 'object_account', 'object_barcode', 'object_bill', 'object_billa', 'object_billd', 'object_bom', - 'object_category', 'object_bookmark', 'object_bug', 'object_dolly', 'object_dollyrevert', 'object_generic', 'object_folder', + 'object_category', 'object_conversation', 'object_bookmark', 'object_bug', 'object_dolly', 'object_dollyrevert', 'object_generic', 'object_folder', 'object_list-alt', 'object_calendar', 'object_calendarweek', 'object_calendarmonth', 'object_calendarday', 'object_calendarperuser', 'object_cash-register', 'object_company', 'object_contact', 'object_contract', 'object_donation', 'object_dynamicprice', 'object_holiday', 'object_hrm', 'object_invoice', 'object_intervention', 'object_label', @@ -3190,7 +3190,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ $arrayconvpictotofa = array( 'account'=>'university', 'accountancy'=>'money-check-alt', 'action'=>'calendar-alt', 'address'=> 'address-book', 'bank_account'=>'university', 'bill'=>'file-invoice-dollar', 'billa'=>'file-excel', 'billd'=>'file-medical', 'bom'=>'cubes', - 'company'=>'building', 'contact'=>'address-book', 'contract'=>'suitcase', 'donation'=>'file-alt', 'dynamicprice'=>'hand-holding-usd', + 'company'=>'building', 'contact'=>'address-book', 'contract'=>'suitcase', 'conversation'=>'comments', 'donation'=>'file-alt', 'dynamicprice'=>'hand-holding-usd', 'setup'=>'cog', 'companies'=>'building', 'products'=>'cube', 'commercial'=>'suitcase', 'invoicing'=>'coins', 'accounting'=>'chart-line', 'category'=>'tag', 'dollyrevert'=>'dolly', 'hrm'=>'umbrella-beach', 'margin'=>'calculator', 'members'=>'users', 'ticket'=>'ticket-alt', 'globe'=>'external-link-alt', 'lot'=>'barcode', @@ -3263,7 +3263,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ $arrayconvpictotomorcess = array( 'action'=>'bg-infobox-action', 'account'=>'bg-infobox-bank_account', 'accountancy'=>'bg-infobox-bank_account', 'bank_account'=>'bg-infobox-bank_account', 'bill'=>'bg-infobox-commande', 'billa'=>'bg-infobox-commande', 'billd'=>'bg-infobox-commande', - 'cash-register'=>'bg-infobox-bank_account', 'contract'=>'bg-infobox-contrat', 'check'=>'font-status4', + 'cash-register'=>'bg-infobox-bank_account', 'contract'=>'bg-infobox-contrat', 'check'=>'font-status4', 'conversation'=>'bg-infobox-contrat', 'donation'=>'bg-infobox-commande', 'dollyrevert'=>'flip', 'ecm'=>'bg-infobox-action', 'hrm'=>'bg-infobox-adherent', 'group'=>'bg-infobox-adherent', 'intervention'=>'bg-infobox-contrat', 'multicurrency'=>'bg-infobox-bank_account', diff --git a/htdocs/core/lib/ticket.lib.php b/htdocs/core/lib/ticket.lib.php index e12531b3846..0a50eb7407f 100644 --- a/htdocs/core/lib/ticket.lib.php +++ b/htdocs/core/lib/ticket.lib.php @@ -709,7 +709,7 @@ function show_ticket_messaging($conf, $langs, $db, $filterobj, $objcon = '', $no $out .= $histo[$key]['id']; $out .= ' '; } else { - $out .= $actionstatic->getNomUrl(1, -1).' '; + $out .= $actionstatic->getNomUrl(1, -1, 'valignmiddle').' '; } //if ($user->rights->agenda->allactions->read || $actionstatic->authorid == $user->id) diff --git a/htdocs/core/website.inc.php b/htdocs/core/website.inc.php index 3e54f6ec2ad..b5053fcc814 100644 --- a/htdocs/core/website.inc.php +++ b/htdocs/core/website.inc.php @@ -33,11 +33,6 @@ if (!is_object($website)) $website = new Website($db); $website->fetch(0, $websitekey); } -// Define $weblangs -if (!is_object($weblangs)) -{ - $weblangs = dol_clone($langs); // TODO Use an object lang from a language set into $website object instead of backoffice -} // Define $websitepage if we have $websitepagefile defined if (!$pageid && !empty($websitepagefile)) { @@ -48,10 +43,17 @@ if (!is_object($websitepage)) { $websitepage = new WebsitePage($db); } +// Define $weblangs +if (!is_object($weblangs)) +{ + $weblangs = new Translate('', $conf); +} if ($pageid > 0) { $websitepage->fetch($pageid); + $weblangs->setDefaultLang($websitepage->lang ? $websitepage->lang : 'auto'); + if (!defined('USEDOLIBARREDITOR') && in_array($websitepage->type_container, array('menu', 'other'))) { $weblangs->load("website"); diff --git a/htdocs/install/mysql/migration/10.0.0-11.0.0.sql b/htdocs/install/mysql/migration/10.0.0-11.0.0.sql index bc4b562711b..2a7a8963e9f 100644 --- a/htdocs/install/mysql/migration/10.0.0-11.0.0.sql +++ b/htdocs/install/mysql/migration/10.0.0-11.0.0.sql @@ -582,3 +582,14 @@ create table llx_commande_fournisseur_dispatch_extrafields ALTER TABLE llx_commande_fournisseur_dispatch_extrafields ADD INDEX idx_commande_fournisseur_dispatch_extrafields (fk_object); + +create table llx_facturedet_rec_extrafields +( + rowid integer AUTO_INCREMENT PRIMARY KEY, + tms timestamp, + fk_object integer NOT NULL, -- object id + import_key varchar(14) -- import key +)ENGINE=innodb; + +ALTER TABLE llx_facturedet_rec_extrafields ADD INDEX idx_facturedet_rec_extrafields (fk_object); + diff --git a/htdocs/install/mysql/migration/11.0.0-12.0.0.sql b/htdocs/install/mysql/migration/11.0.0-12.0.0.sql index 0730511ad99..8a68e763160 100644 --- a/htdocs/install/mysql/migration/11.0.0-12.0.0.sql +++ b/htdocs/install/mysql/migration/11.0.0-12.0.0.sql @@ -54,6 +54,15 @@ create table llx_c_shipment_package_type entity integer DEFAULT 1 NOT NULL -- Multi company id )ENGINE=innodb; +create table llx_facturedet_rec_extrafields +( + rowid integer AUTO_INCREMENT PRIMARY KEY, + tms timestamp, + fk_object integer NOT NULL, -- object id + import_key varchar(14) -- import key +)ENGINE=innodb; + +ALTER TABLE llx_facturedet_rec_extrafields ADD INDEX idx_facturedet_rec_extrafields (fk_object); -- For v12 @@ -275,4 +284,4 @@ ALTER TABLE llx_prelevement_facture ADD COLUMN fk_facture_fourn INTEGER NULL; ALTER TABLE llx_menu MODIFY COLUMN module varchar(255); - +UPDATE llx_actioncomm SET fk_action = 50 where fk_action = 40 AND code = 'TICKET_MSG'; diff --git a/htdocs/langs/en_US/accountancy.lang b/htdocs/langs/en_US/accountancy.lang index ba34d38f36e..eb3229efaee 100644 --- a/htdocs/langs/en_US/accountancy.lang +++ b/htdocs/langs/en_US/accountancy.lang @@ -314,12 +314,13 @@ Modelcsv_quadratus=Export for Quadratus QuadraCompta Modelcsv_ebp=Export for EBP Modelcsv_cogilog=Export for Cogilog Modelcsv_agiris=Export for Agiris -Modelcsv_LDCompta=Export for LD Compta (v9 & higher) (Test) +Modelcsv_LDCompta=Export for LD Compta (v9) (Test) Modelcsv_LDCompta10=Export for LD Compta (v10 & higher) Modelcsv_openconcerto=Export for OpenConcerto (Test) Modelcsv_configurable=Export CSV Configurable Modelcsv_FEC=Export FEC Modelcsv_Sage50_Swiss=Export for Sage 50 Switzerland +Modelcsv_winfic=Export Winfic - eWinfic - WinSis Compta ChartofaccountsId=Chart of accounts Id ## Tools - Init accounting account on product / service diff --git a/htdocs/langs/en_US/cashdesk.lang b/htdocs/langs/en_US/cashdesk.lang index b22a7b83166..52c2004c1c7 100644 --- a/htdocs/langs/en_US/cashdesk.lang +++ b/htdocs/langs/en_US/cashdesk.lang @@ -95,7 +95,7 @@ PrintMethod=Print method ReceiptPrinterMethodDescription=Powerful method with a lot of parameters. Full customizable with templates. Cannot print from the cloud. ByTerminal=By terminal TakeposNumpadUsePaymentIcon=Use payment icon on numpad -CashDeskRefNumberingModules=Numbering module for cash desk +CashDeskRefNumberingModules=Numbering module for POS sales CashDeskGenericMaskCodes6 =
{TN} tag is used to add the terminal number TakeposGroupSameProduct=Group same products lines StartAParallelSale=Start a new parallel sale diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index fb0808e0953..8c992bf91ca 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -426,6 +426,7 @@ Modules=Modules/Applications Option=Option List=List FullList=Full list +FullConversation=Full conversation Statistics=Statistics OtherStatistics=Other statistics Status=Status diff --git a/htdocs/public/ticket/view.php b/htdocs/public/ticket/view.php index 1938c68de3e..af656e69ab0 100644 --- a/htdocs/public/ticket/view.php +++ b/htdocs/public/ticket/view.php @@ -370,7 +370,7 @@ if ($action == "view_ticket" || $action == "presend" || $action == "close" || $a } // Message list - print load_fiche_titre($langs->trans('TicketMessagesList'), '', 'messages@ticket'); + print load_fiche_titre($langs->trans('TicketMessagesList'), '', 'object_conversation'); $object->viewTicketMessages(false, true, $object->dao); } else diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php index b5400db04b3..195d4df88bb 100644 --- a/htdocs/societe/card.php +++ b/htdocs/societe/card.php @@ -2826,7 +2826,7 @@ else $MAXEVENT = 10; - $morehtmlright = dolGetButtonTitle($langs->trans('SeeAll'), '', 'fa fa-list-alt', DOL_URL_ROOT.'/societe/agenda.php?socid='.$object->id); + $morehtmlright = dolGetButtonTitle($langs->trans('SeeAll'), '', 'fa fa-list-alt imgforviewmode', DOL_URL_ROOT.'/societe/agenda.php?socid='.$object->id); // List of actions on element include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; diff --git a/htdocs/takepos/admin/bar.php b/htdocs/takepos/admin/bar.php index 7b6e1d9a98c..2508ab56040 100644 --- a/htdocs/takepos/admin/bar.php +++ b/htdocs/takepos/admin/bar.php @@ -85,7 +85,7 @@ print ''; print '
'; print ''; print ''; -print ''; +print ''; print "\n"; if ($conf->global->TAKEPOS_BAR_RESTAURANT && $conf->global->TAKEPOS_PRINT_METHOD != "browser") { @@ -157,7 +157,7 @@ if ($conf->global->TAKEPOS_AUTO_ORDER) print ''; } diff --git a/htdocs/takepos/admin/setup.php b/htdocs/takepos/admin/setup.php index 59fe85e66ef..85406c46faa 100644 --- a/htdocs/takepos/admin/setup.php +++ b/htdocs/takepos/admin/setup.php @@ -274,7 +274,7 @@ if (!empty($conf->service->enabled)) print '\n"; diff --git a/htdocs/takepos/genimg/qr.php b/htdocs/takepos/genimg/qr.php index f0c3bea82b9..c73e874a465 100644 --- a/htdocs/takepos/genimg/qr.php +++ b/htdocs/takepos/genimg/qr.php @@ -29,5 +29,5 @@ require '../../core/modules/barcode/doc/tcpdfbarcode.modules.php'; $key = GETPOST('key'); -$module = new modtcpdfbarcode($db); +$module = new modTcpdfbarcode($db); $result = $module->buildBarCode("http://www.takepos.com", 'QRCODE', 'Y'); diff --git a/htdocs/takepos/phone.php b/htdocs/takepos/phone.php index 80d67513bf2..eac1f40bfd1 100644 --- a/htdocs/takepos/phone.php +++ b/htdocs/takepos/phone.php @@ -31,14 +31,14 @@ if (!defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); if (!defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1'); if (!defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); -require '../main.inc.php'; // Load $user and permissions +if (!defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; -if ($_SESSION["publicterminal"]){ - // Decode place if is a order from customer phone +if (defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) { + // Decode place if it is an order from customer phone $key = GETPOST('key'); $place=dol_decode($key); } @@ -53,7 +53,7 @@ if ($setterminal > 0) $langs->loadLangs(array("bills", "orders", "commercial", "cashdesk", "receiptprinter")); -if ($_SESSION["publicterminal"]) { +if (defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) { $_SESSION["takeposterminal"] = 1; // Use Terminal 1 for public customers } elseif (empty($user->rights->takepos->run)) { diff --git a/htdocs/takepos/public/auto_order.php b/htdocs/takepos/public/auto_order.php index c97edfdc0e7..5b463959b69 100644 --- a/htdocs/takepos/public/auto_order.php +++ b/htdocs/takepos/public/auto_order.php @@ -24,6 +24,10 @@ if (!defined("NOLOGIN")) define("NOLOGIN", '1'); // If this page is public (can be called outside logged session) if (!defined('NOIPCHECK')) define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip +require '../../main.inc.php'; + $_SESSION["basiclayout"] = 1; $_SESSION["publicterminal"] = true; // Is a public customer -require '../phone.php'; + +define('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE', 1); +include '../phone.php'; diff --git a/htdocs/theme/eldy/timeline.inc.php b/htdocs/theme/eldy/timeline.inc.php index 21e683e42f0..eb13821c221 100644 --- a/htdocs/theme/eldy/timeline.inc.php +++ b/htdocs/theme/eldy/timeline.inc.php @@ -154,7 +154,7 @@ a.timeline-btn:hover border-radius: 50%; text-align: center; left: 18px; - top: 0; + top: 5px; } .timeline > .time-label > span { font-weight: 600; diff --git a/htdocs/ticket/card.php b/htdocs/ticket/card.php index 7d5ab5fe228..6e400b3eeaa 100644 --- a/htdocs/ticket/card.php +++ b/htdocs/ticket/card.php @@ -143,6 +143,7 @@ if (empty($reshook)) { $action = 'view'; } + // Action to add an action (not a message) if (GETPOST('add', 'alpha') && $user->rights->ticket->write) { $error = 0; @@ -381,6 +382,7 @@ if (empty($reshook)) { $action = 'view'; } + // Action to add an action (not a message) if ($action == 'add_message' && GETPOSTISSET('btn_add_message') && $user->rights->ticket->read) { $ret = $object->newMessage($user, $action, (GETPOST('private_message', 'alpha') == "on" ? 1 : 0)); @@ -1218,7 +1220,8 @@ if (empty($action) || $action == 'view' || $action == 'addlink' || $action == 'd if (GETPOSTISSET('actionbis') && $action == 'presend') $action = 'presend_addmessage'; // add a message - if ($action == 'presend' || $action == 'presend_addmessage') { + if ($action == 'presend' || $action == 'presend_addmessage') + { $action = 'add_message'; // action to use to post the message $modelmail = 'ticket_send'; @@ -1293,8 +1296,8 @@ if (empty($action) || $action == 'view' || $action == 'addlink' || $action == 'd print ''; } - // Show messages on card - if (empty($conf->global->TICKET_HIDE_MESSAGES_ON_CARD)) { + // Show messages on card (Note: this is a duplicate of the view Events/Agenda but on the main tab) + if (! empty($conf->global->TICKET_SHOW_MESSAGES_ON_CARD)) { $param = '&id='.$object->id; if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.$contextpage; if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.$limit; @@ -1337,16 +1340,23 @@ if (empty($action) || $action == 'view' || $action == 'addlink' || $action == 'd print showDirectPublicLink($object).'
'; print ''; - if (!empty($conf->global->TICKET_HIDE_MESSAGES_ON_CARD)) { + if (empty($conf->global->TICKET_SHOW_MESSAGES_ON_CARD)) { print '
'; + $MAXEVENT = 10; + + $morehtmlcenter = dolGetButtonTitle($langs->trans('FullConversation'), '', 'fa fa-comments imgforviewmode', DOL_URL_ROOT.'/ticket/messaging.php?id='.$object->id); + $morehtmlcenter .= ' '; + $morehtmlcenter .= dolGetButtonTitle($langs->trans('FullList'), '', 'fa fa-list-alt imgforviewmode', DOL_URL_ROOT.'/ticket/agenda.php?id='.$object->id); + // List of actions on element include_once DOL_DOCUMENT_ROOT . '/core/class/html.formactions.class.php'; $formactions = new FormActions($db); - $somethingshown = $formactions->showactions($object, 'ticket', $socid, 1); + $somethingshown = $formactions->showactions($object, 'ticket', $socid, 1, 'listactions', $MAXEVENT, '', $morehtmlcenter); print '
'; } + print ''; } } diff --git a/htdocs/ticket/class/actions_ticket.class.php b/htdocs/ticket/class/actions_ticket.class.php index 9a67c3dd574..0fb5835cb4c 100644 --- a/htdocs/ticket/class/actions_ticket.class.php +++ b/htdocs/ticket/class/actions_ticket.class.php @@ -272,6 +272,7 @@ class ActionsTicket print $langs->trans('User'); print ''; } + print ''; foreach ($this->dao->cache_msgs_ticket as $id => $arraymsgs) { if (!$arraymsgs['private'] @@ -280,7 +281,7 @@ class ActionsTicket //print ''; print ''; print ''; if ($show_user) { print '
'.$langs->trans("Parameters").''.$langs->trans("Value").''.$langs->trans("Parameters").''.$langs->trans("Value").'
'; print "".$urlwithroot."/takepos/public/auto_order.php?key=".dol_encode($row['rowid']).""; print ''; - print ""; + print ""; print '
'; print $form->textwithpicto($langs->trans("RootCategoryForProductsToSell"), $langs->trans("RootCategoryForProductsToSellDesc")); print ''; -print $form->select_all_categories(Categorie::TYPE_PRODUCT, $conf->global->TAKEPOS_ROOT_CATEGORY_ID, 'TAKEPOS_ROOT_CATEGORY_ID', 64, 0, 0); +print img_object('', 'category', 'class="paddingright"').$form->select_all_categories(Categorie::TYPE_PRODUCT, $conf->global->TAKEPOS_ROOT_CATEGORY_ID, 'TAKEPOS_ROOT_CATEGORY_ID', 64, 0, 0); print ajax_combobox('TAKEPOS_ROOT_CATEGORY_ID'); print "
'; - print dol_print_date($arraymsgs['datec'], 'dayhour'); + print img_picto('', 'object_action', 'class="paddingright"').dol_print_date($arraymsgs['datec'], 'dayhour'); print ''; @@ -379,8 +380,7 @@ class ActionsTicket global $langs; print '
'; - print '
'; - print '
'; + print '
'; // Exclude status which requires specific method $exclude_status = array(Ticket::STATUS_CLOSED, Ticket::STATUS_CANCELED); // Exclude actual status @@ -391,7 +391,7 @@ class ActionsTicket foreach ($object->statuts_short as $status => $status_label) { if (!in_array($status, $exclude_status)) { - print '
'; + print '
'; if ($status == 1) { @@ -402,13 +402,13 @@ class ActionsTicket $urlforbutton = $_SERVER['PHP_SELF'].'?track_id='.$object->track_id.'&action=set_status&new_status='.$status; } - print ''; + print ''; print img_picto($langs->trans($object->statuts_short[$status]), 'statut'.$status.'.png@ticket').' '.$langs->trans($object->statuts_short[$status]); print ''; print '
'; } } - print '

'; + print '

'; } /** diff --git a/htdocs/ticket/class/ticket.class.php b/htdocs/ticket/class/ticket.class.php index f94599153f0..4db98cfe7ad 100644 --- a/htdocs/ticket/class/ticket.class.php +++ b/htdocs/ticket/class/ticket.class.php @@ -1559,7 +1559,7 @@ class Ticket extends CommonObject // Insert entry into agenda with code 'TICKET_MSG' include_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php'; $actioncomm = new ActionComm($this->db); - $actioncomm->type_code = 'AC_OTH_AUTO'; + $actioncomm->type_code = 'AC_OTH'; $actioncomm->code = 'TICKET_MSG'; if ($this->private) { $actioncomm->code = 'TICKET_MSG_PRIVATE';