Fixes for tests

This commit is contained in:
David Bomba 2024-06-22 14:53:45 +10:00
parent 1966f00a2d
commit 1cfb2a0ad1
2 changed files with 4 additions and 1 deletions

View File

@ -174,7 +174,7 @@ class SubscriptionStatus extends AbstractService
*/
private function checkRefundable(): self
{
if(!$this->recurring_invoice->subscription->refund_period || $this->recurring_invoice->subscription->refund_period === 0) {
if(!$this->recurring_invoice->subscription->refund_period || (int)$this->recurring_invoice->subscription->refund_period == 0) {
return $this->setRefundable(false);
}

View File

@ -82,6 +82,9 @@ trait MakesReminders
private function checkEndlessReminder($last_sent_date, $endless_reminder_frequency_id): bool
{
if(!$last_sent_date)
return false;
if (Carbon::now()->startOfDay()->eq($this->addTimeInterval($last_sent_date, $endless_reminder_frequency_id))) {
return true;
}