';
- // Ref
- print '| '.$langs->trans('Ref').' | ';
- print ''.$commande->ref.' | ';
- print '
';
+ // Ref
+ print '| '.$langs->trans('Ref').' | ';
+ print ''.$commande->ref.' | ';
+ print '
';
- // Ref commande client
- print '';
- print '| ';
- print $langs->trans('RefCustomer').' | ';
- print ' | ';
- if ($_GET['action'] != 'RefCustomerOrder' && $commande->brouillon) print ''.img_edit($langs->trans('Edit')).' | ';
- print ' ';
- print ' | ';
- if ($user->rights->commande->creer && $_GET['action'] == 'RefCustomerOrder')
- {
- print '';
- }
- else
- {
- print $commande->ref_client;
- }
- print ' | ';
- print '
';
-
-
- // Société
- print '| '.$langs->trans('Company').' | ';
- print ''.$soc->getNomUrl(1).' | ';
- print '
';
-
- // Date
- print '| '.$langs->trans('Date').' | ';
- print ''.dolibarr_print_date($commande->date,'%A %d %B %Y').' | ';
- 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 '
';
-
- // Date de livraison
- print '| ';
- print '';
- print ' | ';
- if ($_GET['action'] == 'editdate_livraison')
- {
- print '';
- }
- else
- {
- print dolibarr_print_date($commande->date_livraison,'%A %d %B %Y');
- }
- print ' | ';
- print ''.$langs->trans('NotePublic').' : ';
- print nl2br($commande->note_public);
- print ' | ';
- print '
';
-
-
- // Adresse de livraison
- print '| ';
- print '';
- print ' | ';
-
- if ($_GET['action'] == 'editdelivery_adress')
- {
- $html->form_adresse_livraison($_SERVER['PHP_SELF'].'?id='.$commande->id,$commande->adresse_livraison_id,$_GET['socid'],'adresse_livraison_id','commande',$commande->id);
- }
- else
- {
- $html->form_adresse_livraison($_SERVER['PHP_SELF'].'?id='.$commande->id,$commande->adresse_livraison_id,$_GET['socid'],'none','commande',$commande->id);
- }
- print ' |
';
-
- // Conditions et modes de réglement
+ // Ref commande client
+ print '';
+ print '| ';
+ print $langs->trans('RefCustomer').' | ';
+ print ' | ';
+ if ($_GET['action'] != 'RefCustomerOrder' && $commande->brouillon) print ''.img_edit($langs->trans('Edit')).' | ';
+ print ' ';
+ print ' | ';
+ if ($user->rights->commande->creer && $_GET['action'] == 'RefCustomerOrder')
+ {
+ print '';
+ }
+ else
+ {
+ print $commande->ref_client;
+ }
+ print ' | ';
+ print '
';
+
+
+ // Société
+ print '| '.$langs->trans('Company').' | ';
+ print ''.$soc->getNomUrl(1).' | ';
+ print '
';
+
+ // Date
+ print '| '.$langs->trans('Date').' | ';
+ print ''.dolibarr_print_date($commande->date,'%A %d %B %Y').' | ';
+ 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 '
';
+
+ // Date de livraison
+ print '| ';
+ print '';
+ print ' | ';
+ if ($_GET['action'] == 'editdate_livraison')
+ {
+ print '';
+ }
+ else
+ {
+ print dolibarr_print_date($commande->date_livraison,'%A %d %B %Y');
+ }
+ print ' | ';
+ print ''.$langs->trans('NotePublic').' : ';
+ print nl2br($commande->note_public);
+ print ' | ';
+ print '
';
+
+
+ // Adresse de livraison
+ print '| ';
+ print '';
+ print ' | ';
+
+ if ($_GET['action'] == 'editdelivery_adress')
+ {
+ $html->form_adresse_livraison($_SERVER['PHP_SELF'].'?id='.$commande->id,$commande->adresse_livraison_id,$_GET['socid'],'adresse_livraison_id','commande',$commande->id);
+ }
+ else
+ {
+ $html->form_adresse_livraison($_SERVER['PHP_SELF'].'?id='.$commande->id,$commande->adresse_livraison_id,$_GET['socid'],'none','commande',$commande->id);
+ }
+ print ' |
';
+
+ // Conditions et modes de réglement
print '';
print '';
print $langs->trans('PaymentConditionsShort');
@@ -399,42 +397,40 @@ if ($_GET["id"] > 0)
* Boutons Actions
*/
if ($user->societe_id == 0)
- {
+ {
print '';
// Bouton expedier sans gestion des stocks
if (! $conf->stock->enabled && $reste_a_livrer_total > 0 && ! $commande->brouillon && $user->rights->expedition->creer)
- {
+ {
print ' '.$langs->trans("NewSending").'';
- }
+ }
print " ";
}
+ print '';
-
- print '| ';
-
- /*
- * Documents générés
- *
- */
- $comref = sanitize_string($commande->ref);
- $file = $conf->commande->dir_output . '/' . $comref . '/' . $comref . '.pdf';
- $relativepath = $comref.'/'.$comref.'.pdf';
- $filedir = $conf->commande->dir_output . '/' . $comref;
- $urlsource=$_SERVER["PHP_SELF"]."?id=".$commande->id;
- $genallowed=0;
- $delallowed=0;
-
- $somethingshown=$html->show_documents('commande',$comref,$filedir,$urlsource,$genallowed,$delallowed,$commande->modelpdf);
+ /*
+ * Documents générés
+ *
+ */
+ $comref = sanitize_string($commande->ref);
+ $file = $conf->commande->dir_output . '/' . $comref . '/' . $comref . '.pdf';
+ $relativepath = $comref.'/'.$comref.'.pdf';
+ $filedir = $conf->commande->dir_output . '/' . $comref;
+ $urlsource=$_SERVER["PHP_SELF"]."?id=".$commande->id;
+ $genallowed=0;
+ $delallowed=0;
+
+ $somethingshown=$html->show_documents('commande',$comref,$filedir,$urlsource,$genallowed,$delallowed,$commande->modelpdf);
print ' | ';
- // Bouton expedier avec gestion des stocks
+ // Bouton expedier avec gestion des stocks
if ($conf->stock->enabled && $reste_a_livrer_total > 0 && $commande->statut > 0 && $commande->statut < 3 && $user->rights->expedition->creer)
{
print_titre($langs->trans("NewSending"));
@@ -448,13 +444,26 @@ if ($_GET["id"] > 0)
$entrepot = new Entrepot($db);
$langs->load("stocks");
+
+
print ' | ';
print '| '.$langs->trans("Warehouse").' | ';
print '';
- $html->select_array("entrepot_id",$entrepot->list_array());
+
+ if (sizeof($user->entrepots) === 1)
+ {
+ $uentrepot = array();
+ $uentrepot[$user->entrepots[0]['id']] = $user->entrepots[0]['label'];
+ $html->select_array("entrepot_id",$uentrepot);
+ }
+ else
+ {
+ $html->select_array("entrepot_id",$entrepot->list_array());
+ }
+
if (sizeof($entrepot->list_array()) <= 0)
{
- print ' Aucun entrepôt définit, definissez en un';
+ print ' Aucun entrepôt définit, definissez en un';
}
print ' | ';
/*
|
|
|