Codacy corrections
This commit is contained in:
parent
bbed5d41ca
commit
19a47c3e0a
@ -50,19 +50,19 @@ frappe.ui.form.on("Payment Request", "refresh", function(frm) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
frappe.ui.form.on("Payment Request", "is_a_subscription", function(frm) {
|
frappe.ui.form.on("Payment Request", "is_a_subscription", function(frm) {
|
||||||
frm.toggle_reqd("payment_gateway_account", frm.doc.is_a_subscription);
|
frm.toggle_reqd("payment_gateway_account", frm.doc.is_a_subscription);
|
||||||
frm.toggle_reqd("subscription_plans", frm.doc.is_a_subscription);
|
frm.toggle_reqd("subscription_plans", frm.doc.is_a_subscription);
|
||||||
|
|
||||||
if (frm.doc.is_a_subscription) {
|
if (frm.doc.is_a_subscription) {
|
||||||
frappe.call({
|
frappe.call({
|
||||||
method: "get_subscription_details",
|
method: "get_subscription_details",
|
||||||
doc: frm.doc,
|
doc: frm.doc,
|
||||||
freeze: true,
|
freeze: true,
|
||||||
callback: function(r){
|
callback: function(r){
|
||||||
if(!r.exc) {
|
if(!r.exc) {
|
||||||
frm.refresh_field("subscription_plans");
|
frm.refresh_field("subscription_plans");
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
}
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@ -6,4 +6,4 @@ frappe.ui.form.on('Subscription Plan', {
|
|||||||
frm.toggle_reqd("cost", frm.doc.price_determination === 'Fixed rate');
|
frm.toggle_reqd("cost", frm.doc.price_determination === 'Fixed rate');
|
||||||
frm.toggle_reqd("price_list", frm.doc.price_determination === 'Based on price list');
|
frm.toggle_reqd("price_list", frm.doc.price_determination === 'Based on price list');
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
@ -3,7 +3,6 @@
|
|||||||
# For license information, please see license.txt
|
# For license information, please see license.txt
|
||||||
|
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
from frappe.model.document import Document
|
|
||||||
import frappe
|
import frappe
|
||||||
from frappe import _
|
from frappe import _
|
||||||
from frappe.integrations.utils import create_request_log
|
from frappe.integrations.utils import create_request_log
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user