add inventory daily
This commit is contained in:
22
backend/components/InventoryManager.php
Normal file
22
backend/components/InventoryManager.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?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;
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user