45 lines
974 B
PHP
45 lines
974 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers\Almoxarifado;
|
|
|
|
use App\Http\Controllers\Controller;
|
|
use App\Services\Almoxarifado\BaixaService;
|
|
use Illuminate\Http\Response;
|
|
|
|
class BaixaController extends Controller
|
|
{
|
|
protected $modulo = 'almoxarifado';
|
|
protected $funcionalidade = 'baixa';
|
|
|
|
public function datatable()
|
|
{
|
|
return BaixaService::datatable();
|
|
}
|
|
|
|
public function history()
|
|
{
|
|
return BaixaService::history();
|
|
}
|
|
|
|
public function create($materialId)
|
|
{
|
|
$this->auth(__FUNCTION__);
|
|
|
|
return response()->json(BaixaService::create($materialId), Response::HTTP_OK);
|
|
}
|
|
|
|
public function store()
|
|
{
|
|
$this->auth(__FUNCTION__);
|
|
|
|
return response()->json(BaixaService::store(), Response::HTTP_CREATED);
|
|
}
|
|
|
|
public function reverse($saidaItemId)
|
|
{
|
|
$this->auth(__FUNCTION__);
|
|
|
|
return response()->json(BaixaService::reverse($saidaItemId), Response::HTTP_OK);
|
|
}
|
|
}
|