Skip to content

Commit bf7bd38

Browse files
committed
Add isBlocked check
1 parent 57795b8 commit bf7bd38

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/resolvers/billingNew.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,11 @@ export default {
109109
const now = new Date();
110110
const invoiceId = `${workspace.name} ${now.getDate()}/${now.getMonth() + 1} ${plan.name}`;
111111

112-
const isCardLinkOperation = workspace.tariffPlanId.toString() === tariffPlanId && !workspace.isTariffPlanExpired();
112+
let isCardLinkOperation = false;
113+
114+
if (workspace.tariffPlanId.toString() === tariffPlanId && !workspace.isTariffPlanExpired() && !workspace.isBlocked) {
115+
isCardLinkOperation = true;
116+
}
113117

114118
// Calculate next payment date
115119
const lastChargeDate = workspace.lastChargeDate ? new Date(workspace.lastChargeDate) : now;

0 commit comments

Comments
 (0)