This commit is contained in:
Laurent Destailleur 2024-11-19 12:21:29 +01:00
parent 1a75883124
commit 0cc2e8a92d

View file

@ -71,7 +71,7 @@ class FormIntervention
$hideunselectables = false;
// Search all contacts
$sql = "SELECT f.rowid, f.ref, f.fk_soc, f.fk_statut";
$sql = "SELECT f.rowid, f.ref, f.fk_soc, f.fk_statut as status";
$sql .= " FROM ".$this->db->prefix()."fichinter as f";
$sql .= " WHERE f.entity = ".$conf->entity;
if ($socid >= 0) {
@ -108,11 +108,11 @@ class FormIntervention
// Do nothing
} else {
$labeltoshow = dol_trunc($obj->ref, 18);
if (!empty($selected) && $selected == $obj->rowid && $obj->statut > 0) {
if (!empty($selected) && $selected == $obj->rowid && $obj->status > 0) {
$out .= '<option value="'.$obj->rowid.'" selected>'.$labeltoshow.'</option>';
} else {
$disabled = 0;
if (!$obj->fk_statut > 0 && ! $draftonly) {
if (!$obj->status > 0 && ! $draftonly) {
$disabled = 1;
$labeltoshow .= ' ('.$langs->trans("Draft").')';
}