From d88ab7a51caf67e81d09364940a63531788c574c Mon Sep 17 00:00:00 2001 From: Johannes Date: Wed, 15 Jan 2025 13:49:41 +0100 Subject: [PATCH] fix isLeaseActive excluding last day of lease --- .../lease-service/adapters/xpand/tenant-lease-adapter.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/services/lease-service/adapters/xpand/tenant-lease-adapter.ts b/src/services/lease-service/adapters/xpand/tenant-lease-adapter.ts index 227f1320..3ff41a3d 100644 --- a/src/services/lease-service/adapters/xpand/tenant-lease-adapter.ts +++ b/src/services/lease-service/adapters/xpand/tenant-lease-adapter.ts @@ -539,7 +539,7 @@ const isLeaseActive = (lease: Lease | PartialLease): boolean => { return ( leaseStartDate < currentDate && - (!lastDebitDate || currentDate < lastDebitDate) + (!lastDebitDate || currentDate <= lastDebitDate) ) }