Skip to content

Commit

Permalink
feat(subscription): Add optional arg in create_usage_record to use in…
Browse files Browse the repository at this point in the history
… scripts
  • Loading branch information
balamurali27 committed Dec 21, 2024
1 parent b5dd9c0 commit 7054ebf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion press/press/doctype/subscription/subscription.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def disable(self):
frappe.log_error(title="Disable Subscription Error")

@frappe.whitelist()
def create_usage_record(self):
def create_usage_record(self, date: DF.Date | None = None):
cannot_charge = not self.can_charge_for_subscription()
if cannot_charge:
return None
Expand Down Expand Up @@ -163,6 +163,7 @@ def create_usage_record(self):
plan_type=self.plan_type,
plan=plan.name,
amount=amount,
date=date,
subscription=self.name,
interval=self.interval,
site=(
Expand Down

0 comments on commit 7054ebf

Please sign in to comment.