diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php
index 9a1eedbf2d7..e34beade774 100644
--- a/htdocs/comm/propal.php
+++ b/htdocs/comm/propal.php
@@ -39,6 +39,7 @@ $user->getrights('propale');
if (!$user->rights->propale->lire)
accessforbidden();
+
$langs->load('companies');
$langs->load('propal');
$langs->load('compta');
@@ -701,6 +702,8 @@ if ($_GET['action'] == 'down' && $user->rights->propale->creer)
exit;
}
+
+
$html = new Form($db);
/*
@@ -709,8 +712,6 @@ $html = new Form($db);
*/
if ($_GET['propalid'] > 0)
{
- if ($mesg) print "$mesg
";
-
$propal = new Propal($db);
$result=$propal->fetch($_GET['propalid']);
@@ -725,6 +726,8 @@ if ($_GET['propalid'] > 0)
llxHeader('',$langs->trans('Proposal'),'Proposition');
+ if ($mesg) print "$mesg
";
+
$societe = new Societe($db);
$societe->fetch($propal->socid);
@@ -871,57 +874,57 @@ if ($_GET['propalid'] > 0)
// date de livraison (conditonné sur PROPALE_ADD_SHIPPING_DATE car carac à
// gérer par les commandes et non les propal
-if ($conf->expedition->enabled)
-{
- if ($conf->global->PROPALE_ADD_SHIPPING_DATE)
+ if ($conf->expedition->enabled)
{
- print '
| ';
- print '';
- print ' | ';
- if ($_GET['action'] == 'editdate_livraison')
+ if ($conf->global->PROPALE_ADD_SHIPPING_DATE)
{
- print '';
+ print ' |
| ';
+ print '';
+ print ' | ';
+ if ($_GET['action'] == 'editdate_livraison')
+ {
+ print '';
+ }
+ else
+ {
+ print dolibarr_print_date($propal->date_livraison,'%a %d %B %Y');
+ }
+ print ' | ';
+ print '
';
}
- else
+
+ // adresse de livraison
+ if ($conf->global->PROPALE_ADD_DELIVERY_ADDRESS)
{
- print dolibarr_print_date($propal->date_livraison,'%a %d %B %Y');
+ print '| ';
+ print '';
+ print ' | ';
+
+ if ($_GET['action'] == 'editdelivery_adress')
+ {
+ $html->form_adresse_livraison($_SERVER['PHP_SELF'].'?propalid='.$propal->id,$propal->adresse_livraison_id,$_GET['socid'],'adresse_livraison_id','propal',$propal->id);
+ }
+ else
+ {
+ $html->form_adresse_livraison($_SERVER['PHP_SELF'].'?propalid='.$propal->id,$propal->adresse_livraison_id,$_GET['socid'],'none','propal',$propal->id);
+ }
+ print ' |
';
}
- print '';
- print '';
}
- // adresse de livraison
- if ($conf->global->PROPALE_ADD_DELIVERY_ADDRESS)
- {
- print '| ';
- print '';
- print ' | ';
-
- if ($_GET['action'] == 'editdelivery_adress')
- {
- $html->form_adresse_livraison($_SERVER['PHP_SELF'].'?propalid='.$propal->id,$propal->adresse_livraison_id,$_GET['socid'],'adresse_livraison_id','propal',$propal->id);
- }
- else
- {
- $html->form_adresse_livraison($_SERVER['PHP_SELF'].'?propalid='.$propal->id,$propal->adresse_livraison_id,$_GET['socid'],'none','propal',$propal->id);
- }
- print ' |
';
- }
-}
-
// Conditions et modes de réglement
print '| ';
print ' |