diff --git a/htdocs/commande/index.php b/htdocs/commande/index.php
index 8dc69a86a0d..6f2c31d13e0 100644
--- a/htdocs/commande/index.php
+++ b/htdocs/commande/index.php
@@ -44,7 +44,7 @@ if ($user->societe_id > 0)
}
$commandestatic=new Commande($db);
-
+$html = new Form($db);
llxHeader("",$langs->trans("Orders"),"Commande");
@@ -95,7 +95,9 @@ if ( $db->query($sql) )
{
$var=!$var;
$obj = $db->fetch_object();
- print "
| rowid."\">".img_object($langs->trans("ShowOrder"),"order").' '.$obj->ref." | ";
+ print "
";
+ print '| ';
+ print "rowid."\">".img_object($langs->trans("ShowOrder"),"order").' '.$obj->ref." | ";
print ''.img_object($langs->trans("ShowCompany"),"company").' '.dolibarr_trunc($obj->nom,24).' |
';
$i++;
}
@@ -130,7 +132,29 @@ if ( $db->query($sql) )
{
$var=!$var;
$obj = $db->fetch_object();
- print "| rowid."\">".img_object($langs->trans("ShowOrder"),"order")." ".$obj->ref." | ";
+ print "
";
+ print '';
+
+ $commandestatic->id=$obj->rowid;
+ $commandestatic->ref=$obj->ref;
+
+ print '';
+ print '| ';
+ print $commandestatic->getNomUrl(1);
+ print ' | ';
+
+ print '';
+ print ' ';
+ print ' | ';
+
+ print '';
+ $filename=sanitize_string($obj->ref);
+ $filedir=$conf->commande->dir_output . '/' . sanitize_string($obj->ref);
+ $urlsource=$_SERVER['PHP_SELF'].'?id='.$obj->rowid;
+ $html->show_documents('commande',$filename,$filedir,$urlsource,'','','','','',1);
+ print ' | ';
+
+ print ' | ';
print ''.img_object($langs->trans("ShowCompany"),"company").' '.dolibarr_trunc($obj->nom,24).' |
';
$i++;
}
@@ -170,8 +194,30 @@ if ( $db->query($sql) )
{
$var=!$var;
$obj = $db->fetch_object();
- print "| rowid."\">".img_object($langs->trans("ShowOrder"),"order").' ';
- print $obj->ref.' | ';
+ print "
";
+ print '';
+
+ $commandestatic->id=$obj->rowid;
+ $commandestatic->ref=$obj->ref;
+
+ print '';
+ print '| ';
+ print $commandestatic->getNomUrl(1);
+ print ' | ';
+
+ print '';
+ print ' ';
+ print ' | ';
+
+ print '';
+ $filename=sanitize_string($obj->ref);
+ $filedir=$conf->commande->dir_output . '/' . sanitize_string($obj->ref);
+ $urlsource=$_SERVER['PHP_SELF'].'?id='.$obj->rowid;
+ $html->show_documents('commande',$filename,$filedir,$urlsource,'','','','','',1);
+ print ' | ';
+
+ print ' | ';
+
print ''.img_object($langs->trans("ShowCompany"),"company").' '.$obj->nom.' | ';
print ''.$commandestatic->LibStatut($obj->fk_statut,$obj->facture,5).' | ';
print '
';
@@ -213,8 +259,31 @@ if ($resql)
{
$var=!$var;
$obj = $db->fetch_object($resql);
- print "| rowid."\">".img_object($langs->trans("ShowOrders"),"order").' ';
- print $obj->ref.' | ';
+
+ print "
";
+ print '';
+
+ $commandestatic->id=$obj->rowid;
+ $commandestatic->ref=$obj->ref;
+
+ print '';
+ print '| ';
+ print $commandestatic->getNomUrl(1);
+ print ' | ';
+
+ print '';
+ print ' ';
+ print ' | ';
+
+ print '';
+ $filename=sanitize_string($obj->ref);
+ $filedir=$conf->commande->dir_output . '/' . sanitize_string($obj->ref);
+ $urlsource=$_SERVER['PHP_SELF'].'?id='.$obj->rowid;
+ $html->show_documents('commande',$filename,$filedir,$urlsource,'','','','','',1);
+ print ' | ';
+
+ print ' | ';
+
print ''.img_object($langs->trans("ShowCompany"),"company").' '.$obj->nom.' | ';
print ''.dolibarr_print_date($obj->datec).' | ';
print ''.$commandestatic->LibStatut($obj->fk_statut,$obj->facture,5).' | ';
diff --git a/htdocs/commande/liste.php b/htdocs/commande/liste.php
index e77fd02f371..b3780095c41 100644
--- a/htdocs/commande/liste.php
+++ b/htdocs/commande/liste.php
@@ -191,8 +191,8 @@ if ($resql)
print $generic_commande->getNomUrl(1);
print '';
- print '';
- print ' ';
+ print ' | ';
+ if (($objp->fk_statut > 0) && ($objp->fk_statut < 3) && $objp->date_commande < (time() - $conf->commande->warning_delay)) print img_picto($langs->trans("Late"),"warning");
print ' | ';
print '';
@@ -214,7 +214,6 @@ if ($resql)
print strftime('%B',$objp->date_commande).'';
print ' ';
print strftime('%Y',$objp->date_commande).'';
- if (($objp->fk_statut > 0) && ($objp->fk_statut < 3) && $objp->date_commande < (time() - $conf->commande->warning_delay)) print img_picto($langs->trans("Late"),"warning");
print ' | ';
print ''.$generic_commande->LibStatut($objp->fk_statut,$objp->facturee,5).' | ';
print '
';