fix Ci error

This commit is contained in:
lmarcouiller
2022-09-01 16:06:03 +02:00
parent 06fafc9d7b
commit c8ddcf86b6

View File

@@ -588,6 +588,7 @@ class Stripe extends CommonObject
return null;
}
}
/**
* Get the Stripe SEPA of a company payment mode
*
@@ -605,7 +606,7 @@ class Stripe extends CommonObject
$sql = "SELECT sa.stripe_card_ref, sa.proprio, sa.iban_prefix"; // stripe_card_ref is src_ for sepa
$sql .= " FROM ".MAIN_DB_PREFIX."societe_rib as sa";
$sql .= " WHERE sa.rowid = ".$object->id; // We get record from ID, no need for filter on entity
$sql .= " WHERE sa.rowid = '".$this->db->escape($object->id)."'"; // We get record from ID, no need for filter on entity
$sql .= " AND sa.type = 'ban'"; //type ban to get normal bank account of customer (prelevement)
$soc = new Societe($this->db);
@@ -691,8 +692,8 @@ class Stripe extends CommonObject
$sql = "UPDATE ".MAIN_DB_PREFIX."societe_rib";
$sql .= " SET stripe_card_ref = '".$this->db->escape($sepa->id)."', card_type = 'sepa_debit',";
$sql .= " stripe_account= '" . $cu->id . '@' . $stripeacc . "'";
$sql .= " WHERE rowid = ".$object->id;
$sql .= " stripe_account= '" . $this->db->escape($cu->id . "@" . $stripeacc) . "'";
$sql .= " WHERE rowid = '".$this->db->escape($object->id)."'";
$sql .= " AND type = 'ban'";
$resql = $this->db->query($sql);
if (!$resql) {