tbl_branchmaster

1 rows


Description

Module: HRMS Branch Management
Purpose: Central repository for all company branch locations with comprehensive geographical, compliance, and operational configurations.
Data: Each row represents a physical branch location with complete address details, compliance settings, and regional configurations.
Process Usage:
- Defines organizational structure and geographical presence of the company.
- Configures branch-specific compliance rules for statutory deductions (PF, PT, ESIC, LWF).
- Manages regional settings like timezones and location-based services.
Key Points:
- Comprehensive branch profiling with both operational and compliance dimensions.
- Regional statutory configuration for automated payroll processing.
- Integration with geo-location services and timezone management.
Business Impact: Ensures accurate payroll processing, compliance with regional labor laws, and efficient multi-location operations management.

Columns

Column Type Size Nulls Auto Default Children Parents Comments
branchid bigserial 19 nextval('tbl_branchmaster_branchid_seq'::regclass)
tbl_branchmasterhistory.branchid Implied Constraint R
tbl_employeestructure.branchid Implied Constraint R
tbl_esicaccountdeductionmapping.branchid Implied Constraint R
tbl_generalpolicy.branchid Implied Constraint R
tbl_gratuityaccountmapping.branchid Implied Constraint R
tbl_gratuitycalculation.branchid Implied Constraint R
tbl_holidaybranchmaster.branchid Implied Constraint R
tbl_lwfaccountdeductionmapping.branchid Implied Constraint R
tbl_pfaccountdeductionmapping.branchid Implied Constraint R
tbl_ptaccountdeductionmapping.branchid Implied Constraint R
tbl_todaysthought.branchid Implied Constraint R
tbl_transferrequisitionmaster.branch fk_tbl_transferrequisitionmaster_branch R
view_employeedetail.branchid Implied Constraint R

Primary key
Format: Long (auto-increment)
Used as: Unique identifier for each branch location.

companyid int4 10 null
tbl_companymaster.companyid fk__tbl_branc__compa__5b2227ff R

FK: public.tbl_company.company_id
Purpose: Associates the branch with its parent company in multi-company setups.
Usage: Multi-tenant architecture support and company-level access control.

stateid int8 19 null
tbl_statemaster.stateid fk__tbl_branc__state__5a2e03c6 R

FK: public.tbl_state_master.state_id
Purpose: Links branch to its respective state for regional compliance and reporting.
Dependency: Essential for state-specific labor law applications and statutory calculations.

branchname varchar 60 null

Format: String
Purpose: Official name of the branch location for identification and display.
Examples: “Medha Plant”, “GANDHINAGAR Office”, “Mumbai Sales Branch”
UI Usage: Displayed in employee profiles, reports, and organizational charts.

branchaddress varchar 300 null

Format: String
Purpose: Complete physical address of the branch location.
Usage: Official correspondence, employee records, compliance documentation.

branchphone varchar 15 null

Format: String
Purpose: Primary contact telephone number for the branch.

branchfax varchar 15 null

Format: String
Purpose: Fax number for official communications (legacy support).

branchemail varchar 100 null

Format: String
Purpose: Official email address for the branch location.

branchcity varchar 100 null

Format: String
Purpose: City name where the branch is located (display purpose).
Usage: Reporting, filtering, and address display alongside cityId reference.

branchurl varchar 100 null

Format: String (URL)
Purpose: Website or specific URL associated with the branch.

branchcreatedate timestamp 29,6 null
branchstatus bool 1 true

Flag Type: Boolean
True: Branch is active and operational
False: Branch is inactive (temporarily closed or suspended)
Workflow: Controls branch availability for new employee assignments and active operations.

branchisdelete bool 1 false

Flag Type: Boolean (Soft Delete)
True: Branch is marked as deleted and hidden from active use
False: Branch is available in the system
Data Retention: Preserves historical data for employees and transactions.

staffemailid varchar 100 null

Format: String
Purpose: Contact email for branch staff or administration.

latitude numeric 0 null
longitude numeric 0 null
login_radius numeric 0 null
moment_radius numeric 0 null
google_map_api_key varchar 50 null

Format: String (Google Maps API Key)
Purpose: Branch-specific Google Maps API key for location services and geo-fencing.
Business Logic:
- If provided: Uses branch-specific API key for Google services
- If empty/null: Falls back to system default key
Usage: Attendance tracking, geo-fencing, location-based services, map integrations.

punch_access int4 10 7
timezone varchar 100 '''Asia/Calcutta'''::character varying

Format: String (IANA Timezone)
Purpose: Defines the timezone for the branch location.
Examples: “Asia/Kolkata”, “America/New_York”, “Europe/London”
Usage: Attendance calculations, shift management, report timing, and system notifications.

createddate timestamp 29,6 null
createdby varchar 500 null
modifiedby varchar 500 null
modifieddate timestamp 29,6 null
countryid int8 19 null

FK: public.tbl_country_master.country_id
Purpose: Identifies the country where the branch is located.
Usage: International compliance, currency settings, and multi-country reporting.

cityid int8 19 null

FK: public.tbl_city_master.city_id
Purpose: Specific city location reference for precise geographical mapping.
Business Use: Local compliance rules, travel policies, and regional HR practices.

centralstateid int8 19 null

FK: public.tbl_state_master.state_id
Purpose: Reference to central/head office state for consolidated reporting.
Usage: Group-level compliance reporting and centralized statutory management.

iscomplianceenable bool 1 null

Flag Type: Boolean
True: Branch is configured for statutory compliance processing
False: Branch operates as non-compliance/normal branch
Business Impact: Determines whether PF, PT, ESIC, LWF calculations apply to branch employees.

pf varchar 255 null

Format: String (Reference/Code)
Purpose: Provident Fund configuration and registration details for the branch.
Usage: PF calculation, compliance reporting, and statutory filing.

pt varchar 255 null

Format: String (Reference/Code)
Purpose: Professional Tax registration and configuration for the branch.
Usage: PT deduction calculations based on state-specific slabs.

esic varchar 255 null

Format: String (Reference/Code)
Purpose: Employees’ State Insurance Corporation registration details.
Usage: ESIC contribution calculations for eligible employees.

lwf varchar 255 null

Format: String (Reference/Code)
Purpose: Labor Welfare Fund registration and configuration.
Usage: LWF contribution calculations where applicable.

pincode varchar 50 null

Format: String
Purpose: Postal/ZIP code of the branch location.
Usage: Address validation, regional classification, and delivery services.

countryname varchar 70 null

Format: String
Purpose: Display name of the country (denormalized for performance).
Usage: UI displays, reports, and exports without requiring country table joins.

statename varchar 100 null

Format: String
Purpose: Display name of the state (denormalized for performance).
Usage: Quick reference in interfaces and simplified reporting.

ptid int8 19 null

FK: public.tbl_pt_master.pt_id
Purpose: Reference to Professional Tax master data for calculation rules.

lwfid int8 19 null

FK: public.tbl_lwf_master.lwf_id
Purpose: Reference to Labor Welfare Fund master data for calculation rules.

esicid int8 19 null

FK: public.tbl_esic_master.esic_id
Purpose: Reference to ESIC master data for contribution rules and rates.

isesicapplicableonbranch bool 1 false

Flag Type: Boolean
True: ESIC scheme is applicable to employees in this branch
False: ESIC not applicable (based on branch location and business type)
Business Logic: Override setting for ESIC applicability regardless of employee eligibility.

Indexes

Constraint Name Type Sort Column(s)
tbl_branchmaster_pk_tbl_branchmaster Primary key Asc branchid

Relationships