Look: Modif esthtique mineure
This commit is contained in:
parent
856b871f74
commit
9bd15473d5
@ -453,7 +453,7 @@ if ($socidp > 0)
|
||||
}
|
||||
print '</td><td align="right" width="80">'.dolibarr_print_date($objp->dp)."</td>\n";
|
||||
print '<td align="right" width="120">'.price($objp->price).'</td>';
|
||||
print '<td align="center" width="100">'.$propal_static->LibStatut($objp->fk_statut,2).'</td></tr>';
|
||||
print '<td align="right" nowrap="nowrap">'.$propal_static->LibStatut($objp->fk_statut,5).'</td></tr>';
|
||||
$var=!$var;
|
||||
$i++;
|
||||
}
|
||||
@ -548,7 +548,7 @@ if ($socidp > 0)
|
||||
.(!isset($objp->ref) ? $objp->id : $objp->ref) ."</a></td>\n";
|
||||
print '<td align="right" width="80">'.dolibarr_print_date($objp->dc)."</td>\n";
|
||||
print '<td width="20"> </td>';
|
||||
print '<td align="center" width="100">'.$contratstatic->LibStatut($objp->statut,2)."</td>\n";
|
||||
print '<td align="right" nowrap="nowrap">'.$contratstatic->LibStatut($objp->statut,5)."</td>\n";
|
||||
print '</tr>';
|
||||
$i++;
|
||||
}
|
||||
|
||||
@ -364,7 +364,7 @@ if ($socid > 0)
|
||||
}
|
||||
print "<td align=\"right\">".price($objp->total_ttc)."</td>\n";
|
||||
|
||||
print '<td align="left">'.($facturestatic->LibStatut($objp->paye,$objp->statut,2))."</td>\n";
|
||||
print '<td align="right" nowrap="nowrap">'.($facturestatic->LibStatut($objp->paye,$objp->statut,5))."</td>\n";
|
||||
print "</tr>\n";
|
||||
$i++;
|
||||
}
|
||||
|
||||
@ -857,9 +857,9 @@ class Contrat
|
||||
|
||||
|
||||
/**
|
||||
* \brief Retourne le libellé du statut du contrat
|
||||
* \param mode 0=libellé long, 1=libellé court, 2=Picto + Libellé court, 3=Picto, 4=Picto + Libellé long
|
||||
* \return string Libellé
|
||||
* \brief Retourne le libellé du statut du contrat
|
||||
* \param mode 0=libellé long, 1=libellé court, 2=Picto + Libellé court, 3=Picto, 4=Picto + Libellé long, 5=Libellé court + Picto
|
||||
* \return string Libellé
|
||||
*/
|
||||
function getLibStatut($mode)
|
||||
{
|
||||
@ -867,10 +867,10 @@ class Contrat
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Renvoi le libellé d'un statut donné
|
||||
* \param statut id statut
|
||||
* \param mode 0=libellé long, 1=libellé court, 2=Picto + Libellé court, 3=Picto, 4=Picto + Libellé long
|
||||
* \return string Libellé
|
||||
* \brief Renvoi le libellé d'un statut donné
|
||||
* \param statut id statut
|
||||
* \param mode 0=libellé long, 1=libellé court, 2=Picto + Libellé court, 3=Picto, 4=Picto + Libellé long, 5=Libellé court + Picto
|
||||
* \return string Libellé
|
||||
*/
|
||||
function LibStatut($statut,$mode)
|
||||
{
|
||||
@ -906,6 +906,12 @@ class Contrat
|
||||
if ($statut == 1) { return img_picto($langs->trans('ContractStatusValidated'),'statut4').' '.$langs->trans("ContractStatusValidated"); }
|
||||
if ($statut == 2) { return img_picto($langs->trans('ContractStatusClosed'),'statut6').' '.$langs->trans("ContractStatusClosed"); }
|
||||
}
|
||||
if ($mode == 5)
|
||||
{
|
||||
if ($statut == 0) { return $langs->trans("ContractStatusDraft").' '.img_picto($langs->trans('ContractStatusDraft'),'statut0'); }
|
||||
if ($statut == 1) { return $langs->trans("ContractStatusValidated").' '.img_picto($langs->trans('ContractStatusValidated'),'statut4'); }
|
||||
if ($statut == 2) { return $langs->trans("ContractStatusClosed").' '.img_picto($langs->trans('ContractStatusClosed'),'statut6'); }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -186,6 +186,8 @@ if ( $societe->fetch($socid) )
|
||||
/*
|
||||
* Liste des commandes associées
|
||||
*/
|
||||
$orderstatic = new CommandeFournisseur($db);
|
||||
|
||||
$sql = "SELECT p.rowid,p.ref,".$db->pdate("p.date_commande")." as dc, p.fk_statut";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."commande_fournisseur as p ";
|
||||
$sql.= " WHERE p.fk_soc =".$societe->id;
|
||||
@ -222,7 +224,7 @@ if ( $societe->fetch($socid) )
|
||||
print "-";
|
||||
}
|
||||
print '</td>';
|
||||
print '<td width="20"><img src="commande/statut'.$obj->fk_statut.'.png"></td>';
|
||||
print '<td align="right" nowrap="nowrap">'.$orderstatic->LibStatut($obj->fk_statut,5).'</td>';
|
||||
print '</tr>';
|
||||
$i++;
|
||||
}
|
||||
@ -273,7 +275,7 @@ if ( $societe->fetch($socid) )
|
||||
print img_object($langs->trans('ShowBill'),'bill').' '.$obj->facnumber.'</a> '.dolibarr_trunc($obj->libelle,14).'</td>';
|
||||
print '<td align="center">'.dolibarr_print_date($obj->df).'</td>';
|
||||
print '<td align="right">'.price($obj->amount).'</td>';
|
||||
print '<td align="left" nowrap="nowrap">'.$facturestatic->LibStatut($obj->paye,$obj->fk_statut,2).'</td>';
|
||||
print '<td align="right" nowrap="nowrap">'.$facturestatic->LibStatut($obj->paye,$obj->fk_statut,5).'</td>';
|
||||
print '</tr>';
|
||||
$i++;
|
||||
}
|
||||
|
||||
@ -273,6 +273,56 @@ class CommandeFournisseur
|
||||
}
|
||||
return $result ;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* \brief Retourne le libellé du statut d'une commande (brouillon, validée, abandonnée, payée)
|
||||
* \param mode 0=libellé long, 1=libellé court, 2=Picto + Libellé court, 3=Picto, 4=Picto + Libellé long
|
||||
* \return string Libelle
|
||||
*/
|
||||
function getLibStatut($mode=0)
|
||||
{
|
||||
return $this->LibStatut($this->statut,$mode);
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Renvoi le libellé d'un statut donné
|
||||
* \param statut Id statut
|
||||
* \param mode 0=libellé long, 1=libellé court, 2=Picto + Libellé court, 3=Picto, 4=Picto + Libellé long, 5=Libellé court + Picto
|
||||
* \return string Libellé du statut
|
||||
*/
|
||||
function LibStatut($statut,$mode=0)
|
||||
{
|
||||
global $langs;
|
||||
$langs->load('orders');
|
||||
|
||||
if ($mode == 0)
|
||||
{
|
||||
return $this->statuts[$statut];
|
||||
}
|
||||
if ($mode == 1)
|
||||
{
|
||||
return $this->statuts[$statut];
|
||||
}
|
||||
if ($mode == 2)
|
||||
{
|
||||
return $this->statuts[$statut];
|
||||
}
|
||||
if ($mode == 3)
|
||||
{
|
||||
return $this->statuts[$statut];
|
||||
}
|
||||
if ($mode == 4)
|
||||
{
|
||||
return $this->statuts[$statut];
|
||||
}
|
||||
if ($mode == 5)
|
||||
{
|
||||
return $this->statuts[$statut];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
*
|
||||
*
|
||||
|
||||
@ -1366,9 +1366,9 @@ class Propal
|
||||
|
||||
|
||||
/**
|
||||
* \brief Retourne le libellé du statut d'une propale (brouillon, validée, ...)
|
||||
* \param mode 0=libellé long, 1=libellé court, 2=Picto + Libellé court, 3=Picto, 4=Picto + Libellé long
|
||||
* \return string Libellé
|
||||
* \brief Retourne le libellé du statut d'une propale (brouillon, validée, ...)
|
||||
* \param mode 0=libellé long, 1=libellé court, 2=Picto + Libellé court, 3=Picto, 4=Picto + Libellé long, 5=Libellé court + Picto
|
||||
* \return string Libellé
|
||||
*/
|
||||
function getLibStatut($mode=0)
|
||||
{
|
||||
@ -1376,16 +1376,16 @@ class Propal
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Renvoi le libellé d'un statut donné
|
||||
* \param statut id statut
|
||||
* \param mode 0=libellé long, 1=libellé court, 2=Picto + Libellé court, 3=Picto, 4=Picto + Libellé long
|
||||
* \return string Libellé
|
||||
* \brief Renvoi le libellé d'un statut donné
|
||||
* \param statut id statut
|
||||
* \param mode 0=libellé long, 1=libellé court, 2=Picto + Libellé court, 3=Picto, 4=Picto + Libellé long, 5=Libellé court + Picto
|
||||
* \return string Libellé
|
||||
*/
|
||||
function LibStatut($statut,$mode=1)
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("propal");
|
||||
|
||||
|
||||
if ($mode == 0)
|
||||
{
|
||||
return $this->labelstatut[$statut];
|
||||
@ -1418,6 +1418,14 @@ class Propal
|
||||
if ($statut==3) return img_picto($langs->trans('PropalStatusNotSigned'),'statut5').' '.$this->labelstatut[$statut];
|
||||
if ($statut==4) return img_picto($langs->trans('PropalStatusBilled'),'statut6').' '.$this->labelstatut[$statut];
|
||||
}
|
||||
if ($mode == 5)
|
||||
{
|
||||
if ($statut==0) return $this->labelstatut_short[$statut].' '.img_picto($langs->trans('PropalStatusDraftShort'),'statut0');
|
||||
if ($statut==1) return $this->labelstatut_short[$statut].' '.img_picto($langs->trans('PropalStatusOpenedShort'),'statut1');
|
||||
if ($statut==2) return $this->labelstatut_short[$statut].' '.img_picto($langs->trans('PropalStatusSignedShort'),'statut3');
|
||||
if ($statut==3) return $this->labelstatut_short[$statut].' '.img_picto($langs->trans('PropalStatusNotSignedShort'),'statut5');
|
||||
if ($statut==4) return $this->labelstatut_short[$statut].' '.img_picto($langs->trans('PropalStatusBilledShort'),'statut6');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user