-
Notifications
You must be signed in to change notification settings - Fork 7.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Enhance] Subscription module #10089
[Enhance] Subscription module #10089
Conversation
d1bce2b
to
6aec08a
Compare
@rohitwaghchaure is possible to add "Every 4 weeks" in Frequency? Seems the trend is moving in that direction .. |
44e0a5e
to
6143f7b
Compare
|
c40ce23
to
7912ac8
Compare
Fixed! |
37bb8c3
to
746df7b
Compare
👍 for UI tests |
4ac438c
to
0461ce9
Compare
Please rebase and push again !!. Closing the PR for now |
f303588
to
b8bcfb2
Compare
882145c
to
d2247ed
Compare
"in_global_search": 0, | ||
"in_list_view": 0, | ||
"in_standard_filter": 0, | ||
"label": "Subscription Detail", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just call this "Subscription"
@@ -0,0 +1,28 @@ | |||
Subscription module plays an important role in the every oraginization, specially for the organization who serve the services to the customers based on period. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this sentence
|
||
refresh: function(frm) { | ||
if(frm.doc.docstatus == 1) { | ||
let label = 'View ' + frm.doc.base_doctype; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be translated! __('View {0}', [frm.doc.base_doctype])
let label = 'View ' + frm.doc.base_doctype; | ||
frm.add_custom_button(__(label), | ||
function() { | ||
frm.trigger("view_subscription_document"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why new function, just add this inline?
'2': 'Cancelled' | ||
}[cstr(self.docstatus or 0)] | ||
|
||
self.db_set("status", status) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why db_set? this is called before saving in validate
make_subscription_entry() | ||
|
||
docnames = frappe.get_all(doc.base_doctype, {'subscription': doc.name}) | ||
self.assertEquals(len(docnames), months) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check if values are copied over correctly!
@@ -128,13 +128,15 @@ def get_next_date(dt, mcount, day=None): | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rename this file to subscription
move this code to subscription.py
d2247ed
to
a367480
Compare
@rmehta |
f28a897
to
c45b242
Compare
@@ -3384,7 +3384,7 @@ | |||
"bold": 0, | |||
"collapsible": 0, | |||
"columns": 0, | |||
"fieldname": "subscription", | |||
"fieldname": "subscription_id", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
noooo! Leave this as subscription
link field naming is very important!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed!
68270ec
to
0ff2cb5
Compare
@rohitwaghchaure can you check codacy? |
0ff2cb5
to
d0f7b52
Compare
@rmehta Fixed codacy! |
…in the dashboard for the sales and buying flow
…move recurring_document from controller
d0f7b52
to
c602af5
Compare
* [Enhance] Subscription module * Added view documents from the subscription form * Test cases * documentation * UI Test cases, fixes * Removed child table in the subscription * Provision to make subscription from the document, added subscription in the dashboard for the sales and buying flow * added patch to make subscription from the recurring data * Rename field subscriptio to subscription_id, added new test cases, remove recurring_document from controller * renamed subscription_id to subscription
@rohitwaghchaure what about to create a subscription not "stand alone"? I mean create it not invoice based but "item based", so that would be possible to choose the items to bill for the subscription and create invoice based on that. |
* [Enhance] Subscription module * Added view documents from the subscription form * Test cases * documentation * UI Test cases, fixes * Removed child table in the subscription * Provision to make subscription from the document, added subscription in the dashboard for the sales and buying flow * added patch to make subscription from the recurring data * Rename field subscriptio to subscription_id, added new test cases, remove recurring_document from controller * renamed subscription_id to subscription
@GSLabIt as following the subscription topic since 2013 in erpnext, I would also suggest to have this not Invoice based. As a monthly subscription for a Service i.e. SaaS/IaaS Service will include also usage based costs, and also may vary in the amount of booked Items. From looking at the subscription management docs and video today this seems no bee possible with the current implementation. |
Subscription
To Make subscription for invoice
To view recurring sales invoices
Dashboard View
Indicator in the listview
Fixed #6313