Add status if referrer list of a project

This commit is contained in:
Laurent Destailleur 2008-12-27 23:40:25 +00:00
parent ff49c3c833
commit cc7ebc8251
3 changed files with 35 additions and 44 deletions

View File

@ -687,7 +687,7 @@ if ($_POST['action'] == 'updateligne' && $user->rights->propale->creer && $_POST
$vat_rate=$_POST['tva_tx'];
$vat_rate=eregi_replace('\*','',$vat_rate);
// On vérifie que le prix minimum est respecté
// On v<EFBFBD>rifie que le prix minimum est respect<63>
$productid = $_POST['productid'] ;
if ($productid)
{
@ -1093,55 +1093,43 @@ if ($_GET['propalid'] > 0)
}
print '</td></tr>';
// Projet
// Project
if ($conf->projet->enabled)
{
$langs->load("projects");
print '<tr><td>';
print '<table class="nobordernopadding" width="100%"><tr><td>';
print $langs->trans('Project').'</td>';
$numprojet = $societe->has_projects();
if (! $numprojet)
if ($propal->statut == 0 && $user->rights->propale->creer)
{
print '</td></tr></table>';
print '<td colspan="2">';
print $langs->trans("NoProject").'</td><td>';
print '<a href=../projet/fiche.php?socid='.$societe->id.'&action=create>'.$langs->trans('AddProject').'</a>';
print '</td>';
}
else
{
if ($propal->statut == 0 && $user->rights->propale->creer)
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>';
print '</tr></table>';
print '</td><td colspan="3">';
if ($_GET['action'] == 'classer')
{
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>';
print '</tr></table>';
print '</td><td colspan="3">';
if ($_GET['action'] == 'classer')
{
$html->form_project($_SERVER['PHP_SELF'].'?propalid='.$propal->id, $propal->socid, $propal->projetidp, 'projetidp');
}
else
{
$html->form_project($_SERVER['PHP_SELF'].'?propalid='.$propal->id, $propal->socid, $propal->projetidp, 'none');
}
print '</td></tr>';
$html->form_project($_SERVER['PHP_SELF'].'?propalid='.$propal->id, $propal->socid, $propal->projetidp, 'projetidp');
}
else
{
print '</td></tr></table>';
if (!empty($propal->projetidp))
{
print '<td colspan="3">';
$proj = new Project($db);
$proj->fetch($propal->projetidp);
print '<a href="../projet/fiche.php?id='.$propal->projetidp.'" title="'.$langs->trans('ShowProject').'">';
print $proj->title;
print '</a>';
print '</td>';
}
else {
print '<td colspan="3">&nbsp;</td>';
}
$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))
{
print '<td colspan="3">';
$proj = new Project($db);
$proj->fetch($propal->projetidp);
print '<a href="../projet/fiche.php?id='.$propal->projetidp.'" title="'.$langs->trans('ShowProject').'">';
print $proj->title;
print '</a>';
print '</td>';
}
else {
print '<td colspan="3">&nbsp;</td>';
}
}
print '</tr>';

View File

@ -2458,7 +2458,7 @@ else
print '<tr><td>'.$langs->trans('Status').'</td>';
print '<td align="left" colspan="3">'.($fac->getLibStatut(4,$totalpaye)).'</td></tr>';
// Projet
// Project
if ($conf->projet->enabled)
{
$langs->load('projects');

View File

@ -40,7 +40,7 @@ if ($conf->facture->enabled) $langs->load("bills");
if ($conf->commande->enabled) $langs->load("orders");
if ($conf->propal->enabled) $langs->load("propal");
// Sécurité accés client
// S<EFBFBD>curit<EFBFBD> acc<63>s client
$projetid='';
if ($_GET["id"]) { $projetid=$_GET["id"]; }
@ -123,6 +123,7 @@ foreach ($listofreferent as $key => $value)
print '<td width="150">'.$langs->trans("Ref").'</td>';
print '<td>'.$langs->trans("Date").'</td>';
print '<td align="right">'.$langs->trans("Amount").'</td>';
print '<td align="right" width="200">'.$langs->trans("Status").'</td>';
print '</tr>';
$elementarray = $projet->get_element_list($key);
if (sizeof($elementarray)>0 && is_array($elementarray))
@ -143,13 +144,15 @@ foreach ($listofreferent as $key => $value)
if (empty($date)) $date=$element->datep;
print '<td>'.dolibarr_print_date($date,'day').'</td>';
print '<td align="right">'.price($element->total_ht).'</td>';
print '</tr>';
print '<td align="right">'.$element->getLibStatut(5).'</td>';
print '</tr>';
$total = $total + $element->total_ht;
}
print '<tr class="liste_total"><td colspan="2">'.$i.' '.$langs->trans("Bills").'</td>';
print '<tr class="liste_total"><td colspan="2">'.$langs->trans("Number").': '.$i.'</td>';
print '<td align="right" width="100">'.$langs->trans("TotalHT").' : '.price($total).'</td>';
print '<td>&nbsp;</td>';
print '</tr>';
}
print "</table>";
@ -189,7 +192,7 @@ foreach ($listofreferent as $key => $value)
}
}
// Juste pour éviter bug IE qui réorganise mal div précédents si celui-ci absent
// Juste pour <EFBFBD>viter bug IE qui r<>organise mal div pr<70>c<EFBFBD>dents si celui-ci absent
print '<div class="tabsAction">';
print '</div>';