Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 11.0
This commit is contained in:
commit
2cf970f617
@ -207,8 +207,12 @@ function societe_prepare_head(Societe $object)
|
|||||||
|
|
||||||
$sql = "SELECT COUNT(n.rowid) as nb";
|
$sql = "SELECT COUNT(n.rowid) as nb";
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."societe_rib as n";
|
$sql .= " FROM ".MAIN_DB_PREFIX."societe_rib as n";
|
||||||
$sql .= " WHERE fk_soc = ".$object->id;
|
$sql .= " WHERE n.fk_soc = ".$object->id;
|
||||||
$sql .= " AND status = ".$servicestatus;
|
if (empty($conf->stripe->enabled)) {
|
||||||
|
$sql .= " AND n.stripe_card_ref IS NULL";
|
||||||
|
} else {
|
||||||
|
$sql .= " AND (n.stripe_card_ref IS NULL OR (n.stripe_card_ref IS NOT NULL AND n.status = ".$servicestatus."))";
|
||||||
|
}
|
||||||
|
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user