jeffersongoncalves/laravel-erp-assets
Composer 安装命令:
composer require jeffersongoncalves/laravel-erp-assets
包简介
ERP assets — fixed asset register, depreciation and movements for the Laravel ERP ecosystem
README 文档
README
ERP assets — fixed asset register, depreciation and movements for the Laravel ERP ecosystem.
This package is the fixed-assets module of an ERPNext-native rebuild. It depends on jeffersongoncalves/laravel-erp-core for the submittable-document foundation and on jeffersongoncalves/laravel-erp-accounting for the general ledger that absorbs depreciation postings.
Features
- Asset Register — Fixed assets built on the core
IsSubmittablelifecycle (Draft → Submitted → Cancelled), grouped under asset categories that carry the depreciation defaults and ledger accounts - Depreciation Engine — A single
DepreciationServiceprojects the full depreciation schedule on submit (Straight Line, Written Down Value, Double Declining Balance) and posts each due period to the general ledger - Native GL Integration — Depreciation posts a balanced entry (debit depreciation expense, credit accumulated depreciation) through the accounting
GeneralLedgerService, with the asset acting as the GL voucher - Movements & Repairs — Submittable asset movements (issue / receipt / transfer) and asset repair documents
- Customizable Models — Override any model via config (ModelResolver pattern);
AssetandAssetCategoryship swappable contracts - Translations — English and Brazilian Portuguese
Compatibility
| Package | PHP | Laravel |
|---|---|---|
^1.0 |
^8.2 |
^11.0 | ^12.0 | ^13.0 |
Installation
composer require jeffersongoncalves/laravel-erp-assets
Publish and run the migrations (the core and accounting package migrations must be published too):
php artisan vendor:publish --tag="erp-core-migrations" php artisan vendor:publish --tag="erp-accounting-migrations" php artisan vendor:publish --tag="erp-assets-migrations" php artisan migrate
Publish the config (optional):
php artisan vendor:publish --tag="erp-assets-config"
Depreciation Flow
- Submit an asset —
Asset::submit()builds theasset_depreciation_schedulesrows from the chosen method, period count and frequency. No money moves at this point (postLedgerEntries()is wired to schedule generation, not a purchase entry). - Post depreciation —
app(DepreciationService::class)->postDepreciation($asset, $upto)posts every period due on or before$uptoto the general ledger and advances the asset toPartially Depreciated/Fully Depreciated. - Cancel — Cancelling the asset reverses every posted period (mirror GL rows, net zero) and clears the schedule's posted flags.
Testing
composer test
Credits
License
The MIT License (MIT). Please see License File for more information.
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-06-28