Fix: L'information contact facturation affichée était toujours à Oui
This commit is contained in:
parent
b39f5668b8
commit
2e6be78e78
@ -511,14 +511,15 @@ class Contact
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$sql = "SELECT count(*) ";
|
$sql = "SELECT count(*) as nb";
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."contact_facture";
|
$sql .= " FROM ".MAIN_DB_PREFIX."contact_facture";
|
||||||
$sql .= " WHERE fk_contact = ". $id;
|
$sql .= " WHERE fk_contact = ". $id;
|
||||||
|
|
||||||
$resql=$this->db->query($sql);
|
$resql=$this->db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
if ($this->db->num_rows($resql))
|
$obj=$this->db->fetch_object($resql);
|
||||||
|
if ($obj->nb)
|
||||||
{
|
{
|
||||||
$this->facturation = 1;
|
$this->facturation = 1;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -413,7 +413,7 @@ else
|
|||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans("BillingContact").'</td><td colspan="3">';
|
print '<tr><td>'.$langs->trans("BillingContact").'</td><td colspan="3">';
|
||||||
print $langs->trans($yesno[$contact->facturation]);
|
print yn($contact->facturation);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
print "</table>";
|
print "</table>";
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user