halumein / yii2-spending
Spending module
Installs: 169
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 0
Open Issues: 0
Type:yii2-extension
Requires
- php: >=5.4.0
- kartik-v/yii2-grid: *
- pistol88/yii2-tree: *
- yiisoft/yii2: *
- yiisoft/yii2-bootstrap: *
This package is not auto-updated.
Last update: 2024-11-09 20:28:25 UTC
README
Модуль учта затрат
php composer require halumein/yii2-spending "*"
миграция:
php yii migrate --migrationPath=vendor/halumein/yii2-spending/migrations
В конфигурационный файл приложения добавить модуль test
'modules' => [ 'spending' => [ 'class' => 'halumein\spending\Module', 'userModel' => 'app\models\User', 'adminRoles' => ['superadmin', 'administrator'], 'on create' => function($event) { \Yii::$app->cashbox->addTransaction('outcome', $event->model->cost, $event->model->cashbox_id); }, ], //... ]