2
0
mirror of https://github.com/frappe/books.git synced 2025-01-03 07:12:21 +00:00

feat: register schemas for coupon codes

This commit is contained in:
AbleKSaju 2024-08-20 15:10:26 +05:30
parent e278f9aa32
commit f717533730
3 changed files with 36 additions and 13 deletions

View File

@ -79,13 +79,6 @@
"default": false, "default": false,
"section": "Features" "section": "Features"
}, },
{
"fieldname": "enableCouponCode",
"label": "Enable Coupon Code",
"fieldtype": "Check",
"default": false,
"section": "Features"
},
{ {
"fieldname": "enablePriceList", "fieldname": "enablePriceList",
"label": "Enable Price List", "label": "Enable Price List",
@ -128,6 +121,14 @@
"default": false, "default": false,
"section": "Features" "section": "Features"
}, },
{
"fieldname": "enableCouponCode",
"label": "Enable Coupon Code",
"fieldtype": "Check",
"default": false,
"section": "Features"
},
{ {
"fieldname": "fiscalYearStart", "fieldname": "fiscalYearStart",
"label": "Fiscal Year Start Date", "label": "Fiscal Year Start Date",

View File

@ -19,12 +19,23 @@
"required": true "required": true
}, },
{ {
"fieldname": "isEnabled", "fieldname": "pricingRule",
"label": "Is Enabled", "label": "Pricing Rule",
"fieldtype": "Check", "fieldtype": "Link",
"default": true, "target": "PricingRule",
"required": true, "required": true
"section": "Validity and Usage" },
{
"fieldname": "minAmount",
"label": "Min Amount",
"fieldtype": "Currency",
"section": "Amount"
},
{
"fieldname": "maxAmount",
"label": "Max Amount",
"fieldtype": "Currency",
"section": "Amount"
}, },
{ {
"fieldname": "validFrom", "fieldname": "validFrom",
@ -40,6 +51,14 @@
"required": true, "required": true,
"section": "Validity and Usage" "section": "Validity and Usage"
}, },
{
"fieldname": "isEnabled",
"label": "Is Enabled",
"fieldtype": "Check",
"default": true,
"required": true,
"section": "Validity and Usage"
},
{ {
"fieldname": "maximumUse", "fieldname": "maximumUse",
"label": "Maximum Use", "label": "Maximum Use",
@ -61,6 +80,7 @@
"quickEditFields": [ "quickEditFields": [
"name", "name",
"couponCode", "couponCode",
"pricingRule",
"validFrom", "validFrom",
"validTo", "validTo",
"maximumUse", "maximumUse",

View File

@ -19,6 +19,7 @@ import Lead from './app/Lead.json';
import LoyaltyProgram from './app/LoyaltyProgram.json'; import LoyaltyProgram from './app/LoyaltyProgram.json';
import LoyaltyPointEntry from './app/LoyaltyPointEntry.json'; import LoyaltyPointEntry from './app/LoyaltyPointEntry.json';
import CollectionRulesItems from './app/CollectionRulesItems.json'; import CollectionRulesItems from './app/CollectionRulesItems.json';
import CouponCode from './app/CouponCode.json';
import Payment from './app/Payment.json'; import Payment from './app/Payment.json';
import PaymentFor from './app/PaymentFor.json'; import PaymentFor from './app/PaymentFor.json';
import PriceList from './app/PriceList.json'; import PriceList from './app/PriceList.json';
@ -128,6 +129,7 @@ export const appSchemas: Schema[] | SchemaStub[] = [
SalesInvoiceItem as SchemaStub, SalesInvoiceItem as SchemaStub,
PurchaseInvoiceItem as SchemaStub, PurchaseInvoiceItem as SchemaStub,
SalesQuoteItem as SchemaStub, SalesQuoteItem as SchemaStub,
CouponCode as Schema,
PriceList as Schema, PriceList as Schema,
PriceListItem as SchemaStub, PriceListItem as SchemaStub,