diff --git a/htdocs/comm/addpropal.php b/htdocs/comm/addpropal.php
index 1475c8280cd..6e902f6c17d 100644
--- a/htdocs/comm/addpropal.php
+++ b/htdocs/comm/addpropal.php
@@ -55,7 +55,7 @@ print_titre($langs->trans("NewProp"));
$html=new Form($db);
-//récupération de l'id de projet
+// Récupération de l'id de projet
$projetid = 0;
if ($_GET["projetid"])
{
diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php
index 3d6674183db..ada308a3879 100644
--- a/htdocs/commande/fiche.php
+++ b/htdocs/commande/fiche.php
@@ -56,6 +56,12 @@ if ($user->societe_id > 0)
$socidp = $user->societe_id;
}
+// Récupération de l'id de projet
+$projetid = 0;
+if ($_GET["projetid"])
+{
+ $projetid = $_GET["projetid"];
+}
/*
* Actions
@@ -373,7 +379,7 @@ if ($_GET['action'] == 'create' && $user->rights->commande->creer)
if ($conf->projet->enabled)
{
print '
| '.$langs->trans('Project').' | ';
- $html->select_projects($soc->id,'','projetid');
+ $html->select_projects($soc->id,$projetid,'projetid');
print ' |
';
}
diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php
index e4c3df29950..4b82485e8d3 100644
--- a/htdocs/compta/facture.php
+++ b/htdocs/compta/facture.php
@@ -63,6 +63,13 @@ if ($user->societe_id > 0)
$socidp = $user->societe_id;
}
+// Récupération de l'id de projet
+$projetid = 0;
+if ($_GET["projetid"])
+{
+ $projetid = $_GET["projetid"];
+}
+
// Nombre de ligne pour choix de produit/service prédéfinis
$NBLINES=4;
@@ -649,7 +656,7 @@ if ($_GET['action'] == 'create')
$propal = New Propal($db);
$propal->fetch($_GET['propalid']);
$societe_id = $propal->soc_id;
- $projet=$propal->projetidp;
+ $projetid=$propal->projetidp;
$soc->fetch($societe_id);
$cond_reglement_id = $propal->cond_reglement_id;
@@ -662,7 +669,7 @@ if ($_GET['action'] == 'create')
$commande = New Commande($db);
$commande->fetch($_GET['commandeid']);
$societe_id = $commande->soc_id;
- $projet=$commande-> projet_id;
+ $projetid=$commande-> projet_id;
$ref_client=$commande->ref_client;
$soc->fetch($societe_id);
@@ -676,7 +683,7 @@ if ($_GET['action'] == 'create')
$contrat = New Contrat($db);
$contrat->fetch($_GET['contratid']);
$societe_id = $contrat->societe->id;
- $projet=$contrat->fk_projet;
+ $projetid=$contrat->fk_projet;
$soc=$contrat->societe;
$cond_reglement_id = $soc->cond_reglement;
@@ -768,7 +775,7 @@ if ($_GET['action'] == 'create')
{
$langs->load('projects');
print '| '.$langs->trans('Project').' | ';
- $html->select_projects($societe_id, $projet, 'projetid');
+ $html->select_projects($societe_id, $projetid, 'projetid');
print ' |
';
}
diff --git a/htdocs/projet/commandes.php b/htdocs/projet/commandes.php
index 60bedcdba49..29a1fa94543 100644
--- a/htdocs/projet/commandes.php
+++ b/htdocs/projet/commandes.php
@@ -125,7 +125,7 @@ print '';
if ($conf->commande->enabled && $user->rights->commande->creer)
{
$langs->load("orders");
- print ''.$langs->trans("AddOrder").'';
+ print ''.$langs->trans("AddOrder").'';
}
print '';
diff --git a/htdocs/projet/facture.php b/htdocs/projet/facture.php
index 348835118a8..521c0127a9f 100644
--- a/htdocs/projet/facture.php
+++ b/htdocs/projet/facture.php
@@ -125,7 +125,7 @@ print '';
if ($conf->facture->enabled && $user->rights->facture->creer)
{
- print ''.$langs->trans("AddBill").'';
+ print ''.$langs->trans("AddBill").'';
}
print '';
@@ -138,7 +138,7 @@ if (sizeof($factures)>0 && is_array($factures))
{
print '
';
- print_titre($langs->trans("ListInvoicesAssociatedProject");
+ print_titre($langs->trans("ListInvoicesAssociatedProject"));
print '