Fix: uniformisation du code

This commit is contained in:
Regis Houssin 2007-12-19 14:24:37 +00:00
parent fcda556b28
commit a9eeb333b9
2 changed files with 50 additions and 37 deletions

View File

@ -1022,9 +1022,9 @@ if ($_GET['propalid'] > 0)
} }
else else
{ {
print '</td></tr></table>';
if (!empty($propal->projetidp)) if (!empty($propal->projetidp))
{ {
print '</td></tr></table>';
print '<td colspan="3">'; print '<td colspan="3">';
$proj = new Project($db); $proj = new Project($db);
$proj->fetch($propal->projetidp); $proj->fetch($propal->projetidp);
@ -1034,7 +1034,6 @@ if ($_GET['propalid'] > 0)
print '</td>'; print '</td>';
} }
else { else {
print '</td></tr></table>';
print '<td colspan="3">&nbsp;</td>'; print '<td colspan="3">&nbsp;</td>';
} }
} }

View File

@ -244,10 +244,13 @@ if ($_GET["propalid"] > 0)
if ($conf->projet->enabled) if ($conf->projet->enabled)
{ {
$langs->load("projects"); $langs->load("projects");
print '<tr><td>'.$langs->trans('Project').'</td>'; print '<tr><td>';
print '<table class="nobordernopadding" width="100%"><tr><td>';
print $langs->trans('Project').'</td>';
$numprojet = $societe->has_projects(); $numprojet = $societe->has_projects();
if (! $numprojet) if (! $numprojet)
{ {
print '</td></tr></table>';
print '<td colspan="2">'; print '<td colspan="2">';
print $langs->trans("NoProject").'</td><td>'; print $langs->trans("NoProject").'</td><td>';
print '<a href=../projet/fiche.php?socid='.$societe->id.'&action=create>'.$langs->trans('AddProject').'</a>'; print '<a href=../projet/fiche.php?socid='.$societe->id.'&action=create>'.$langs->trans('AddProject').'</a>';
@ -257,12 +260,22 @@ if ($_GET["propalid"] > 0)
{ {
if ($propal->statut == 0 && $user->rights->propale->creer) if ($propal->statut == 0 && $user->rights->propale->creer)
{ {
print '<td colspan="3">'; if ($_GET['action'] != 'classer' && $propal->brouillon) print '<td align="right"><a href="'.$_SERVER['PHP_SELF'].'?action=classer&amp;propalid='.$propal->id.'">'.img_edit($langs->trans('SetProject')).'</a></td>';
$html->select_projects($societe->id, $propal->projetidp, 'projetidp'); print '</tr></table>';
print '</td>'; print '</td><td colspan="3">';
if ($_GET['action'] == 'classer')
{
$html->form_project($_SERVER['PHP_SELF'].'?propalid='.$propal->id, $propal->socid, $propal->projetidp, 'projetidp');
} }
else else
{ {
$html->form_project($_SERVER['PHP_SELF'].'?propalid='.$propal->id, $propal->socid, $propal->projetidp, 'none');
}
print '</td></tr>';
}
else
{
print '</td></tr></table>';
if (!empty($propal->projetidp)) if (!empty($propal->projetidp))
{ {
print '<td colspan="3">'; print '<td colspan="3">';
@ -300,6 +313,8 @@ if ($_GET["propalid"] > 0)
* Lignes de propale * Lignes de propale
* *
*/ */
print '<table class="noborder" width="100%">';
$sql = 'SELECT pt.rowid, pt.description, pt.price, pt.fk_product, pt.fk_remise_except,'; $sql = 'SELECT pt.rowid, pt.description, pt.price, pt.fk_product, pt.fk_remise_except,';
$sql.= ' pt.qty, pt.tva_tx, pt.remise_percent, pt.subprice, pt.info_bits,'; $sql.= ' pt.qty, pt.tva_tx, pt.remise_percent, pt.subprice, pt.info_bits,';
$sql.= ' pt.total_ht, pt.total_tva, pt.total_ttc,'; $sql.= ' pt.total_ht, pt.total_tva, pt.total_ttc,';
@ -316,7 +331,6 @@ if ($_GET["propalid"] > 0)
$i = 0; $i = 0;
$total = 0; $total = 0;
print '<table class="noborder" width="100%">';
if ($num_lignes) if ($num_lignes)
{ {
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';