Correciones en autorizaciones
This commit is contained in:
@@ -3341,7 +3341,7 @@
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<asp:DropDownList ID="DdlCuentaEfectivo" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" Width="100%"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVCuenta" runat="server" ControlToValidate="DdlCuentaEfectivo" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpAgregarPago"></asp:RequiredFieldValidator>
|
||||
<asp:CustomValidator ID="RFVCuenta" runat="server" ClientValidationFunction="ValidaCuentaEfectivo" ControlToValidate="DdlCuentaEfectivo" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpAgregarPago"></asp:CustomValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOCuenta" runat="server" HighlightCssClass="vco" TargetControlID="RFVCuenta" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
@@ -3349,7 +3349,7 @@
|
||||
|
||||
<div class="chequesie1">
|
||||
<div class="row">
|
||||
<label class="col-md-2">Credito:</label>
|
||||
<label class="col-md-2">Crédito:</label>
|
||||
<div class="col-md-4 input-icon">
|
||||
<i style="margin: 0px;">$</i>
|
||||
<asp:TextBox ID="TxtImporteCredito" CssClass="form-control input-sm " runat="server" MaxLength="12" Width="100px" ClientIDMode="Static" Style="text-align: right;"></asp:TextBox>
|
||||
@@ -3357,7 +3357,7 @@
|
||||
</div>
|
||||
<div class="col-md-6" runat="server" id="DivDdlCuentaTarjetaCredito" style="margin-right: -40px">
|
||||
<asp:DropDownList ID="DdlCuentaTarjetaCredito" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" Width="100%"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="DdlCuentaTarjetaCredito" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpAgregarPago"></asp:RequiredFieldValidator>
|
||||
<asp:CustomValidator ID="RequiredFieldValidator1" runat="server" ClientValidationFunction="ValidaCuentaCredito" ControlToValidate="DdlCuentaTarjetaCredito" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpAgregarPago"></asp:CustomValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender5" runat="server" HighlightCssClass="vco" TargetControlID="RequiredFieldValidator1" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<div class="col-md-3" runat="server" id="DivMesesSinIntereses" visible="false" style="text-align: right;">
|
||||
@@ -3377,7 +3377,7 @@
|
||||
|
||||
<div class="chequesie1">
|
||||
<div class="row">
|
||||
<label class="col-md-2">Debito:</label>
|
||||
<label class="col-md-2">Débito:</label>
|
||||
<div class="col-md-4 input-icon">
|
||||
<i style="margin: 0px;">$</i>
|
||||
<asp:TextBox ID="TxtImporteDebito" CssClass="form-control input-sm " runat="server" MaxLength="12" Width="100px" ClientIDMode="Static" Style="text-align: right;"></asp:TextBox>
|
||||
@@ -3385,7 +3385,7 @@
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<asp:DropDownList ID="DdlCuentaTarjetaDebito" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" Width="100%"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="DdlCuentaTarjetaDebito" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpAgregarPago"></asp:RequiredFieldValidator>
|
||||
<asp:CustomValidator ID="RequiredFieldValidator4" runat="server" ClientValidationFunction="ValidaCuentaDebito" ControlToValidate="DdlCuentaTarjetaDebito" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpAgregarPago"></asp:CustomValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender9" runat="server" HighlightCssClass="vco" TargetControlID="RequiredFieldValidator4" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
@@ -3400,7 +3400,7 @@
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<asp:DropDownList ID="DdlCuentaCheque" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" Width="100%"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="DdlCuentaCheque" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpAgregarPago"></asp:RequiredFieldValidator>
|
||||
<asp:CustomValidator ID="RequiredFieldValidator3" runat="server" ClientValidationFunction="ValidaCuentaCheque" ControlToValidate="DdlCuentaCheque" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpAgregarPago"></asp:CustomValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender11" runat="server" HighlightCssClass="vco" TargetControlID="RequiredFieldValidator3" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
@@ -3416,7 +3416,7 @@
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<asp:DropDownList ID="DdlCuentaTransferencia" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" Width="100%"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVTransferencia" runat="server" ControlToValidate="DdlCuentaTransferencia" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpAgregarPago"></asp:RequiredFieldValidator>
|
||||
<asp:CustomValidator ID="RFVTransferencia" runat="server" ClientValidationFunction="ValidaCuentaTransferencia" ControlToValidate="DdlCuentaTransferencia" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpAgregarPago"></asp:CustomValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCETransferencia" runat="server" HighlightCssClass="vco" TargetControlID="RFVTransferencia" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
@@ -3480,6 +3480,8 @@
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<asp:HiddenField ID="HdnCambioFaltante" runat="server" Value="1" ClientIDMode="Static" />
|
||||
<%--<asp:HiddenField ID="HdnPagadoContado" runat="server" Value="0" ClientIDMode="Static" />--%>
|
||||
</div>
|
||||
<label id="lblCambio" class="col-md-2">Cambio:</label>
|
||||
<div class="col-md-4 input-icon">
|
||||
@@ -7749,6 +7751,7 @@
|
||||
<asp:ListItem Value="1" Text="Importe"></asp:ListItem>
|
||||
<asp:ListItem Value="2" Text="Vencimiento"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVTipoAut" runat="server" CssClass="help-block errorimput" InitialValue="-1" ControlToValidate="DdlTipoAutorizacion" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo''</b> es necesario, por favor ingréselo." ValidationGroup="VgmGuardarAut"></asp:RequiredFieldValidator>
|
||||
<label for="<%= DdlTipoAutorizacion.ClientID.ToString()%>">Tipo Autorización:</label>
|
||||
</div>
|
||||
<div id="DivDiasVencidos" runat="server" visible="false" class="row">
|
||||
@@ -7836,6 +7839,61 @@
|
||||
$("#BtnDirClienteValidar").click();
|
||||
}
|
||||
|
||||
function ValidaCuentaEfectivo(val, args) {
|
||||
//VALIDA SOLO SI EL IMPORTE ES MAYOR A CERO
|
||||
var totalPago = ToDouble($get("TxtImporteEfectivo").value);
|
||||
if (totalPago > 0) {
|
||||
args.IsValid = (ToDouble(args.Value) > 0);
|
||||
}else
|
||||
{
|
||||
args.IsValid = true;
|
||||
}
|
||||
}
|
||||
|
||||
function ValidaCuentaCredito(val, args) {
|
||||
//VALIDA SOLO SI EL IMPORTE ES MAYOR A CERO
|
||||
var totalPago = ToDouble($get("TxtImporteCredito").value);
|
||||
if (totalPago > 0) {
|
||||
args.IsValid = (ToDouble(args.Value) > 0);
|
||||
}else
|
||||
{
|
||||
args.IsValid = true;
|
||||
}
|
||||
}
|
||||
|
||||
function ValidaCuentaDebito(val, args) {
|
||||
//VALIDA SOLO SI EL IMPORTE ES MAYOR A CERO
|
||||
var totalPago = ToDouble($get("TxtImporteDebito").value);
|
||||
if (totalPago > 0) {
|
||||
args.IsValid = (ToDouble(args.Value) > 0);
|
||||
}else
|
||||
{
|
||||
args.IsValid = true;
|
||||
}
|
||||
}
|
||||
|
||||
function ValidaCuentaCheque(val, args) {
|
||||
//VALIDA SOLO SI EL IMPORTE ES MAYOR A CERO
|
||||
var totalPago = ToDouble($get("TxtImporteCheque").value);
|
||||
if (totalPago > 0) {
|
||||
args.IsValid = (ToDouble(args.Value) > 0);
|
||||
}else
|
||||
{
|
||||
args.IsValid = true;
|
||||
}
|
||||
}
|
||||
|
||||
function ValidaCuentaTransferencia(val, args) {
|
||||
//VALIDA SOLO SI EL IMPORTE ES MAYOR A CERO
|
||||
var totalPago = ToDouble($get("TxtImporteTransferencia").value);
|
||||
if (totalPago > 0) {
|
||||
args.IsValid = (ToDouble(args.Value) > 0);
|
||||
}else
|
||||
{
|
||||
args.IsValid = true;
|
||||
}
|
||||
}
|
||||
|
||||
//FUNCIONES PARA COMERCIO EXTERIOR
|
||||
function CalculaTotalUSD(TotalUSD, ValorUnitario, TxtCantidad) {
|
||||
TotalUSD.innerText = FormatoNumero(ToDouble(ValorUnitario.value) * ToDouble(TxtCantidad.value), 2);
|
||||
@@ -8868,14 +8926,16 @@
|
||||
} catch (e) { }
|
||||
|
||||
var total = totalEfectivo + totalCredito + totalDebito + totalCheque + totalTransferencia + TotalOtrosContado + totalRNC + totalAmortizado + totalProntoPago;
|
||||
var totalVenta = ToDouble($get('TxtTotal').value);
|
||||
var totalVenta = ToDouble($get('TxtTotal').value);// - ToDouble($get('HdnPagadoContado').value);
|
||||
|
||||
if (total > totalVenta) {
|
||||
lblCambio.innerHTML = "Cambio:"
|
||||
lblCambio.innerHTML = "Cambio:";
|
||||
HdnCambioFaltante.value = "1";
|
||||
$get("TxtCambio").value = FormatoNumero(total - totalVenta);
|
||||
} else {
|
||||
if ('<%= UsuarioActual.Empresa.Funcionalidad(531) %>' == '1') {
|
||||
lblCambio.innerHTML = "Faltante:"
|
||||
lblCambio.innerHTML = "Faltante:";
|
||||
HdnCambioFaltante.value = "2";
|
||||
$get("TxtCambio").value = FormatoNumero(total - totalVenta, 2);
|
||||
} else {
|
||||
$get("TxtCambio").value = "$0.00"
|
||||
|
||||
Reference in New Issue
Block a user