';
+
+ // Ref
print '| '.$langs->trans('Ref').' | ';
print ''.$commande->ref.' | ';
- print ''.$langs->trans('Source').' : ' . $commande->sources[$commande->source] ;
+ print ' | '.$langs->trans('Source').' : ' . $commande->sources[$commande->source] ;
if ($commande->source == 0)
{
- /* Propale */
+ // Si source = propal
$propal = new Propal($db);
$propal->fetch($commande->propale_id);
print ' -> '.$propal->ref.'';
}
print ' |
';
+ // Société
print '| '.$langs->trans('Customer').' | ';
print '';
print ''.$soc->nom.' | ';
print '
';
- print '| '.$langs->trans('Status').' | ';
- print ''.$commande->statuts[$commande->statut].' | ';
- $nbrow=6;
+ $nbrow=7;
if ($conf->projet->enabled) $nbrow++;
+
+ // Ref commande client
+ print '
| ';
+ print '';
+ print ' | ';
+ if ($user->rights->commande->creer && $_GET['action'] == 'refcdeclient')
+ {
+ print '';
+ }
+ else
+ {
+ print $commande->ref_client;
+ }
+ print ' | ';
print ''.$langs->trans('Note').' : ';
if ($commande->brouillon == 1 && $user->rights->commande->creer)
{
print '';
}
@@ -538,7 +561,12 @@ else
{
print nl2br($commande->note);
}
- print ' |
';
+ print '';
+ print '';
+
+ print '| '.$langs->trans('Status').' | ';
+ print ''.$commande->statuts[$commande->statut].' | ';
+ print '
';
print '| '.$langs->trans('Date').' | ';
print ''.dolibarr_print_date($commande->date,'%A %d %B %Y').' | ';
@@ -570,45 +598,41 @@ else
print '
| | |
';
}
-
-
// Lignes de 3 colonnes
- print '| '.$langs->trans('RefCdeClient').' : | ';
- if ($commande->brouillon == 1 && $user->rights->commande->creer)
- {
- print ' | ';
- print '';
- }
- else
- {
- print $commande->ref_client.' | ';
- }
- print ' |
';
- print '| '.$langs->trans('AmountHT').' | ';
- print ''.price($commande->total_ht).' | ';
- print ''.$langs->trans('Currency'.$conf->monnaie).' |
';
-
- print '| '.$langs->trans('GlobalDiscount').' | ';
- if ($commande->brouillon == 1 && $user->rights->commande->creer)
+ print ' |
| ';
+ print '';
+ print ' | ';
+ if ($user->rights->commande->creer && $_GET['action'] == 'setdiscount')
{
+ print '';
print ' | ';
+ print ' | ';
print '';
+ print ' | ';
}
else
{
- print $commande->remise_percent.'% ';
+ print ' | '.$commande->remise_percent.' | % | ';
}
- print '
';
+ print '';
- print '| '.$langs->trans('VAT').' | '.price($commande->total_tva).' | ';
+ // Total HT
+ print '
| '.$langs->trans('TotalHT').' | ';
+ print ''.price($commande->total_ht).' | ';
print ''.$langs->trans('Currency'.$conf->monnaie).' |
';
+
+ // Total TVA
+ print '| '.$langs->trans('TotalVAT').' | '.price($commande->total_tva).' | ';
+ print ''.$langs->trans('Currency'.$conf->monnaie).' |
';
+
+ // Total TTC
print '| '.$langs->trans('TotalTTC').' | '.price($commande->total_ttc).' | ';
print ''.$langs->trans('Currency'.$conf->monnaie).' |
';
@@ -803,6 +827,7 @@ else
if ($user->societe_id == 0 && $commande->statut < 3 && $_GET['action'] == '')
{
print '';
+
if ($conf->expedition->enabled && $commande->statut > 0 && $commande->statut < 3 && $user->rights->expedition->creer)
{
print '
'.$langs->trans('Send').'';
diff --git a/htdocs/expedition/commande.php b/htdocs/expedition/commande.php
index b4199b5592d..697dcbfe16e 100644
--- a/htdocs/expedition/commande.php
+++ b/htdocs/expedition/commande.php
@@ -126,33 +126,50 @@ if ($_GET["id"] > 0)
// Onglet expedition
print '
';
- print '| '.$langs->trans("Customer").' | ';
- print '';
- print ''.$soc->nom.' | ';
- print '';
- print $commande->statuts[$commande->statut];
- print " |
";
+ // Ref
+ print '| '.$langs->trans('Ref').' | ';
+ print ''.$commande->ref.' | ';
+ print ''.$langs->trans('Source').' : ' . $commande->sources[$commande->source] ;
+ if ($commande->source == 0)
+ {
+ // Si source = propal
+ $propal = new Propal($db);
+ $propal->fetch($commande->propale_id);
+ print ' -> '.$propal->ref.'';
+ }
+ print ' |
';
- print '| '.$langs->trans("Date").' | ';
- print ''.strftime("%A %d %B %Y",$commande->date)." | \n";
+ // Société
+ print '
| '.$langs->trans('Customer').' | ';
+ print '';
+ print ''.$soc->nom.' | ';
+ print '
';
- print 'Source : ' . $commande->sources[$commande->source] ;
- if ($commande->source == 0)
- {
- /* Propale */
- $propal = new Propal($db);
- $propal->fetch($commande->propale_id);
- print ' -> '.$propal->ref.'';
- }
- print " | ";
+ $nbrow=3;
- if ($commande->note)
- {
- print '| '.$langs->trans("Note").' |
';
- print '| '.nl2br($commande->note)." |
";
- }
+ // Ref commande client
+ print '';
+ print '| ';
+ print $langs->trans('RefCdeClient').' | ';
+ print ' | ';
+ print ' ';
+ print ' | ';
+ print $commande->ref_client;
+ print ' | ';
+ print ''.$langs->trans('Note').' : ';
+ print nl2br($commande->note);
+ print ' | ';
+ print '
';
+ print '| '.$langs->trans('Status').' | ';
+ print ''.$commande->statuts[$commande->statut].' | ';
+ print '
';
+
+ print '| '.$langs->trans('Date').' | ';
+ print ''.dolibarr_print_date($commande->date,'%A %d %B %Y').' | ';
+ print '
';
+
print '
';
/**
diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang
index f50e42ccf83..fe51fabfa50 100644
--- a/htdocs/langs/en_US/admin.lang
+++ b/htdocs/langs/en_US/admin.lang
@@ -137,10 +137,10 @@ Permission74=Delete members
Permission75=Setup types and attributes for members
Permission78=Read subscriptions
Permission79=Create/modify subscriptions
-Permission81=Read orders
-Permission82=Create/modify orders
-Permission84=Activate orders
-Permission89=Disable orders
+Permission81=Read customers orders
+Permission82=Create/modify customers orders
+Permission84=Validate customers orders
+Permission89=Cancel customers orders
Permission91=Read charges and vat
Permission92=Create/modify charges and vat
Permission93=Delete charges and vat
diff --git a/htdocs/langs/en_US/orders.lang b/htdocs/langs/en_US/orders.lang
index 428ba9e4891..31490c43684 100755
--- a/htdocs/langs/en_US/orders.lang
+++ b/htdocs/langs/en_US/orders.lang
@@ -49,6 +49,7 @@ ComptaCard=Accountancy card
DraftOrders=Draft orders
RelatedOrders=Related orders
OnProcessOrders=On process orders
+RefCdeClient=Ref. customer order
# Sources
OrderSource0=Commercial proposal
OrderSource1=Internet
diff --git a/htdocs/langs/fr_FR/admin.lang b/htdocs/langs/fr_FR/admin.lang
index 163a126e55e..7d1ca51d9a4 100644
--- a/htdocs/langs/fr_FR/admin.lang
+++ b/htdocs/langs/fr_FR/admin.lang
@@ -137,10 +137,10 @@ Permission74=Supprimer les adh
Permission75=Configurer les types et caractéristiques des adhérents
Permission78=Consulter les cotisations
Permission79=Créer/modifier les cotisations
-Permission81=Consulter les commandes
-Permission82=Créer/modifier les commandes
-Permission84=Activer les commandes
-Permission89=Désactiver les commandes
+Permission81=Consulter les commandes clients
+Permission82=Créer/modifier les commandes clients
+Permission84=Valider les commandes clients
+Permission89=Annuler les commandes clients
Permission91=Consulter les charges et la TVA
Permission92=Créer/modifier les charges et la TVA
Permission93=Supprimer les charges et la TVA
diff --git a/htdocs/langs/fr_FR/orders.lang b/htdocs/langs/fr_FR/orders.lang
index d0a5f40f9d4..f94a75af314 100755
--- a/htdocs/langs/fr_FR/orders.lang
+++ b/htdocs/langs/fr_FR/orders.lang
@@ -49,6 +49,7 @@ ComptaCard=Fiche compta
DraftOrders=Commandes brouillons
RelatedOrders=Commandes rattachées
OnProcessOrders=Commandes en cours de traitement
+RefCdeClient=Ref. commande client
# Sources
OrderSource0=Proposition commerciale
OrderSource1=Internet