Look: Modif esthtiques mineures
This commit is contained in:
parent
dcb1c188a2
commit
20e50322eb
@ -262,7 +262,7 @@ if ($resql)
|
||||
print "<input class=\"flat\" name=\"num_releve\" type=\"text\" value=\"\" size=\"8\">";
|
||||
if ($options)
|
||||
{
|
||||
print "<br><select name=\"cat1\">$options";
|
||||
print "<br><select class=\"flat\" name=\"cat1\">$options";
|
||||
print "</select>";
|
||||
}
|
||||
print "</td>";
|
||||
|
||||
@ -257,9 +257,10 @@ if ( $societe->fetch($socid) )
|
||||
$max=5;
|
||||
|
||||
$sql = "SELECT p.rowid,p.libelle,p.facnumber,p.fk_statut,".$db->pdate("p.datef")." as df, total_ttc as amount, paye";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."facture_fourn as p WHERE p.fk_soc = $societe->id";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."facture_fourn as p";
|
||||
$sql.= " WHERE p.fk_soc = ".$societe->id;
|
||||
$sql.= " ORDER BY p.datef DESC";
|
||||
$sql.= " ".$db->plimit($conf->liste_limit+1, $offset);
|
||||
$sql.= " ".$db->plimit($max+1);
|
||||
|
||||
$resql=$db->query($sql);
|
||||
if ($resql)
|
||||
@ -274,7 +275,8 @@ if ( $societe->fetch($socid) )
|
||||
print "<table class=\"noborder\" width=\"100%\"><tr><td>".$langs->trans("LastSuppliersBills",min($num,$max))."</td><td align=\"right\"><a href=\"facture/index.php?socid=$societe->id\">".$langs->trans("AllBills")." (".$num.")</td></tr></table>";
|
||||
print "</td></tr>";
|
||||
}
|
||||
while ($i < $num && $i < $max)
|
||||
$facturestatic = new FactureFournisseur($db);
|
||||
while ($i < min($num,$max))
|
||||
{
|
||||
$obj = $db->fetch_object($resql);
|
||||
$var=!$var;
|
||||
@ -283,10 +285,9 @@ if ( $societe->fetch($socid) )
|
||||
print '<td>';
|
||||
print '<a href="facture/fiche.php?facid='.$obj->rowid.'">';
|
||||
print img_object($langs->trans("ShowBill"),"bill")." ".$obj->facnumber.'</a> '.dolibarr_trunc($obj->libelle,14).'</td>';
|
||||
print "<td align=\"right\" width=\"80\">".dolibarr_print_date($obj->df)."</td>";
|
||||
print '<td align="right">'.$obj->amount.'</td>';
|
||||
$fac = new FactureFournisseur($db);
|
||||
print '<td align="center">'.$fac->LibStatut($obj->paye,$obj->fk_statut).'</td>';
|
||||
print '<td align="right" width="80">'.dolibarr_print_date($obj->df).'</td>';
|
||||
print '<td align="right">'.price($obj->amount).'</td>';
|
||||
print '<td align="center">'.$facturestatic->LibStatutShort($obj->paye,$obj->fk_statut).'</td>';
|
||||
print "</tr>";
|
||||
$i++;
|
||||
}
|
||||
|
||||
@ -454,12 +454,34 @@ class FactureFournisseur
|
||||
return $this->LibStatut($this->paye,$this->statut);
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Renvoi le libellé long d'un statut donné
|
||||
* \param paye etat paye
|
||||
* \param statut id statut
|
||||
* \return string Libellé long du statut
|
||||
*/
|
||||
/**
|
||||
* \brief Renvoi le libellé court d'un statut donné
|
||||
* \param paye etat paye
|
||||
* \param statut id statut
|
||||
* \return string Libellé long du statut
|
||||
*/
|
||||
function LibStatutShort($paye,$statut)
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("bills");
|
||||
if (! $paye)
|
||||
{
|
||||
if ($statut == 0) return $langs->trans("BillShortStatusDraft");
|
||||
if ($statut == 3) return $langs->trans("BillShortStatusCanceled");
|
||||
return $langs->trans("BillShortValidated");
|
||||
}
|
||||
else
|
||||
{
|
||||
return $langs->trans("BillShortStatusPayed");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Renvoi le libellé long d'un statut donné
|
||||
* \param paye etat paye
|
||||
* \param statut id statut
|
||||
* \return string Libellé long du statut
|
||||
*/
|
||||
function LibStatut($paye,$statut)
|
||||
{
|
||||
global $langs;
|
||||
@ -475,7 +497,7 @@ class FactureFournisseur
|
||||
return $langs->trans("BillStatusPayed");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* \brief Renvoi le libellé court d'un statut donné
|
||||
* \param paye etat paye
|
||||
|
||||
Loading…
Reference in New Issue
Block a user