PHPackages                             tourze/salary-manage-bundle - 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. [Admin Panels](/categories/admin)
4. /
5. tourze/salary-manage-bundle

ActiveSymfony-bundle[Admin Panels](/categories/admin)

tourze/salary-manage-bundle
===========================

企业薪酬管理 Symfony Bundle - 提供薪资计算、税务处理、社保管理的完整解决方案

0.1.0(6mo ago)00MITPHPPHP ^8.2CI passing

Since Nov 14Pushed 6mo agoCompare

[ Source](https://github.com/tourze/salary-manage-bundle)[ Packagist](https://packagist.org/packages/tourze/salary-manage-bundle)[ RSS](/packages/tourze-salary-manage-bundle/feed)WikiDiscussions master Synced today

READMEChangelog (2)Dependencies (35)Versions (3)Used By (0)

Salary Manage Bundle
====================

[](#salary-manage-bundle)

[中文](README.zh-CN.md) | [English](README.md)

A comprehensive enterprise salary management Symfony Bundle that provides complete solutions for salary calculation, tax processing, and social insurance management.

Features
--------

[](#features)

- **💰 Salary Calculation**: Flexible salary calculation engine with configurable rules and support for various pay components
- **🧾 Tax Management**: Automated tax calculation with support for multiple tax brackets and regional tax policies
- **🛡️ Social Insurance**: Comprehensive social insurance calculation including pension, medical, unemployment, work injury, and maternity insurance
- **📊 Reporting**: Advanced reporting system with multiple report types and export capabilities
- **🔄 Workflow**: Approval workflow system for salary calculations and payments
- **💳 Payment Processing**: Integrated payment processing with multiple payment methods and status tracking
- **📁 Data Import/Export**: Flexible data import and export functionality for integration with external systems
- **🎯 Performance Integration**: Performance data integration for performance-based salary calculations
- **🕒 Attendance Integration**: Attendance data integration for attendance-based salary calculations

Requirements
------------

[](#requirements)

- PHP ^8.2
- Symfony ^7.3
- Doctrine ORM ^3.0

Installation
------------

[](#installation)

```
composer require tourze/salary-manage-bundle
```

Configuration
-------------

[](#configuration)

Enable the bundle in your Symfony application:

```
// config/bundles.php
return [
    // ...
    Tourze\SalaryManageBundle\SalaryManageBundle::class => ['all' => true],
];
```

Basic Usage
-----------

[](#basic-usage)

### Salary Calculation

[](#salary-calculation)

```
use Tourze\SalaryManageBundle\Service\SalaryCalculatorService;
use Tourze\SalaryManageBundle\Entity\Employee;
use Tourze\SalaryManageBundle\Entity\PayrollPeriod;

// Get the salary calculator service
$calculator = $container->get(SalaryCalculatorService::class);

// Create employee and payroll period
$employee = new Employee();
$employee->setEmployeeNumber('EMP001');
$employee->setName('John Doe');
$employee->setBaseSalary('5000.00');

$period = new PayrollPeriod();
$period->setStartDate(new DateTime('2024-01-01'));
$period->setEndDate(new DateTime('2024-01-31'));

// Calculate salary
$calculation = $calculator->calculate($employee, $period);

// Get calculation results
$grossSalary = $calculation->getGrossSalary();
$netSalary = $calculation->getNetSalary();
$totalDeductions = $calculation->getTotalDeductions();
```

### Tax Calculation

[](#tax-calculation)

```
use Tourze\SalaryManageBundle\Service\TaxCalculatorService;

$taxCalculator = $container->get(TaxCalculatorService::class);

$taxResult = $taxCalculator->calculateTax($employee, $grossSalary);

$incomeTax = $taxResult->getIncomeTax();
$socialInsuranceTax = $taxResult->getSocialInsuranceTax();
$totalTax = $taxResult->getTotalTax();
```

### Social Insurance Calculation

[](#social-insurance-calculation)

```
use Tourze\SalaryManageBundle\Service\SocialInsuranceCalculatorService;

$insuranceCalculator = $container->get(SocialInsuranceCalculatorService::class);

$insuranceResult = $insuranceCalculator->calculate($employee, $grossSalary);

$pensionInsurance = $insuranceResult->getPensionInsurance();
$medicalInsurance = $insuranceResult->getMedicalInsurance();
$unemploymentInsurance = $insuranceResult->getUnemploymentInsurance();
```

### Report Generation

[](#report-generation)

```
use Tourze\SalaryManageBundle\Service\ReportGeneratorService;

$reportGenerator = $container->get(ReportGeneratorService::class);

// Generate monthly salary report
$report = $reportGenerator->generateReport([
    'type' => 'monthly_salary',
    'period' => $period,
    'department' => 'IT'
]);

// Export to Excel
$excelFile = $reportGenerator->exportToExcel($report, 'salary_report.xlsx');
```

### Data Import

[](#data-import)

```
use Tourze\SalaryManageBundle\Service\DataImportExportService;

$dataService = $container->get(DataImportExportService::class);

// Import employee data from CSV
$result = $dataService->importEmployees('employees.csv', [
    'employee_number' => 0,
    'name' => 1,
    'department' => 2,
    'base_salary' => 3
]);
```

Configuration
-------------

[](#configuration-1)

The bundle provides flexible configuration options:

```
# config/packages/salary_manage.yaml
salary_manage:
    # Regional configuration
    regional:
        default_region: 'CN'
        regions:
            CN:
                currency: 'CNY'
                tax_year: 'calendar'
                social_insurance_rates:
                    pension: 0.08
                    medical: 0.02
                    unemployment: 0.005

    # Calculation rules
    calculation:
        overtime_rate: 1.5
        weekend_rate: 2.0
        holiday_rate: 3.0

    # Approval workflow
    approval:
        enabled: true
        required_approvers: 2
        auto_approve_threshold: 1000
```

Entities
--------

[](#entities)

### Core Entities

[](#core-entities)

- **Employee**: Employee information and salary details
- **PayrollPeriod**: Payroll period definition
- **SalaryCalculation**: Salary calculation results
- **SalaryItem**: Individual salary components
- **TaxBracket**: Tax bracket configuration
- **TaxResult**: Tax calculation results
- **SocialInsuranceResult**: Social insurance calculation results
- **Deduction**: Various deduction types
- **PaymentRecord**: Payment processing records
- **ApprovalRequest**: Approval workflow requests

### Enums

[](#enums)

- **SalaryItemType**: Types of salary items (base, overtime, bonus, etc.)
- **DeductionType**: Types of deductions (tax, insurance, etc.)
- **PaymentStatus**: Payment processing status
- **PaymentMethod**: Payment methods (bank transfer, cash, etc.)
- **ApprovalStatus**: Approval workflow status
- **InsuranceType**: Social insurance types
- **ReportType**: Available report types

Services
--------

[](#services)

### Core Services

[](#core-services)

- **SalaryCalculatorService**: Main salary calculation engine
- **TaxCalculatorService**: Tax calculation service
- **SocialInsuranceCalculatorService**: Social insurance calculation
- **ReportGeneratorService**: Report generation and export
- **ApprovalWorkflowService**: Approval workflow management
- **PaymentProcessorService**: Payment processing
- **DataImportExportService**: Data import and export
- **ExternalSystemService**: External system integration

### Interfaces

[](#interfaces)

All services implement corresponding interfaces for better testability and flexibility:

- `SalaryCalculatorInterface`
- `TaxCalculatorInterface`
- `SocialInsuranceCalculatorInterface`
- `ReportGeneratorInterface`
- `ApprovalWorkflowInterface`
- `PaymentProcessorInterface`
- `DataImportExportInterface`

Exception Handling
------------------

[](#exception-handling)

The bundle provides specific exception types for better error handling:

- **SalaryCalculationException**: Salary calculation errors
- **TaxCalculationException**: Tax calculation errors
- **InsuranceCalculationException**: Social insurance calculation errors
- **PaymentProcessingException**: Payment processing errors
- **ApprovalWorkflowException**: Approval workflow errors
- **DataValidationException**: Data validation errors
- **DataAccessException**: Data access errors
- **ReportGeneratorException**: Report generation errors

Testing
-------

[](#testing)

The bundle includes comprehensive tests:

```
# Run all tests
php vendor/bin/phpunit

# Run specific test suites
php vendor/bin/phpunit tests/Service/
php vendor/bin/phpunit tests/Entity/
php vendor/bin/phpunit tests/Exception/
```

Integration Examples
--------------------

[](#integration-examples)

### EasyAdmin Integration

[](#easyadmin-integration)

The bundle provides EasyAdmin integration for quick admin interface setup:

```
// config/packages/easy_admin.yaml
easy_admin:
    entities:
        - Tourze\SalaryManageBundle\Entity\Employee
        - Tourze\SalaryManageBundle\Entity\SalaryCalculation
        - Tourze\SalaryManageBundle\Entity\PayrollPeriod
```

### External System Integration

[](#external-system-integration)

```
use Tourze\SalaryManageBundle\Interface\ExternalSystemInterface;

class CustomERPSystem implements ExternalSystemInterface
{
    public function syncEmployeeData(Employee $employee): bool
    {
        // Sync employee data to external ERP system
        return true;
    }

    public function getAttendanceData(Employee $employee, \DateTime $startDate, \DateTime $endDate): array
    {
        // Get attendance data from external system
        return [];
    }
}
```

Performance Considerations
--------------------------

[](#performance-considerations)

- **Caching**: The bundle uses Symfony cache component for calculation results
- **Batch Processing**: Support for batch salary calculations
- **Lazy Loading**: Entities use lazy loading for optimal performance
- **Query Optimization**: Optimized database queries for large datasets

Security
--------

[](#security)

- **Input Validation**: All inputs are validated using Symfony validator
- **Data Encryption**: Sensitive data is encrypted in database
- **Access Control**: Support for role-based access control
- **Audit Trail**: Complete audit trail for all operations

Contributing
------------

[](#contributing)

Please read our contributing guidelines before submitting pull requests.

License
-------

[](#license)

This bundle is licensed under the MIT License. See the LICENSE file for details.

Support
-------

[](#support)

For support and documentation:

- 📚 [Documentation](docs/)
- 🐛 [Issue Tracker](https://github.com/tourze/salary-manage-bundle/issues)
- 💬 [Discussions](https://github.com/tourze/salary-manage-bundle/discussions)

Changelog
---------

[](#changelog)

See [CHANGELOG.md](CHANGELOG.md) for details about changes in each version.

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance66

Regular maintenance activity

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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

Every ~34 days

Total

2

Last Release

198d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/13899502?v=4)[tourze](/maintainers/tourze)[@tourze](https://github.com/tourze)

---

Top Contributors

[![tourze](https://avatars.githubusercontent.com/u/13899502?v=4)](https://github.com/tourze "tourze (1 commits)")

---

Tags

symfonybundlehrmanagementtaxpayrollsalarysocial-insurance

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/tourze-salary-manage-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/tourze-salary-manage-bundle/health.svg)](https://phpackages.com/packages/tourze-salary-manage-bundle)
```

###  Alternatives

[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.9M387](/packages/easycorp-easyadmin-bundle)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.5k5.9M737](/packages/sylius-sylius)[oro/platform

Business Application Platform (BAP)

645143.5k115](/packages/oro-platform)[2lenet/crudit-bundle

The easy like Crud'it Bundle.

1616.4k14](/packages/2lenet-crudit-bundle)[open-dxp/opendxp

Content &amp; Product Management Framework (CMS/PIM)

9421.6k61](/packages/open-dxp-opendxp)[contao/core-bundle

Contao Open Source CMS

1231.6M2.8k](/packages/contao-core-bundle)

PHPackages © 2026

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