add new dolGetStatus to LibStatut in common invoice class

This commit is contained in:
John BOTELLA
2019-03-07 15:24:11 +01:00
parent ca10b1e403
commit 97544e0aea
3 changed files with 62 additions and 125 deletions

View File

@@ -3428,46 +3428,46 @@ class Commande extends CommonOrder
if ($statut==self::STATUS_CANCELED){
$labelstatut = $langs->trans('StatusOrderCanceled');
$labelstatutShort = $langs->trans('StatusOrderCanceledShort');
$statuttrans='status5';
$statusType='status5';
}
elseif ($statut==self::STATUS_DRAFT){
$labelstatut = $langs->trans('StatusOrderDraft');
$labelstatutShort = $langs->trans('StatusOrderDraftShort');
$statuttrans='status0';
$statusType='status0';
}
elseif ($statut==self::STATUS_VALIDATED){
$labelstatut = $langs->trans('StatusOrderValidated').$billedtext;
$labelstatutShort = $langs->trans('StatusOrderValidatedShort').$billedtext;
$statuttrans='status1';
$statusType='status1';
}
elseif ($statut==self::STATUS_SHIPMENTONPROCESS){
$labelstatut = $langs->trans('StatusOrderSentShort').$billedtext;
$labelstatutShort = $langs->trans('StatusOrderSentShort').$billedtext;
$statuttrans='status3';
$statusType='status3';
}
elseif ($statut==self::STATUS_CLOSED && (! $billed && empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT))){
$labelstatut = $langs->trans('StatusOrderToBill');
$labelstatutShort = $langs->trans('StatusOrderToBillShort');
$statuttrans='status4';
$statusType='status4';
}
elseif ($statut==self::STATUS_CLOSED && ($billed && empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT))){
$labelstatut = $langs->trans('StatusOrderProcessed').$billedtext;
$labelstatutShort = $langs->trans('StatusOrderProcessed').$billedtext;
$statuttrans='status6';
$statusType='status6';
}
elseif ($statut==self::STATUS_CLOSED && (! empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT))){
$labelstatut = $langs->trans('StatusOrderDelivered');
$labelstatutShort = $langs->trans('StatusOrderDelivered');
$statuttrans='status6';
$statusType='status6';
}
else{
$labelstatut = $langs->trans('Unknown');
$labelstatutShort = '';
$statuttrans='';
$statusType='';
$mode = 0;
}
return dolGetStatus($labelstatut, $labelstatutShort, '', $statuttrans, $mode);
return dolGetStatus($labelstatut, $labelstatutShort, '', $statusType, $mode);
}