Skip to content

Commit

Permalink
fix(invoice): add invoice item descriptions for marketplace apps
Browse files Browse the repository at this point in the history
  • Loading branch information
shadrak98 committed Dec 21, 2024
1 parent a9a9e57 commit 76a3b52
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions press/press/doctype/invoice/invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -518,6 +518,11 @@ def update_item_descriptions(self):
item.description = f"{server_title} Storage Add-on for {how_many_days}"

Check warning on line 518 in press/press/doctype/invoice/invoice.py

View check run for this annotation

Codecov / codecov/patch

press/press/doctype/invoice/invoice.py#L516-L518

Added lines #L516 - L518 were not covered by tests
else:
item.description = f"{server_title} active for {how_many_days}"

Check warning on line 520 in press/press/doctype/invoice/invoice.py

View check run for this annotation

Codecov / codecov/patch

press/press/doctype/invoice/invoice.py#L520

Added line #L520 was not covered by tests
elif item.document_type == "Marketplace App":
app_title = frappe.get_cached_value("Marketplace App", item.document_name, "title")
item.description = f"Marketplace app {app_title} active for {how_many_days}"

Check warning on line 523 in press/press/doctype/invoice/invoice.py

View check run for this annotation

Codecov / codecov/patch

press/press/doctype/invoice/invoice.py#L522-L523

Added lines #L522 - L523 were not covered by tests
else:
item.description = "Prepaid Credits"

def add_usage_record(self, usage_record):
if self.type != "Subscription":
Expand Down

0 comments on commit 76a3b52

Please sign in to comment.