PHPackages                             azaharizaman/nexus-payroll-mys-statutory - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. azaharizaman/nexus-payroll-mys-statutory

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

azaharizaman/nexus-payroll-mys-statutory
========================================

Malaysia statutory payroll calculations (EPF, SOCSO, EIS, PCB) for Nexus Payroll package

v0.1.0-alpha1(1mo ago)00MITPHPPHP ^8.3

Since May 5Pushed 1mo agoCompare

[ Source](https://github.com/azaharizaman/nexus-payroll-mys-statutory)[ Packagist](https://packagist.org/packages/azaharizaman/nexus-payroll-mys-statutory)[ RSS](/packages/azaharizaman-nexus-payroll-mys-statutory/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

Nexus Payroll - Malaysia Statutory Calculator
=============================================

[](#nexus-payroll---malaysia-statutory-calculator)

Country-specific statutory payroll calculations for Malaysia, implementing the `Nexus\Payroll` package's `StatutoryCalculatorInterface`.

Features
--------

[](#features)

This package calculates Malaysian statutory deductions and employer contributions:

- **EPF (Employees Provident Fund)** - Employee and employer contributions
- **SOCSO (Social Security Organization)** - Employee and employer contributions
- **EIS (Employment Insurance System)** - Employee and employer contributions
- **PCB (Income Tax Deduction)** - Monthly tax estimate (MTD)

Calculation Rules (2024/2025)
-----------------------------

[](#calculation-rules-20242025)

### EPF

[](#epf)

- **Employee:** 11% of monthly salary
- **Employer:** 12% or 13% depending on salary (12% for salary ≤ RM5,000, 13% for &gt; RM5,000)
- **Salary Ceiling:** RM30,000 per month

### SOCSO

[](#socso)

- **Contribution Categories:** Based on monthly salary ranges (RM30 to RM5,000)
- **Maximum Contribution:** RM234.30 per month (for salary &gt; RM4,950)
- Both employee and employer contributions apply

### EIS

[](#eis)

- **Employee:** 0.2% of monthly salary (capped)
- **Employer:** 0.2% of monthly salary (capped)
- **Salary Ceiling:** RM4,000 per month
- **Maximum Contribution:** RM7.90 per month

### PCB (Income Tax)

[](#pcb-income-tax)

- Calculated based on MTD (Monthly Tax Deduction) tables
- Considers tax relief, marital status, and dependents
- Progressive tax rates apply

Usage
-----

[](#usage)

```
use Nexus\PayrollMysStatutory\MalaysiaStatutoryCalculator;
use Nexus\Payroll\Contracts\PayloadInterface;

$calculator = new MalaysiaStatutoryCalculator();

// Create payload with employee and company data
$payload = new StandardPayload(
    employeeId: '01234567-89ab-cdef-0123-456789abcdef',
    employeeMetadata: [
        'tax_number' => 'SG1234567890',
        'socso_number' => '12345678',
        'epf_number' => '87654321',
        'marital_status' => 'married',
        'dependents' => 2,
    ],
    companyMetadata: [
        'company_registration_number' => '1234567-X',
        'epf_employer_number' => 'EMPLOYER123',
    ],
    grossPay: 5000.00,
    taxableIncome: 5000.00,
    basicSalary: 4000.00,
    earningsBreakdown: [
        ['code' => 'BASIC', 'name' => 'Basic Salary', 'amount' => 4000.00],
        ['code' => 'ALLOWANCE', 'name' => 'Transport Allowance', 'amount' => 1000.00],
    ],
    periodStart: new \DateTime('2025-01-01'),
    periodEnd: new \DateTime('2025-01-31'),
    ytdGrossPay: 60000.00,
    ytdTaxPaid: 1200.00,
);

// Calculate statutory deductions
$result = $calculator->calculate($payload);

// Get results
$totalEmployeeDeductions = $result->getTotalEmployeeDeductions(); // EPF + SOCSO + EIS + PCB
$totalEmployerContributions = $result->getTotalEmployerContributions(); // EPF + SOCSO + EIS
$netPay = $result->getNetPay();

// Get breakdown
$employeeDeductions = $result->getEmployeeDeductionsBreakdown();
// [
//     ['code' => 'EPF_EMPLOYEE', 'name' => 'EPF Employee Contribution', 'amount' => 550.00],
//     ['code' => 'SOCSO_EMPLOYEE', 'name' => 'SOCSO Employee Contribution', 'amount' => 24.75],
//     ['code' => 'EIS_EMPLOYEE', 'name' => 'EIS Employee Contribution', 'amount' => 7.90],
//     ['code' => 'PCB', 'name' => 'Income Tax (PCB)', 'amount' => 125.00],
// ]

$employerContributions = $result->getEmployerContributionsBreakdown();
// [
//     ['code' => 'EPF_EMPLOYER', 'name' => 'EPF Employer Contribution', 'amount' => 650.00],
//     ['code' => 'SOCSO_EMPLOYER', 'name' => 'SOCSO Employer Contribution', 'amount' => 84.75],
//     ['code' => 'EIS_EMPLOYER', 'name' => 'EIS Employer Contribution', 'amount' => 7.90],
// ]
```

Integration with Nexus Payroll
------------------------------

[](#integration-with-nexus-payroll)

Register the calculator in your service provider:

```
use Nexus\PayrollMysStatutory\MalaysiaStatutoryCalculator;
use App\Services\Payroll\TenantAwareStatutoryCalculator;

public function register(): void
{
    $this->app->singleton(StatutoryCalculatorInterface::class, function ($app) {
        $tenantCalculator = new TenantAwareStatutoryCalculator();

        // Register Malaysia calculator
        $tenantCalculator->registerCalculator('MY', new MalaysiaStatutoryCalculator());

        // Set as default for Malaysian tenants
        $tenantCalculator->setDefaultCountryCode('MY');

        return $tenantCalculator;
    });
}
```

Required Employee Metadata Fields
---------------------------------

[](#required-employee-metadata-fields)

- `epf_number` - EPF membership number
- `socso_number` - SOCSO registration number
- `tax_number` - Income tax reference number
- `marital_status` - 'single' or 'married' (for PCB calculation)
- `dependents` - Number of dependents (for PCB calculation)

Required Company Metadata Fields
--------------------------------

[](#required-company-metadata-fields)

- `company_registration_number` - SSM registration number
- `epf_employer_number` - EPF employer reference number

Official References
-------------------

[](#official-references)

- **EPF:**
- **SOCSO:**
- **EIS:**
- **LHDN (Inland Revenue):**

Notes
-----

[](#notes)

- Calculations are based on 2024/2025 statutory rates
- EPF, SOCSO, and EIS rates may change annually - update accordingly
- PCB calculations use simplified MTD tables - consult tax advisor for complex scenarios
- Foreign workers may have different contribution rules

📖 Documentation
---------------

[](#-documentation)

### Package Documentation

[](#package-documentation)

- [Getting Started Guide](docs/getting-started.md)
- [API Reference](docs/api-reference.md)
- [Integration Guide](docs/integration-guide.md)
- [Examples](docs/examples/)

### Additional Resources

[](#additional-resources)

- `IMPLEMENTATION_SUMMARY.md` - Implementation progress
- `REQUIREMENTS.md` - Requirements
- `TEST_SUITE_SUMMARY.md` - Tests
- `VALUATION_MATRIX.md` - Valuation

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance93

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity34

Early-stage or recently created project

 Bus Factor1

Top contributor holds 76.6% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

36d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/117408?v=4)[Azahari Zaman](/maintainers/azaharizaman)[@azaharizaman](https://github.com/azaharizaman)

---

Top Contributors

[![azaharizaman](https://avatars.githubusercontent.com/u/117408?v=4)](https://github.com/azaharizaman "azaharizaman (461 commits)")[![Copilot](https://avatars.githubusercontent.com/in/1143301?v=4)](https://github.com/Copilot "Copilot (139 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (2 commits)")

### Embed Badge

![Health badge](/badges/azaharizaman-nexus-payroll-mys-statutory/health.svg)

```
[![Health](https://phpackages.com/badges/azaharizaman-nexus-payroll-mys-statutory/health.svg)](https://phpackages.com/packages/azaharizaman-nexus-payroll-mys-statutory)
```

###  Alternatives

[winteragency/acf-native-fields

An interface to move native WordPress fields and options into ACF for a cleaner editor layout

2511.9k](/packages/winteragency-acf-native-fields)[slince/shipment-tracking

A flexible and awesome shipment tracking library for several carriers like DHL eCommerce, USPS, YanWen Express, Epacket, E包裹, E特快, 国际EMS, 快递100

271.6k4](/packages/slince-shipment-tracking)[lnear/html

Utility functions for rendering html

261.1k](/packages/lnear-html)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
