kinetixbd / acc
2.0.0
2020-12-02 10:39 UTC
Requires
- php: ^7.3|^8.0
- fruitcake/laravel-cors: ^2.0
- illuminate/support: ^v8.0
- livewire/livewire: ^2.3
README
请仔细阅读
composer require kinetixbd/acc
在app/app.php的provider数组中添加此代码
'providers' => [
...,
Enam\Acc\AccountingServiceProvider::class
]
发布迁移,运行
php artisan vendor:publish --provider=Enam\Acc\AccountingServiceProvider
运行迁移,运行
php artisan migrate
示例
$vno = Accounting::generateUniqueVoucher();
Accounting::makeTransaction("c_5", Accounting::$PRODUCT_SALES, $vno, 0, 50, null, 'Ops', Carbon::today()->subDays(5));
Accounting::makeTransaction("c_5", Accounting::$CASH_IN_HAND, $vno, 50, 0, null, 'Hahah', Carbon::today()->subDays(5));
Accounting::makeHeadIfNotExists('Product Sales', 'Sales', 'Expense');
Accounting::makeHeadIfNotExists('Cash In Hand', 'Cash', 'Income');