centrex / laravel-accounting
管理laravel中的账户
v1.4.1
2024-09-29 12:17 UTC
Requires
- php: ^8.1|^8.2|^8.3
- illuminate/database: ^10.0|^11.0
- illuminate/support: ^10.0|^11.0
- moneyphp/money: ^4.0
Requires (Dev)
- larastan/larastan: ^2.0
- laravel/pint: ^1.0
- nunomaduro/collision: ^7.8
- orchestra/testbench: ^8.8
- pestphp/pest: ^2.30
- pestphp/pest-plugin-arch: ^2.0
- pestphp/pest-plugin-laravel: ^2.0
- phpstan/extension-installer: ^1.1
- phpstan/phpstan-deprecation-rules: ^1.0
- phpstan/phpstan-phpunit: ^1.0
- rector/rector: ^1.1
- spatie/laravel-ray: ^1.26
README
此软件包提供了一种简单的即插即用特性,用于管理特定模型累积余额。它还可以用于创建基于双重入账的项目,其中您可能希望在一个日记账中记贷,在另一个日记账中记借。
内容
安装
您可以通过composer安装此软件包
composer require centrex/laravel-accounting
您可以使用以下命令发布和运行迁移
php artisan vendor:publish --tag="accounting-migrations"
php artisan migrate
您可以选择使用以下命令发布配置文件
php artisan vendor:publish --tag="accounting-config"
使用方法
// 标准会计系统等式
// 标准会计报表
'statements' => [
'balance_sheet' => [
'accumulated' => true,
'name' => 'Balance Sheet',
'cash_only' => false,
'accounts' => ['Asset', 'Liability', 'Equity', 'Revenue', 'Expense']
],
'income' => [
'name' => 'Income',
'cash_only' => true,
'accounts' => ['Revenue', 'Expense', 'Other',]
],
'cash_flow' => [
'name' => 'Cash Flow',
'cash_only' => true,
'accounts' => ['Asset']
]
],
测试
🧹 使用 Pint 保持现代代码库
composer lint
✅ 使用 Rector 进行重构
composer refacto
⚗️ 使用 PHPStan 进行静态分析
composer test:types
✅ 使用 PEST 运行单元测试
composer test:unit
🚀 运行整个测试套件
composer test
变更日志
请参阅 CHANGELOG 以获取有关最近更改的更多信息。
贡献
请参阅 CONTRIBUTING 以获取详细信息。
致谢
许可证
MIT许可证(MIT)。请参阅 许可证文件 以获取更多信息。