Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/aba vendas clientes #2169

Merged
merged 5 commits into from
Sep 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 64 additions & 1 deletion application/views/clientes/visualizar.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<ul class="nav nav-tabs">
<li class="active"><a data-toggle="tab" href="#tab1">Dados do Cliente</a></li>
<li><a data-toggle="tab" href="#tab2">Ordens de Serviço</a></li>

<li><a data-toggle="tab" href="#tab3">Vendas</a></li>
</ul>
</div>
<div class="widget-content tab-content">
Expand Down Expand Up @@ -213,6 +213,69 @@
<?php
} ?>
</div>
<!--Tab 3-->
<div id="tab3" class="tab-pane" style="min-height: 300px">
<?php if (!$result_vendas) { ?>
<table class="table table-bordered ">
<thead>
<tr>
<th>N° Venda</th>
<th>Data</th>
<th>Faturado</th>
<th>Total</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td colspan="6">Nenhuma OS Cadastrada</td>
</tr>
</tbody>
</table>
<?php
} else { ?>
<table class="table table-bordered ">
<thead>
<tr>
<th>N° Venda</th>
<th>Data</th>
<th>Faturado</th>
<th>Total</th>
<th></th>
</tr>
</thead>
<tbody>
<?php
foreach ($result_vendas as $r) {
$dataVenda = date(('d/m/Y'), strtotime($r->dataVenda));
if ($r->faturado == 1) {
$faturado = 'Sim';
} else {
$faturado = 'Não';
}
echo '<tr>';
echo '<td>' . $r->idVendas . '</td>';
echo '<td>' . $dataVenda . '</td>';
echo '<td>' . $faturado . '</td>';
echo '<td>R$' . $r->valorTotal. '</td>';

echo '<td>';
if ($this->permission->checkPermission($this->session->userdata('permissao'), 'vOs')) {
echo '<a href="' . base_url() . 'index.php/vendas/visualizar/' . $r->idVendas . '" style="margin-right: 1%" class="btn tip-top" title="Ver mais detalhes"><i class="fas fa-eye"></i></a>';
}
if ($this->permission->checkPermission($this->session->userdata('permissao'), 'eOs')) {
echo '<a href="' . base_url() . 'index.php/vendas/editar/' . $r->idVendas . '" class="btn btn-info tip-top" title="Editar OS"><i class="fas fa-edit"></i></a>';
}
echo '</td>';
echo '</tr>';
} ?>
<tr>
</tr>
</tbody>
</table>
<?php
} ?>
</div>
</div>
<div class="modal-footer" style="display:flex;justify-content: center">
<?php if ($this->permission->checkPermission($this->session->userdata('permissao'), 'eCliente')) {
Expand Down
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^3.0",
"symfony/var-dumper": "^5.0"
"symfony/var-dumper": "^5.0",
"fakerphp/faker": "^1.23"
},
"scripts": {
"format": [
Expand All @@ -37,4 +38,4 @@
"url": "https://github.com/map-os/asaas-sdk"
}
]
}
}
Loading
Loading