Look: Ajout picto statut sur les factures fournisseurs

This commit is contained in:
Laurent Destailleur 2006-03-19 01:21:35 +00:00
parent 0f3c488c05
commit 787d1f1b72
4 changed files with 17 additions and 50 deletions

View File

@ -1465,7 +1465,7 @@ class Facture
{
if ($statut == 0) return $langs->trans('Bill'.$prefix.'StatusDraft').' '.img_picto($langs->trans('Bill'.$prefix.'StatusDraft'),'statut0');
if ($statut == 3) return $langs->trans('Bill'.$prefix.'StatusCanceled').' '.img_picto($langs->trans('Bill'.$prefix.'StatusCanceled'),'statut5');
if ($alreadypayed <= 0) return $langs->trans('Bill'.$prefix.'StatusNotPayed').' '.img_picto($langs->trans('Bill'.$prefix.'StatusValidated'),'statut1');
if ($alreadypayed <= 0) return $langs->trans('Bill'.$prefix.'StatusNotPayed').' '.img_picto($langs->trans('Bill'.$prefix.'StatusNotPayed'),'statut1');
return $langs->trans('Bill'.$prefix.'StatusStarted').' '.img_picto($langs->trans('Bill'.$prefix.'StatusStarted'),'statut3');
}
else

View File

@ -497,7 +497,7 @@ else
$authorfullname=$author->fullname;
}
print '<tr><td>'.$langs->trans('Author').'</td><td colspan="3">'.$authorfullname.'</td>';
print '<tr><td>'.$langs->trans('Status').'</td><td colspan="3">'.$fac->LibStatut($fac->paye,$fac->statut).'</td></tr>';
print '<tr><td>'.$langs->trans('Status').'</td><td colspan="3">'.$fac->LibStatut($fac->paye,$fac->statut,4).'</td></tr>';
print '<tr><td>'.$langs->trans('AmountHT').'</td><td><b>'.price($fac->total_ht).'</b></td><td colspan="2" align="left">'.$langs->trans('Currency'.$conf->monnaie).'</td></tr>';
print '<tr><td>'.$langs->trans('AmountVAT').'</td><td>'.price($fac->total_tva).'</td><td colspan="2" align="left">'.$langs->trans('Currency'.$conf->monnaie).'</td></tr>';

View File

@ -190,7 +190,7 @@ if ($resql)
print "</tr>\n";
print '</form>';
$fac = new FactureFournisseur($db);
$facturestatic = new FactureFournisseur($db);
$var=true;
$total=0;
@ -201,9 +201,9 @@ if ($resql)
$var=!$var;
print "<tr $bc[$var]>";
print '<td nowrap><a href="'.DOL_URL_ROOT.'/fourn/facture/fiche.php?facid='.$obj->facid.'" title="'.$obj->facnumber.'">'.img_object($langs->trans("ShowBill"),"bill").' '.dolibarr_trunc($obj->facnumber,20)."</a></td>\n";
print '<td nowrap><a href="'.DOL_URL_ROOT.'/fourn/facture/fiche.php?facid='.$obj->facid.'" title="'.$obj->facnumber.'">'.img_object($langs->trans("ShowBill"),"bill").' '.dolibarr_trunc($obj->facnumber,12)."</a></td>\n";
print '<td align="center" nowrap>'.dolibarr_print_date($obj->date_echeance).'</td>';
print '<td>'.dolibarr_trunc(stripslashes("$obj->libelle"),44).'</td>';
print '<td>'.dolibarr_trunc(stripslashes("$obj->libelle"),36).'</td>';
print '<td>';
print '<a href="'.DOL_URL_ROOT.'/fourn/fiche.php?socid='.$obj->socid.'">'.img_object($langs->trans("ShowSupplier"),"company").' '.$obj->nom.'</a</td>';
print '<td align="right">'.price($obj->total_ht).'</td>';
@ -212,56 +212,23 @@ if ($resql)
$total_ttc+=$obj->total_ttc;
// Affiche statut de la facture
if ($obj->paye)
{
$class = "normal";
}
else
{
if ($obj->fk_statut == 0)
{
$class = "normal";
}
else
{
$class = "impayee";
}
}
print '<td align="center">';
if (! $obj->paye)
{
if ($obj->fk_statut == 0)
{
print $fac->PayedLibStatut($obj->paye,$obj->fk_statut);
}
elseif ($obj->fk_statut == 3)
{
print $fac->PayedLibStatut($obj->paye,$obj->fk_statut);
}
else
{
print '<td align="right">';
// \todo le montant deja payé obj->am n'est pas définie
print '<a class="'.$class.'" href=""index.php?filtre=paye:0,fk_statut:1">'.($fac->PayedLibStatut($obj->paye,$obj->fk_statut,$obj->am)).'</a>';
}
}
else
{
print $fac->PayedLibStatut($obj->paye,$obj->fk_statut);
}
print $facturestatic->LibStatut($obj->paye,$obj->fk_statut,5,$objp->am);
print '</td>';
print "</tr>\n";
$i++;
if ($i == min($num,$limit)) {
// Print total
print '<tr class="liste_total">';
print '<td class="liste_total" colspan="4" align="left">'.$langs->trans("Total").'</td>';
print '<td class="liste_total" align="right">'.price($total).'</td>';
print '<td class="liste_total" align="right">'.price($total_ttc).'</td>';
print '<td class="liste_total" align="center">&nbsp;</td>';
print "</tr>\n";
if ($i == min($num,$limit))
{
// Print total
print '<tr class="liste_total">';
print '<td class="liste_total" colspan="4" align="left">'.$langs->trans("Total").'</td>';
print '<td class="liste_total" align="right">'.price($total).'</td>';
print '<td class="liste_total" align="right">'.price($total_ttc).'</td>';
print '<td class="liste_total" align="center">&nbsp;</td>';
print "</tr>\n";
}
}

View File

@ -608,7 +608,7 @@ class FactureFournisseur
{
if ($statut == 0) return $langs->trans('Bill'.$prefix.'StatusDraft').' '.img_picto($langs->trans('Bill'.$prefix.'StatusDraft'),'statut0');
if ($statut == 3) return $langs->trans('Bill'.$prefix.'StatusCanceled').' '.img_picto($langs->trans('Bill'.$prefix.'StatusCanceled'),'statut5');
if ($alreadypayed <= 0) return $langs->trans('Bill'.$prefix.'StatusNotPayed').' '.img_picto($langs->trans('Bill'.$prefix.'StatusValidated'),'statut1');
if ($alreadypayed <= 0) return $langs->trans('Bill'.$prefix.'StatusNotPayed').' '.img_picto($langs->trans('Bill'.$prefix.'StatusNotPayed'),'statut1');
return $langs->trans('Bill'.$prefix.'StatusStarted').' '.img_picto($langs->trans('Bill'.$prefix.'StatusStarted'),'statut3');
}
else