From 75a5672de32a59cc53c3c76a08793e6a33cce828 Mon Sep 17 00:00:00 2001 From: Miguel Ribeiro Date: Wed, 20 Mar 2024 13:50:20 +0100 Subject: [PATCH] fix: next payment date not updating for disabled subscriptions (#243) --- endpoints/cronjobs/updatenextpayment.php | 2 +- includes/version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/endpoints/cronjobs/updatenextpayment.php b/endpoints/cronjobs/updatenextpayment.php index e7bf3ab..546939e 100644 --- a/endpoints/cronjobs/updatenextpayment.php +++ b/endpoints/cronjobs/updatenextpayment.php @@ -13,7 +13,7 @@ $cycles[$cycleId] = $row; } - $query = "SELECT id, next_payment, frequency, cycle FROM subscriptions WHERE inactive = 0 AND next_payment < :currentDate"; + $query = "SELECT id, next_payment, frequency, cycle FROM subscriptions WHERE next_payment < :currentDate"; $stmt = $db->prepare($query); $stmt->bindValue(':currentDate', $currentDate->format('Y-m-d')); $result = $stmt->execute(); diff --git a/includes/version.php b/includes/version.php index 9b4637d..51d8225 100644 --- a/includes/version.php +++ b/includes/version.php @@ -1,3 +1,3 @@ \ No newline at end of file