feat(lpe): add distretionary reason

This commit is contained in:
David
2024-07-01 16:17:52 +02:00
parent 816aae968e
commit 586422424a
2 changed files with 30 additions and 16 deletions

View File

@@ -15,14 +15,16 @@
"purchase_amount", "purchase_amount",
"expiry_date", "expiry_date",
"posting_date", "posting_date",
"company" "company",
"discretionary_reason"
], ],
"fields": [ "fields": [
{ {
"fieldname": "loyalty_program", "fieldname": "loyalty_program",
"fieldtype": "Link", "fieldtype": "Link",
"label": "Loyalty Program", "label": "Loyalty Program",
"options": "Loyalty Program" "options": "Loyalty Program",
"reqd": 1
}, },
{ {
"fieldname": "loyalty_program_tier", "fieldname": "loyalty_program_tier",
@@ -34,7 +36,8 @@
"fieldtype": "Link", "fieldtype": "Link",
"in_list_view": 1, "in_list_view": 1,
"label": "Customer", "label": "Customer",
"options": "Customer" "options": "Customer",
"reqd": 1
}, },
{ {
"fieldname": "redeem_against", "fieldname": "redeem_against",
@@ -46,7 +49,8 @@
"fieldname": "loyalty_points", "fieldname": "loyalty_points",
"fieldtype": "Int", "fieldtype": "Int",
"in_list_view": 1, "in_list_view": 1,
"label": "Loyalty Points" "label": "Loyalty Points",
"reqd": 1
}, },
{ {
"fieldname": "purchase_amount", "fieldname": "purchase_amount",
@@ -57,24 +61,28 @@
"fieldname": "expiry_date", "fieldname": "expiry_date",
"fieldtype": "Date", "fieldtype": "Date",
"in_list_view": 1, "in_list_view": 1,
"label": "Expiry Date" "label": "Expiry Date",
"reqd": 1
}, },
{ {
"fieldname": "posting_date", "fieldname": "posting_date",
"fieldtype": "Date", "fieldtype": "Date",
"label": "Posting Date" "label": "Posting Date",
"reqd": 1
}, },
{ {
"fieldname": "company", "fieldname": "company",
"fieldtype": "Link", "fieldtype": "Link",
"label": "Company", "label": "Company",
"options": "Company" "options": "Company",
"reqd": 1
}, },
{ {
"fieldname": "invoice_type", "fieldname": "invoice_type",
"fieldtype": "Link", "fieldtype": "Link",
"label": "Invoice Type", "label": "Invoice Type",
"options": "DocType" "options": "DocType",
"reqd": 1
}, },
{ {
"fieldname": "invoice", "fieldname": "invoice",
@@ -82,11 +90,16 @@
"in_list_view": 1, "in_list_view": 1,
"label": "Invoice", "label": "Invoice",
"options": "invoice_type" "options": "invoice_type"
},
{
"fieldname": "discretionary_reason",
"fieldtype": "Data",
"label": "Discretionary Reason"
} }
], ],
"in_create": 1, "in_create": 1,
"links": [], "links": [],
"modified": "2024-03-27 13:10:03.015035", "modified": "2024-07-01 08:51:13.927009",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Accounts", "module": "Accounts",
"name": "Loyalty Point Entry", "name": "Loyalty Point Entry",

View File

@@ -18,15 +18,16 @@ class LoyaltyPointEntry(Document):
if TYPE_CHECKING: if TYPE_CHECKING:
from frappe.types import DF from frappe.types import DF
company: DF.Link | None company: DF.Link
customer: DF.Link | None customer: DF.Link
expiry_date: DF.Date | None discretionary_reason: DF.Data | None
expiry_date: DF.Date
invoice: DF.DynamicLink | None invoice: DF.DynamicLink | None
invoice_type: DF.Link | None invoice_type: DF.Link
loyalty_points: DF.Int loyalty_points: DF.Int
loyalty_program: DF.Link | None loyalty_program: DF.Link
loyalty_program_tier: DF.Data | None loyalty_program_tier: DF.Data | None
posting_date: DF.Date | None posting_date: DF.Date
purchase_amount: DF.Currency purchase_amount: DF.Currency
redeem_against: DF.Link | None redeem_against: DF.Link | None
# end: auto-generated types # end: auto-generated types