2
0
forked from Wavyzz/dolibarr

Fix: Database compatibility

This commit is contained in:
Laurent Destailleur
2010-08-09 16:07:23 +00:00
parent 11b0d03ce0
commit d3536e3d42
10 changed files with 541 additions and 541 deletions

View File

@@ -2631,9 +2631,10 @@ class Facture extends CommonObject
$sql.= ' WHERE fk_facture = '.$this->id;
$sql.= ' AND traite = 0';
if ( $this->db->query( $sql) )
$resql=$this->db->query($sql);
if ($resql)
{
$row = $this->db->fetch_row();
$row = $this->db->fetch_row($resql);
if ($row[0] == 0)
{
$sql = 'INSERT INTO '.MAIN_DB_PREFIX.'prelevement_facture_demande';
@@ -2645,7 +2646,7 @@ class Facture extends CommonObject
$sql .= ",'".$soc->bank_account->code_guichet."'";
$sql .= ",'".$soc->bank_account->number."'";
$sql .= ",'".$soc->bank_account->cle_rib."')";
if ( $this->db->query( $sql) )
if ( $this->db->query($sql))
{
return 1;
}