diff --git a/schemas/app/AccountingSettings.json b/schemas/app/AccountingSettings.json index e7d09d60..377bbde2 100644 --- a/schemas/app/AccountingSettings.json +++ b/schemas/app/AccountingSettings.json @@ -79,13 +79,6 @@ "default": false, "section": "Features" }, - { - "fieldname": "enableCouponCode", - "label": "Enable Coupon Code", - "fieldtype": "Check", - "default": false, - "section": "Features" - }, { "fieldname": "enablePriceList", "label": "Enable Price List", @@ -128,6 +121,14 @@ "default": false, "section": "Features" }, + { + + "fieldname": "enableCouponCode", + "label": "Enable Coupon Code", + "fieldtype": "Check", + "default": false, + "section": "Features" + }, { "fieldname": "fiscalYearStart", "label": "Fiscal Year Start Date", diff --git a/schemas/app/CouponCode.json b/schemas/app/CouponCode.json index a31b2372..91ee1621 100644 --- a/schemas/app/CouponCode.json +++ b/schemas/app/CouponCode.json @@ -19,12 +19,23 @@ "required": true }, { - "fieldname": "isEnabled", - "label": "Is Enabled", - "fieldtype": "Check", - "default": true, - "required": true, - "section": "Validity and Usage" + "fieldname": "pricingRule", + "label": "Pricing Rule", + "fieldtype": "Link", + "target": "PricingRule", + "required": true + }, + { + "fieldname": "minAmount", + "label": "Min Amount", + "fieldtype": "Currency", + "section": "Amount" + }, + { + "fieldname": "maxAmount", + "label": "Max Amount", + "fieldtype": "Currency", + "section": "Amount" }, { "fieldname": "validFrom", @@ -40,6 +51,14 @@ "required": true, "section": "Validity and Usage" }, + { + "fieldname": "isEnabled", + "label": "Is Enabled", + "fieldtype": "Check", + "default": true, + "required": true, + "section": "Validity and Usage" + }, { "fieldname": "maximumUse", "label": "Maximum Use", @@ -61,6 +80,7 @@ "quickEditFields": [ "name", "couponCode", + "pricingRule", "validFrom", "validTo", "maximumUse", diff --git a/schemas/schemas.ts b/schemas/schemas.ts index aef9ff6d..d6dbd45d 100644 --- a/schemas/schemas.ts +++ b/schemas/schemas.ts @@ -19,6 +19,7 @@ import Lead from './app/Lead.json'; import LoyaltyProgram from './app/LoyaltyProgram.json'; import LoyaltyPointEntry from './app/LoyaltyPointEntry.json'; import CollectionRulesItems from './app/CollectionRulesItems.json'; +import CouponCode from './app/CouponCode.json'; import Payment from './app/Payment.json'; import PaymentFor from './app/PaymentFor.json'; import PriceList from './app/PriceList.json'; @@ -128,6 +129,7 @@ export const appSchemas: Schema[] | SchemaStub[] = [ SalesInvoiceItem as SchemaStub, PurchaseInvoiceItem as SchemaStub, SalesQuoteItem as SchemaStub, + CouponCode as Schema, PriceList as Schema, PriceListItem as SchemaStub,