diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php index a8a22425698..8164a3b5e97 100644 --- a/htdocs/commande/fiche.php +++ b/htdocs/commande/fiche.php @@ -272,33 +272,35 @@ if ($_GET['action'] == 'create' && $user->rights->commande->creer) print ''; - print ''; - print ''; + print ''; + print ''; $nbrow=4; if ($conf->projet->enabled) $nbrow++; - print ''; - print ''; + print ''; + print ''; + + print ''; + print ''; + + print ''; if ($conf->projet->enabled) { - print ''; } - print ''; - print ''; - if ($propalid > 0) { $amount = ($obj->price); @@ -321,10 +323,8 @@ if ($_GET['action'] == 'create' && $user->rights->commande->creer) */ $NBLINES=8; - print ''; print '
'.$langs->trans('Ref').' :Provisoire'.$langs->trans('Comments').' :
'.$langs->trans('Ref').'Provisoire'.$langs->trans('Comments').'
'.$langs->trans('Customer').' :'.$soc->nom_url.''; - print '
'.$langs->trans('Date').' :'; + print '
'.$langs->trans('Customer').''.$soc->nom_url.'
'.$langs->trans('RefCdeClient').''; + print '
'.$langs->trans('Date').''; $html->select_date(); print '
'.$langs->trans('Project').' :'; + print '
'.$langs->trans('Project').''; $html->select_projects($soc->id,'','projetid'); print '
'.$langs->trans('Source').' :'; + print '
'.$langs->trans('Source').''; $html->select_array('source_id',$new_commande->sources,2); print '
'.$langs->trans('RefCdeClient').' :'; - print ''; - print '
'.$langs->trans('Services').'/'.$langs->trans('Products').'
'; - print ''; print ''; for ($i = 1 ; $i <= $NBLINES ; $i++) @@ -504,33 +504,56 @@ else * Commande */ print '
'.$langs->trans('ProductsAndServices').''.$langs->trans('Qty').''.$langs->trans('Discount').'
'; + + // Ref print ''; print ''; - print ''; + // Société print ''; print ''; print ''; - print ''; - print ''; - $nbrow=6; + $nbrow=7; if ($conf->projet->enabled) $nbrow++; + + // Ref commande client + print ''; print ''; + print ''; + print ''; + + print ''; + print ''; + print ''; print ''; print ''; @@ -570,45 +598,41 @@ else print ''; } - - // Lignes de 3 colonnes - print ''; - print ''; - print ''; - print ''; - - print ''; + if ($user->rights->commande->creer && $_GET['action'] == 'setdiscount') { + print ''; } else { - print $commande->remise_percent.'%'; } - print ''; + print ''; - print ''; + // Total HT + print ''; + print ''; print ''; + + // Total TVA + print ''; + print ''; + + // Total TTC print ''; print ''; @@ -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 '
'.$langs->trans('Ref').''.$commande->ref.''.$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 '
'.$langs->trans('Customer').''; print ''.$soc->nom.'
'.$langs->trans('Status').''.$commande->statuts[$commande->statut].'
'; + print ''; + if ($_GET['action'] != 'refcdeclient') print ''; + print '
'; + print $langs->trans('RefCdeClient').''; + print ''.img_edit($langs->trans('Edit')).'
'; + print '
'; + if ($user->rights->commande->creer && $_GET['action'] == 'refcdeclient') + { + print '
'; + print ''; + print ''; + print ' '; + print '
'; + } + else + { + print $commande->ref_client; + } + print '
'.$langs->trans('Note').' :
'; if ($commande->brouillon == 1 && $user->rights->commande->creer) { print '
'; print ''; - print '
'; + print '
'; print '
'; print '
'; } @@ -538,7 +561,12 @@ else { print nl2br($commande->note); } - print '
'.$langs->trans('Status').''.$commande->statuts[$commande->statut].'
'.$langs->trans('Date').''.dolibarr_print_date($commande->date,'%A %d %B %Y').'
  
'.$langs->trans('RefCdeClient').' :'; - if ($commande->brouillon == 1 && $user->rights->commande->creer) - { - print '
'; - print ''; - print ''; - print '
'; - print ''; - } - else - { - print $commande->ref_client.' '; - } - print '
'.$langs->trans('AmountHT').''.price($commande->total_ht).''.$langs->trans('Currency'.$conf->monnaie).'
'.$langs->trans('GlobalDiscount').''; - if ($commande->brouillon == 1 && $user->rights->commande->creer) + print '
'; + print ''; + if ($_GET['action'] != 'setdiscount') print ''; + print '
'; + print $langs->trans('GlobalDiscount').''; + print ''.img_edit($langs->trans('Edit')).'
'; + print '
'; print '
'; print ''; print '%'; - print '
'; + print ''; print ''; + print ' '; + print ''.$commande->remise_percent.'%
'.$langs->trans('VAT').''.price($commande->total_tva).'
'.$langs->trans('TotalHT').''.price($commande->total_ht).''.$langs->trans('Currency'.$conf->monnaie).'
'.$langs->trans('TotalVAT').''.price($commande->total_tva).''.$langs->trans('Currency'.$conf->monnaie).'
'.$langs->trans('TotalTTC').''.price($commande->total_ttc).''.$langs->trans('Currency'.$conf->monnaie).'
'; - print ''; - print ''; - print '"; + // Ref + print ''; + print ''; + print ''; - print ''; - print '\n"; + // Société + print ''; + print ''; + print ''; - print '"; + $nbrow=3; - if ($commande->note) - { - print ''; - print '"; - } + // Ref commande client + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + + print ''; + print ''; + print ''; + print '
'.$langs->trans("Customer").''; - print ''.$soc->nom.''; - print $commande->statuts[$commande->statut]; - print "
'.$langs->trans('Ref').''.$commande->ref.''.$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 '
'.$langs->trans("Date").''.strftime("%A %d %B %Y",$commande->date)."
'.$langs->trans('Customer').''; + print ''.$soc->nom.'
Source : ' . $commande->sources[$commande->source] ; - if ($commande->source == 0) - { - /* Propale */ - $propal = new Propal($db); - $propal->fetch($commande->propale_id); - print ' -> '.$propal->ref.''; - } - print "
'.$langs->trans("Note").'
'.nl2br($commande->note)."
'; + print ''; + print '
'; + print $langs->trans('RefCdeClient').''; + print '
'; + print '
'; + print $commande->ref_client; + print ''.$langs->trans('Note').' :
'; + print nl2br($commande->note); + print '
'.$langs->trans('Status').''.$commande->statuts[$commande->statut].'
'.$langs->trans('Date').''.dolibarr_print_date($commande->date,'%A %d %B %Y').'
'; /** 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