Skip to content

Commit 269ed52

Browse files
authored
Merge pull request #880 from fproldan/bp_sp
[Backport diamoerp-staging] Desarrollo Serviplaga COT-2024-00013-1
2 parents 7a82c80 + b9aaae5 commit 269ed52

File tree

2 files changed

+16
-7
lines changed

2 files changed

+16
-7
lines changed

erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.json

+13-5
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@
9696
"sales_order",
9797
"so_detail",
9898
"sales_invoice_item",
99+
"subscription_plan",
99100
"column_break_74",
100101
"delivery_note",
101102
"dn_detail",
@@ -222,12 +223,12 @@
222223
"collapsible": 1,
223224
"fieldname": "comisi\u00f3n_section",
224225
"fieldtype": "Section Break",
225-
"label": "Comisión Vendedores por Producto"
226+
"label": "Comisi\u00f3n Vendedores por Producto"
226227
},
227228
{
228229
"fieldname": "porcentaje_comision",
229230
"fieldtype": "Percent",
230-
"label": "Comisión %"
231+
"label": "Comisi\u00f3n %"
231232
},
232233
{
233234
"fieldname": "column_break_53",
@@ -861,18 +862,25 @@
861862
"fieldtype": "Check",
862863
"label": "Grant Commission",
863864
"read_only": 1
865+
},
866+
{
867+
"fieldname": "subscription_plan",
868+
"fieldtype": "Link",
869+
"label": "Subscription Plan",
870+
"options": "Subscription Plan",
871+
"read_only": 1
864872
}
865873
],
866874
"idx": 1,
867875
"istable": 1,
868876
"links": [],
869-
"modified": "2021-08-20 16:42:53.435827",
877+
"modified": "2024-10-03 16:39:41.672280",
870878
"modified_by": "Administrator",
871879
"module": "Accounts",
872880
"name": "Sales Invoice Item",
873-
"naming_rule": "Random",
874881
"owner": "Administrator",
875882
"permissions": [],
883+
"route": "app/doctype/Sales%20Invoice%20Item",
876884
"sort_field": "modified",
877885
"sort_order": "DESC"
878-
}
886+
}

erpnext/accounts/doctype/subscription/subscription.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -489,13 +489,14 @@ 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-
492+
if doctype == "Sales Invoice":
493+
item["subscription_plan"] = plan_doc.name
493494

494495
if deferred:
495496
item.update({
496497
deferred_field: deferred,
497498
'service_start_date': self.current_invoice_start,
498-
'service_end_date': self.current_invoice_end
499+
'service_end_date': self.current_invoice_end,
499500
})
500501

501502
accounting_dimensions = get_accounting_dimensions()

0 commit comments

Comments
 (0)