spelling: canceled --> cancelled
diff --git a/erpnext/accounts/doctype/subscription/subscription.js b/erpnext/accounts/doctype/subscription/subscription.js
index 8d8f2cc..dcbec12 100644
--- a/erpnext/accounts/doctype/subscription/subscription.js
+++ b/erpnext/accounts/doctype/subscription/subscription.js
@@ -4,7 +4,7 @@
frappe.ui.form.on('Subscription', {
refresh: function(frm) {
if(!frm.is_new()){
- if(frm.doc.status !== 'Canceled'){
+ if(frm.doc.status !== 'Cancelled'){
frm.add_custom_button(
__('Cancel Subscription'),
() => frm.events.cancel_this_subscription(frm)
@@ -14,7 +14,7 @@
() => frm.events.get_subscription_updates(frm)
);
}
- else if(frm.doc.status === 'Canceled'){
+ else if(frm.doc.status === 'Cancelled'){
frm.add_custom_button(
__('Restart Subscription'),
() => frm.events.renew_this_subscription(frm)
diff --git a/erpnext/accounts/doctype/subscription/subscription.json b/erpnext/accounts/doctype/subscription/subscription.json
index 80cbd85..1165bed 100644
--- a/erpnext/accounts/doctype/subscription/subscription.json
+++ b/erpnext/accounts/doctype/subscription/subscription.json
@@ -315,7 +315,7 @@
"label": "Status",
"length": 0,
"no_copy": 0,
- "options": "\nTrialling\nActive\nPast Due Date\nCanceled\nUnpaid",
+ "options": "\nTrialling\nActive\nPast Due Date\nCancelled\nUnpaid",
"permlevel": 0,
"precision": "",
"print_hide": 0,
diff --git a/erpnext/accounts/doctype/subscription/subscription.py b/erpnext/accounts/doctype/subscription/subscription.py
index 7b013bb..8f4fe4d 100644
--- a/erpnext/accounts/doctype/subscription/subscription.py
+++ b/erpnext/accounts/doctype/subscription/subscription.py
@@ -129,7 +129,7 @@
"""
subscription_settings = frappe.get_single('Subscription Settings')
if self.status == 'Past Due Date' and self.is_past_grace_period():
- self.status = 'Canceled' if cint(subscription_settings.cancel_after_grace) else 'Unpaid'
+ self.status = 'Cancelled' if cint(subscription_settings.cancel_after_grace) else 'Unpaid'
def set_subscription_status(self):
"""
@@ -139,7 +139,7 @@
self.status = 'Trialling'
elif self.status == 'Past Due Date' and self.is_past_grace_period():
subscription_settings = frappe.get_single('Subscription Settings')
- self.status = 'Canceled' if cint(subscription_settings.cancel_after_grace) else 'Unpaid'
+ self.status = 'Cancelled' if cint(subscription_settings.cancel_after_grace) else 'Unpaid'
elif self.status == 'Past Due Date' and not self.has_outstanding_invoice():
self.status = 'Active'
elif self.current_invoice_is_past_due():
@@ -335,7 +335,7 @@
The possible outcomes of this method are:
1. Generate a new invoice
2. Change the `Subscription` status to 'Past Due Date'
- 3. Change the `Subscription` status to 'Canceled'
+ 3. Change the `Subscription` status to 'Cancelled'
"""
if getdate(nowdate()) > getdate(self.current_invoice_end) and not self.has_outstanding_invoice():
self.generate_invoice()
@@ -352,7 +352,7 @@
"""
Called when `Subscription.cancel_at_period_end` is truthy
"""
- self.status = 'Canceled'
+ self.status = 'Cancelled'
if not self.cancelation_date:
self.cancelation_date = nowdate()
@@ -362,7 +362,7 @@
The possible outcomes of this method are:
1. Change the `Subscription` status to 'Active'
- 2. Change the `Subscription` status to 'Canceled'
+ 2. Change the `Subscription` status to 'Cancelled'
3. Change the `Subscription` status to 'Unpaid'
"""
current_invoice = self.get_current_invoice()
@@ -397,10 +397,10 @@
This sets the subscription as cancelled. It will stop invoices from being generated
but it will not affect already created invoices.
"""
- if self.status != 'Canceled':
+ if self.status != 'Cancelled':
to_generate_invoice = True if self.status == 'Active' else False
to_prorate = frappe.db.get_single_value('Subscription Settings', 'prorate')
- self.status = 'Canceled'
+ self.status = 'Cancelled'
self.cancelation_date = nowdate()
if to_generate_invoice:
self.generate_invoice(prorate=to_prorate)
@@ -412,7 +412,7 @@
subscription and the `Subscription` will lose all the history of generated invoices
it has.
"""
- if self.status == 'Canceled':
+ if self.status == 'Cancelled':
self.status = 'Active'
self.db_set('start', nowdate())
self.update_subscription_period(nowdate())
@@ -449,7 +449,7 @@
Returns all `Subscription` documents
"""
return frappe.db.sql(
- 'select name from `tabSubscription` where status != "Canceled"',
+ 'select name from `tabSubscription` where status != "Cancelled"',
as_dict=1
)
diff --git a/erpnext/accounts/doctype/subscription/subscription_list.js b/erpnext/accounts/doctype/subscription/subscription_list.js
index 6614e24..abcfc5e 100644
--- a/erpnext/accounts/doctype/subscription/subscription_list.js
+++ b/erpnext/accounts/doctype/subscription/subscription_list.js
@@ -8,8 +8,8 @@
return [__("Past Due Date"), "orange"];
} else if(doc.status === 'Unpaid') {
return [__("Unpaid"), "red"];
- } else if(doc.status === 'Canceled') {
- return [__("Canceled"), "darkgrey"];
+ } else if(doc.status === 'Cancelled') {
+ return [__("Cancelled"), "darkgrey"];
}
}
};
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/subscription/test_subscription.py b/erpnext/accounts/doctype/subscription/test_subscription.py
index 781567d..47efa45 100644
--- a/erpnext/accounts/doctype/subscription/test_subscription.py
+++ b/erpnext/accounts/doctype/subscription/test_subscription.py
@@ -165,8 +165,8 @@
self.assertEqual(subscription.status, 'Past Due Date')
subscription.process()
- # This should change status to Canceled since grace period is 0
- self.assertEqual(subscription.status, 'Canceled')
+ # This should change status to Cancelled since grace period is 0
+ self.assertEqual(subscription.status, 'Cancelled')
settings.cancel_after_grace = default_grace_period_action
settings.save()
@@ -188,7 +188,7 @@
self.assertEqual(subscription.status, 'Past Due Date')
subscription.process()
- # This should change status to Canceled since grace period is 0
+ # This should change status to Cancelled since grace period is 0
self.assertEqual(subscription.status, 'Unpaid')
settings.cancel_after_grace = default_grace_period_action
@@ -270,7 +270,7 @@
subscription.save()
subscription.cancel_subscription()
- self.assertEqual(subscription.status, 'Canceled')
+ self.assertEqual(subscription.status, 'Cancelled')
subscription.delete()
@@ -303,7 +303,7 @@
flt(prorate_factor, 2)
)
self.assertEqual(flt(invoice.grand_total, 2), flt(prorate_factor * 900, 2))
- self.assertEqual(subscription.status, 'Canceled')
+ self.assertEqual(subscription.status, 'Cancelled')
subscription.delete()
settings.prorate = to_prorate
@@ -371,15 +371,15 @@
self.assertEqual(len(subscription.invoices), invoices)
subscription.cancel_subscription()
- self.assertEqual(subscription.status, 'Canceled')
+ self.assertEqual(subscription.status, 'Cancelled')
self.assertEqual(len(subscription.invoices), invoices)
subscription.process()
- self.assertEqual(subscription.status, 'Canceled')
+ self.assertEqual(subscription.status, 'Cancelled')
self.assertEqual(len(subscription.invoices), invoices)
subscription.process()
- self.assertEqual(subscription.status, 'Canceled')
+ self.assertEqual(subscription.status, 'Cancelled')
self.assertEqual(len(subscription.invoices), invoices)
settings.cancel_after_grace = default_grace_period_action
@@ -406,7 +406,7 @@
self.assertEqual(subscription.status, 'Unpaid')
subscription.cancel_subscription()
- self.assertEqual(subscription.status, 'Canceled')
+ self.assertEqual(subscription.status, 'Cancelled')
subscription.restart_subscription()
self.assertEqual(subscription.status, 'Active')
@@ -440,7 +440,7 @@
self.assertEqual(subscription.status, 'Past Due Date')
subscription.process()
- # This should change status to Canceled since grace period is 0
+ # This should change status to Cancelled since grace period is 0
self.assertEqual(subscription.status, 'Unpaid')
invoice = subscription.get_current_invoice()