Table of Contents
1. Overview
The Benefit Template form allows defining reusable benefit configuration templates for Advance Plans through the Benefit Template Mapping. Each template specifies the plan structure type, eligibility criteria, settlement modes, benefit items applied on, slab-based benefit values, and stone/diamond discount or rate overrides. These templates are assigned to Advance Plans to drive benefit calculation at the time of plan enrollment and maturity settlement.
| Attribute | Value |
|---|---|
| Form Name | Benefit Template |
| Module | Layaway / EMA Plans |
| Form Type | Master Configuration |
| Primary Table | emaADPPlanBenefitTemplateHDR |
| Approval Workflow | Yes – MasterDataValueID_ApprovalStatus on HDR |
| Multi-Location Support | No |
| Soft Delete | Yes – Active flag on HDR |
2. Database
SioniqAdminDB
3. Primary Tables
| Table Name | Type | Description |
|---|---|---|
| emaADPPlanBenefitTemplateHDR | HDR | Stores header-level details of the benefit template — name, description, plan structure type, eligibility type, wastage/making limits, and approval status. |
| emaADPPlanBenefitTemplateSettlementModeDTL | DTL | Stores the selected settlement mode(s) for the template. One row per selected settlement mode. |
| emaADPPlanBenefitTemplateBenefitAppliedOnDTL | DTL | Stores the benefit items selected in the "Benefit Applied On" grid. One row per selected benefit item, with optional priority order. |
| emaADPPlanBenefitTemplateSlabDTL | DTL | Stores slab-wise benefit value definitions. One row per slab. Contains range fields (installment, days, collection), deferral amount, waiver percentages, bonus values, and discount percentages. |
| emaADPPlanBenefitTemplateDiamondStoneDiscountDTL | DTL | Stores diamond discount percent at Stone Group level. |
| emaADPPlanBenefitTemplateDiamondStoneCategoryDiscountDTL | DTL | Stores diamond discount percent at Stone Category level. |
| emaADPPlanBenefitTemplateDiamondStoneSubCategoryDiscountDTL | DTL | Stores diamond discount percent at Stone Sub-Category level. |
| emaADPPlanBenefitTemplateDiamondStoneAttributeDiscountDTL | DTL | Stores diamond discount percent at Stone Attribute level. |
| emaADPPlanBenefitTemplateDiamondStoneArticleDiscountDTL | DTL | Stores diamond discount percent at Stone Article level. |
| emaADPPlanBenefitTemplateStoneRateDTL | DTL | Stores fixed stone rate at Stone Group level. |
| emaADPPlanBenefitTemplateStoneCategoryRateDTL | DTL | Stores fixed stone rate at Stone Category level. |
| emaADPPlanBenefitTemplateStoneSubCategoryRateDTL | DTL | Stores fixed stone rate at Stone Sub-Category level. |
| emaADPPlanBenefitTemplateStoneAttributeDiscountDTL | DTL | Stores fixed stone rate at Stone Attribute level. |
| emaADPPlanBenefitTemplateStoneArticleRateDTL | DTL | Stores fixed stone rate at Stone Article level. |
Table Relationship Diagram
Transaction Flow Diagram
4. Reference / Lookup Tables
| Table Name | Used For |
|---|---|
| admMasterDataValueDTL | Source for Plan Structure Type, Benefit Eligibility Type, Settlement Mode, Benefit Applied On, Stone Setup Type, Stone Attribute Type, and Approval Status dropdowns. |
| invStone | Source for Stone Group dropdown in Diamond Discount and Stone Rate panels. |
| invStoneCategory | Source for Stone Category dropdown; filtered by selected Stone Group. |
| invStoneSubCategory | Source for Stone Sub-Category dropdown; filtered by selected Stone Category. |
| invStoneAttribute | Source for Stone Attribute dropdown; filtered by selected Attribute Type. |
| invStoneArticleCatalog | Source for Stone Article dropdown in Diamond Discount and Stone Rate panels. |
5. Form Controls & Functionalities
5.1 Header Level Fields
Active (Toggle)
Controls the active/inactive status of the benefit template record.
Control Properties:- Default Value: Checked (True)
- User Entry: User can Toggle On/Off
- Mandatory: No
- Toggled On (True): Template is Active and available for assignment to ADP Plans.
- Toggled Off (False): Template is Inactive and cannot be assigned to new plans.
- emaADPPlanBenefitTemplateHDR →
Active(bit)
Name (Textbox)
Unique name to identify the benefit template.
Control Properties:- Default Value: Empty
- User Entry: Manual input by user
- Mandatory: Yes
- Allowed Characters: Alphanumeric
Must be unique. Duplicate name should trigger an inline error: "Template name already exists."
Saved in & as:- emaADPPlanBenefitTemplateHDR →
Name(nvarchar)
Description (Textbox)
Optional free-text description of the benefit template.
Control Properties:- Default Value: Empty
- User Entry: Manual input by user
- Mandatory: No
- Allowed Characters: Alphanumeric
- emaADPPlanBenefitTemplateHDR →
Decription(nvarchar)
Plan Structure Type (Single Selection Dropdown)
Defines how the ADP plan collects contributions — by fixed installments or open contributions.
Control Properties:- Default Value: —
- Data Source: admMasterDataValueDTL
- Filter Condition:
- Active = True, listed from MasterDataValueID
- MasterDataCategory = ADPPlanStructureType
- User Entry: Selection from dropdown
- Mandatory: Yes
- Options:
- Installment-Based — Plan collects contributions in fixed periodic installments.
- Open Contribution — Plan allows flexible contribution amounts at any time.
- If Installment-Based → Slab section shows From Installment / To Installment fields.
- If Open Contribution → Rotation field becomes visible/applicable.
- emaADPPlanBenefitTemplateHDR →
MasterDataValueID_ADPPlanStructureType
Benefit Eligibility Type (Single Selection Dropdown)
Determines the criteria used to evaluate benefit eligibility within each slab.
Control Properties:- Default Value: —
- Data Source: admMasterDataValueDTL
- Filter Condition:
- Active = True, listed from MasterDataValueID
- MasterDataCategory = ADPBenefitEligibilityType
- User Entry: Selection from dropdown
- Mandatory: Yes
- Options:
- Installment Count — Benefit slab is defined by From/To installment number range.
- Days From Joining — Benefit slab is defined by From/To days range from plan enrollment date.
- Collection Count — Benefit slab is defined by From/To collection count range.
- Controls which range fields are shown in the Slab section:
- Installment Count → Shows From Installment, To Installment, Min Days Completed.
- Days From Joining → Shows From Days, To Days, Min Installments Paid.
- Collection Count → Shows From Collection, To Collection, Min Days Completed.
- emaADPPlanBenefitTemplateHDR →
MasterDataValueID_ADPBenefitEligibilityType
Settlement Mode (Multi-Selection Dropdown)
Specifies one or more modes through which plan benefits are settled at maturity.
Control Properties:- Default Value: —
- Data Source: admMasterDataValueDTL
- Filter Condition:
- Active = True, listed from MasterDataValueID
- MasterDataCategory = ADPBenefitSettlementMode
- User Entry: Multi-selection from dropdown
- Mandatory: Yes
- Options:
- Invoice Adjustment — Benefit applied directly against invoice at billing.
- Customer Advance Credit — Benefit credited to customer's advance account.
- Order Advance Adjustment — Benefit adjusted against an existing order advance.
- Collection Adjustment — Benefit adjusted within the collection itself.
- Enrollment Benefit — Benefit granted at the time of plan enrollment.
- CDU Collection Adjustment — Benefit adjustment through CDU channel collection.
- emaADPPlanBenefitTemplateSettlementModeDTL →
MasterDataValueID_ADPBenefitSettlementMode(one row per selected mode)
Rotation (Textbox)
Defines the rotation count applicable for the plan template.
Control Properties:- Default Value: Empty
- User Entry: Manual input by user
- Mandatory: No
- Allowed Characters: Numeric (integer)
- emaADPPlanBenefitTemplateHDR →
Rotation(int)
Min Wastage % (Textbox)
Minimum wastage percentage allowed for plan benefit calculation.
Control Properties:- Default Value: Empty
- User Entry: Manual input by user
- Mandatory: No
- Allowed Characters: Numeric (decimal)
Must be less than or equal to Max Wastage %.
Behavior:Enabled when "Wastage Waiver" is selected in Benefit Applied On.
Saved in & as:- emaADPPlanBenefitTemplateHDR →
MinWastagePercent(decimal)
Max Wastage % (Textbox)
Maximum wastage percentage allowed for plan benefit calculation.
Control Properties:- Default Value: Empty
- User Entry: Manual input by user
- Mandatory: No
- Allowed Characters: Numeric (decimal)
Must be greater than or equal to Min Wastage %.
Behavior:Enabled when "Wastage Waiver" is selected in Benefit Applied On.
Saved in & as:- emaADPPlanBenefitTemplateHDR →
MaxWastagePercent(decimal)
Min Making Amount (Textbox)
Minimum making charge amount allowed for plan benefit calculation.
Control Properties:- Default Value: Empty
- User Entry: Manual input by user
- Mandatory: No
- Allowed Characters: Numeric (decimal)
Must be less than or equal to Max Making Amount.
Behavior:Enabled when "Making Charge Waiver" is selected in Benefit Applied On.
Saved in & as:- emaADPPlanBenefitTemplateHDR →
MinMakingAmount(decimal)
Max Making Amount (Textbox)
Maximum making charge amount allowed for plan benefit calculation.
Control Properties:- Default Value: Empty
- User Entry: Manual input by user
- Mandatory: No
- Allowed Characters: Numeric (decimal)
Must be greater than or equal to Min Making Amount.
Behavior:Enabled when "Making Charge Waiver" is selected in Benefit Applied On.
Saved in & as:- emaADPPlanBenefitTemplateHDR →
MaxMakingAmount(decimal)
5.2 Benefit Applied On (Checkbox Grid)
Benefit Applied On (Checkbox Grid)
A grid listing all available benefit types. User selects which benefit types apply to this template and optionally sets a priority order for applicable items.
Control Properties:- Default Value: Unchecked (False) for each row
- User Entry: User can Check/Uncheck per row; enter Priority for priority-eligible rows
- Mandatory: At least one benefit item must be selected before Save
- Data Source: admMasterDataValueDTL
- Filter Condition:
- Active = True, listed from MasterDataValueID
- MasterDataCategory = ADPBenefitAppliedOn
- Columns: Checkbox, Applied On (label), Priority (input — applicable rows only)
- Bonus Percentage — No priority input
- Bonus Amount — No priority input
- Bonus Weight — No priority input
- Making Charge Waiver — No priority input
- Wastage Waiver — No priority input
- Tax Waiver — No priority input
- Interest Benefit — No priority input
- Stone Value Discount — Priority input shown. Mandatory when checked. Must be a unique integer (e.g., 1, 2, 3). Duplicate priority values not allowed.
- Diamond Value Discount — Priority input shown. Mandatory when checked. Must be a unique integer (e.g., 1, 2, 3). Duplicate priority values not allowed.
- Fixed Stone Rate — Priority input shown. Mandatory when checked. Must be a unique integer (e.g., 1, 2, 3). Duplicate priority values not allowed.
- Metal Rate Discount — No priority input
- Average Metal Rate — No priority input
- Checking Wastage Waiver → Enables Min Wastage % and Max Wastage % fields in header.
- Checking Making Charge Waiver → Enables Min Making Amount and Max Making Amount fields in header.
- Checking Stone Value Discount or Diamond Value Discount or Fixed Stone Rate → Makes the corresponding Stone/Diamond Discount panel available in the Slab section.
- emaADPPlanBenefitTemplateBenefitAppliedOnDTL →
MasterDataValueID_ADPBenefitAppliedOn,PriorityOrder(one row per checked item)
5.3 Benefit Slab Section
The Benefit Slab section allows defining multiple slab ranges with associated benefit values. The range fields displayed depend on the selected Benefit Eligibility Type. Multiple slabs can be added using the Add button.
From Installment (Textbox)
Starting installment number of the slab range.
Control Properties:- Default Value: Empty
- User Entry: Manual input by user
- Mandatory: Yes (when Benefit Eligibility Type = Installment Count)
- Allowed Characters: Numeric (integer)
Visible only when Benefit Eligibility Type = Installment Count.
Validation:Must be less than To Installment. Slabs must not overlap.
Saved in & as:- emaADPPlanBenefitTemplateSlabDTL →
FromInstallmentNo
To Installment (Textbox)
Ending installment number of the slab range.
Control Properties:- Default Value: Empty
- User Entry: Manual input by user
- Mandatory: Yes (when Benefit Eligibility Type = Installment Count)
- Allowed Characters: Numeric (integer)
Visible only when Benefit Eligibility Type = Installment Count.
Validation:Must be greater than From Installment. Slabs must not overlap.
Saved in & as:- emaADPPlanBenefitTemplateSlabDTL →
ToInstallmentNo
From Days (Textbox)
Starting day number (from plan joining date) of the slab range.
Control Properties:- Default Value: Empty
- User Entry: Manual input by user
- Mandatory: Yes (when Benefit Eligibility Type = Days From Joining)
- Allowed Characters: Numeric (integer)
Visible only when Benefit Eligibility Type = Days From Joining.
Validation:Must be less than To Days. Slabs must not overlap.
Saved in & as:- emaADPPlanBenefitTemplateSlabDTL →
FromDays
To Days (Textbox)
Ending day number (from plan joining date) of the slab range.
Control Properties:- Default Value: Empty
- User Entry: Manual input by user
- Mandatory: Yes (when Benefit Eligibility Type = Days From Joining)
- Allowed Characters: Numeric (integer)
Visible only when Benefit Eligibility Type = Days From Joining.
Validation:Must be greater than From Days. Slabs must not overlap.
Saved in & as:- emaADPPlanBenefitTemplateSlabDTL →
ToDays
From Collection (Textbox)
Starting collection count of the slab range.
Control Properties:- Default Value: Empty
- User Entry: Manual input by user
- Mandatory: Yes (when Benefit Eligibility Type = Collection Count)
- Allowed Characters: Numeric (integer)
Visible only when Benefit Eligibility Type = Collection Count.
Validation:Must be less than To Collection. Slabs must not overlap.
Saved in & as:- emaADPPlanBenefitTemplateSlabDTL →
FromCollectionCount
To Collection (Textbox)
Ending collection count of the slab range.
Control Properties:- Default Value: Empty
- User Entry: Manual input by user
- Mandatory: Yes (when Benefit Eligibility Type = Collection Count)
- Allowed Characters: Numeric (integer)
Visible only when Benefit Eligibility Type = Collection Count.
Validation:Must be greater than From Collection. Slabs must not overlap.
Saved in & as:- emaADPPlanBenefitTemplateSlabDTL →
ToCollectionCount
Min Days Completed (Textbox)
Minimum number of days the customer must have been enrolled before this slab benefit applies.
Control Properties:- Default Value: Empty
- User Entry: Manual input by user
- Mandatory: No
- Allowed Characters: Numeric (integer)
Visible when Benefit Eligibility Type = Installment Count or Collection Count.
Saved in & as:- emaADPPlanBenefitTemplateSlabDTL →
MinDaysCompleted
Min Installments Paid (Textbox)
Minimum number of installments the customer must have paid for this slab benefit to apply.
Control Properties:- Default Value: Empty
- User Entry: Manual input by user
- Mandatory: No
- Allowed Characters: Numeric (integer)
Visible only when Benefit Eligibility Type = Days From Joining.
Saved in & as:- emaADPPlanBenefitTemplateSlabDTL →
MinInstallmentsPaid
Deferral Amount (Textbox)
Amount that can be deferred/adjusted for the customer under this slab.
Control Properties:- Default Value: Empty
- User Entry: Manual input by user
- Mandatory: No
- Allowed Characters: Numeric (decimal)
- emaADPPlanBenefitTemplateSlabDTL →
DeferralAmount
Bonus Amount (Textbox)
Fixed bonus amount awarded to the customer under this slab.
Control Properties:- Default Value: Empty
- User Entry: Manual input by user
- Mandatory: Yes (when Benefit Applied On includes Bonus Amount)
- Allowed Characters: Numeric (decimal)
- emaADPPlanBenefitTemplateSlabDTL →
BonusAmount
Bonus Percentage (Textbox)
Bonus awarded as a percentage of the plan value under this slab.
Control Properties:- Default Value: Empty
- User Entry: Manual input by user
- Mandatory: Yes (when Benefit Applied On includes Bonus Percent)
- Allowed Characters: Numeric (decimal)
- emaADPPlanBenefitTemplateSlabDTL →
BonusPercentage
Bonus Weight (Textbox)
Bonus awarded in weight units (e.g., grams) under this slab.
Control Properties:- Default Value: Empty
- User Entry: Manual input by user
- Mandatory: Yes (when Benefit Applied On includes Bonus Weight)
- Allowed Characters: Numeric (decimal)
- emaADPPlanBenefitTemplateSlabDTL →
BonusWeight
Interest Percentage (Textbox)
Interest benefit percentage applicable for this slab.
Control Properties:- Default Value: Empty
- User Entry: Manual input by user
- Mandatory: Yes (when Benefit Applied On includes Interest Benefit)
- Allowed Characters: Numeric (decimal)
- emaADPPlanBenefitTemplateSlabDTL →
InterestPercent
Metal Rate Discount Percent (Textbox)
Discount percentage applied on metal rate under this slab.
Control Properties:- Default Value: Empty
- User Entry: Manual input by user
- Mandatory: Yes (when Benefit Applied On includes Metal Rate Discount)
- Allowed Characters: Numeric (decimal)
- emaADPPlanBenefitTemplateSlabDTL →
MetalRateDiscountPercent
Stone Value Discount % (Textbox)
Discount percentage applied on Total stone value under this slab.
Control Properties:- Default Value: Empty
- User Entry: Manual input by user
- Mandatory: Yes (when Benefit Applied On includes Stone Value Discount)
- Allowed Characters: Numeric (decimal)
- emaADPPlanBenefitTemplateSlabDTL →
StoneValueDiscountPercent
Waiver Wastage Percent (Textbox)
Wastage percentage to be waived under this slab.
Control Properties:- Default Value: Empty
- User Entry: Manual input by user
- Mandatory: Yes (when Benefit Applied On includes Wastage Waiver)
- Allowed Characters: Numeric (decimal)
- emaADPPlanBenefitTemplateSlabDTL →
WaiverWastagePercent
Waiver Making Percent (Textbox)
Making charge percentage to be waived under this slab.
Control Properties:- Default Value: Empty
- User Entry: Manual input by user
- Mandatory: Yes (when Benefit Applied On includes Making Charge Waiver)
- Allowed Characters: Numeric (decimal)
- emaADPPlanBenefitTemplateSlabDTL →
WaiverMakingPercent
Add (Slab) (Button)
Adds the currently entered slab data as a row in the slab grid.
Control Properties:- User Entry: Manual click by user
- Mandatory: No — at least one slab row is required before Save
- Validates all mandatory slab fields before adding.
- Validates slab range does not overlap with existing slabs.
- On success: appends slab as an inline row in the slab grid with a Remove option.
- On failure: shows inline validation error.
- Multiple slabs can be added (multiple adding supported).
5.4 Diamond Value Discount Panel
Visible only when Diamond Value Discount is checked in Benefit Applied On. The panel layout changes based on the selected Stone Setup Type.
Stone Setup Type (Single Selection Dropdown)
Determines the level at which diamond discount is configured.
Control Properties:- Default Value: —
- Data Source: admMasterDataValueDTL
- Filter Condition:
- Active = True, listed from MasterDataValueID
- MasterDataCategory = VendorStoneRateSetUpType
- User Entry: Selection from dropdown
- Mandatory: Yes (when Diamond Value Discount is selected)
- Options:
- Stone Group — Discount defined at the stone group (type) level.
- Stone Category — Discount defined at the category level within a stone group.
- Stone Sub Category — Discount defined at the sub-category level.
- Stone Attribute Wise — Discount defined per stone attribute (e.g., color, clarity).
- Stone Article — Discount defined per individual stone article catalog entry.
- Stone Group → Shows: Stone Group (multi-select), Diamond Discount %.
- Stone Category → Shows: Stone Group (multi-select), Stone Category (multi-select), Diamond Discount %.
- Stone Sub Category → Shows: Stone Group (multi-select), Stone Category (multi-select), Stone Sub Category (multi-select), Diamond Discount %.
- Stone Attribute Wise → Shows: Stone Attribute Type (single-select), Stone Group (multi-select), Stone Category (multi-select), Stone Sub Category (multi-select), Attribute Value (multi-select), Diamond Discount %.
- Stone Article → Shows: Stone Article (multi-select), Diamond Discount %. All other fields are for filtration only.
- emaADPPlanBenefitTemplateDiamondStoneDiscountDTL →
MasterDataValueID_VendorStoneRateSetUpType(Stone Group) - emaADPPlanBenefitTemplateDiamondStoneCategoryDiscountDTL →
MasterDataValueID_VendorStoneRateSetUpType(Stone Category) - emaADPPlanBenefitTemplateDiamondStoneSubCategoryDiscountDTL →
MasterDataValueID_VendorStoneRateSetUpType(Stone Sub Category) - emaADPPlanBenefitTemplateDiamondStoneAttributeDiscountDTL →
MasterDataValueID_VendorStoneRateSetUpType(Stone Attribute Wise) - emaADPPlanBenefitTemplateDiamondStoneArticleDiscountDTL →
MasterDataValueID_VendorStoneRateSetUpType(Stone Article)
Stone Group (Diamond Panel) (Multi-Selection Dropdown)
Selects the stone group(s) for which the diamond discount applies.
Control Properties:- Default Value: —
- Data Source: invStone & invStoneArticleCatalog
- Filter Condition:
- Active = True, listed from StoneID
- Linked Stone Article Configuration
- MasterDataValueID_Stone = Diamond
- User Entry: Multi-selection from dropdown
- Mandatory: Yes
- emaADPPlanBenefitTemplateDiamondStoneDiscountDTL →
StoneID(Stone Group) - emaADPPlanBenefitTemplateDiamondStoneCategoryDiscountDTL →
StoneID(Stone Category) - emaADPPlanBenefitTemplateDiamondStoneSubCategoryDiscountDTL →
StoneID(Stone Sub Category) - emaADPPlanBenefitTemplateDiamondStoneAttributeDiscountDTL →
StoneID(Stone Attribute Wise) - emaADPPlanBenefitTemplateDiamondStoneArticleDiscountDTL →
StoneID(Stone Article)
Stone Category (Diamond Panel) (Multi-Selection Dropdown)
Selects the stone category(ies) under the selected stone group for which the diamond discount applies.
Control Properties:- Default Value: —
- Data Source: invStoneCategory & invStoneArticleCatalog
- Filter Condition:
- Active = True, listed from StoneCategoryID
- Filtered by selected StoneID (Stone Group)
- Linked Stone Article Configuration
- MasterDataValueID_Stone = Diamond
- User Entry: Multi-selection from dropdown
- Mandatory: Yes (when Stone Setup Type = Stone Category, Stone Sub Category, or Stone Attribute Wise)
Visible only when Stone Setup Type = Stone Category, Stone Sub Category, or Stone Attribute Wise.
Saved in & as:- emaADPPlanBenefitTemplateDiamondStoneCategoryDiscountDTL →
StoneCategoryID(Stone Category) - emaADPPlanBenefitTemplateDiamondStoneSubCategoryDiscountDTL →
StoneCategoryID(Stone Sub Category) - emaADPPlanBenefitTemplateDiamondStoneAttributeDiscountDTL →
StoneCategoryID(Stone Attribute Wise)
Stone Sub Category (Diamond Panel) (Multi-Selection Dropdown)
Selects the stone sub-category(ies) under the selected stone category for which the diamond discount applies.
Control Properties:- Default Value: —
- Data Source: invStoneSubCategory & invStoneArticleCatalog
- Filter Condition:
- Active = True, listed from StoneSubCategoryID
- Filtered by selected StoneCategoryID (Stone Category)
- Linked Stone Article Configuration
- MasterDataValueID_Stone = Diamond
- User Entry: Multi-selection from dropdown
- Mandatory: Yes (when Stone Setup Type = Stone Sub Category or Stone Attribute Wise)
Visible only when Stone Setup Type = Stone Sub Category or Stone Attribute Wise.
Saved in & as:- emaADPPlanBenefitTemplateDiamondStoneSubCategoryDiscountDTL →
StoneSubCategoryID(Stone Sub Category) - emaADPPlanBenefitTemplateDiamondStoneAttributeDiscountDTL →
StoneSubCategoryID(Stone Attribute Wise)
Stone Attribute Type (Diamond Panel) (Single Selection Dropdown)
Selects the attribute type (e.g., Color, Clarity) used to further classify the stone for diamond discount.
Control Properties:- Default Value: —
- Data Source: admMasterDataValueDTL
- Filter Condition:
- Active = True, listed from MasterDataValueID
- MasterDataCategory = StoneAttributeType (1 to 15 dynamic categories)
- User Entry: Single selection from dropdown
- Mandatory: Yes (when Stone Setup Type = Stone Attribute Wise)
Visible only when Stone Setup Type = Stone Attribute Wise. Drives the values available in the Stone Attribute dropdown.
Saved in & as:- emaADPPlanBenefitTemplateDiamondStoneAttributeDiscountDTL →
MasterDataValueID_StoneAttributeType
Stone Attribute (Diamond Panel) (Multi-Selection Dropdown)
Selects the specific attribute value(s) (e.g., D color, VVS clarity) under the selected attribute type for diamond discount.
Control Properties:- Default Value: —
- Data Source: invStoneAttribute & invStoneArticleCatalog
- Filter Condition:
- Active = True, listed from StoneAttributeID
- Filtered by selected MasterDataValueID_StoneAttributeType
- Linked Stone Article Configuration
- MasterDataValueID_Stone = Diamond
- User Entry: Multi-selection from dropdown
- Mandatory: Yes (when Stone Setup Type = Stone Attribute Wise)
Visible only when Stone Setup Type = Stone Attribute Wise.
Saved in & as:- emaADPPlanBenefitTemplateDiamondStoneAttributeDiscountDTL →
StoneAttributeID(one row per selection)
Stone Article (Diamond Panel) (Multi-Selection Dropdown)
Selects the specific stone article catalog entry(ies) for which the diamond discount applies.
Control Properties:- Default Value: —
- Data Source: invStoneArticleCatalog
- Filter Condition:
- Active = True, listed from StoneArticleCatalogID
- Filtered by selected StoneID, StoneCategoryID, StoneSubCategoryID (for filtration only)
- Linked Stone Article Configuration
- MasterDataValueID_Stone = Diamond
- User Entry: Multi-selection from dropdown
- Mandatory: Yes (when Stone Setup Type = Stone Article)
Visible only when Stone Setup Type = Stone Article.
Saved in & as:- emaADPPlanBenefitTemplateDiamondStoneArticleDiscountDTL →
StoneArticleCatalogID(one row per selection)
Diamond Discount Percentage (Textbox)
The discount percentage to be applied on diamond/stone value.
Control Properties:- Default Value: Empty
- User Entry: Manual input by user
- Mandatory: Yes
- Allowed Characters: Numeric (decimal)
- Respective Diamond Discount DTL →
DiamondDiscountPercent
5.5 Fixed Stone Rate Panel
Visible only when Fixed Stone Rate is checked in Benefit Applied On. Follows the same Stone Setup Type conditional layout as the Diamond Value Discount Panel — except the value field is Stone Rate (amount) instead of Diamond Discount Percent. No MasterDataValueID_Stone = Diamond filter condition applies for this panel.
Stone Setup Type (Stone Rate Panel) (Single Selection Dropdown)
Determines the level at which the fixed stone rate is configured.
Control Properties:- Default Value: —
- Data Source: admMasterDataValueDTL
- Filter Condition:
- Active = True, listed from MasterDataValueID
- MasterDataCategory = VendorStoneRateSetUpType
- User Entry: Selection from dropdown
- Mandatory: Yes (when Fixed Stone Rate is selected)
- Options:
- Stone Group — Rate defined at the stone group (type) level.
- Stone Category — Rate defined at the category level within a stone group.
- Stone Sub Category — Rate defined at the sub-category level.
- Stone Attribute Wise — Rate defined per stone attribute (e.g., color, clarity).
- Stone Article — Rate defined per individual stone article catalog entry.
- Stone Group → Shows: Stone Group (multi-select), Stone Rate.
- Stone Category → Shows: Stone Group (multi-select), Stone Category (multi-select), Stone Rate.
- Stone Sub Category → Shows: Stone Group (multi-select), Stone Category (multi-select), Stone Sub Category (multi-select), Stone Rate.
- Stone Attribute Wise → Shows: Stone Attribute Type (single-select), Stone Group (multi-select), Stone Category (multi-select), Stone Sub Category (multi-select), Attribute Value (multi-select), Stone Rate.
- Stone Article → Shows: Stone Article (multi-select), Stone Rate. All other fields are for filtration only.
- emaADPPlanBenefitTemplateStoneRateDTL →
MasterDataValueID_VendorStoneRateSetUpType(Stone Group) - emaADPPlanBenefitTemplateStoneCategoryRateDTL →
MasterDataValueID_VendorStoneRateSetUpType(Stone Category) - emaADPPlanBenefitTemplateStoneSubCategoryRateDTL →
MasterDataValueID_VendorStoneRateSetUpType(Stone Sub Category) - emaADPPlanBenefitTemplateStoneAttributeDiscountDTL →
MasterDataValueID_VendorStoneRateSetUpType(Stone Attribute Wise) - emaADPPlanBenefitTemplateStoneArticleRateDTL →
MasterDataValueID_VendorStoneRateSetUpType(Stone Article)
Stone Group (Stone Rate Panel) (Multi-Selection Dropdown)
Selects the stone group(s) for which the fixed stone rate applies.
Control Properties:- Default Value: —
- Data Source: invStone & invStoneArticleCatalog
- Filter Condition:
- Active = True, listed from StoneID
- Linked Stone Article Configuration
- User Entry: Multi-selection from dropdown
- Mandatory: Yes
- emaADPPlanBenefitTemplateStoneRateDTL →
StoneID(Stone Group) - emaADPPlanBenefitTemplateStoneCategoryRateDTL →
StoneID(Stone Category) - emaADPPlanBenefitTemplateStoneSubCategoryRateDTL →
StoneID(Stone Sub Category) - emaADPPlanBenefitTemplateStoneAttributeDiscountDTL →
StoneID(Stone Attribute Wise) - emaADPPlanBenefitTemplateStoneArticleRateDTL →
StoneID(Stone Article)
Stone Category (Stone Rate Panel) (Multi-Selection Dropdown)
Selects the stone category(ies) under the selected stone group for which the fixed stone rate applies.
Control Properties:- Default Value: —
- Data Source: invStoneCategory & invStoneArticleCatalog
- Filter Condition:
- Active = True, listed from StoneCategoryID
- Filtered by selected StoneID (Stone Group)
- Linked Stone Article Configuration
- User Entry: Multi-selection from dropdown
- Mandatory: Yes (when Stone Setup Type = Stone Category, Stone Sub Category, or Stone Attribute Wise)
Visible only when Stone Setup Type = Stone Category, Stone Sub Category, or Stone Attribute Wise.
Saved in & as:- emaADPPlanBenefitTemplateStoneCategoryRateDTL →
StoneCategoryID(Stone Category) - emaADPPlanBenefitTemplateStoneSubCategoryRateDTL →
StoneCategoryID(Stone Sub Category) - emaADPPlanBenefitTemplateStoneAttributeDiscountDTL →
StoneCategoryID(Stone Attribute Wise)
Stone Sub Category (Stone Rate Panel) (Multi-Selection Dropdown)
Selects the stone sub-category(ies) under the selected stone category for which the fixed stone rate applies.
Control Properties:- Default Value: —
- Data Source: invStoneSubCategory & invStoneArticleCatalog
- Filter Condition:
- Active = True, listed from StoneSubCategoryID
- Filtered by selected StoneCategoryID (Stone Category)
- Linked Stone Article Configuration
- User Entry: Multi-selection from dropdown
- Mandatory: Yes (when Stone Setup Type = Stone Sub Category or Stone Attribute Wise)
Visible only when Stone Setup Type = Stone Sub Category or Stone Attribute Wise.
Saved in & as:- emaADPPlanBenefitTemplateStoneSubCategoryRateDTL →
StoneSubCategoryID(Stone Sub Category) - emaADPPlanBenefitTemplateStoneAttributeDiscountDTL →
StoneSubCategoryID(Stone Attribute Wise)
Stone Attribute Type (Stone Rate Panel) (Single Selection Dropdown)
Selects the attribute type (e.g., Color, Clarity) used to further classify the stone for fixed stone rate.
Control Properties:- Default Value: —
- Data Source: admMasterDataValueDTL
- Filter Condition:
- Active = True, listed from MasterDataValueID
- MasterDataCategory = StoneAttributeType (1 to 15 dynamic categories)
- User Entry: Single selection from dropdown
- Mandatory: Yes (when Stone Setup Type = Stone Attribute Wise)
Visible only when Stone Setup Type = Stone Attribute Wise. Drives the values available in the Stone Attribute dropdown.
Saved in & as:- emaADPPlanBenefitTemplateStoneAttributeDiscountDTL →
MasterDataValueID_StoneAttributeType
Stone Attribute (Stone Rate Panel) (Multi-Selection Dropdown)
Selects the specific attribute value(s) (e.g., D color, VVS clarity) under the selected attribute type for fixed stone rate.
Control Properties:- Default Value: —
- Data Source: invStoneAttribute & invStoneArticleCatalog
- Filter Condition:
- Active = True, listed from StoneAttributeID
- Filtered by selected MasterDataValueID_StoneAttributeType
- Linked Stone Article Configuration
- User Entry: Multi-selection from dropdown
- Mandatory: Yes (when Stone Setup Type = Stone Attribute Wise)
Visible only when Stone Setup Type = Stone Attribute Wise.
Saved in & as:- emaADPPlanBenefitTemplateStoneAttributeDiscountDTL →
StoneAttributeID(one row per selection)
Stone Article (Stone Rate Panel) (Multi-Selection Dropdown)
Selects the specific stone article catalog entry(ies) for which the fixed stone rate applies.
Control Properties:- Default Value: —
- Data Source: invStoneArticleCatalog
- Filter Condition:
- Active = True, listed from StoneArticleCatalogID
- Filtered by selected StoneID, StoneCategoryID, StoneSubCategoryID (for filtration only)
- Linked Stone Article Configuration
- User Entry: Multi-selection from dropdown
- Mandatory: Yes (when Stone Setup Type = Stone Article)
Visible only when Stone Setup Type = Stone Article.
Saved in & as:- emaADPPlanBenefitTemplateStoneArticleRateDTL →
StoneArticleCatalogID(one row per selection)
Stone Rate (Textbox)
Fixed rate amount to be applied on the stone for benefit calculation.
Control Properties:- Default Value: Empty
- User Entry: Manual input by user
- Mandatory: Yes
- Allowed Characters: Numeric (decimal)
- Respective Stone Rate DTL →
StoneRate
5.6 Form Action Buttons
Save (Button)
Validates all form data and persists the benefit template record.
Control Properties:- User Entry: Manual click by user
- Mandatory: Yes
- Validates all mandatory fields across header, slab, and stone/diamond panels.
- Inserts HDR record + all applicable DTL records.
- Sets ApprovalStatus = Pending on HDR.
- On failure: displays inline validation errors without closing the form.
Clear (Button)
Resets all form fields to their default state without saving.
Control Properties:- User Entry: Manual click by user
- Mandatory: No
- Clears all header fields, slab grid rows, and stone/diamond panel entries.
- No data is saved. Form returns to blank Add mode.
6. Table View
The Table View is a Searchable Table View. Users can search and filter records by column values. Results update dynamically based on search input.
6.1 Column List
| # | Column Header | Source Field | Remarks |
|---|---|---|---|
| 1 | Name | emaADPPlanBenefitTemplateHDR.Name | |
| 2 | Description | emaADPPlanBenefitTemplateHDR.Decription | |
| 3 | Plan Structure Type | admMasterDataValueDTL (via MasterDataValueID_ADPPlanStructureType) | Display label |
| 4 | Benefit Eligibility Type | admMasterDataValueDTL (via MasterDataValueID_ADPBenefitEligibilityType) | Display label |
| 5 | Settlement Mode | emaADPPlanBenefitTemplateSettlementModeDTL (via MasterDataValueID_ADPBenefitSettlementMode) | Display label; comma-separated if multiple |
| 6 | Rotation | emaADPPlanBenefitTemplateHDR.Rotation | |
| 7 | Approval Status | admMasterDataValueDTL (via MasterDataValueID_ApprovalStatus) | Display label |
| 8 | Active | emaADPPlanBenefitTemplateHDR.Active | Active / Inactive |
| 9 | Actions | — | Add, Edit, Delete, Export, Export All buttons |
6.2 Add Button
- Accessible only to users with Add permission in Roles and Rights Configuration.
- If no Add rights: button is hidden or disabled based on Rights Configuration.
- Opens blank form in Add mode.
6.3 Edit Button
- Accessible only to users with Edit permission in Roles and Rights Configuration.
- If no Edit rights: button is hidden or disabled based on Rights Configuration.
- Available only when Approval Status = Pending or Rejected.
- Disabled if Active = False.
Edit Scenario 1 — No Linked Transactions:
- All fields are fully editable. No restrictions apply.
Edit Scenario 2 — Linked Transactions Exist:
- Plan Structure Type and Benefit Eligibility Type are locked (read-only).
- Name, Description, Settlement Mode, Min/Max Wastage %, Min/Max Making Amount are editable.
- Slab ranges cannot be reduced below already-utilized ranges. (Confirm with team)
- Benefit Applied On Grid — Edit Restrictions:
- For all benefit items where Checkbox = True (already checked):
- Checkbox is not editable (locked — cannot be unchecked).
- Priority Input (applicable for Stone Value Discount, Diamond Value Discount, Fixed Stone Rate) is editable. Duplicate priority values not allowed.
- For all benefit items where Checkbox = False (not checked):
- Checkbox is editable (can be checked).
- Priority Input is editable once checkbox is checked. Duplicate priority values not allowed.
- For all benefit items where Checkbox = True (already checked):
- On Save: HDR updated in place; all DTL records deleted and re-inserted.
6.4 Delete Button
- Accessible only to users with Delete permission in Roles and Rights Configuration.
- If no Delete rights: button is hidden or disabled based on Rights Configuration.
- Shows confirmation prompt before deletion.
- Disabled if already Inactive (Active = False).
- Dependency Check Before Deletion:
- System checks for active ADP Plans linked to this template.
- If dependencies exist: deletion blocked — "Benefit Template cannot be deleted as it is linked with active plans."
- If no dependencies:
Active = Falseset on HDR only. All child DTL records retained. Hard delete not performed.
6.5 Export Button
- Exports currently filtered/paginated records.
- File format: e.g., Excel / CSV
- Exported columns match Table View columns.
6.6 Export All Button
- Exports all records where Active = True.
- File format: e.g., Excel / CSV
- Exported columns match Table View columns.
7. Functional Specifications
7.1 Save Behavior (Add Mode)
On Save, the system inserts records in the following sequence:
- emaADPPlanBenefitTemplateHDR — 1 row. ApprovalStatus set to Pending.
- emaADPPlanBenefitTemplateSettlementModeDTL — One row per selected settlement mode.
- emaADPPlanBenefitTemplateBenefitAppliedOnDTL — One row per checked benefit item.
- emaADPPlanBenefitTemplateSlabDTL — One row per slab added.
- If Diamond Value Discount is selected → Insert into applicable Diamond Discount DTL (one row per stone selection, based on Setup Type level).
- If Fixed Stone Rate is selected → Insert into applicable Stone Rate DTL (one row per stone selection, based on Setup Type level).
7.2 Edit Save Behavior
- HDR record updated in place.
- All DTL records (SettlementMode, BenefitAppliedOn, Slab, Diamond/Stone DTLs) deleted and re-inserted in dependency order.
- ApprovalStatus reset to Pending.
7.3 Common Validations
- Name is mandatory and must be unique.
- Plan Structure Type and Benefit Eligibility Type are mandatory.
- At least one Settlement Mode must be selected.
- At least one Benefit Applied On item must be checked.
- At least one Slab row must be added before Save.
- Min Wastage % must be ≤ Max Wastage %.
- Min Making Amount must be ≤ Max Making Amount.
- Slab ranges (From/To Installment, Days, or Collection) must not overlap across rows.
- From value must always be less than To value within the same slab row.
- Stone Setup Type is mandatory when Diamond Value Discount or Fixed Stone Rate is selected.
- Diamond Discount % / Stone Rate is mandatory when Stone Setup Type is defined.
7.4.1 HDR Table — Value on Save
Table: emaADPPlanBenefitTemplateHDR — One row per template.
| Column | Value on Save |
|---|---|
AdvancePlanBenefitTemplateID | New GUID (system generated) |
Name | User input |
Decription | User input or NULL |
MasterDataValueID_ADPPlanStructureType | FK → admMasterDataValueDTL.MasterDataValueID |
MasterDataValueID_ADPBenefitEligibilityType | FK → admMasterDataValueDTL.MasterDataValueID |
Rotation | User input or NULL |
MinWastagePercent | User input or NULL |
MaxWastagePercent | User input or NULL |
MinMakingAmount | User input or NULL |
MaxMakingAmount | User input or NULL |
Active | 1 = Active (default) |
MasterDataValueID_ApprovalStatus | Pending |
7.4.2 Settlement Mode DTL — Value on Save
Table: emaADPPlanBenefitTemplateSettlementModeDTL — One row per selected settlement mode.
| Column | Value on Save |
|---|---|
AdvancePlanBenefitTemplateSettlementModeID | New GUID (system generated) |
AdvancePlanBenefitTemplateID | FK → emaADPPlanBenefitTemplateHDR |
MasterDataValueID_ADPBenefitSettlementMode | FK → admMasterDataValueDTL.MasterDataValueID (one row per mode) |
7.4.3 Benefit Applied On DTL — Value on Save
Table: emaADPPlanBenefitTemplateBenefitAppliedOnDTL — One row per checked benefit item.
| Column | Value on Save |
|---|---|
ADPPlanBenefitTemplateBenefitAppliedOnID | New GUID (system generated) |
AdvancePlanBenefitTemplateID | FK → emaADPPlanBenefitTemplateHDR |
MasterDataValueID_ADPBenefitAppliedOn | FK → admMasterDataValueDTL.MasterDataValueID |
PriorityOrder | User input or NULL (when priority is applicable for that item) |
7.4.4 Slab DTL — Value on Save
Table: emaADPPlanBenefitTemplateSlabDTL — One row per slab. Columns populated vary based on Benefit Eligibility Type.
| Column | Installment Count | Days From Joining | Collection Count |
|---|---|---|---|
AdvancePlanBenefitTemplateSlabID | New GUID | New GUID | New GUID |
AdvancePlanBenefitTemplateID | FK → HDR | FK → HDR | FK → HDR |
FromInstallmentNo | User input | NULL | NULL |
ToInstallmentNo | User input | NULL | NULL |
MinDaysCompleted | User input or NULL | NULL | User input or NULL |
FromDays | NULL | User input | NULL |
ToDays | NULL | User input | NULL |
MinInstallmentsPaid | NULL | User input or NULL | NULL |
FromCollectionCount | NULL | NULL | User input |
ToCollectionCount | NULL | NULL | User input |
DeferralAmount | User input or NULL | ||
WaiverWastagePercent | User input or NULL (when Wastage Waiver selected) | ||
WaiverMakingPercent | User input or NULL (when Making Charge Waiver selected) | ||
InterestPercent | User input or NULL (when Interest Benefit selected) | ||
MetalRateDiscountPercent | User input or NULL (when Metal Rate Discount selected) | ||
StoneValueDiscountPercent | User input or NULL (when Stone Value Discount selected) | ||
BonusAmount | User input or NULL (when Bonus Amount selected) | ||
BonusPercentage | User input or NULL (when Bonus Percent selected) | ||
BonusWeight | User input or NULL (when Bonus Weight selected) | ||
7.4.5 Diamond Discount DTLs — Value on Save
Saved only when Diamond Value Discount is selected in Benefit Applied On. The specific DTL table used depends on Stone Setup Type.
| Stone Setup Type | Target Table | Key Columns Populated |
|---|---|---|
| Stone Group | emaADPPlanBenefitTemplateDiamondStoneDiscountDTL | StoneID, DiamondDiscountPercent |
| Stone Category | emaADPPlanBenefitTemplateDiamondStoneCategoryDiscountDTL | StoneID, StoneCategoryID, DiamondDiscountPercent |
| Stone Sub Category | emaADPPlanBenefitTemplateDiamondStoneSubCategoryDiscountDTL | StoneID, StoneCategoryID, StoneSubCategoryID, DiamondDiscountPercent |
| Stone Attribute Wise | emaADPPlanBenefitTemplateDiamondStoneAttributeDiscountDTL | StoneID, StoneCategoryID, StoneSubCategoryID, MasterDataValueID_StoneAttributeType, StoneAttributeID, DiamondDiscountPercent |
| Stone Article | emaADPPlanBenefitTemplateDiamondStoneArticleDiscountDTL | StoneArticleCatalogID, DiamondDiscountPercent |
7.4.6 Stone Rate DTLs — Value on Save
Saved only when Fixed Stone Rate is selected in Benefit Applied On. The specific DTL table used depends on Stone Setup Type.
| Stone Setup Type | Target Table | Key Columns Populated |
|---|---|---|
| Stone Group | emaADPPlanBenefitTemplateStoneRateDTL | StoneID, StoneRate |
| Stone Category | emaADPPlanBenefitTemplateStoneCategoryRateDTL | StoneID, StoneCategoryID, StoneRate |
| Stone Sub Category | emaADPPlanBenefitTemplateStoneSubCategoryRateDTL | StoneID, StoneCategoryID, StoneSubCategoryID, StoneRate |
| Stone Attribute Wise | emaADPPlanBenefitTemplateStoneAttributeDiscountDTL | StoneID, StoneCategoryID, StoneSubCategoryID, MasterDataValueID_StoneAttributeType, StoneAttributeID, StoneRate |
| Stone Article | emaADPPlanBenefitTemplateStoneArticleRateDTL | StoneArticleCatalogID, StoneRate |