mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-08 00:52:01 +01:00
Ajout liste des commandes
This commit is contained in:
@@ -24,6 +24,8 @@ require("./pre.inc.php");
|
||||
|
||||
llxHeader();
|
||||
|
||||
print_titre("Commandes");
|
||||
|
||||
print '<table border="0" width="100%" cellspacing="0" cellpadding="4">';
|
||||
|
||||
print '<tr><td valign="top" width="30%">';
|
||||
@@ -54,10 +56,8 @@ if ( $db->query($sql) )
|
||||
{
|
||||
$num = $db->num_rows();
|
||||
|
||||
print_barre_liste("Liste des Commandes",$page,$PHP_SELF,"",$sortfield,$sortorder,'',$num);
|
||||
|
||||
$i = 0;
|
||||
print '<p><table class="liste" width="100%" cellspacing="0" cellpadding="4">';
|
||||
print '<table class="liste" width="100%" cellspacing="0" cellpadding="4">';
|
||||
print '<tr class="liste_titre"><td>';
|
||||
print_liste_field_titre("Client",$PHP_SELF, "p.ref");
|
||||
print "</td>";
|
||||
@@ -82,6 +82,69 @@ if ( $db->query($sql) )
|
||||
*/
|
||||
print '</td><td valign="top" width="70%">';
|
||||
|
||||
/*
|
||||
* Commandes <20> valider
|
||||
*/
|
||||
$sql = "SELECT c.rowid, c.ref, s.nom, s.idp FROM llx_commande as c, llx_societe as s";
|
||||
$sql .= " WHERE c.fk_soc = s.idp AND c.fk_statut = 0";
|
||||
if ($socidp)
|
||||
{
|
||||
$sql .= " AND c.fk_soc = $socidp";
|
||||
}
|
||||
|
||||
if ( $db->query($sql) )
|
||||
{
|
||||
$num = $db->num_rows();
|
||||
if ($num)
|
||||
{
|
||||
$i = 0;
|
||||
print '<table border="0" cellspacing="0" cellpadding="3" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td colspan="2">'.translate("Commandes <EFBFBD> valider").'</td></tr>';
|
||||
|
||||
while ($i < $num)
|
||||
{
|
||||
$var=!$var;
|
||||
$obj = $db->fetch_object($i);
|
||||
print "<tr $bc[$var]><td width=\"20%\"><a href=\"fiche.php?id=$obj->rowid\">$obj->ref</a></td>";
|
||||
print '<td><a href="fiche.php?socid='.$obj->idp.'">'.$obj->nom.'</a></td></tr>';
|
||||
$i++;
|
||||
}
|
||||
print "</table><br>";
|
||||
}
|
||||
}
|
||||
/*
|
||||
* Commandes <20> traiter
|
||||
*/
|
||||
$sql = "SELECT c.rowid, c.ref, s.nom, s.idp FROM llx_commande as c, llx_societe as s";
|
||||
$sql .= " WHERE c.fk_soc = s.idp AND c.fk_statut = 1";
|
||||
if ($socidp)
|
||||
{
|
||||
$sql .= " AND c.fk_soc = $socidp";
|
||||
}
|
||||
|
||||
if ( $db->query($sql) )
|
||||
{
|
||||
$num = $db->num_rows();
|
||||
if ($num)
|
||||
{
|
||||
$i = 0;
|
||||
print '<table border="0" cellspacing="0" cellpadding="3" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td colspan="2">'.translate("Commandes <EFBFBD> traiter").'</td></tr>';
|
||||
|
||||
while ($i < $num)
|
||||
{
|
||||
$var=!$var;
|
||||
$obj = $db->fetch_object($i);
|
||||
print "<tr $bc[$var]><td width=\"20%\"><a href=\"fiche.php?id=$obj->rowid\">$obj->ref</a></td>";
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/comm/fiche.php?socid='.$obj->idp.'">'.$obj->nom.'</a></td></tr>';
|
||||
$i++;
|
||||
}
|
||||
print "</table><br>";
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Propales <20> facturer
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user