This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\Almoxarifado\Relatorios;
|
||||
|
||||
use App\Services\Almoxarifado\Relatorios\ConsumoFinanceiroService;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class ConsumoFinanceiro implements FromView
|
||||
{
|
||||
private const TITLE = 'RELATÓRIO DE CONSUMO FINANCEIRO';
|
||||
private const VIEW = 'exportacoes.almoxarifado.relatorios.consumo-financeiro';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
$data = ConsumoFinanceiroService::getPrintExportData();
|
||||
$data['title'] = self::TITLE;
|
||||
|
||||
return view(self::VIEW, $data);
|
||||
}
|
||||
}
|
||||
21
api/app/Exports/Almoxarifado/Relatorios/Entrada.php
Normal file
21
api/app/Exports/Almoxarifado/Relatorios/Entrada.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\Almoxarifado\Relatorios;
|
||||
|
||||
use App\Services\Almoxarifado\Relatorios\EntradaService;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class Entrada implements FromView
|
||||
{
|
||||
private const TITLE = 'RELATÓRIO DE ENTRADA';
|
||||
private const VIEW = 'exportacoes.almoxarifado.relatorios.entrada';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
$data = EntradaService::getPrintExportData();
|
||||
$data['title'] = self::TITLE;
|
||||
|
||||
return view(self::VIEW, $data);
|
||||
}
|
||||
}
|
||||
21
api/app/Exports/Almoxarifado/Relatorios/EstornoEntrada.php
Normal file
21
api/app/Exports/Almoxarifado/Relatorios/EstornoEntrada.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\Almoxarifado\Relatorios;
|
||||
|
||||
use App\Services\Almoxarifado\Relatorios\EstornoEntradaService;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class EstornoEntrada implements FromView
|
||||
{
|
||||
private const TITLE = 'RELATÓRIO DE ESTORNO DE ENTRADAS';
|
||||
private const VIEW = 'exportacoes.almoxarifado.relatorios.estorno-entrada';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
$data = EstornoEntradaService::getPrintExportData();
|
||||
$data['title'] = self::TITLE;
|
||||
|
||||
return view(self::VIEW, $data);
|
||||
}
|
||||
}
|
||||
21
api/app/Exports/Almoxarifado/Relatorios/EstornoSaida.php
Normal file
21
api/app/Exports/Almoxarifado/Relatorios/EstornoSaida.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\Almoxarifado\Relatorios;
|
||||
|
||||
use App\Services\Almoxarifado\Relatorios\EstornoSaidaService;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class EstornoSaida implements FromView
|
||||
{
|
||||
private const TITLE = 'RELATÓRIO DE ESTORNO DE SAÍDAS';
|
||||
private const VIEW = 'exportacoes.almoxarifado.relatorios.estorno-saida';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
$data = EstornoSaidaService::getPrintExportData();
|
||||
$data['title'] = self::TITLE;
|
||||
|
||||
return view(self::VIEW, $data);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\Almoxarifado\Relatorios;
|
||||
|
||||
use App\Models\Almoxarifado\EntradaTipo;
|
||||
use App\Models\Almoxarifado\SaidaTipo;
|
||||
use App\Models\Cadastro\Estabelecimento\Infraestrutura;
|
||||
use App\Models\Cadastro\Estabelecimento\Setor;
|
||||
use App\Models\Cadastro\Estabelecimento\Unidade;
|
||||
use App\Models\Cadastro\Material\Material;
|
||||
use App\Models\Cadastro\OrigemProgramatica;
|
||||
use App\Models\Cadastro\SujeitoAtencao\Usuario;
|
||||
use App\Services\Almoxarifado\Relatorios\MovimentacaoGeralService;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class MovimentacaoGeral implements FromView
|
||||
{
|
||||
private const TITLE = 'RELATÓRIO DE MOVIMENTAÇÃO GERAL';
|
||||
private const VIEW = 'exportacoes.almoxarifado.relatorios.movimentacao-geral';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
$itens = MovimentacaoGeralService::index();
|
||||
|
||||
$data = [
|
||||
'title' => self::TITLE,
|
||||
'periodo' => [
|
||||
'start' => request()->periodo['start'],
|
||||
'end' => request()->periodo['end'],
|
||||
],
|
||||
'movimentacao_tipo' => request()->movimentacao_tipo === 'entrada' ? 'ENTRADA' : 'SAÍDA',
|
||||
'movimentacao_subtipo' => (request()->movimentacao_tipo === 'entrada' ? EntradaTipo::find(request()->movimentacao_subtipo_id)->nome ?? null : SaidaTipo::find(request()->movimentacao_subtipo_id)->nome ?? null) ?? 'Todos',
|
||||
'unidade' => Unidade::find(request()->unidade_id)->nome_fantasia ?? 'Todas',
|
||||
'infraestrutura' => Infraestrutura::find(request()->infraestrutura_id)->nome ?? 'Todos',
|
||||
'setor' => Setor::find(request()->setor_id)->nome ?? 'Todos',
|
||||
'usuario' => Usuario::find(request()->usuario_id)->nome ?? 'Todos',
|
||||
'origem_programatica' => OrigemProgramatica::find(request()->origem_programatica_id)->nome ?? 'Todas',
|
||||
'material' => Material::find(request()->material_id)->descricao_completa ?? 'Todos',
|
||||
'colunas' => collect(request()->selected_cols),
|
||||
'itens' => $itens,
|
||||
];
|
||||
|
||||
return view(self::VIEW, $data);
|
||||
}
|
||||
}
|
||||
21
api/app/Exports/Almoxarifado/Relatorios/PosicaoEstoque.php
Normal file
21
api/app/Exports/Almoxarifado/Relatorios/PosicaoEstoque.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\Almoxarifado\Relatorios;
|
||||
|
||||
use App\Services\Almoxarifado\Relatorios\PosicaoEstoqueService;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class PosicaoEstoque implements FromView
|
||||
{
|
||||
private const TITLE = 'RELATÓRIO DE POSIÇÃO DE ESTOQUE';
|
||||
private const VIEW = 'exportacoes.almoxarifado.relatorios.posicao-estoque';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
$data = PosicaoEstoqueService::getPrintData();
|
||||
$data['title'] = self::TITLE;
|
||||
|
||||
return view(self::VIEW, $data);
|
||||
}
|
||||
}
|
||||
21
api/app/Exports/Almoxarifado/Relatorios/Requisicao.php
Normal file
21
api/app/Exports/Almoxarifado/Relatorios/Requisicao.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\Almoxarifado\Relatorios;
|
||||
|
||||
use App\Services\Almoxarifado\Relatorios\RequisicaoService;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class Requisicao implements FromView
|
||||
{
|
||||
private const TITLE = 'RELATÓRIO DE REQUISIÇÕES';
|
||||
private const VIEW = 'exportacoes.almoxarifado.relatorios.requisicao';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
$data = RequisicaoService::getPrintExportData();
|
||||
$data['title'] = self::TITLE;
|
||||
|
||||
return view(self::VIEW, $data);
|
||||
}
|
||||
}
|
||||
21
api/app/Exports/Almoxarifado/Relatorios/Saida.php
Normal file
21
api/app/Exports/Almoxarifado/Relatorios/Saida.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\Almoxarifado\Relatorios;
|
||||
|
||||
use App\Services\Almoxarifado\Relatorios\SaidaService;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class Saida implements FromView
|
||||
{
|
||||
private const TITLE = 'RELATÓRIO DE SAÍDAS';
|
||||
private const VIEW = 'exportacoes.almoxarifado.relatorios.saida';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
$data = SaidaService::getPrintExportData();
|
||||
$data['title'] = self::TITLE;
|
||||
|
||||
return view(self::VIEW, $data);
|
||||
}
|
||||
}
|
||||
21
api/app/Exports/Almoxarifado/Relatorios/ValidadeMaterial.php
Normal file
21
api/app/Exports/Almoxarifado/Relatorios/ValidadeMaterial.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\Almoxarifado\Relatorios;
|
||||
|
||||
use App\Services\Almoxarifado\Relatorios\ValidadeMaterialService;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class ValidadeMaterial implements FromView
|
||||
{
|
||||
private const TITLE = 'RELATÓRIO DE VALIDADE DE MATERIAL';
|
||||
private const VIEW = 'exportacoes.almoxarifado.relatorios.validade-material';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
$data = ValidadeMaterialService::getPrintExportData();
|
||||
$data['title'] = self::TITLE;
|
||||
|
||||
return view(self::VIEW, $data);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user