Fix intervention list null/empty sign status (#30783)

* Fixed null sign status

* Updated sign status field label

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
This commit is contained in:
William Mead
2024-08-29 09:16:15 +02:00
committed by GitHub
parent 060c0b97c0
commit 129bc02b82
2 changed files with 3 additions and 3 deletions

View File

@@ -888,8 +888,8 @@ class Fichinter extends CommonObject
global $langs;
$langs->load("commercial");
$list_signed_status = $this->getSignedStatusLocalisedArray();
$signed_status_label = $list_signed_status[$this->signed_status];
$signed_status_label_short = $list_signed_status[$this->signed_status];
$signed_status_label = $this->signed_status != '' ? $list_signed_status[$this->signed_status] : '';
$signed_status_label_short = $this->signed_status != '' ? $list_signed_status[$this->signed_status] : '';
$signed_status_code = 'status'.$this->signed_status;
return dolGetStatus($signed_status_label, $signed_status_label_short, '', $signed_status_code, $mode);
}

View File

@@ -142,7 +142,7 @@ $arrayfields = array(
'f.note_public' => array('label' => 'NotePublic', 'checked' => 0, 'position' => 510, 'enabled' => (!getDolGlobalInt('MAIN_LIST_HIDE_PUBLIC_NOTES'))),
'f.note_private' => array('label' => 'NotePrivate', 'checked' => 0, 'position' => 511, 'enabled' => (!getDolGlobalInt('MAIN_LIST_HIDE_PRIVATE_NOTES'))),
'f.fk_statut' => array('label' => 'Status', 'checked' => 1, 'position' => 1000),
'f.signed_status' =>array('label' => 'Signed status', 'checked' => 0, 'position' => 1001),
'f.signed_status' =>array('label' => 'SignedStatus', 'checked' => 0, 'position' => 1001),
'fd.description' => array('label' => "DescriptionOfLine", 'checked' => 1, 'enabled' => !getDolGlobalString('FICHINTER_DISABLE_DETAILS') ? 1 : 0),
'fd.date' => array('label' => 'DateOfLine', 'checked' => 1, 'enabled' => !getDolGlobalString('FICHINTER_DISABLE_DETAILS') ? 1 : 0),
'fd.duree' => array('label' => 'DurationOfLine', 'type' => 'duration', 'checked' => 1, 'enabled' => !getDolGlobalString('FICHINTER_DISABLE_DETAILS') ? 1 : 0), //type duration is here because in database, column 'duree' is double