Skip to content

Commit 362427f

Browse files
committed
feat: subscription plan in sales invoice item
1 parent ed3c505 commit 362427f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

erpnext/accounts/doctype/subscription/subscription.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,8 @@ def get_items_from_plans(self, plans, prorate=0):
489489
item = {'item_code': item_code, 'qty': plan.qty, 'rate': get_plan_rate(plan.plan, plan.qty, party,
490490
self.current_invoice_start, self.current_invoice_end, prorate_factor, doctype, company), 'cost_center': plan_doc.cost_center}
491491

492-
item["subscription_plan"] = plan_doc.name
492+
if doctype == "Sales Invoice":
493+
item["subscription_plan"] = plan_doc.name
493494

494495
if deferred:
495496
item.update({

0 commit comments

Comments
 (0)