| Server IP : 54.94.228.101 / Your IP : 172.28.1.13 Web Server : Apache System : Linux ip-172-28-29-189 6.5.0-1014-aws #14~22.04.1-Ubuntu SMP Thu Feb 15 15:27:06 UTC 2024 x86_64 User : www-data ( 33) PHP Version : 7.2.34-43+ubuntu22.04.1+deb.sury.org+1 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals, MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /var/www/html/vinumday2_0/app/Modules/Produto/Views/admin/ |
Upload File : |
@extends($current_template)
@section('content')
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<section class="content-header">
<h1>
Produtos
<small>Importação Lançamentos</small>
</h1>
<ol class="breadcrumb">
<li><a href="{{ url('admin') }}"><i class="fa fa-dashboard"></i> Dashboard</a></li>
<li><a href="{{ url('admin/produto') }}"> Produtos</a></li>
<li class="active">Importação Produtos ERP</li>
</ol>
</section>
<!-- Main content -->
<section class="content">
<div class="row">
<div class="col-xs-12">
<div class="box">
<div class="box-header no-print">
<form method="POST" action="<?php echo url('admin/produto/importacao-produto-erp'); ?>" enctype="multipart/form-data">
<div class="row">
<div class="col-md-2">
<div class="row">
<div class="col-md-12">
<h5>Empresa:</h5>
<select id="empresa_id" required class="form-control select2" name="empresa_id">
<option value="0">Selecione a empresa</option>
<?php foreach ($empresas as $empresa): ?>
<option <?php echo (isset($empresa_id) && $empresa_id == $empresa->id) ? 'selected' : ''; ?> value="<?php echo $empresa->id; ?>"><?php echo $empresa->nome; ?></option>
<?php endforeach; ?>
</select>
</div>
</div>
</div>
<div class="col-md-2">
<div class="row">
<div class="col-md-12">
<h5>Unidade:</h5>
<select id="unidade_negocio_id" required class="form-control select2" name="unidade_negocio_id">
<option value="0">Selecione a unidade</option>
<?php foreach ($unidades as $unidade): ?>
<option <?php echo (isset($unidade_negocio_id) && $unidade_negocio_id == $unidade->id) ? 'selected' : ''; ?> value="<?php echo $unidade->id; ?>"><?php echo $unidade->nome; ?></option>
<?php endforeach; ?>
</select>
</div>
</div>
</div>
<div class="col-md-2">
<div class="row">
<div class="col-md-12">
<h5>Arquivo:</h5>
<input name="file" id="file" type="file" />
</div>
</div>
</div>
<div class="col-md-2">
<div class="row">
<div class="col-md-12">
<button type="submit" class="btn btn-block btn-primary" style="margin-top:35px;">Importar</button>
</div>
</div>
</div>
</div>
</form>
</div>
<!-- /.box-header -->
<div class="box-body relatorio-saldos">
<?php if(isset($inseridos)): ?>
<h5>Número de Registros Importados: <?php echo $inseridos; ?> / <span style="color:red">Tabela Registros com erro: {{ count($falhas) }}</span></h5>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>ID Tiny</th>
<th>Código (SKU)</th>
<th>Produto</th>
<th>Descrição</th>
<th>Mensagem</th>
</tr>
</thead>
<tbody>
<?php foreach ($falhas as $falha): ?>
<?php $dados = $falha['dados']; ?>
<tr>
<td>{{ $falha['line'] }}</td>
<td>{{ (isset($dados[0]) ? $dados[0] : '') }}</td>
<td>{{ (isset($dados[1]) ? utf8_encode($dados[1]) : '') }}</td>
<td>{{ (isset($dados[2]) ? utf8_encode($dados[2]) : '') }}</td>
<td>{{ (isset($dados[3]) ? $dados[3] : '') }}</td>
<td>{{ $falha['message'] }}</td>
</tr>
<?php endforeach;?>
</tbody>
</table>
<?php endif; ?>
</div>
<!-- /.box-body -->
<div class="box-footer">
</div>
</div>
<!-- /.box -->
</div>
<!-- /.col -->
</div>
<!-- /.row -->
</section>
<!-- /.content -->
</div>
<!-- /.content-wrapper -->
<script type="text/javascript">
$(document).ready(function(){
$('.select2').select2();
});
</script>
@endsection