Actions
Task #154
openTarget Master and Target Assignment to Employee
Start date:
03/02/2026
Due date:
03/02/2026 (3 days late)
% Done:
0%
Estimated time:
Description
Target Master
This module is used to define business targets for a specific period. Targets include target name, start date, end date, and target amount. These targets can later be assigned to employees to track performance and achievement.
Table
target_master
- id (PK) INT AUTO_INCREMENT Unique target ID
- target_name VARCHAR(150) Name of the target (Example: Jan to July, Feb Target)
- from_date DATE Target start date
- to_date DATE Target end date
- target_amount DECIMAL(12,2) Target amount
- enterprise_id (FK) INT References enterprise_master.id
- is_active BOOLEAN DEFAULT TRUE Active / inactive
- created_at DATETIME Record created date
- updated_at DATETIME Record updated date
Validations
- Target name required
- From date required
- To date required
- Target amount required
- enterprise_id required (session based)
Date
To date must be greater than From date
Amount
- Must be numeric
- Must be greater than 0
- Cannot be empty
Duplicate
- Prevent duplicate target name within same enterprise
Edit
Allow edit:
- target_name
- from_date
- to_date
- target_amount
- is_active
Do NOT allow edit:
- enterprise_id
Delete
- Soft delete only
- is_active = FALSE
Target Assignment to Employee
This module is used to assign targets to employees for a specific period. This helps track employee performance against assigned targets.
Table
employee_target_assignment
- id (PK) INT AUTO_INCREMENT Unique assignment ID
- employee_id (FK) INT References employee_master.id
- target_id (FK) INT References target_master.id
- target_amount DECIMAL(12,2) Assigned target amount
- from_date DATE Assignment start date
- to_date DATE Assignment end date
- enterprise_id (FK) INT References enterprise_master.id
- is_active BOOLEAN DEFAULT TRUE Active / inactive
- created_at DATETIME Record created date
Validations
- employee_id required
- target_id required
- target_amount required
- from_date required
- to_date required
- enterprise_id required
Date
- To date must be greater than From date
- Assignment date must be within target date range
Amount
- Must be numeric
- Must be greater than 0
- Cannot exceed target_master.target_amount
Duplicate
- Prevent duplicate assignment
Employee
- employee must exist in employee_master
- employee must belong to same enterprise
Target
- target must exist in target_master
- target must be active
Edit
Allow edit:
- target_amount
- from_date
- to_date
- is_active
Do NOT allow edit:
- employee_id
- target_id
- enterprise_id
Delete
- Soft delete only
- is_active = FALSE
Actions