You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
91 lines
3.6 KiB
Plaintext
91 lines
3.6 KiB
Plaintext
@using GCI.PortalCondomino.Models
|
|
@model ContaCorrenteModel
|
|
@{
|
|
ViewBag.Title = "Conta Corrente";
|
|
Layout = "~/Views/BackOffice/_Layout.cshtml";
|
|
}
|
|
|
|
<section class="container">
|
|
<h3 class="oswald mt0 mb40 ac">@ViewBag.Title</h3>
|
|
@if (Model.SaldoFinal == 0)
|
|
{
|
|
<h4 class="oswald mt0 mb40 ac">Saldo @(0.ToString("C2"))</h4>
|
|
}
|
|
else if (Model.SaldoFinal > 0)
|
|
{
|
|
<h4 class="oswald mt0 mb40 ac">Saldo a seu favor de @(Math.Abs(Model.SaldoFinal).ToString("C2"))</h4>
|
|
}
|
|
else
|
|
{
|
|
<h4 class="oswald mt0 mb40 ac">Saldo devedor de @(Math.Abs(Model.SaldoFinal).ToString("C2"))</h4>
|
|
}
|
|
|
|
@using (Html.BeginForm("Index", "ContaCorrente", FormMethod.Get, null))
|
|
{
|
|
@Html.Hidden("commonholdid", @Model.CodCondominio, new { onchange = "this.form.submit();" })
|
|
<div>
|
|
<div class="table-responsive col-xs-11">
|
|
<table id="contacorrente" border="0" cellspacing="0" cellpadding="0" class="table table-striped mb40">
|
|
<thead>
|
|
<tr>
|
|
<th>Fração</th>
|
|
<th>Documento</th>
|
|
<th></th>
|
|
<th>
|
|
Data
|
|
@if (ViewBag.Sort == "asc")
|
|
{
|
|
<a href="/ContaCorrente?sort=desc"><i class='glyphicon glyphicon-sort-by-attributes-alt'></i></a>
|
|
}
|
|
else
|
|
{
|
|
<a href="/ContaCorrente?sort=asc"><i class='glyphicon glyphicon-sort-by-attributes'></i></a>
|
|
}
|
|
</th>
|
|
<th>Descrição</th>
|
|
<th>Valor</th>
|
|
<th>Saldo</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach (var linha in Model.Registos)
|
|
{
|
|
<tr>
|
|
<td>@linha.Fracao.ID</td>
|
|
<td>@linha.Documento</td>
|
|
<td>
|
|
@if (@linha.DocumentoRelacao.Trim() != "0")
|
|
{
|
|
@linha.DocumentoRelacao
|
|
}
|
|
</td>
|
|
<td>@linha.DataRegisto.ToShortDateString()</td>
|
|
<td>@linha.Descricao</td>
|
|
<td>@linha.Valor.ToString("C2")</td>
|
|
<td>@linha.Saldo.ToString("C2")</td>
|
|
</tr>
|
|
}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
}
|
|
|
|
@section footer {
|
|
@Html.Partial("_ContactosAdminPartial", Model.AdminData)
|
|
}
|
|
|
|
@section scripts {
|
|
<script type="text/javascript">
|
|
$(function () {
|
|
// Poor mans binding
|
|
$('#condominios').val($('#commonholdid').val())
|
|
$('#condominios').change(function () {
|
|
$('#commonholdid').val($(this).val());
|
|
// Force trigger onchange
|
|
$('#commonholdid').trigger('change');
|
|
});
|
|
});
|
|
</script>
|
|
}
|
|
</section> |