diff --git a/htdocs/comm/index.php b/htdocs/comm/index.php index 29a63394e58..09a5cde0dbe 100644 --- a/htdocs/comm/index.php +++ b/htdocs/comm/index.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004 Laurent Destailleur + * Copyright (C) 2004-2005 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -21,7 +21,7 @@ * */ -/*! +/** \file htdocs/comm/index.php \ingroup commercial \brief Page acceuil de la zone commercial @@ -100,13 +100,32 @@ print ''; * Recherche Propal */ if ($conf->propal->enabled) { + $var=true; print '
'; print ''; print ''; - print "'; print "
Rechercher une proposition
"; + print '
'; print $langs->trans("Ref").' :  

\n"; +} +/* + * Recherche Contrat + */ +if ($conf->contrat->enabled) { + $var=true; + print '
'; + print ''; + print ''; + print ''; + print "
Rechercher un contrat
'; + print $langs->trans("Ref").' :  

\n"; +} + +/* + * Liste des propal brouillons + */ +if ($conf->propal->enabled) { $sql = "SELECT p.rowid, p.ref, p.price, s.nom"; $sql .= " FROM ".MAIN_DB_PREFIX."propal as p, ".MAIN_DB_PREFIX."societe as s"; $sql .= " WHERE p.fk_statut = 0 and p.fk_soc = s.idp"; @@ -116,6 +135,7 @@ if ($conf->propal->enabled) { $total = 0; $num = $db->num_rows(); $i = 0; + $var=true; if ($num > 0 ) { print ''; @@ -126,12 +146,12 @@ if ($conf->propal->enabled) { { $obj = $db->fetch_object(); $var=!$var; - print ""; + print ""; $i++; $total += $obj->price; } if ($total>0) { - print ""; + print ""; } print "
rowid."\">".$obj->ref."".$obj->nom."".price($obj->price)."
rowid."\">".$obj->ref."".$obj->nom."".price($obj->price)."
Total".price($total)."
".$langs->trans("Total")."".price($total)."

"; } @@ -208,7 +228,8 @@ if ( $db->query($sql) ) print ""; print ''.$obj->nom.''; print ''; - print ''; + print img_delete(); + print ''; print ''; $i++; } @@ -248,7 +269,7 @@ if ( $db->query($sql) ) $var=!$var; print ""; - print "id\">".img_file()." "; + print "id\">".img_file()." "; print "id\">$obj->libelle $obj->label"; print "".strftime("%d %b %Y",$obj->da).""; print ''.$obj->sname.''; @@ -408,7 +429,7 @@ if ($conf->propal->enabled) { $total += $obj->price; } if ($total>0) { - print "Total".price($total).""; + print "".$langs->trans("Total")."".price($total).""; } print "
"; } diff --git a/htdocs/contrat/liste.php b/htdocs/contrat/liste.php index 411ff9382bb..6a17da938d3 100644 --- a/htdocs/contrat/liste.php +++ b/htdocs/contrat/liste.php @@ -72,6 +72,9 @@ if ($sortorder == "") $sql = "SELECT c.rowid as cid, c.statut, ".$db->pdate("c.fin_validite")." as fin_validite, c.fin_validite-sysdate() as delairestant, s.nom, s.idp as sidp"; $sql .= " FROM ".MAIN_DB_PREFIX."contrat as c, ".MAIN_DB_PREFIX."societe as s"; $sql .= " WHERE c.fk_soc = s.idp "; +if ($_POST["search_contract"]) { + $sql .= " AND c.rowid = ".$_POST["search_contract"]; +} if ($socid > 0) { $sql .= " AND s.idp = $socid";