Pendientes BDH

This commit is contained in:
2020-10-15 20:03:09 -07:00
parent eb399787a6
commit 6eb4cd9814
9 changed files with 557 additions and 330 deletions

View File

@@ -424,10 +424,10 @@
</td>
</tr>--%>
<tr runat="server" id="trsucursalciente" visible="false">
<td align="left" ><b>
<td align="left"><b>
<asp:Label ID="LblSucursal" runat="server" Text="Sucursal"></asp:Label>
:</b></td>
<td align="left" >
<td align="left">
<div class="row align-items-start">
<div class="col-md-10">
<asp:DropDownList ID="DdlSucursalCliente" runat="server" AutoPostBack="true" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" DataTextField="SucursalCliente" DataValueField="CveClienteSucursal">
@@ -438,11 +438,11 @@
</div>
</div>
</td>
<td align="left" >
<td align="left">
<b>
<asp:Label ID="LtlTitleRFCSucursal" runat="server" Text=""></asp:Label></b>
</td>
<td align="left" >
<td align="left">
<asp:Label ID="LtlRFCSucursal" runat="server" Text=""></asp:Label>
</td>
</tr>
@@ -1575,7 +1575,7 @@
</div>
</div>
</div>
<asp:HiddenField ID="HdnTotalRNC" runat="server" ClientIDMode="Static" Value="0" />
</ContentTemplate>
</asp:UpdatePanel>
</div>
@@ -4316,23 +4316,18 @@
<div class="portlet-title">
<div class="caption font-green">
<%--<i class="fa fa-users font-green"></i>--%>
<span class="caption-subject bold uppercase">Bitacora</span>
</div>
<div class="actions">
<div class="btn-group">
<%--<div class=" font-green" style="cursor: pointer;" runat="server" id="ImgAddObs" visible="false">
<i class="fa fa-commenting font-green"></i>
<span class="caption-subject bold">Agregar</span>
</div>--%>
<asp:HyperLink ID="ImgAddObs" CssClass="caption-subject bold" data-toggle="modal" data-target="#ModalBitacora" runat="server" Text=" <i class='fa fa-commenting font-green' style='font-weight: 700 !important;' ><span class='caption-subject bold'>Agregar</span></i>" Style="cursor: pointer;" ToolTip="Observaciones"></asp:HyperLink><br />
<asp:HyperLink ID="HlEvento" CssClass="thickbox caption-subject bold" runat="server" Visible="false" Style="cursor: pointer; text-decoration: none;" ToolTip="Agendar"><i class='fa fa-calendar-plus-o font-green' style='font-weight: 700 !important;' ></i> <span class="caption-subject bold font-green">Agendar</span></asp:HyperLink><br />
<asp:Literal ID="LtlTareaNueva" runat="server"></asp:Literal>
<UserControl:TareaNueva runat="server" id="TareaNueva" />
<script> function OnAddedTareaNueva() {
$('.btnupEventoBitacora').click();
}
<script>
function OnAddedTareaNueva() {
$('.btnupEventoBitacora').click();
}
</script>
</div>
</div>
@@ -6799,7 +6794,7 @@
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:TextBox ID="TxtImporte" CssClass="myvalue" runat="server" Width="75px" />
<asp:TextBox ID="TxtImporte" CssClass="myvalue ImportesRNCCargo" runat="server" Width="75px" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
@@ -6876,23 +6871,24 @@
</asp:GridView>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<table border="0" rules="none" class="well TextTab" style="float: right;" runat="server">
<tr align="right">
<td style="border: 1px none white"><b>Saldo Maximo Utilizable.:</b></td>
<td>
<asp:Label ID="LblSaldoMaximoBonificacion" ClientIDMode="Static" runat="server" Style="text-align: right;" Text="0.00"></asp:Label></td>
<td align="right">&nbsp;
</td>
</tr>
</table>
<div class="row">
<div class="col-md-12">
<table border="0" rules="none" class="well TextTab" style="float: right;" runat="server">
<tr align="right">
<td style="border: 1px none white"><b>Saldo Maximo Utilizable.:</b></td>
<td>
<asp:Label ID="LblSaldoMaximoBonificacion" ClientIDMode="Static" runat="server" Style="text-align: right;" Text="0.00"></asp:Label></td>
<td align="right">&nbsp;
</td>
</tr>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
<asp:HiddenField ID="HdnSaldoMaximoUsados" runat="server" ClientIDMode="Static" Value="0" />
</div>
<div class="modal-footer">
<button id="CancelarAplicarDescNC" type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
@@ -7083,13 +7079,75 @@
}
function CalculaSaldoRNCChk(TxtImporte, Saldo, Chk) {
//ImportesRNCCargo
if (Chk.checked) {
TxtImporte.value = FormatoNumero(Saldo, 2);
let SaldoMaximoUtilizable = ToDouble(HdnSaldoMaximoUsados.value)
let ImportesAsignados = 0;
$('.ImportesRNCCargo').each(function () {
if ($(this).context.id != TxtImporte.id) {
ImportesAsignados += ToDouble($(this).val());
}
});
let Importe = SaldoMaximoUtilizable - ImportesAsignados;
if (Importe > 0) {
if (Saldo > Importe) {
TxtImporte.value = FormatoNumero(Importe, 2);
} else {
TxtImporte.value = FormatoNumero(Saldo, 2);
}
} else {
TxtImporte.value = "";
Chk.checked = false;
}
} else {
TxtImporte.value = "";
}
}
function LimitaSaldoRNCChk(TxtImporte, Saldo) {
//var Importe = 0;
//if (TxtImporte.value.includes('.')) {
// return;
//}
//if (TxtImporte.value.includes(',')) {
// return;
//}
//var regex = new RegExp("^\d*\.?\d*$");
//if (regex.test(TxtImporte.value.trim())) {
// if (TxtImporte.value != '') {
// Importe = parseFloat(TxtImporte.value);
// }
//let SaldoMaximoUtilizable = ToDouble(HdnSaldoMaximoUsados.value)
//let ImportesAsignados = 0;
//$('.ImportesRNCCargo').each(function () {
// if ($(this).context.id != TxtImporte.id) {
// ImportesAsignados += ToDouble($(this).val());
// }
//});
// let ImporteDiferencia = SaldoMaximoUtilizable - ImportesAsignados;
// if (ImporteDiferencia < 0) {
// ImporteDiferencia = 0;
// }
// if (ImporteDiferencia > 0) {
// if (ImporteDiferencia > Importe) {
// TxtImporte.value = FormatoNumero(Importe, 2);
// } else {
// TxtImporte.value = FormatoNumero(ImporteDiferencia, 2);
// }
// } else {
// TxtImporte.value = "";
// }
//}
var Importe = 0;
if (TxtImporte.value.includes('.')) {
@@ -7106,8 +7164,17 @@
Importe = parseFloat(TxtImporte.value);
}
if (Importe > Saldo) {
TxtImporte.value = FormatoNumero(Saldo, 2);
let SaldoMaximoUtilizable = parseFloat(HdnSaldoMaximoUsados.value)
let ImportesAsignados = 0;
$('.ImportesRNCCargo').each(function () {
if ($(this).context.id != TxtImporte.id) {
ImportesAsignados += ToDouble($(this).val());
}
});
let ImporteDiferencia = SaldoMaximoUtilizable - ImportesAsignados;
if (Importe > ImporteDiferencia) {
TxtImporte.value = FormatoNumero(ImporteDiferencia, 2);
} else {
TxtImporte.value = FormatoNumero(Importe, 2);;
}
@@ -7542,6 +7609,7 @@
var totalDebito = ToDouble($get("TxtImporteDebito").value);
var totalCheque = ToDouble($get("TxtImporteCheque").value);
var totalTransferencia = ToDouble($get("TxtImporteTransferencia").value);
var totalRNC = ToDouble($get("HdnTotalRNC").value);
var TotalOtrosContado = 0;
@@ -7551,7 +7619,7 @@
}
} catch (e) { }
var total = totalEfectivo + totalCredito + totalDebito + totalCheque + totalTransferencia + TotalOtrosContado;
var total = totalEfectivo + totalCredito + totalDebito + totalCheque + totalTransferencia + TotalOtrosContado + totalRNC;
var totalVenta = ToDouble($get('TxtTotal').value);
if (total > totalVenta) {
@@ -8099,23 +8167,23 @@
function ConvertirPesos(ChkConvertirDoctoPesos) {
//LIMPIA
$('#<%= LtlTotalConvertido.ClientID %>').text('');
$("#TrConversionPesosTexto").hide();
$("#TrConversionPesosTexto").hide();
//CALCULA
if (ChkConvertirDoctoPesos.checked) {
ConvertirDllsPesos();
}
}
function ConvertirPesosDlls() {
var totalPesos = FormatoNumero(ToDouble($get('TxtTotal').value) / ToDouble($get('TxtTipoCambioDlls').value), 2)
$('#<%= LblDolaresConvertidos.ClientID %>').text(totalPesos);
$("#TrConversionDolaresTexto").show();
//CALCULA
if (ChkConvertirDoctoPesos.checked) {
ConvertirDllsPesos();
}
}
function ConvertirDolares(ChkConvertirDolares) {
//LIMPIA
$('#<%= LblDolaresConvertidos.ClientID %>').text('');
function ConvertirPesosDlls() {
var totalPesos = FormatoNumero(ToDouble($get('TxtTotal').value) / ToDouble($get('TxtTipoCambioDlls').value), 2)
$('#<%= LblDolaresConvertidos.ClientID %>').text(totalPesos);
$("#TrConversionDolaresTexto").show();
}
function ConvertirDolares(ChkConvertirDolares) {
//LIMPIA
$('#<%= LblDolaresConvertidos.ClientID %>').text('');
$("#TrConversionDolaresTexto").hide();
//CALCULA