fix: coupon code changes suggested by prasad (#19352)
* changes suggested by prasad * codacy correction
This commit is contained in:
parent
45c18b3184
commit
28710cdf99
@ -2,6 +2,15 @@
|
||||
// For license information, please see license.txt
|
||||
|
||||
frappe.ui.form.on('Coupon Code', {
|
||||
setup: function(frm) {
|
||||
frm.set_query("pricing_rule", function() {
|
||||
return {
|
||||
filters: [
|
||||
["Pricing Rule","coupon_code_based", "=", "1"]
|
||||
]
|
||||
};
|
||||
});
|
||||
},
|
||||
coupon_name:function(frm){
|
||||
if (frm.doc.__islocal===1) {
|
||||
frm.trigger("make_coupon_code");
|
||||
|
@ -24,6 +24,7 @@
|
||||
],
|
||||
"fields": [
|
||||
{
|
||||
"description": "e.g. \"Summer Holiday 2019 Offer 20\"",
|
||||
"fieldname": "coupon_name",
|
||||
"fieldtype": "Data",
|
||||
"label": "Coupon Name",
|
||||
@ -50,7 +51,7 @@
|
||||
"fieldtype": "Column Break"
|
||||
},
|
||||
{
|
||||
"description": "To be used to get discount",
|
||||
"description": "unique e.g. SAVE20 To be used to get discount",
|
||||
"fieldname": "coupon_code",
|
||||
"fieldtype": "Data",
|
||||
"label": "Coupon Code",
|
||||
@ -62,12 +63,13 @@
|
||||
"fieldname": "pricing_rule",
|
||||
"fieldtype": "Link",
|
||||
"label": "Pricing Rule",
|
||||
"options": "Pricing Rule"
|
||||
"options": "Pricing Rule",
|
||||
"reqd": 1
|
||||
},
|
||||
{
|
||||
"fieldname": "uses",
|
||||
"fieldtype": "Section Break",
|
||||
"label": "Uses"
|
||||
"label": "Validity and Usage"
|
||||
},
|
||||
{
|
||||
"fieldname": "valid_from",
|
||||
@ -113,7 +115,7 @@
|
||||
"read_only": 1
|
||||
}
|
||||
],
|
||||
"modified": "2019-10-15 14:12:22.686986",
|
||||
"modified": "2019-10-19 14:48:14.602481",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Accounts",
|
||||
"name": "Coupon Code",
|
||||
|
Loading…
x
Reference in New Issue
Block a user