";
- $c = new Categorie ($db, $catid);
- $ways = $c->print_all_ways(' > ','fourn/product/liste.php');
- print " > ".$ways[0]."
\n";
- print "
";
+ $c = new Categorie ($db, $catid);
+ $ways = $c->print_all_ways(' > ','fourn/product/liste.php');
+ print " > ".$ways[0]."
\n";
+ print "
| ';
- print ''.img_object('','bill').' '.$langs->trans("Bills").'';
+ print ''.img_object('','bill').' '.$langs->trans("CustomersInvoices").'';
print ' | ';
print $product->stats_facture['customers'];
print ' | ';
@@ -194,7 +194,7 @@ if ($_GET["id"] || $_GET["ref"])
$sql = "SELECT distinct(s.nom), s.idp, s.code_client, c.rowid, c.total_ht as amount, c.ref,";
- $sql.= " ".$db->pdate("c.date_creation")." as date, c.fk_statut as statut, c.rowid as commandeid";
+ $sql.= " ".$db->pdate("c.date_creation")." as date, c.fk_statut as statut, c.facture, c.rowid as commandeid";
if (!$user->rights->commercial->client->voir && !$socidp) $sql .= ", sc.fk_soc, sc.fk_user ";
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s,".MAIN_DB_PREFIX."commande as c, ".MAIN_DB_PREFIX."commandedet as d";
if (!$user->rights->commercial->client->voir && !$socidp) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
@@ -213,7 +213,7 @@ if ($_GET["id"] || $_GET["ref"])
{
$num = $db->num_rows($result);
- print_barre_liste($langs->trans("Orders"),$page,$_SERVER["PHP_SELF"],"&id=$product->id",$sortfield,$sortorder,'',$num);
+ print_barre_liste($langs->trans("CustomersOrders"),$page,$_SERVER["PHP_SELF"],"&id=$product->id",$sortfield,$sortorder,'',$num);
$i = 0;
print "";
@@ -246,7 +246,7 @@ if ($_GET["id"] || $_GET["ref"])
print "| ";
print dolibarr_print_date($objp->date)." | ";
print "".price($objp->amount)." | \n";
- print ''.$commandestatic->LibStatut($objp->statut,5).' | ';
+ print ''.$commandestatic->LibStatut($objp->statut,$objp->facture,5).' | ';
print "\n";
$i++;
}
diff --git a/htdocs/product/stats/contrat.php b/htdocs/product/stats/contrat.php
index 88680f0e3e3..48efdcdcf17 100644
--- a/htdocs/product/stats/contrat.php
+++ b/htdocs/product/stats/contrat.php
@@ -142,7 +142,7 @@ if ($_GET["id"] || $_GET["ref"])
if ($ret < 0) dolibarr_print_error($db);
$langs->load("orders");
print '| ';
- print ''.img_object('','order').' '.$langs->trans("Orders").'';
+ print ''.img_object('','order').' '.$langs->trans("CustomersOrders").'';
print ' | ';
print $product->stats_commande['customers'];
print ' | ';
@@ -176,7 +176,7 @@ if ($_GET["id"] || $_GET["ref"])
if ($ret < 0) dolibarr_print_error($db);
$langs->load("bills");
print ' | | ';
- print ''.img_object('','bill').' '.$langs->trans("Bills").'';
+ print ''.img_object('','bill').' '.$langs->trans("CustomersInvoices").'';
print ' | ';
print $product->stats_facture['customers'];
print ' | ';
diff --git a/htdocs/product/stats/facture.php b/htdocs/product/stats/facture.php
index 37b584e73bb..725b40e2a60 100644
--- a/htdocs/product/stats/facture.php
+++ b/htdocs/product/stats/facture.php
@@ -107,10 +107,10 @@ if ($_GET["id"] || $_GET["ref"])
print $product->getLibStatut(2);
print ' | ';
- print '| '.$langs->trans("Referers").' | ';
- print ''.$langs->trans("NbOfCustomers").' | ';
- print ''.$langs->trans("NbOfReferers").' | ';
- print ''.$langs->trans("TotalQuantity").' | ';
+ print ' | '.$langs->trans("Referers").' | ';
+ print ''.$langs->trans("NbOfCustomers").' | ';
+ print ''.$langs->trans("NbOfReferers").' | ';
+ print ''.$langs->trans("TotalQuantity").' | ';
print ' ';
// Propals
@@ -137,7 +137,7 @@ if ($_GET["id"] || $_GET["ref"])
if ($ret < 0) dolibarr_print_error($db);
$langs->load("orders");
print '| ';
- print ''.img_object('','order').' '.$langs->trans("Orders").'';
+ print ''.img_object('','order').' '.$langs->trans("CustomersOrders").'';
print ' | ';
print $product->stats_commande['customers'];
print ' | ';
@@ -171,7 +171,7 @@ if ($_GET["id"] || $_GET["ref"])
if ($ret < 0) dolibarr_print_error($db);
$langs->load("bills");
print ' | | ';
- print ''.img_object('','bill').' '.$langs->trans("Bills").'';
+ print ''.img_object('','bill').' '.$langs->trans("CustomersInvoices").'';
print ' | ';
print $product->stats_facture['customers'];
print ' | ';
@@ -207,7 +207,7 @@ if ($_GET["id"] || $_GET["ref"])
{
$num = $db->num_rows($result);
- print_barre_liste($langs->trans("Bills"),$page,$_SERVER["PHP_SELF"],"&id=$product->id",$sortfield,$sortorder,'',$num);
+ print_barre_liste($langs->trans("CustomersInvoices"),$page,$_SERVER["PHP_SELF"],"&id=$product->id",$sortfield,$sortorder,'',$num);
$i = 0;
print "";
diff --git a/htdocs/product/stats/fiche.php b/htdocs/product/stats/fiche.php
index 938937b8e6e..d44296c2b41 100644
--- a/htdocs/product/stats/fiche.php
+++ b/htdocs/product/stats/fiche.php
@@ -132,7 +132,7 @@ if ($_GET["id"] || $_GET["ref"])
// Reference
print '';
- print '| '.$langs->trans("Ref").' | ';
+ print ' | '.$langs->trans("Ref").' | ';
$product->load_previous_next_ref();
$previous_ref = $product->ref_previous?'ref_previous.'">'.img_previous().'':'';
$next_ref = $product->ref_next?'ref_next.'">'.img_next().'':'';
@@ -152,10 +152,10 @@ if ($_GET["id"] || $_GET["ref"])
print $product->getLibStatut(2);
print ' | ';
- print '| '.$langs->trans("Referers").' | ';
- print ''.$langs->trans("NbOfCustomers").' | ';
- print ''.$langs->trans("NbOfReferers").' | ';
- print ''.$langs->trans("TotalQuantity").' | ';
+ print ' | '.$langs->trans("Referers").' | ';
+ print ''.$langs->trans("NbOfCustomers").' | ';
+ print ''.$langs->trans("NbOfReferers").' | ';
+ print ''.$langs->trans("TotalQuantity").' | ';
print ' ';
// Propals
@@ -182,7 +182,7 @@ if ($_GET["id"] || $_GET["ref"])
if ($ret < 0) dolibarr_print_error($db);
$langs->load("orders");
print '| ';
- print ''.img_object('','order').' '.$langs->trans("Orders").'';
+ print ''.img_object('','order').' '.$langs->trans("CustomersOrders").'';
print ' | ';
print $product->stats_commande['customers'];
print ' | ';
@@ -216,7 +216,7 @@ if ($_GET["id"] || $_GET["ref"])
if ($ret < 0) dolibarr_print_error($db);
$langs->load("bills");
print ' | | ';
- print ''.img_object('','bill').' '.$langs->trans("Bills").'';
+ print ''.img_object('','bill').' '.$langs->trans("CustomersInvoices").'';
print ' | ';
print $product->stats_facture['customers'];
print ' | ';
diff --git a/htdocs/product/stats/propal.php b/htdocs/product/stats/propal.php
index e5cf6785fdc..549db179183 100644
--- a/htdocs/product/stats/propal.php
+++ b/htdocs/product/stats/propal.php
@@ -141,7 +141,7 @@ if ($_GET["id"] || $_GET["ref"])
if ($ret < 0) dolibarr_print_error($db);
$langs->load("orders");
print ' | | ';
- print ''.img_object('','order').' '.$langs->trans("Orders").'';
+ print ''.img_object('','order').' '.$langs->trans("CustomersOrders").'';
print ' | ';
print $product->stats_commande['customers'];
print ' | ';
@@ -175,7 +175,7 @@ if ($_GET["id"] || $_GET["ref"])
if ($ret < 0) dolibarr_print_error($db);
$langs->load("bills");
print ' | | ';
- print ''.img_object('','bill').' '.$langs->trans("Bills").'';
+ print ''.img_object('','bill').' '.$langs->trans("CustomersInvoices").'';
print ' | ';
print $product->stats_facture['customers'];
print ' | ';
diff --git a/htdocs/product/stock/product.php b/htdocs/product/stock/product.php
index 454cd4a1813..a75de643cdd 100644
--- a/htdocs/product/stock/product.php
+++ b/htdocs/product/stock/product.php
@@ -35,6 +35,7 @@ require_once(DOL_DOCUMENT_ROOT."/lib/product.lib.php");
require_once(DOL_DOCUMENT_ROOT."/product.class.php");
$langs->load("products");
+$langs->load("orders");
$langs->load("bills");
$user->getrights('produit');
@@ -119,7 +120,7 @@ if ($_GET["id"] || $_GET["ref"])
// Reference
print ' | ';
- print '| '.$langs->trans("Ref").' | ';
+ print ' | '.$langs->trans("Ref").' | ';
$product->load_previous_next_ref();
$previous_ref = $product->ref_previous?'ref_previous.'">'.img_previous().'':'';
$next_ref = $product->ref_next?'ref_next.'">'.img_next().'':'';
@@ -179,14 +180,14 @@ if ($_GET["id"] || $_GET["ref"])
// Nbre de commande fournisseurs en cours
if ($conf->fournisseur->enabled)
{
- $result=$product->load_stats_commande_fournisseur(0,'1');
+ $result=$product->load_stats_commande_fournisseur(0,'2');
if ($result < 0) dolibarr_print_error($db,$product->error);
print ' | | '.$langs->trans("SuppliersOrders").' | ';
print '';
print $product->stats_commande_fournisseur['qty'];
- $result=$product->load_stats_commande_fournisseur(0,'0');
+ $result=$product->load_stats_commande_fournisseur(0,'0,1');
if ($result < 0) dolibarr_print_error($db,$product->error);
- print ' ('.$langs->trans("Draft").': '.$product->stats_commande_fournisseur['qty'].')';
+ print ' ('.$langs->trans("DraftOrWaitingApproved").': '.$product->stats_commande_fournisseur['qty'].')';
print ' | ';
}
diff --git a/htdocs/societe/notify/fiche.php b/htdocs/societe/notify/fiche.php
index 862e29bc8ed..31ef77e4cd3 100644
--- a/htdocs/societe/notify/fiche.php
+++ b/htdocs/societe/notify/fiche.php
@@ -32,6 +32,7 @@ require_once(DOL_DOCUMENT_ROOT."/lib/company.lib.php");
require_once(DOL_DOCUMENT_ROOT."/contact.class.php");
$langs->load("companies");
+$langs->load("mails");
$user->getrights('commercial');
diff --git a/htdocs/translate.class.php b/htdocs/translate.class.php
index b6d3e59e995..361f4177057 100644
--- a/htdocs/translate.class.php
+++ b/htdocs/translate.class.php
@@ -34,7 +34,8 @@
class Translate {
var $dir;
- var $defaultlang;
+ var $origlang; // Langue origine
+ var $defaultlang; // Langue courante en vigueur de l'utilisateur
var $tab_loaded=array(); // Tableau pour signaler les fichiers deja chargés
var $tab_translate=array(); // Tableau des traductions
@@ -81,11 +82,13 @@ class Translate {
/**
* \brief Accesseur de this->defaultlang
- * \param defaultlang Langue par defaut à utiliser
+ * \param srclang Langue à utiliser
*/
- function setDefaultLang($defaultlang='fr_FR')
+ function setDefaultLang($srclang='fr_FR')
{
- if ($defaultlang == 'auto')
+ $this->origlang=$srclang;
+
+ if ($srclang == 'auto')
{
$langpref=$_SERVER['HTTP_ACCEPT_LANGUAGE'];
$langpref=eregi_replace(";[^,]*","",$langpref);
@@ -95,11 +98,11 @@ class Translate {
$langpart=split("_",$langlist[0]);
- if (isset($langpart[1])) $defaultlang=strtolower($langpart[0])."_".strtoupper($langpart[1]);
- else $defaultlang=strtolower($langpart[0])."_".strtoupper($langpart[0]);
+ if (isset($langpart[1])) $srclang=strtolower($langpart[0])."_".strtoupper($langpart[1]);
+ else $srclang=strtolower($langpart[0])."_".strtoupper($langpart[0]);
}
- $this->defaultlang=$defaultlang;
+ $this->defaultlang=$srclang;
}
diff --git a/htdocs/user.class.php b/htdocs/user.class.php
index 5d8439faae6..fe56f2de19a 100644
--- a/htdocs/user.class.php
+++ b/htdocs/user.class.php
@@ -1031,10 +1031,10 @@ class User
$result = $this->db->query($sql);
}
- /**
- * \brief Retire l'utilisateur d'un groupe
- * \param group id du groupe
- */
+ /**
+ * \brief Retire l'utilisateur d'un groupe
+ * \param group id du groupe
+ */
function RemoveFromGroup($group)
{
@@ -1044,7 +1044,32 @@ class User
$result = $this->db->query($sql);
}
-
+
+ /**
+ * \brief Renvoie nom clicable (avec eventuellement le picto)
+ * \param withpicto Inclut le picto dans le lien
+ * \param option Sur quoi pointe le lien
+ * \return string Chaine avec URL
+ */
+ function getNomUrl($withpicto=0,$option='')
+ {
+ global $langs;
+
+ $result='';
+
+ $lien = '';
+ $lienfin='';
+
+ if ($option == 'xxx')
+ {
+ $lien = '';
+ $lienfin='';
+ }
+
+ if ($withpicto) $result.=($lien.img_object($langs->trans("ShowUser"),'user').$lienfin.' ');
+ $result.=$lien.$this->nom.' '.$this->prenom.$lienfin;
+ return $result;
+ }
}
?>
diff --git a/mysql/data/data.sql b/mysql/data/data.sql
index b33e86f160e..72ef70d86f5 100644
--- a/mysql/data/data.sql
+++ b/mysql/data/data.sql
@@ -52,6 +52,7 @@ insert into llx_sqltables (name, loaded) values ('llx_album',0);
delete from llx_action_def;
insert into llx_action_def (rowid,code,titre,description,objet_type) values (1,'NOTIFY_VAL_FICHINTER','Validation fiche intervention','Déclenché lors de la validation d\'une fiche d\'intervention','ficheinter');
insert into llx_action_def (rowid,code,titre,description,objet_type) values (2,'NOTIFY_VAL_FAC','Validation facture','Déclenché lors de la validation d\'une facture','facture');
+insert into llx_action_def (rowid,code,titre,description,objet_type) values (3,'NOTIFY_VAL_ORDER_SUUPLIER','Validation commande fournisseur','Déclenché lors de la validation d\'une commande fournisseur','order_supplier');
--
-- Constantes de configuration
diff --git a/mysql/migration/2.0.0-2.1.0.sql b/mysql/migration/2.0.0-2.1.0.sql
index d1f192279eb..129dd4f947b 100644
--- a/mysql/migration/2.0.0-2.1.0.sql
+++ b/mysql/migration/2.0.0-2.1.0.sql
@@ -334,4 +334,6 @@ alter table llx_commande drop column fk_soc_contact;
alter table llx_livraison drop column fk_soc_contact;
alter table llx_propal drop column fk_soc_contact;
-alter table llx_c_pays modify libelle varchar(50) NOT NULL;
\ No newline at end of file
+alter table llx_c_pays modify libelle varchar(50) NOT NULL;
+
+insert into llx_action_def (rowid,code,titre,description,objet_type) values (3,'NOTIFY_VAL_ORDER_SUUPLIER','Validation commande fournisseur','Déclenché lors de la validation d\'une commande fournisseur','order_supplier');
| |