BDH. marcas de usados, quitar restriccion de saldo en bonificaciones, verificar estatus en refacturacion
This commit is contained in:
@@ -3635,15 +3635,17 @@
|
||||
<td id="Td3" runat="server">Próxima Rotación y Balanceo: </td>
|
||||
</tr>
|
||||
<tr align="left" id="trRotacionlbl" runat="server" visible="false">
|
||||
<td><asp:Label runat="server" id="LblRotacion" Text=""></asp:Label></td>
|
||||
<td>
|
||||
<asp:Label runat="server" ID="LblRotacion" Text=""></asp:Label></td>
|
||||
</tr>
|
||||
<tr align="left" id="trAlineacion" runat="server" visible="false">
|
||||
<td id="Td7" runat="server">Próxima Alineación: </td>
|
||||
</tr>
|
||||
<tr align="left" id="trAlineacionlbl" runat="server" visible="false">
|
||||
<td><asp:Label runat="server" id="LblAlineacion" Text=""></asp:Label></td>
|
||||
<td>
|
||||
<asp:Label runat="server" ID="LblAlineacion" Text=""></asp:Label></td>
|
||||
</tr>
|
||||
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
@@ -6627,7 +6629,7 @@
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtImporte" CssClass="myvalue" runat="server" Width="75px" />
|
||||
<asp:TextBox ID="TxtImporte" CssClass="myvalue ImportesRNCBon" runat="server" Width="75px" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
@@ -7030,7 +7032,7 @@
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<asp:RadioButtonList ID="RblRNCTipoDesc" runat="server" RepeatDirection="Horizontal" CssClass="input-group col-md-12" CellSpacing="100" AutoPostBack="true" OnSelectedIndexChanged="RblRNCTipoDesc_SelectedIndexChanged">
|
||||
<asp:ListItem Value="2" Class="one"><label><b>Bonificaciones</b></label></asp:ListItem>
|
||||
<%--<asp:ListItem Value="2" Class="one"><label><b>Bonificaciones</b></label></asp:ListItem>--%>
|
||||
<asp:ListItem Value="1" Class="one" Selected="True"><label><b>Cargos</b></label></asp:ListItem>
|
||||
<asp:ListItem Value="3" Class="one"><label><b>Ajuste/Garantía</b></label></asp:ListItem>
|
||||
</asp:RadioButtonList>
|
||||
@@ -7110,7 +7112,7 @@
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="ChkAplicar" runat="server" />
|
||||
<asp:HiddenField ID="HdnPorcentajeIVA" ClientIDMode="Static" runat="server" Value='<%# Eval("PorcentajeIVA").ToString %>' />
|
||||
<asp:HiddenField ID="HdnPorcentajeIVA" ClientIDMode="Static" runat="server" Value='<%# Eval("PorcentajeIVA").ToString %>' />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Cantidad">
|
||||
@@ -7201,7 +7203,7 @@
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<%-- <div class="row">
|
||||
<div class="col-md-12">
|
||||
<table border="0" rules="none" class="well TextTab" style="float: right;" runat="server">
|
||||
<tr align="right">
|
||||
@@ -7213,13 +7215,11 @@
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>--%>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<asp:HiddenField ID="HdnSaldoMaximoUsados" runat="server" ClientIDMode="Static" Value="0" />
|
||||
<asp:HiddenField ID="HdnSMUBonDesc" 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>
|
||||
@@ -7229,6 +7229,13 @@
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
<asp:UpdatePanel ID="UpHdnSaldos" runat="server">
|
||||
<ContentTemplate>
|
||||
<asp:HiddenField ID="HdnSaldoMaximoUsados" runat="server" ClientIDMode="Static" Value="0" />
|
||||
<asp:HiddenField ID="HdnSMUBon" runat="server" ClientIDMode="Static" Value="0" />
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<%-- MODAL SUCURSAL --%>
|
||||
<div id="divAgregarSucursal" class="modal fade" role="dialog">
|
||||
<div class="modal-dialog" style="max-height: 500px; max-width: 500px;">
|
||||
@@ -7577,6 +7584,100 @@
|
||||
}
|
||||
}
|
||||
|
||||
function CalculaSaldoRNCBonChkDesc(TxtImporte, Saldo, Chk) {
|
||||
if (Chk.checked) {
|
||||
TxtImporte.value = FormatoNumero(Saldo, 2);
|
||||
} else {
|
||||
TxtImporte.value = "";
|
||||
}
|
||||
//if (Chk.checked) {
|
||||
// let SaldoMaximoUtilizable = ToDouble(HdnSMUBonDesc.value)
|
||||
// let ImportesAsignados = 0;
|
||||
|
||||
// $('.ImportesRNCBon').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 {
|
||||
// if (SaldoMaximoUtilizable > 0) {
|
||||
// TxtImporte.value = "";
|
||||
// Chk.checked = false;
|
||||
// } else {
|
||||
// TxtImporte.value = FormatoNumero(Saldo, 2);
|
||||
// }
|
||||
|
||||
// }
|
||||
|
||||
//} else {
|
||||
// TxtImporte.value = "";
|
||||
//}
|
||||
}
|
||||
function LimitaSaldoRNCBonChkDesc(TxtImporte, Saldo) {
|
||||
//var Importe = 0;
|
||||
|
||||
//if (TxtImporte.value.includes('.')) {
|
||||
// return;
|
||||
//}
|
||||
//if (TxtImporte.value.includes(',')) {
|
||||
// return;
|
||||
//}
|
||||
|
||||
//var regex = new RegExp("^[-+]?[0-9]+\.[0-9]+$");
|
||||
|
||||
//if (regex.test(TxtImporte.value)) {
|
||||
// if (TxtImporte.value != '') {
|
||||
// Importe = parseFloat(TxtImporte.value);
|
||||
// }
|
||||
|
||||
// if (Importe > Saldo) {
|
||||
// TxtImporte.value = FormatoNumero(Saldo, 2);
|
||||
// } else {
|
||||
// TxtImporte.value = FormatoNumero(Importe, 2);;
|
||||
// }
|
||||
//}
|
||||
|
||||
var Importe = 0;
|
||||
|
||||
if (TxtImporte.value.includes('.')) {
|
||||
return;
|
||||
}
|
||||
if (TxtImporte.value.includes(',')) {
|
||||
return;
|
||||
}
|
||||
|
||||
var regex = new RegExp("^[-+]?[0-9]+\.[0-9]+$");
|
||||
|
||||
if (regex.test(TxtImporte.value)) {
|
||||
if (TxtImporte.value != '') {
|
||||
Importe = parseFloat(TxtImporte.value);
|
||||
}
|
||||
|
||||
let SaldoMaximoUtilizable = parseFloat(Saldo)
|
||||
//let ImportesAsignados = 0;
|
||||
//$('.ImportesRNCBon').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);;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function CalculaSaldoRNCBonChk(TxtImporte, Saldo, Chk) {
|
||||
//if (Chk.checked) {
|
||||
// TxtImporte.value = FormatoNumero(Saldo, 2);
|
||||
@@ -7584,7 +7685,7 @@
|
||||
// TxtImporte.value = "";
|
||||
//}
|
||||
if (Chk.checked) {
|
||||
let SaldoMaximoUtilizable = ToDouble(HdnSMUBonDesc.value)
|
||||
let SaldoMaximoUtilizable = ToDouble(HdnSMUBon.value)
|
||||
let ImportesAsignados = 0;
|
||||
|
||||
$('.ImportesRNCBon').each(function () {
|
||||
@@ -7654,7 +7755,7 @@
|
||||
Importe = parseFloat(TxtImporte.value);
|
||||
}
|
||||
|
||||
let SaldoMaximoUtilizable = parseFloat(HdnSMUBonDesc.value)
|
||||
let SaldoMaximoUtilizable = parseFloat(HdnSMUBon.value)
|
||||
let ImportesAsignados = 0;
|
||||
$('.ImportesRNCBon').each(function () {
|
||||
if ($(this).context.id != TxtImporte.id) {
|
||||
@@ -8806,31 +8907,31 @@
|
||||
|
||||
function CerrarModalRemNC() {
|
||||
if ('<%= UsuarioActual.Empresa.Funcionalidad(344) %>' == '1') {
|
||||
AplicarValidarRNC(true);
|
||||
CompararNC();
|
||||
AplicarValidarRNC(true);
|
||||
CompararNC();
|
||||
}
|
||||
$('#ModalAplicarRemisionesNC').modal('hide');
|
||||
}
|
||||
$('#ModalAplicarRemisionesNC').modal('hide');
|
||||
}
|
||||
|
||||
var verficaRNC = function () {
|
||||
var total = 0;
|
||||
if ('<%= UsuarioActual.CveEmpresa %>' == '140') {
|
||||
$(".ChkAplicaRNC > input").each(function () {
|
||||
if (this.checked) {
|
||||
total = total + 1;
|
||||
}
|
||||
if (total == 2) {
|
||||
alert("No se puede seleccionar mas de una remisión de nota de crédito.");
|
||||
this.checked = false;
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
var verficaRNC = function () {
|
||||
var total = 0;
|
||||
if ('<%= UsuarioActual.CveEmpresa %>' == '140') {
|
||||
$(".ChkAplicaRNC > input").each(function () {
|
||||
if (this.checked) {
|
||||
total = total + 1;
|
||||
}
|
||||
if (total == 2) {
|
||||
alert("No se puede seleccionar mas de una remisión de nota de crédito.");
|
||||
this.checked = false;
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
function showDivAgregarSucursal() {
|
||||
function showDivAgregarSucursal() {
|
||||
|
||||
$('#<%= TxtNombreSucursal.ClientID %>').val('');
|
||||
$('#<%= TxtNombreSucursal.ClientID %>').val('');
|
||||
$('#<%= TxtDireccionSucursal.ClientID %>').val('');
|
||||
$('#<%= TxtNumExtSucursal.ClientID %>').val('');
|
||||
$('#<%= TxtNumIntSucursal.ClientID %>').val('');
|
||||
|
||||
Reference in New Issue
Block a user