Qual: Translation of status must be in the "view" functions.
This commit is contained in:
parent
8924f1104a
commit
3ef86dedec
@ -65,16 +65,14 @@ class Mailing extends CommonObject
|
|||||||
*/
|
*/
|
||||||
function Mailing($DB)
|
function Mailing($DB)
|
||||||
{
|
{
|
||||||
global $langs;
|
|
||||||
$langs->load("mails");
|
|
||||||
|
|
||||||
$this->db = $DB ;
|
$this->db = $DB ;
|
||||||
$this->db_table = MAIN_DB_PREFIX."mailing";
|
$this->db_table = MAIN_DB_PREFIX."mailing";
|
||||||
|
|
||||||
$this->statuts[0] = $langs->trans("MailingStatusDraft");
|
// List of language codes for status
|
||||||
$this->statuts[1] = $langs->trans("MailingStatusValidated");
|
$this->statuts[0] = 'MailingStatusDraft';
|
||||||
$this->statuts[2] = $langs->trans("MailingStatusSentPartialy");
|
$this->statuts[1] = 'MailingStatusValidated';
|
||||||
$this->statuts[3] = $langs->trans("MailingStatusSentCompletely");
|
$this->statuts[2] = 'MailingStatusSentPartialy';
|
||||||
|
$this->statuts[3] = 'MailingStatusSentCompletely';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -402,18 +400,18 @@ class Mailing extends CommonObject
|
|||||||
|
|
||||||
if ($mode == 0)
|
if ($mode == 0)
|
||||||
{
|
{
|
||||||
return $this->statuts[$statut];
|
return $langs->trans($this->statuts[$statut]);
|
||||||
}
|
}
|
||||||
if ($mode == 1)
|
if ($mode == 1)
|
||||||
{
|
{
|
||||||
return $this->statuts[$statut];
|
return $langs->trans($this->statuts[$statut]);
|
||||||
}
|
}
|
||||||
if ($mode == 2)
|
if ($mode == 2)
|
||||||
{
|
{
|
||||||
if ($statut == 0) return img_picto($langs->trans($this->statuts[$statut]),'statut0').' '.$this->statuts[$statut];
|
if ($statut == 0) return img_picto($langs->trans($this->statuts[$statut]),'statut0').' '.$langs->trans($this->statuts[$statut]);
|
||||||
if ($statut == 1) return img_picto($langs->trans($this->statuts[$statut]),'statut1').' '.$this->statuts[$statut];
|
if ($statut == 1) return img_picto($langs->trans($this->statuts[$statut]),'statut1').' '.$langs->trans($this->statuts[$statut]);
|
||||||
if ($statut == 2) return img_picto($langs->trans($this->statuts[$statut]),'statut3').' '.$this->statuts[$statut];
|
if ($statut == 2) return img_picto($langs->trans($this->statuts[$statut]),'statut3').' '.$langs->trans($this->statuts[$statut]);
|
||||||
if ($statut == 3) return img_picto($langs->trans($this->statuts[$statut]),'statut6').' '.$this->statuts[$statut];
|
if ($statut == 3) return img_picto($langs->trans($this->statuts[$statut]),'statut6').' '.$langs->trans($this->statuts[$statut]);
|
||||||
}
|
}
|
||||||
if ($mode == 3)
|
if ($mode == 3)
|
||||||
{
|
{
|
||||||
@ -424,19 +422,18 @@ class Mailing extends CommonObject
|
|||||||
}
|
}
|
||||||
if ($mode == 4)
|
if ($mode == 4)
|
||||||
{
|
{
|
||||||
if ($statut == 0) return img_picto($langs->trans($this->statuts[$statut]),'statut0').' '.$this->statuts[$statut];
|
if ($statut == 0) return img_picto($langs->trans($this->statuts[$statut]),'statut0').' '.$langs->trans($this->statuts[$statut]);
|
||||||
if ($statut == 1) return img_picto($langs->trans($this->statuts[$statut]),'statut1').' '.$this->statuts[$statut];
|
if ($statut == 1) return img_picto($langs->trans($this->statuts[$statut]),'statut1').' '.$langs->trans($this->statuts[$statut]);
|
||||||
if ($statut == 2) return img_picto($langs->trans($this->statuts[$statut]),'statut3').' '.$this->statuts[$statut];
|
if ($statut == 2) return img_picto($langs->trans($this->statuts[$statut]),'statut3').' '.$langs->trans($this->statuts[$statut]);
|
||||||
if ($statut == 3) return img_picto($langs->trans($this->statuts[$statut]),'statut6').' '.$this->statuts[$statut];
|
if ($statut == 3) return img_picto($langs->trans($this->statuts[$statut]),'statut6').' '.$langs->trans($this->statuts[$statut]);
|
||||||
}
|
}
|
||||||
if ($mode == 5)
|
if ($mode == 5)
|
||||||
{
|
{
|
||||||
if ($statut == 0) return $this->statuts[$statut].' '.img_picto($langs->trans($this->statuts[$statut]),'statut0');
|
if ($statut == 0) return $langs->trans($this->statuts[$statut]).' '.img_picto($langs->trans($this->statuts[$statut]),'statut0');
|
||||||
if ($statut == 1) return $this->statuts[$statut].' '.img_picto($langs->trans($this->statuts[$statut]),'statut1');
|
if ($statut == 1) return $langs->trans($this->statuts[$statut]).' '.img_picto($langs->trans($this->statuts[$statut]),'statut1');
|
||||||
if ($statut == 2) return $this->statuts[$statut].' '.img_picto($langs->trans($this->statuts[$statut]),'statut3');
|
if ($statut == 2) return $langs->trans($this->statuts[$statut]).' '.img_picto($langs->trans($this->statuts[$statut]),'statut3');
|
||||||
if ($statut == 3) return $this->statuts[$statut].' '.img_picto($langs->trans($this->statuts[$statut]),'statut6');
|
if ($statut == 3) return $langs->trans($this->statuts[$statut]).' '.img_picto($langs->trans($this->statuts[$statut]),'statut6');
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -167,9 +167,9 @@ if ($_GET["id"])
|
|||||||
|
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
print '<tr><td width="20%">Statut</td><td>';
|
print '<tr><td width="20%">'.$langs->trans('Status').'</td><td>';
|
||||||
print '<img src="./statut'.$bon->statut.'.png"> ';
|
print '<img src="./statut'.$bon->statut.'.png"> ';
|
||||||
print $lipre->statuts[$lipre->statut].'</td></tr>';
|
print $langs->trans($lipre->statuts[$lipre->statut]).'</td></tr>';
|
||||||
|
|
||||||
if($bon->date_trans <> 0)
|
if($bon->date_trans <> 0)
|
||||||
{
|
{
|
||||||
@ -220,7 +220,7 @@ if ($_GET["id"])
|
|||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
print '<input type="hidden" name="action" value="infocredit">';
|
print '<input type="hidden" name="action" value="infocredit">';
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
print '<tr><td width="20%">Crédité le</td><td>';
|
print '<tr><td width="20%">Cr<EFBFBD>dit<EFBFBD> le</td><td>';
|
||||||
print $html->select_date('','','','','',"infocredit");
|
print $html->select_date('','','','','',"infocredit");
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
print '<tr><td colspan="2" align="center">';
|
print '<tr><td colspan="2" align="center">';
|
||||||
|
|||||||
@ -30,8 +30,8 @@
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\class LignePrelevement
|
* \class LignePrelevement
|
||||||
\brief Classe permettant la gestion des prelevements
|
* \brief Classe permettant la gestion des prelevements
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class LignePrelevement
|
class LignePrelevement
|
||||||
@ -39,6 +39,8 @@ class LignePrelevement
|
|||||||
var $id;
|
var $id;
|
||||||
var $db;
|
var $db;
|
||||||
|
|
||||||
|
var $statuts = array();
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Constructeur de la classe
|
* \brief Constructeur de la classe
|
||||||
@ -50,10 +52,10 @@ class LignePrelevement
|
|||||||
$this->db = $DB ;
|
$this->db = $DB ;
|
||||||
$this->user = $user;
|
$this->user = $user;
|
||||||
|
|
||||||
$this->statuts = array();
|
// List of language codes for status
|
||||||
$this->statuts[0] = "En attente";
|
$this->statuts[0] = "Waiting";
|
||||||
$this->statuts[2] = "Credite";
|
$this->statuts[2] = "Credited";
|
||||||
$this->statuts[3] = "Rejete";
|
$this->statuts[3] = "Refused";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -100,8 +100,8 @@ if ($_GET["id"])
|
|||||||
print '<a href="fiche.php?id='.$lipre->bon_rowid.'">'.$lipre->bon_ref.'</a></td></tr>';
|
print '<a href="fiche.php?id='.$lipre->bon_rowid.'">'.$lipre->bon_ref.'</a></td></tr>';
|
||||||
print '<tr><td width="20%">'.$langs->trans("Amount").'</td><td>'.price($lipre->amount).'</td></tr>';
|
print '<tr><td width="20%">'.$langs->trans("Amount").'</td><td>'.price($lipre->amount).'</td></tr>';
|
||||||
print '<tr><td width="20%">'.$langs->trans("Status").'</td><td>';
|
print '<tr><td width="20%">'.$langs->trans("Status").'</td><td>';
|
||||||
print '<img src="./statut'.$lipre->statut.'.png"> ';
|
print '<img src="./statut'.$lipre->statut.'.png"> ';
|
||||||
print $lipre->statuts[$lipre->statut].'</td></tr>';
|
print $langs->trans($lipre->statuts[$lipre->statut]).'</td></tr>';
|
||||||
|
|
||||||
if ($lipre->statut == 3)
|
if ($lipre->statut == 3)
|
||||||
{
|
{
|
||||||
@ -151,8 +151,8 @@ if ($_GET["id"])
|
|||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
print '<input type="hidden" name="action" value="confirm_rejet">';
|
print '<input type="hidden" name="action" value="confirm_rejet">';
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
print '<tr><td colspan="3">Rejet de prélèvement</td></tr>';
|
print '<tr><td colspan="3">Rejet de pr<EFBFBD>l<EFBFBD>vement</td></tr>';
|
||||||
print '<tr><td class="valid">Etes-vous sûr de vouloir saisir un rejet de prélèvement pour la société '.$soc->nom.' ?</td>';
|
print '<tr><td class="valid">Etes-vous s<EFBFBD>r de vouloir saisir un rejet de pr<70>l<EFBFBD>vement pour la soci<63>t<EFBFBD> '.$soc->nom.' ?</td>';
|
||||||
print '<td colspan="2" class="valid">';
|
print '<td colspan="2" class="valid">';
|
||||||
print '<select name="confirm">';
|
print '<select name="confirm">';
|
||||||
print '<option value="yes">oui</option>';
|
print '<option value="yes">oui</option>';
|
||||||
|
|||||||
@ -54,20 +54,17 @@ class Expedition extends CommonObject
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Initialisation
|
* Initialisation
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
function Expedition($DB)
|
function Expedition($DB)
|
||||||
{
|
{
|
||||||
global $langs;
|
|
||||||
|
|
||||||
$this->db = $DB;
|
$this->db = $DB;
|
||||||
$this->lignes = array();
|
$this->lignes = array();
|
||||||
|
|
||||||
$this->statuts[-1] = $langs->trans("Canceled");
|
|
||||||
$this->statuts[0] = $langs->trans("Draft");
|
|
||||||
$this->statuts[1] = $langs->trans("Validated");
|
|
||||||
|
|
||||||
$this->products = array();
|
$this->products = array();
|
||||||
|
|
||||||
|
// List of long language codes for status
|
||||||
|
$this->statuts[-1] = 'StatusSendingCanceled';
|
||||||
|
$this->statuts[0] = 'StatusSendingDraft';
|
||||||
|
$this->statuts[1] = 'StatusSendingValidated';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -690,10 +687,10 @@ class Expedition extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Renvoi le libelle d'un statut donne
|
* \brief Return label of a status
|
||||||
* \param statut Id statut
|
* \param statut Id statut
|
||||||
* \param mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto
|
* \param mode 0=Long label, 1=Short label, 2=Picto + Short label, 3=Picto, 4=Picto + Long label, 5=Short label + Picto
|
||||||
* \return string Libelle
|
* \return string Label of status
|
||||||
*/
|
*/
|
||||||
function LibStatut($statut,$mode)
|
function LibStatut($statut,$mode)
|
||||||
{
|
{
|
||||||
@ -701,23 +698,23 @@ class Expedition extends CommonObject
|
|||||||
|
|
||||||
if ($mode==0)
|
if ($mode==0)
|
||||||
{
|
{
|
||||||
if ($statut==0) return $this->statuts[$statut];
|
if ($statut==0) return $langs->trans($this->statuts[$statut]);
|
||||||
if ($statut==1) return $this->statuts[$statut];
|
if ($statut==1) return $langs->trans($this->statuts[$statut]);
|
||||||
}
|
}
|
||||||
if ($mode==1)
|
if ($mode==1)
|
||||||
{
|
{
|
||||||
if ($statut==0) return $this->statuts[$statut];
|
if ($statut==0) return $langs->trans($this->statuts[$statut]);
|
||||||
if ($statut==1) return $this->statuts[$statut];
|
if ($statut==1) return $langs->trans($this->statuts[$statut]);
|
||||||
}
|
}
|
||||||
if ($mode == 4)
|
if ($mode == 4)
|
||||||
{
|
{
|
||||||
if ($statut==0) return img_picto($langs->trans('StatusSendingDraft'),'statut0').' '.$langs->trans('StatusSendingDraft');
|
if ($statut==0) return img_picto(this->statuts[$statut],'statut0').' '.$langs->trans($this->statuts[$statut]);
|
||||||
if ($statut==1) return img_picto($langs->trans('StatusSendingValidated'),'statut4').' '.$langs->trans('StatusSendingValidated');
|
if ($statut==1) return img_picto(this->statuts[$statut],'statut4').' '.$langs->trans($this->statuts[$statut]);
|
||||||
}
|
}
|
||||||
if ($mode == 5)
|
if ($mode == 5)
|
||||||
{
|
{
|
||||||
if ($statut==0) return $langs->trans('StatusSendingDraftShort').' '.img_picto($langs->trans('StatusSendingDraft'),'statut0');
|
if ($statut==0) return $langs->trans('StatusSendingDraftShort').' '.img_picto($langs->trans($this->statuts[$statut]),'statut0');
|
||||||
if ($statut==1) return $langs->trans('StatusSendingValidatedShort').' '.img_picto($langs->trans('StatusSendingValidated'),'statut4');
|
if ($statut==1) return $langs->trans('StatusSendingValidatedShort').' '.img_picto($langs->trans($this->statuts[$statut]),'statut4');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -66,18 +66,16 @@ class Fichinter extends CommonObject
|
|||||||
*/
|
*/
|
||||||
function Fichinter($DB, $socid="")
|
function Fichinter($DB, $socid="")
|
||||||
{
|
{
|
||||||
global $langs;
|
|
||||||
|
|
||||||
$this->db = $DB ;
|
$this->db = $DB ;
|
||||||
$this->socid = $socid;
|
$this->socid = $socid;
|
||||||
$this->products = array();
|
$this->products = array();
|
||||||
$this->projet_id = 0;
|
$this->projet_id = 0;
|
||||||
|
|
||||||
// Statut 0=brouillon, 1=valide
|
// List of language codes for status
|
||||||
$this->statuts[0]=$langs->trans("Draft");
|
$this->statuts[0]='Draft';
|
||||||
$this->statuts[1]=$langs->trans("Validated");
|
$this->statuts[1]='Validated';
|
||||||
$this->statuts_short[0]=$langs->trans("Draft");
|
$this->statuts_short[0]='Draft';
|
||||||
$this->statuts_short[1]=$langs->trans("Validated");
|
$this->statuts_short[1]='Validated';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -340,31 +338,31 @@ class Fichinter extends CommonObject
|
|||||||
{
|
{
|
||||||
if ($mode == 0)
|
if ($mode == 0)
|
||||||
{
|
{
|
||||||
return $this->statuts[$statut];
|
return $langs->trans($this->statuts[$statut]);
|
||||||
}
|
}
|
||||||
if ($mode == 1)
|
if ($mode == 1)
|
||||||
{
|
{
|
||||||
return $this->statuts_short[$statut];
|
return $langs->trans($this->statuts_short[$statut]);
|
||||||
}
|
}
|
||||||
if ($mode == 2)
|
if ($mode == 2)
|
||||||
{
|
{
|
||||||
if ($statut==0) return img_picto($this->statuts_short[$statut],'statut0').' '.$this->statuts_short[$statut];
|
if ($statut==0) return img_picto($langs->trans($this->statuts_short[$statut]),'statut0').' '.$langs->trans($this->statuts_short[$statut]);
|
||||||
if ($statut==1) return img_picto($this->statuts_short[$statut],'statut6').' '.$this->statuts_short[$statut];
|
if ($statut==1) return img_picto($langs->trans($this->statuts_short[$statut]),'statut6').' '.$langs->trans($this->statuts_short[$statut]);
|
||||||
}
|
}
|
||||||
if ($mode == 3)
|
if ($mode == 3)
|
||||||
{
|
{
|
||||||
if ($statut==0) return img_picto($this->statuts_short[$statut],'statut0');
|
if ($statut==0) return img_picto($langs->trans($this->statuts_short[$statut]),'statut0');
|
||||||
if ($statut==1) return img_picto($this->statuts_short[$statut],'statut6');
|
if ($statut==1) return img_picto($langs->trans($this->statuts_short[$statut]),'statut6');
|
||||||
}
|
}
|
||||||
if ($mode == 4)
|
if ($mode == 4)
|
||||||
{
|
{
|
||||||
if ($statut==0) return img_picto($this->statuts_short[$statut],'statut0').' '.$this->statuts[$statut];
|
if ($statut==0) return img_picto($langs->trans($this->statuts_short[$statut]),'statut0').' '.$langs->trans($this->statuts[$statut]);
|
||||||
if ($statut==1) return img_picto($this->statuts_short[$statut],'statut6').' '.$this->statuts[$statut];
|
if ($statut==1) return img_picto($langs->trans($this->statuts_short[$statut]),'statut6').' '.$langs->trans($this->statuts[$statut]);
|
||||||
}
|
}
|
||||||
if ($mode == 5)
|
if ($mode == 5)
|
||||||
{
|
{
|
||||||
if ($statut==0) return $this->statuts_short[$statut].' '.img_picto($this->statuts_short[$statut],'statut0');
|
if ($statut==0) return $langs->trans($this->statuts_short[$statut]).' '.img_picto($langs->trans($this->statuts_short[$statut]),'statut0');
|
||||||
if ($statut==1) return $this->statuts_short[$statut].' '.img_picto($this->statuts_short[$statut],'statut6');
|
if ($statut==1) return $langs->trans($this->statuts_short[$statut]).' '.img_picto($langs->trans($this->statuts_short[$statut]),'statut6');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -97,7 +97,7 @@ if ($resql)
|
|||||||
$var=!$var;
|
$var=!$var;
|
||||||
|
|
||||||
print "<tr $bc[$var]>";
|
print "<tr $bc[$var]>";
|
||||||
print '<td>'.$commande->statuts[$row[1]].'</td>';
|
print '<td>'.$langs->trans($commande->statuts[$row[1]]).'</td>';
|
||||||
print '<td align="right"><a href="liste.php?statut='.$row[1].'">'.$row[0].' '.$commande->LibStatut($row[1],3).'</a></td>';
|
print '<td align="right"><a href="liste.php?statut='.$row[1].'">'.$row[0].' '.$commande->LibStatut($row[1],3).'</a></td>';
|
||||||
|
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|||||||
@ -56,20 +56,17 @@ class CommandeFournisseur extends Commande
|
|||||||
function CommandeFournisseur($DB)
|
function CommandeFournisseur($DB)
|
||||||
{
|
{
|
||||||
$this->db = $DB;
|
$this->db = $DB;
|
||||||
|
|
||||||
global $langs;
|
|
||||||
$langs->load('orders');
|
|
||||||
|
|
||||||
$this->statuts[0] = $langs->trans('StatusOrderDraft');
|
|
||||||
$this->statuts[1] = $langs->trans('StatusOrderValidated');
|
|
||||||
$this->statuts[2] = $langs->trans('StatusOrderApproved');
|
|
||||||
$this->statuts[3] = $langs->trans('StatusOrderOnProcess');
|
|
||||||
$this->statuts[4] = $langs->trans('StatusOrderReceivedPartially');
|
|
||||||
$this->statuts[5] = $langs->trans('StatusOrderReceivedAll');
|
|
||||||
$this->statuts[6] = $langs->trans('StatusOrderCanceled');
|
|
||||||
$this->statuts[9] = $langs->trans('StatusOrderRefused');
|
|
||||||
|
|
||||||
$this->products = array();
|
$this->products = array();
|
||||||
|
|
||||||
|
// List of language codes for status
|
||||||
|
$this->statuts[0] = 'StatusOrderDraft';
|
||||||
|
$this->statuts[1] = 'StatusOrderValidated';
|
||||||
|
$this->statuts[2] = 'StatusOrderApproved';
|
||||||
|
$this->statuts[3] = 'StatusOrderOnProcess';
|
||||||
|
$this->statuts[4] = 'StatusOrderReceivedPartially';
|
||||||
|
$this->statuts[5] = 'StatusOrderReceivedAll';
|
||||||
|
$this->statuts[6] = 'StatusOrderCanceled';
|
||||||
|
$this->statuts[9] = 'StatusOrderRefused';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -365,9 +362,9 @@ class CommandeFournisseur extends Commande
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Retourne le libelle du statut d'une commande (brouillon, validee, abandonnee, payee
|
* \brief Return label of the status of object
|
||||||
* \param mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long
|
* \param mode 0=Long label, 1=Short label, 2=Picto + Short label, 3=Picto, 4=Picto + Long label
|
||||||
* \return string Libelle
|
* \return string Label
|
||||||
*/
|
*/
|
||||||
function getLibStatut($mode=0)
|
function getLibStatut($mode=0)
|
||||||
{
|
{
|
||||||
@ -375,10 +372,10 @@ class CommandeFournisseur extends Commande
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Renvoi le libelle d'un statut donne
|
* \brief Return label of a status
|
||||||
* \param statut Id statut
|
* \param statut Id statut
|
||||||
* \param mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto
|
* \param mode 0=Long label, 1=Short label, 2=Picto + Short label, 3=Picto, 4=Picto + Long label, 5=Short label + Picto
|
||||||
* \return string Libelle du statut
|
* \return string Label of status
|
||||||
*/
|
*/
|
||||||
function LibStatut($statut,$mode=0)
|
function LibStatut($statut,$mode=0)
|
||||||
{
|
{
|
||||||
@ -387,57 +384,57 @@ class CommandeFournisseur extends Commande
|
|||||||
|
|
||||||
if ($mode == 0)
|
if ($mode == 0)
|
||||||
{
|
{
|
||||||
return $this->statuts[$statut];
|
return $langs->trans($this->statuts[$statut]);
|
||||||
}
|
}
|
||||||
if ($mode == 1)
|
if ($mode == 1)
|
||||||
{
|
{
|
||||||
return $this->statuts[$statut];
|
return $langs->trans($this->statuts[$statut]);
|
||||||
}
|
}
|
||||||
if ($mode == 2)
|
if ($mode == 2)
|
||||||
{
|
{
|
||||||
return $this->statuts[$statut];
|
return $langs->trans($this->statuts[$statut]);
|
||||||
}
|
}
|
||||||
if ($mode == 3)
|
if ($mode == 3)
|
||||||
{
|
{
|
||||||
if ($statut==0) return img_picto($langs->trans('StatusOrderDraft'),'statut0');
|
if ($statut==0) return img_picto($langs->trans($this->statuts[$statut]),'statut0');
|
||||||
if ($statut==1) return img_picto($langs->trans('StatusOrderValidated'),'statut1');
|
if ($statut==1) return img_picto($langs->trans($this->statuts[$statut]),'statut1');
|
||||||
if ($statut==2) return img_picto($langs->trans('StatusOrderApproved'),'statut3');
|
if ($statut==2) return img_picto($langs->trans($this->statuts[$statut]),'statut3');
|
||||||
if ($statut==3) return img_picto($langs->trans('StatusOrderOnProcess'),'statut3');
|
if ($statut==3) return img_picto($langs->trans($this->statuts[$statut]),'statut3');
|
||||||
if ($statut==4) return img_picto($langs->trans('StatusOrderReceivedPartially'),'statut3');
|
if ($statut==4) return img_picto($langs->trans($this->statuts[$statut]),'statut3');
|
||||||
if ($statut==5) return img_picto($langs->trans('StatusOrderProcessed'),'statut6');
|
if ($statut==5) return img_picto($langs->trans($this->statuts[$statut]),'statut6');
|
||||||
if ($statut==6) return img_picto($langs->trans('StatusOrderCanceled'),'statut5');
|
if ($statut==6) return img_picto($langs->trans($this->statuts[$statut]),'statut5');
|
||||||
if ($statut==9) return img_picto($langs->trans('StatusOrderRefused'),'statut5');
|
if ($statut==9) return img_picto($langs->trans($this->statuts[$statut]),'statut5');
|
||||||
}
|
}
|
||||||
if ($mode == 4)
|
if ($mode == 4)
|
||||||
{
|
{
|
||||||
if ($statut==0) return img_picto($langs->trans('StatusOrderDraft'),'statut0').' '.$this->statuts[$statut];
|
if ($statut==0) return img_picto($langs->trans($this->statuts[$statut]),'statut0').' '.$langs->trans($this->statuts[$statut]);
|
||||||
if ($statut==1) return img_picto($langs->trans('StatusOrderValidated'),'statut1').' '.$this->statuts[$statut];
|
if ($statut==1) return img_picto($langs->trans($this->statuts[$statut]),'statut1').' '.$langs->trans($this->statuts[$statut]);
|
||||||
if ($statut==2) return img_picto($langs->trans('StatusOrderApproved'),'statut3').' '.$this->statuts[$statut];
|
if ($statut==2) return img_picto($langs->trans($this->statuts[$statut]),'statut3').' '.$langs->trans($this->statuts[$statut]);
|
||||||
if ($statut==3) return img_picto($langs->trans('StatusOrderOnProcess'),'statut3').' '.$this->statuts[$statut];
|
if ($statut==3) return img_picto($langs->trans($this->statuts[$statut]),'statut3').' '.$langs->trans($this->statuts[$statut]);
|
||||||
if ($statut==4) return img_picto($langs->trans('StatusOrderReceivedPartially'),'statut3').' '.$this->statuts[$statut];
|
if ($statut==4) return img_picto($langs->trans($this->statuts[$statut]),'statut3').' '.$langs->trans($this->statuts[$statut]);
|
||||||
if ($statut==5) return img_picto($langs->trans('StatusOrderProcessed'),'statut6').' '.$this->statuts[$statut];
|
if ($statut==5) return img_picto($langs->trans($this->statuts[$statut]),'statut6').' '.$langs->trans($this->statuts[$statut]);
|
||||||
if ($statut==6) return img_picto($langs->trans('StatusOrderCanceled'),'statut5').' '.$this->statuts[$statut];
|
if ($statut==6) return img_picto($langs->trans($this->statuts[$statut]),'statut5').' '.$langs->trans($this->statuts[$statut]);
|
||||||
if ($statut==9) return img_picto($langs->trans('StatusOrderRefused'),'statut5').' '.$this->statuts[$statut];
|
if ($statut==9) return img_picto($langs->trans($this->statuts[$statut]),'statut5').' '.$langs->trans($this->statuts[$statut]);
|
||||||
}
|
}
|
||||||
if ($mode == 5)
|
if ($mode == 5)
|
||||||
{
|
{
|
||||||
if ($statut==0) return $this->statuts[$statut].' '.img_picto($langs->trans('StatusOrderDraft'),'statut0');
|
if ($statut==0) return $langs->trans($this->statuts[$statut]).' '.img_picto($langs->trans($this->statuts[$statut]),'statut0');
|
||||||
if ($statut==1) return $this->statuts[$statut].' '.img_picto($langs->trans('StatusOrderValidated'),'statut1');
|
if ($statut==1) return $langs->trans($this->statuts[$statut]).' '.img_picto($langs->trans($this->statuts[$statut]),'statut1');
|
||||||
if ($statut==2) return $this->statuts[$statut].' '.img_picto($langs->trans('StatusOrderApproved'),'statut3');
|
if ($statut==2) return $langs->trans($this->statuts[$statut]).' '.img_picto($langs->trans($this->statuts[$statut]),'statut3');
|
||||||
if ($statut==3) return $this->statuts[$statut].' '.img_picto($langs->trans('StatusOrderOnProcess'),'statut3');
|
if ($statut==3) return $langs->trans($this->statuts[$statut]).' '.img_picto($langs->trans($this->statuts[$statut]),'statut3');
|
||||||
if ($statut==4) return $this->statuts[$statut].' '.img_picto($langs->trans('StatusOrderReceivedPartially'),'statut3');
|
if ($statut==4) return $langs->trans($this->statuts[$statut]).' '.img_picto($langs->trans($this->statuts[$statut]),'statut3');
|
||||||
if ($statut==5) return $this->statuts[$statut].' '.img_picto($langs->trans('StatusOrderProcessed'),'statut6');
|
if ($statut==5) return $langs->trans($this->statuts[$statut]).' '.img_picto($langs->trans($this->statuts[$statut]),'statut6');
|
||||||
if ($statut==6) return $this->statuts[$statut].' '.img_picto($langs->trans('StatusOrderCanceled'),'statut5');
|
if ($statut==6) return $langs->trans($this->statuts[$statut]).' '.img_picto($langs->trans($this->statuts[$statut]),'statut5');
|
||||||
if ($statut==9) return $this->statuts[$statut].' '.img_picto($langs->trans('StatusOrderRefused'),'statut5');
|
if ($statut==9) return $langs->trans($this->statuts[$statut]).' '.img_picto($langs->trans($this->statuts[$statut]),'statut5');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\brief Renvoie nom clicable (avec eventuellement le picto)
|
* \brief Renvoie nom clicable (avec eventuellement le picto)
|
||||||
\param withpicto 0=Pas de picto, 1=Inclut le picto dans le lien, 2=Picto seul
|
* \param withpicto 0=Pas de picto, 1=Inclut le picto dans le lien, 2=Picto seul
|
||||||
\param option Sur quoi pointe le lien
|
* \param option Sur quoi pointe le lien
|
||||||
\return string Chaine avec URL
|
* \return string Chaine avec URL
|
||||||
*/
|
*/
|
||||||
function getNomUrl($withpicto=0,$option='')
|
function getNomUrl($withpicto=0,$option='')
|
||||||
{
|
{
|
||||||
|
|||||||
@ -83,7 +83,7 @@ if ($resql)
|
|||||||
$var=!$var;
|
$var=!$var;
|
||||||
|
|
||||||
print "<tr $bc[$var]>";
|
print "<tr $bc[$var]>";
|
||||||
print '<td>'.$commande->statuts[$row[1]].'</td>';
|
print '<td>'.$langs->trans($commande->statuts[$row[1]]).'</td>';
|
||||||
print '<td align="center">'.$row[0].'</td>';
|
print '<td align="center">'.$row[0].'</td>';
|
||||||
print '<td align="center"><a href="'.DOL_URL_ROOT.'/fourn/commande/liste.php?statut='.$row[1].'">'.$commande->LibStatut($row[1],3).'</a></td>';
|
print '<td align="center"><a href="'.DOL_URL_ROOT.'/fourn/commande/liste.php?statut='.$row[1].'">'.$commande->LibStatut($row[1],3).'</a></td>';
|
||||||
|
|
||||||
|
|||||||
@ -27,8 +27,10 @@ DateSendingShort=Date sending order
|
|||||||
SendingsForSameOrder=Shipments for this order
|
SendingsForSameOrder=Shipments for this order
|
||||||
SendingsAndReceivingForSameOrder=Shipments and receivings for this order
|
SendingsAndReceivingForSameOrder=Shipments and receivings for this order
|
||||||
SendingsToValidate=Sending to validate
|
SendingsToValidate=Sending to validate
|
||||||
|
StatusSendingCanceled=Canceled
|
||||||
StatusSendingDraft=Draft
|
StatusSendingDraft=Draft
|
||||||
StatusSendingValidated=Validated (products to ship or already shipped)
|
StatusSendingValidated=Validated (products to ship or already shipped)
|
||||||
|
StatusSendingCanceledShort=Canceled
|
||||||
StatusSendingDraftShort=Draft
|
StatusSendingDraftShort=Draft
|
||||||
StatusSendingValidatedShort=Validated
|
StatusSendingValidatedShort=Validated
|
||||||
SendingSheet=Sending sheet
|
SendingSheet=Sending sheet
|
||||||
|
|||||||
@ -27,8 +27,10 @@ DateSendingShort=Date ordre expéd.
|
|||||||
SendingsForSameOrder=Expéditions pour cette commande
|
SendingsForSameOrder=Expéditions pour cette commande
|
||||||
SendingsAndReceivingForSameOrder=Expéditions et réceptions pour cette commande
|
SendingsAndReceivingForSameOrder=Expéditions et réceptions pour cette commande
|
||||||
SendingsToValidate=Expéditions à valider
|
SendingsToValidate=Expéditions à valider
|
||||||
|
StatusSendingCanceled=Annulée
|
||||||
StatusSendingDraft=Brouillon
|
StatusSendingDraft=Brouillon
|
||||||
StatusSendingValidated=Validée (produits à envoyer ou envoyés)
|
StatusSendingValidated=Validée (produits à envoyer ou envoyés)
|
||||||
|
StatusSendingCanceledShort=Annulée
|
||||||
StatusSendingDraftShort=Brouillon
|
StatusSendingDraftShort=Brouillon
|
||||||
StatusSendingValidatedShort=Validée
|
StatusSendingValidatedShort=Validée
|
||||||
SendingSheet=Bordereau d'expédition
|
SendingSheet=Bordereau d'expédition
|
||||||
|
|||||||
@ -61,20 +61,17 @@ class Livraison extends CommonObject
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Initialisation
|
* Initialisation
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
function Livraison($DB)
|
function Livraison($DB)
|
||||||
{
|
{
|
||||||
global $langs;
|
|
||||||
|
|
||||||
$this->db = $DB;
|
$this->db = $DB;
|
||||||
$this->lignes = array();
|
$this->lignes = array();
|
||||||
|
|
||||||
$this->statuts[-1] = $langs->trans("Canceled");
|
|
||||||
$this->statuts[0] = $langs->trans("Draft");
|
|
||||||
$this->statuts[1] = $langs->trans("Validated");
|
|
||||||
|
|
||||||
$this->products = array();
|
$this->products = array();
|
||||||
|
|
||||||
|
// List of short language codes for status
|
||||||
|
$this->statuts[-1] = 'StatusSendingCanceled';
|
||||||
|
$this->statuts[0] = 'StatusSendingDraft';
|
||||||
|
$this->statuts[1] = 'StatusSendingValidated';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -690,19 +687,19 @@ class Livraison extends CommonObject
|
|||||||
|
|
||||||
if ($mode==0)
|
if ($mode==0)
|
||||||
{
|
{
|
||||||
if ($statut==-1) return $this->statuts[$statut];
|
if ($statut==-1) return $langs->trans('StatusSendingCanceled');
|
||||||
if ($statut==0) return $this->statuts[$statut];
|
if ($statut==0) return $langs->trans('StatusSendingDraft');
|
||||||
if ($statut==1) return $this->statuts[$statut];
|
if ($statut==1) return $langs->trans('StatusSendingValidated')
|
||||||
}
|
}
|
||||||
if ($mode==1)
|
if ($mode==1)
|
||||||
{
|
{
|
||||||
if ($statut==-1) return $this->statuts[$statut];
|
if ($statut==-1) return $langs->trans($this->statuts[$statut]);
|
||||||
if ($statut==0) return $this->statuts[$statut];
|
if ($statut==0) return $langs->trans($this->statuts[$statut]);
|
||||||
if ($statut==1) return $this->statuts[$statut];
|
if ($statut==1) return $langs->trans($this->statuts[$statut]);
|
||||||
}
|
}
|
||||||
if ($mode == 4)
|
if ($mode == 4)
|
||||||
{
|
{
|
||||||
if ($statut==-1) return img_picto($langs->trans('StatusSendingCanceled'),'statut5').' '.$langs->trans('StatusSendingDraft');
|
if ($statut==-1) return img_picto($langs->trans('StatusSendingCanceled'),'statut5').' '.$langs->trans('StatusSendingCanceled');
|
||||||
if ($statut==0) return img_picto($langs->trans('StatusSendingDraft'),'statut0').' '.$langs->trans('StatusSendingDraft');
|
if ($statut==0) return img_picto($langs->trans('StatusSendingDraft'),'statut0').' '.$langs->trans('StatusSendingDraft');
|
||||||
if ($statut==1) return img_picto($langs->trans('StatusSendingValidated'),'statut4').' '.$langs->trans('StatusSendingValidated');
|
if ($statut==1) return img_picto($langs->trans('StatusSendingValidated'),'statut4').' '.$langs->trans('StatusSendingValidated');
|
||||||
}
|
}
|
||||||
|
|||||||
@ -52,22 +52,22 @@ class Entrepot extends CommonObject
|
|||||||
var $ville;
|
var $ville;
|
||||||
var $pays_id;
|
var $pays_id;
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* \brief Constructeur de l'objet entrepot
|
* \brief Constructeur de l'objet entrepot
|
||||||
* \param DB Handler d'acc<EFBFBD>s <EFBFBD> la base de donn<EFBFBD>e
|
* \param DB Handler d'acc<EFBFBD>s <EFBFBD> la base de donn<EFBFBD>e
|
||||||
*/
|
*/
|
||||||
function Entrepot($DB)
|
function Entrepot($DB)
|
||||||
{
|
{
|
||||||
global $langs;
|
|
||||||
$this->db = $DB;
|
$this->db = $DB;
|
||||||
|
|
||||||
$this->statuts[0] = $langs->trans("Closed2");
|
// List of short language codes for status
|
||||||
$this->statuts[1] = $langs->trans("Opened");
|
$this->statuts[0] = 'Closed2';
|
||||||
|
$this->statuts[1] = 'Opened';
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* \brief Creation d'un entrepot en base
|
* \brief Creation d'un entrepot en base
|
||||||
* \param Objet user qui cr<EFBFBD>e l'entrepot
|
* \param Objet user qui cree l'entrepot
|
||||||
*/
|
*/
|
||||||
function create($user)
|
function create($user)
|
||||||
{
|
{
|
||||||
@ -412,37 +412,37 @@ class Entrepot extends CommonObject
|
|||||||
if ($mode == 0)
|
if ($mode == 0)
|
||||||
{
|
{
|
||||||
$prefix='';
|
$prefix='';
|
||||||
if ($statut == 0) return $langs->trans('Closed2');
|
if ($statut == 0) return $langs->trans($this->statuts[$statut]);
|
||||||
if ($statut == 1) return $langs->trans('Opened');
|
if ($statut == 1) return $langs->trans($this->statuts[$statut]);
|
||||||
}
|
}
|
||||||
if ($mode == 1)
|
if ($mode == 1)
|
||||||
{
|
{
|
||||||
$prefix='Short';
|
$prefix='Short';
|
||||||
if ($statut == 0) return $langs->trans('Closed2');
|
if ($statut == 0) return $langs->trans($this->statuts[$statut]);
|
||||||
if ($statut == 1) return $langs->trans('Opened');
|
if ($statut == 1) return $langs->trans($this->statuts[$statut]);
|
||||||
}
|
}
|
||||||
if ($mode == 2)
|
if ($mode == 2)
|
||||||
{
|
{
|
||||||
$prefix='Short';
|
$prefix='Short';
|
||||||
if ($statut == 0) return img_picto($langs->trans('Closed2'),'statut5').' '.$langs->trans('Closed2');
|
if ($statut == 0) return img_picto($langs->trans($this->statuts[$statut]),'statut5').' '.$langs->trans($this->statuts[$statut]);
|
||||||
if ($statut == 1) return img_picto($langs->trans('Opened'),'statut4').' '.$langs->trans('Opened');
|
if ($statut == 1) return img_picto($langs->trans($this->statuts[$statut]),'statut4').' '.$langs->trans($this->statuts[$statut]);
|
||||||
}
|
}
|
||||||
if ($mode == 3)
|
if ($mode == 3)
|
||||||
{
|
{
|
||||||
$prefix='Short';
|
$prefix='Short';
|
||||||
if ($statut == 0) return img_picto($langs->trans('Closed2'),'statut5');
|
if ($statut == 0) return img_picto($langs->trans($this->statuts[$statut]),'statut5');
|
||||||
if ($statut == 1) return img_picto($langs->trans('Opened'),'statut4');
|
if ($statut == 1) return img_picto($langs->trans($this->statuts[$statut]),'statut4');
|
||||||
}
|
}
|
||||||
if ($mode == 4)
|
if ($mode == 4)
|
||||||
{
|
{
|
||||||
if ($statut == 0) return img_picto($langs->trans('Closed2'),'statut5').' '.$langs->trans('Closed2');
|
if ($statut == 0) return img_picto($langs->trans($this->statuts[$statut]),'statut5').' '.$langs->trans($this->statuts[$statut]);
|
||||||
if ($statut == 1) return img_picto($langs->trans('Opened'),'statut4').' '.$langs->trans('Opened');
|
if ($statut == 1) return img_picto($langs->trans($this->statuts[$statut]),'statut4').' '.$langs->trans($this->statuts[$statut]);
|
||||||
}
|
}
|
||||||
if ($mode == 5)
|
if ($mode == 5)
|
||||||
{
|
{
|
||||||
$prefix='Short';
|
$prefix='Short';
|
||||||
if ($statut == 0) return $langs->trans('Closed2').' '.img_picto($langs->trans('Closed2'),'statut5');
|
if ($statut == 0) return $langs->trans($this->statuts[$statut]).' '.img_picto($langs->trans($this->statuts[$statut]),'statut5');
|
||||||
if ($statut == 1) return $langs->trans('Opened').' '.img_picto($langs->trans('Opened'),'statut4');
|
if ($statut == 1) return $langs->trans($this->statuts[$statut]).' '.img_picto($langs->trans($this->statuts[$statut]),'statut4');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user