diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php
index 3ff3053e6e9..dd15c3a0990 100644
--- a/htdocs/compta/facture.php
+++ b/htdocs/compta/facture.php
@@ -2381,7 +2381,7 @@ if ($action == 'create')
{
$langs->load('projects');
print '
| ' . $langs->trans('Project') . ' | ';
- $numprojet = $formproject->select_projects($soc->id, $projectid, 'projectid', 0);
+ $numprojet = $formproject->select_projects($socid, $projectid, 'projectid', 0);
print ' id).'">' . $langs->trans("AddProject") . '';
print ' |
';
}
diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php
index 3765f2f6115..8a8df661651 100644
--- a/htdocs/fourn/commande/card.php
+++ b/htdocs/fourn/commande/card.php
@@ -44,8 +44,10 @@ if (! empty($conf->supplier_proposal->enabled))
require DOL_DOCUMENT_ROOT . '/supplier_proposal/class/supplier_proposal.class.php';
if (!empty($conf->produit->enabled))
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
-if (!empty($conf->projet->enabled))
- require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
+if (!empty($conf->projet->enabled)) {
+ require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
+ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php';
+}
require_once NUSOAP_PATH.'/nusoap.php'; // Include SOAP
$langs->load('admin');
@@ -1569,7 +1571,7 @@ if ($action=='create')
}
else
{
- print $form->select_company((empty($socid)?'':$socid),'socid','s.fournisseur = 1',1);
+ print $form->select_company((empty($socid)?'':$socid), 'socid', 's.fournisseur = 1', 'SelectThirdParty');
}
print '';
@@ -1608,7 +1610,18 @@ if ($action=='create')
print '';
}
- // Incoterms
+ // Project
+ if (! empty($conf->projet->enabled))
+ {
+ $formproject = new FormProjets($db);
+
+ $langs->load('projects');
+ print '| ' . $langs->trans('Project') . ' | ';
+ $formproject->select_projects((empty($conf->global->PROJECT_CAN_ALWAYS_LINK_TO_ALL_SUPPLIERS)?$societe->id:-1), $projectid, 'projectid', 0, 0, 1, 1);
+ print ' |
';
+ }
+
+ // Incoterms
if (!empty($conf->incoterm->enabled))
{
print '';
diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php
index 27b51244d86..aa57910794d 100644
--- a/htdocs/fourn/facture/card.php
+++ b/htdocs/fourn/facture/card.php
@@ -1388,7 +1388,7 @@ if ($action == 'create')
}
else
{
- print $form->select_company(GETPOST('socid','int'),'socid','s.fournisseur = 1',1);
+ print $form->select_company(GETPOST('socid','int'), 'socid', 's.fournisseur = 1', 'SelectThirdParty');
}
print '
';
@@ -1502,6 +1502,21 @@ if ($action == 'create')
$form->select_types_paiements(isset($_POST['mode_reglement_id'])?$_POST['mode_reglement_id']:$mode_reglement_id, 'mode_reglement_id', 'DBIT');
print '';
+ // Bank Account
+ print '| '.$langs->trans('BankAccount').' | ';
+ $form->select_comptes($fk_account, 'fk_account', 0, '', 1);
+ print ' |
';
+
+ // Multicurrency
+ if (! empty($conf->multicurrency->enabled))
+ {
+ print '';
+ print '| '.fieldLabel('Currency','multicurrency_code').' | ';
+ print '';
+ print $form->selectMultiCurrency($currency_code, 'multicurrency_code');
+ print ' |
';
+ }
+
// Project
if (! empty($conf->projet->enabled))
{
@@ -1523,21 +1538,6 @@ if ($action == 'create')
print '';
}
- // Bank Account
- print '| '.$langs->trans('BankAccount').' | ';
- $form->select_comptes($fk_account, 'fk_account', 0, '', 1);
- print ' |
';
-
- // Multicurrency
- if (! empty($conf->multicurrency->enabled))
- {
- print '';
- print '| '.fieldLabel('Currency','multicurrency_code').' | ';
- print '';
- print $form->selectMultiCurrency($currency_code, 'multicurrency_code');
- print ' |
';
- }
-
// Public note
print '| '.$langs->trans('NotePublic').' | ';
print '';
diff --git a/htdocs/projet/card.php b/htdocs/projet/card.php
index a5a27966948..b59d725fecd 100644
--- a/htdocs/projet/card.php
+++ b/htdocs/projet/card.php
@@ -913,53 +913,53 @@ else
if (! empty($conf->propal->enabled) && $user->rights->propal->creer)
{
$langs->load("propal");
- print '';
+ print '';
}
if (! empty($conf->commande->enabled) && $user->rights->commande->creer)
{
$langs->load("orders");
- print '';
+ print '';
}
if (! empty($conf->facture->enabled) && $user->rights->facture->creer)
{
$langs->load("bills");
- print '';
+ print '';
}
if (! empty($conf->supplier_proposal->enabled) && $user->rights->supplier_proposal->creer)
{
$langs->load("supplier_proposal");
- print '';
+ print '';
}
if (! empty($conf->supplier_order->enabled) && $user->rights->fournisseur->commande->creer)
{
$langs->load("suppliers");
- print '';
+ print '';
}
if (! empty($conf->supplier_invoice->enabled) && $user->rights->fournisseur->facture->creer)
{
$langs->load("suppliers");
- print '';
+ print '';
}
if (! empty($conf->ficheinter->enabled) && $user->rights->ficheinter->creer)
{
$langs->load("interventions");
- print '';
+ print '';
}
if (! empty($conf->contrat->enabled) && $user->rights->contrat->creer)
{
$langs->load("contracts");
- print '';
+ print '';
}
if (! empty($conf->expensereport->enabled) && $user->rights->expensereport->creer)
{
$langs->load("expensereports");
$langs->load("trips");
- print '';
+ print '';
}
if (! empty($conf->don->enabled) && $user->rights->don->creer)
{
$langs->load("donations");
- print '';
+ print '';
}
}
|