Fix: L'information contact facturation affiche tait toujours Oui

This commit is contained in:
Laurent Destailleur 2005-08-18 18:03:53 +00:00
parent b39f5668b8
commit 2e6be78e78
2 changed files with 4 additions and 3 deletions

View File

@ -511,14 +511,15 @@ class Contact
}
$sql = "SELECT count(*) ";
$sql = "SELECT count(*) as nb";
$sql .= " FROM ".MAIN_DB_PREFIX."contact_facture";
$sql .= " WHERE fk_contact = ". $id;
$resql=$this->db->query($sql);
if ($resql)
{
if ($this->db->num_rows($resql))
$obj=$this->db->fetch_object($resql);
if ($obj->nb)
{
$this->facturation = 1;
}

View File

@ -413,7 +413,7 @@ else
print '</td></tr>';
print '<tr><td>'.$langs->trans("BillingContact").'</td><td colspan="3">';
print $langs->trans($yesno[$contact->facturation]);
print yn($contact->facturation);
print '</td></tr>';
print "</table>";