add inventory daily
This commit is contained in:
@@ -96,6 +96,7 @@ class AdminMenuStructure{
|
||||
$items[] = ['label' => 'Leltár', 'url' => ['/inventory/index'] ];
|
||||
$items[] = ['label' => 'Részletes eladások', 'url' => ['/transfer/sale' ,'TransferSaleSearch[start]' =>$todayDatetime,'TransferSaleSearch[end]' => $tomorrowDatetime ] ];
|
||||
$items[] = ['label' => 'Termék összesítő', 'url' => ['/product/statistics' ,'ProductStatisticsSearch[start]' =>$todayDatetime,'ProductStatisticsSearch[end]' => $tomorrowDatetime ] ];
|
||||
$items[] = ['label' => 'Leltár pillanat képek', 'url' => ['/inventory/daily' ] ];
|
||||
$this->menuItems[] = ['label' => 'Termékek', 'url' => $this->emptyUrl,
|
||||
'items' => $items
|
||||
];
|
||||
|
||||
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