N'affiche pas les infos de propale sur le module n'est pas actif.

This commit is contained in:
Laurent Destailleur 2004-01-24 20:51:31 +00:00
parent 7525d5847e
commit fdbe141f93

View File

@ -75,12 +75,13 @@ print '<table border="0" width="100%" cellspacing="0" cellpadding="4">';
print '<tr><td valign="top" width="30%">'; print '<tr><td valign="top" width="30%">';
if ($conf->propal->enabled) {
print '<form method="post" action="propal.php">'; print '<form method="post" action="propal.php">';
print '<table border="0" cellspacing="0" cellpadding="3" width="100%">'; print '<table border="0" cellspacing="0" cellpadding="3" width="100%">';
print '<tr class="liste_titre"><td colspan="2">Rechercher une proposition</td></tr>'; print '<tr class="liste_titre"><td colspan="2">Rechercher une proposition</td></tr>';
print "<tr $bc[1]><td>"; print "<tr $bc[1]><td>";
print 'Num. : <input type="text" name="sf_ref"><input type="submit" value="Rechercher" class="flat"></td></tr>'; print 'Num. : <input type="text" name="sf_ref"><input type="submit" value="Rechercher" class="flat"></td></tr>';
print "</table></form>\n"; print "</table></form><br>\n";
$sql = "SELECT p.rowid, p.ref"; $sql = "SELECT p.rowid, p.ref";
$sql .= " FROM llx_propal as p"; $sql .= " FROM llx_propal as p";
@ -92,7 +93,7 @@ if ( $db->query($sql) )
$i = 0; $i = 0;
if ($num > 0 ) if ($num > 0 )
{ {
print '<br><table border="0" cellspacing="0" cellpadding="3" width="100%">'; print '<table border="0" cellspacing="0" cellpadding="3" width="100%">';
print "<TR class=\"liste_titre\">"; print "<TR class=\"liste_titre\">";
print "<td colspan=\"2\">Propositions commerciales brouillons</td></tr>"; print "<td colspan=\"2\">Propositions commerciales brouillons</td></tr>";
@ -106,6 +107,7 @@ if ( $db->query($sql) )
print "</table><br>"; print "</table><br>";
} }
} }
}
/* /*
* Commandes à valider * Commandes à valider
@ -248,12 +250,13 @@ if ( $db->query($sql) )
} }
} }
/* /*
* Dernières propales * Dernières propales
* *
*/ */
if ($conf->propal->enabled) {
$sql = "SELECT s.nom, s.idp, p.rowid as propalid, p.price, p.ref,".$db->pdate("p.datep")." as dp, c.label as statut, c.id as statutid"; $sql = "SELECT s.nom, s.idp, p.rowid as propalid, p.price, p.ref,".$db->pdate("p.datep")." as dp, c.label as statut, c.id as statutid";
$sql .= " FROM llx_societe as s, llx_propal as p, c_propalst as c WHERE p.fk_soc = s.idp AND p.fk_statut = c.id AND p.fk_statut > 1"; $sql .= " FROM llx_societe as s, llx_propal as p, c_propalst as c WHERE p.fk_soc = s.idp AND p.fk_statut = c.id AND p.fk_statut > 1";
if ($socidp) if ($socidp)
@ -305,7 +308,7 @@ if ( $db->query($sql) )
print "</table>"; print "</table>";
$db->free(); $db->free();
} }
}
print '</td></tr>'; print '</td></tr>';
@ -314,6 +317,5 @@ print '</table>';
$db->close(); $db->close();
llxFooter("<em>Derni&egrave;re modification $Date$ r&eacute;vision $Revision$</em>"); llxFooter("<em>Derni&egrave;re modification $Date$ r&eacute;vision $Revision$</em>");
?> ?>