Fix: Translation of sending methods

This commit is contained in:
Laurent Destailleur 2009-03-23 17:38:04 +00:00
parent f38232cbb1
commit 5d3f628692
4 changed files with 21 additions and 6 deletions

View File

@ -760,23 +760,27 @@ class Expedition extends CommonObject
}
}
/*
Fetch deliveries method and return an array
/**
* \brief Fetch deliveries method and return an array. Load array this->meths(rowid=>label).
*/
function fetch_delivery_methods()
{
global $langs;
$meths = array();
$sql = "SELECT em.rowid, em.libelle";
$sql = "SELECT em.rowid, em.code, em.libelle";
$sql.= " FROM ".MAIN_DB_PREFIX."expedition_methode as em";
$sql.= " WHERE em.active = 1 ORDER BY em.libelle ASC";
$sql.= " WHERE em.active = 1";
$sql.= " ORDER BY em.libelle ASC";
$resql = $this->db->query($sql);
if ($resql)
{
while ($obj = $this->db->fetch_object($resql))
{
$this->meths[$obj->rowid] = $obj->libelle;
$label=$langs->trans('SendingMethod'.$obj->code);
$this->meths[$obj->rowid] = ($label != 'SendingMethod'.$obj->code?$label:$obj->libelle);
}
}
}

View File

@ -43,6 +43,10 @@ GenericTransport=Generic transport
Enlevement=Gotten by customer
DocumentModelSimple=Simple document model
WarningNoQtyLeftToSend=Warning, no products waiting to be shipped.
# Sending methods
SendingMethodCATCH=Catch by customer
SendingMethodTRANS=Transporter
SendingMethodCOLSUI=Colissimo
# NumRef
NumRefModelJade=Return a reference number with format BLYY00001, ... where YY is year. Number at end is never reset to zero.

View File

@ -43,6 +43,10 @@ GenericTransport=Transporteur générique
Enlevement=Enlèvement sur place par le client
DocumentModelSimple=Modèle simple
WarningNoQtyLeftToSend=Alerte, aucun produit en attente de livraison.
# Sending methods
SendingMethodCATCH=Enlevement par le client
SendingMethodTRANS=Transporteur
SendingMethodCOLSUI=Colissimo Suivi
# NumRef
NumRefModelJade=Renvoie un numéro de référence sous la forme numérique BLYY00001, ... où YY représente l'année. Le numéro d'incrément qui suit l'année n'est PAS remis à zéro en début d'année.

View File

@ -25,6 +25,9 @@ update llx_actioncomm set datep = datea where datep is null;
INSERT INTO llx_expedition_methode (rowid,code,libelle,description,active) VALUES (1,'CATCH','Catch','Catch by client',1);
INSERT INTO llx_expedition_methode (rowid,code,libelle,description,active) VALUES (2,'TRANS','Transporter','Generic transporter',1);
INSERT INTO llx_expedition_methode (rowid,code,libelle,description,active) VALUES (3,'COLSUI','Colissimo Suivi','Colissimo Suivi',0);
UPDATE llx_expedition_methode set code='CATCH', libelle='Catch', description='Catch by client' where rowid=1;
UPDATE llx_expedition_methode set code='TRANS', libelle='Transporter', description='Generic transporter' where rowid=2;
UPDATE llx_expedition_methode set code='COLSUI', libelle='Colissimo Suivi', description='Colissimo Suivi' where rowid=3;
insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (70, 'facture_fourn', 'internal', 'SALESREPFOLL', 'Responsable suivi du paiement', 1);