mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Fix agenda event type label instead of event type code on actionComm card (#31106)
* Fix display agenda event type label instead of event type code when event type code has no translation In a ActionComm card, if we use agenda event types, the type of event displayed is the event code if this event code has no translation. Now, if there is no translation, the label of the event type is displayed instead of the code. * fix for PHPStan * fix for PHPStan * fix for PHPStan * fix for PHPStan --------- Co-authored-by: Ulysse Valdenaire <uvaldenaire@easya.solutions> Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
This commit is contained in:
parent
c4ffa090b2
commit
b2aafb37f3
|
|
@ -2336,12 +2336,13 @@ if ($id > 0) {
|
|||
// Type
|
||||
if (getDolGlobalString('AGENDA_USE_EVENT_TYPE')) {
|
||||
print '<tr><td class="titlefield">'.$langs->trans("Type").'</td><td>';
|
||||
$labeltoshow = $langs->trans("Action".$object->type_code);
|
||||
$labeltype = ($langs->transnoentities("Action".$object->type_code) != "Action".$object->type_code) ? $langs->transnoentities("Action".$object->type_code) : $object->type_label;
|
||||
$labeltoshow = $labeltype;
|
||||
if ($object->code) {
|
||||
$labeltoshow .= ' ('.$object->code.')';
|
||||
}
|
||||
print $object->getTypePicto('pictofixedwidth paddingright', $labeltoshow);
|
||||
print $langs->trans("Action".$object->type_code);
|
||||
print $labeltype;
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -845,6 +845,7 @@ class ActionComm extends CommonObject
|
|||
$this->type_color = $obj->type_color;
|
||||
$this->type_picto = $obj->type_picto;
|
||||
$this->type = $obj->type_type;
|
||||
$this->type_label = $obj->type_label;
|
||||
|
||||
$this->code = $obj->code;
|
||||
$this->label = $obj->label;
|
||||
|
|
|
|||
|
|
@ -201,7 +201,7 @@ if ($action == 'order' && GETPOST('valid') && $user->hasRight('fournisseur', 'co
|
|||
// If we use multicurrency
|
||||
if (isModEnabled('multicurrency') && !empty($productsupplier->fourn_multicurrency_code) && $productsupplier->fourn_multicurrency_code != $conf->currency) {
|
||||
$line->multicurrency_code = $productsupplier->fourn_multicurrency_code;
|
||||
$line->fk_multicurrency = $productsupplier->fourn_multicurrency_id;
|
||||
$line->fk_multicurrency = (int) $productsupplier->fourn_multicurrency_id;
|
||||
$line->multicurrency_subprice = $productsupplier->fourn_multicurrency_unitprice;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user