feat: initialize project backend structure and document system specifications across all modules
This commit is contained in:
58
docs/specs/onecatalogue/voucher_code.md
Normal file
58
docs/specs/onecatalogue/voucher_code.md
Normal file
@@ -0,0 +1,58 @@
|
||||
---
|
||||
title: "Voucher Code"
|
||||
type: OpenSpec
|
||||
status: Draft
|
||||
domain: OneCatalogue
|
||||
---
|
||||
|
||||
# Voucher Code
|
||||
|
||||
## Requirement Definition
|
||||
Voucher Codes manage external partner vouchers distributed to customers. Vouchers are imported or generated with specific codes, valid periods, and serial numbers.
|
||||
|
||||
## Process Flow
|
||||
|
||||
### Pre-Conditions
|
||||
- Users must have access rights in the "Voucher Management" screen under the "OneCatalogue" module.
|
||||
- Depending on access rights, users can view, add, edit, or approve Voucher records.
|
||||
|
||||
## Business Rules
|
||||
- Voucher codes cannot be deleted if any associated voucher serial number has been redeemed.
|
||||
|
||||
### Data Schema
|
||||
|
||||
#### Voucher Statistic (View Only)
|
||||
| Field Name | Description | Logic Type |
|
||||
|---|---|---|
|
||||
| Total Voucher | Total serial numbers under this voucher code. | Integer |
|
||||
| Available Vouchers | Total valid, non-expired, ready-to-use vouchers. | Integer |
|
||||
| Redeemed Vouchers | Total successfully redeemed vouchers. | Integer |
|
||||
| Cancelled Vouchers | Total failed redemptions canceled by customers/system. | Integer |
|
||||
| Expired Vouchers | Total expired vouchers not redeemed. | Integer |
|
||||
|
||||
#### Voucher Code Detail
|
||||
| Field Name | Description | Logic Type | Constraints / Rules |
|
||||
|---|---|---|---|
|
||||
| Voucher Code | Identifier of the voucher. | String (10) | Required. |
|
||||
| Description | Description of the voucher. | String (100) | Optional. |
|
||||
| Supplier | Partner issuing the voucher. | String (Lookup) | Optional. |
|
||||
| Expiry Policy | Determines how the voucher expires. | Enum | Required. Values: Fixed Date, N days from Transaction Date, N days from Post Date, N Months from Transaction Date, N months from Post Date. |
|
||||
| Expiry Date | The absolute expiry date. | Date | Required if Expiry Policy is "Fixed Date". |
|
||||
| N Param | Parameter N for relative expiry policies. | Integer | Required if Expiry Policy requires N parameter. Must be >= 0. |
|
||||
| Generate Voucher | Indicates if OLS generates the voucher (instead of partner upload). | Boolean | Default: False. Read-only if voucher is redeemed. |
|
||||
| Quantity | Number of voucher codes to generate. | Integer | Required if Generate Voucher is True. Read-only if voucher is redeemed. |
|
||||
| This is a promo code | Indicates if this is a promo code. | Boolean | Default: False. |
|
||||
| Promotion Type | Type of discount. | Enum | Required if This is a promo code is True. Values: Fixed Percentage Discount, Fixed Monetary Value Discount, Cashback Voucher, Gift Voucher. |
|
||||
| Value | The specific value of the discount. | Decimal (14,2) | Required if Promotion Type is Fixed Monetary Value or Fixed Percentage. Must be > 0. |
|
||||
|
||||
#### Voucher Detail (View Only)
|
||||
*Displays specific serial numbers assigned to the Voucher Code.*
|
||||
|
||||
| Field Name | Description | Logic Type |
|
||||
|---|---|---|
|
||||
| Voucher Code | The associated voucher code. | String |
|
||||
| Voucher No | The serial voucher number. | String |
|
||||
| Redemption Date | Date when voucher is redeemed. | Date |
|
||||
| Expiry Date | Expiry date of the serial number. | Date |
|
||||
| Redemption Indicator | Yes or No. | Boolean |
|
||||
| Fulfillment Status | New, Issued, Fulfilled, Cancelled, Rejected. | Enum |
|
||||
Reference in New Issue
Block a user