Allow to disable notifications
This commit is contained in:
@@ -30,7 +30,7 @@
|
||||
$currencies[$currencyId] = $row;
|
||||
}
|
||||
|
||||
$querySubscriptions = "SELECT * FROM subscriptions WHERE notify = 1";
|
||||
$querySubscriptions = "SELECT * FROM subscriptions WHERE notify = 1 AND inactive = 0";
|
||||
$resultSubscriptions = $db->query($querySubscriptions);
|
||||
|
||||
$notify = []; $i = 0;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
$cycles[$cycleId] = $row;
|
||||
}
|
||||
|
||||
$query = "SELECT id, next_payment, frequency, cycle FROM subscriptions WHERE next_payment < :currentDate";
|
||||
$query = "SELECT id, next_payment, frequency, cycle FROM subscriptions WHERE inactive = 0 AND next_payment < :currentDate";
|
||||
$stmt = $db->prepare($query);
|
||||
$stmt->bindValue(':currentDate', $currentDate->format('Y-m-d'));
|
||||
$result = $stmt->execute();
|
||||
|
||||
Reference in New Issue
Block a user