<?php 
namespace backend\components;

use common\models\Inventory;

class InventoryManager
{

    /**
     * @return Inventory
     */
    public function generateDaily(){
        $model = new Inventory();
        $model->status = Inventory::$STATUS_CLOSED;
        $model->type = Inventory::$TYPE_DAILY;
        $model->name = 'Automatikus Napi '.date('Ymd_His') ;
        $model->save(false);
        return $model;
    }

}
?>