This commit is contained in:
rrene
2019-11-07 10:15:43 -07:00
26 changed files with 1071 additions and 308 deletions

View File

@@ -2729,7 +2729,16 @@
<label for="<%= TxtPrecio.ClientID.ToString()%>">Precio:</label>
</div>
</div>
<div class="col-md-8">
<div class="col-md-3">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtDescuento" runat="server" onkeypress="setFocus(event,'LbAgregar');" onkeyup="Recalcula();" CausesValidation="true" lang="nb" ClientIDMode="Static" Text="0.00" MaxLength="12" ValidationGroup="GrpAddVenta" Width="100px" CssClass="form-control "></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender2" runat="server" TargetControlID="TxtDescuento" FilterType="Custom, Numbers" ValidChars="." />
<asp:CustomValidator ID="CVDescuento" runat="server" ClientValidationFunction="ValidaDecimal6digits" ControlToValidate="TxtDescuento" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Descuento''</b> no tiene el formato correcto. Por favor rectifique y vuelva a intentar." ValidateEmptyText="True" ValidationGroup="GrpAddVenta"></asp:CustomValidator>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender6" runat="server" HighlightCssClass="vco" TargetControlID="CVDescuento" Width="300px"></ajax:ValidatorCalloutExtender>
<label for="<%= TxtDescuento.ClientID.ToString()%>">Descuento:</label>
</div>
</div>
<div class="col-md-1" >
<asp:UpdatePanel ID="UpBtnDescuento" runat="server" class="portlet-body form" UpdateMode="Conditional">
<ContentTemplate>
<asp:LinkButton ID="ImgDescPU" runat="server" Text="<i class='fa fa-tags' style='color:dimgray;'></i>" Style="cursor: pointer;" AlternateText="Agregar Descuento" />
@@ -3115,15 +3124,27 @@
var Descuento = parseFloat($get("TxtPorDescP").value);
$get("LblPrecioFinal").innerText = formato_numero(Monto - ((Monto * Descuento) / 100), 2, '.', ',');
$get("TxtPrecio").value = formato_numero(parseFloat($get("LblPrecioFinal").innerText.replace(",", "").replace(",", "")), 2, '.', ',');
$get("LblTotalPS").innerText = formato_numero(parseFloat($get("LblPrecioFinal").innerText.replace(",", "").replace(",", "")), 2, '.', ',');
var Total = Monto - parseFloat($get("LblPrecioFinal").innerText.replace(",", "").replace(",", ""));
$get("LblDescuento").innerText = formato_numero(Total, 2, '.', ',');
$get("LblDescuento").innerText = formato_numero(Total, 2, '.', ',');
$get("TxtDescuento").value = formato_numero(Total, 2, '.', ',');
$get("TxtDescP").value = formato_numero(0, 2, '.', ',');
$get("HdnDescuento").value = Total;
if (TipoDescuento == 2) {
$get("LblDescuentos").innerText = formato_numero(Total, 2, '.', ',');
}
}
else if ($get("TxtDescP").value != "0" && $get("TxtDescP").value) {
else {
$get("LblPrecioFinal").innerText = "0.00";
$get("LblDescuento").innerText = "0.00";
$get("HdnDescuento").value = "0.00";
}
}
function CalculaDescuentoMonto() {
if ($get("TxtDescP").value != "0" && $get("TxtDescP").value) {
var Monto = 0;
var TipoDescuento = $get("HdnTipoDescuento").value;
@@ -3141,11 +3162,12 @@
}
var Descuento = parseFloat($get("TxtDescP").value);
$get("TxtPorDescP").value = Descuento * 100 / Monto * 10
$get("TxtPorDescP").value = formato_numero((Descuento * 100 / Monto), 2, '.', ',');
$get("LblPrecioFinal").innerText = formato_numero(Monto - Descuento, 2, '.', ',');
$get("TxtPrecio").value = formato_numero(parseFloat($get("LblPrecioFinal").innerText.replace(",", "").replace(",", "")), 2, '.', ',');
$get("LblTotalPS").innerText = formato_numero(parseFloat($get("LblPrecioFinal").innerText.replace(",", "").replace(",", "")), 2, '.', ',');
var Total = Monto - parseFloat($get("LblPrecioFinal").innerText.replace(",", "").replace(",", ""));
$get("LblDescuento").innerText = formato_numero(Total, 2, '.', ',');
$get("LblDescuento").innerText = formato_numero(Total, 2, '.', ',');
$get("TxtDescuento").value = formato_numero(Total, 2, '.', ',');
$get("HdnDescuento").value = Total;
if (TipoDescuento == 2) {
Monto - parseFloat($get("LblPrecioFinal").innerText.replace(",", "").replace(",", ""));
@@ -3156,7 +3178,6 @@
$get("LblDescuento").innerText = "0.00";
$get("HdnDescuento").value = "0.00";
}
}
function BorraDescuentos() {
@@ -3273,8 +3294,8 @@
var totalVenta = ToDouble($get('TxtTotal').value);
if (totalEfectivo > totalVenta) {
$get("TxtCambio").value = FormatoNumero(totalEfectivo - totalVenta);
if (total > totalVenta) {
$get("TxtCambio").value = FormatoNumero(total - totalVenta);
} else {
$get("TxtCambio").value = "0.00";
}

View File

@@ -1062,7 +1062,7 @@ Partial Class PV
'ImgCerrarIE.Attributes.Add("OnClick", "$('#DivIngresoEgreso').hide();")
'ImgCerrarEstadoCaja.Attributes.Add("OnClick", "$('#DivEstadoCaja').hide();")
TxtPorDescP.Attributes.Add("onKeyUp", "CalculaDescuento();")
TxtDescP.Attributes.Add("onKeyUp", "CalculaDescuento();")
TxtDescP.Attributes.Add("onKeyUp", "CalculaDescuentoMonto();")
TxtFechaAjuste.Attributes.Add("onchange", "CalculaMesesUso();")
CreaDTmpC()
@@ -2771,6 +2771,9 @@ Partial Class PV
Exit Sub
End If
TxtDescuento.Text = FormatoNumero(0, 2)
TxtPrecio.Text = ""
If CvePSParametro > 0 Then
Dim drPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePSParametro).FiltroPrimero("")
@@ -2828,6 +2831,7 @@ Partial Class PV
End If
If PrecioSugerido > 0 Then
TxtPrecio.Text = PrecioSugerido.FormatoNumero()
RegistraScript("$get('LblPrecio1').innerText = formato_numero(" + PrecioSugerido.ToString + ", 2, '.', ',');")
End If
@@ -4294,7 +4298,7 @@ Partial Class PV
Private Sub CargaCuentas()
DdlCuentaEfectivo.Items.Clear()
'DdlCuentaEfectivo.Items.Clear()
DdlCuentaTarjetaCredito.Items.Clear()
DdlCuentaTarjetaDebito.Items.Clear()
DdlCuentaCheque.Items.Clear()
@@ -4351,6 +4355,11 @@ Partial Class PV
If total <= 0 Then Alert("No se ha ingresado importe", TipoMensaje.MsgAdvertencia) : Exit Sub
If TxtCambio.Text.ToDecimal > 0 And TxtImporteEfectivo.Text.ToDecimal < TxtCambio.Text.ToDecimal Then
Alert("Debe haber un pago en efectivo y ser mayor que el cambio. Si no, ser pago exacto.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
If (DtPagos.SUM("Importe").ToString.ToDecimal + total - TxtCambio.Text.ToDecimal) > TxtTotal.Text.ToDecimal Then
Alert("El importe de los pagos no puede exceder el importe de la factura. Por favor rectifique.", TipoMensaje.MsgAdvertencia)
Exit Sub
@@ -5088,14 +5097,15 @@ Partial Class PV
Dim FechaI = TxtFechaAjuste.Text.ToDate.AddDays(1)
Dim FechaF = Now
'Dim NumDiasAlMes As Double = (365 / 12)
'Dim DiasTranscurridos = DateDiff(DateInterval.Day, FechaI, FechaF)
'Dim MesesTranscurridos As Double = DiasTranscurridos / NumDiasAlMes
'Dim MesesTranscurridos As Double = (DiasTranscurridos / NumDiasAlMes)
'Dim Diff = Math.Round(MesesTranscurridos - Math.Truncate(MesesTranscurridos), 2)
'Dim NoMesesTrascurridos = Math.Ceiling(MesesTranscurridos)
Dim NoMesesTrascurridos2 = DateDiff(DateInterval.Month, FechaI, FechaF)
TxtMesesUso.Text = (DateDiff(DateInterval.Month, FechaI, FechaF)).ToString()
'TxtMesesUso.Text = If(Diff > 0.5, NoMesesTrascurridos, NoMesesTrascurridos2).ToString()
TxtMesesUso.Text = NoMesesTrascurridos2.ToString
CalculaPorcentajeAjuste()
End Sub

View File

@@ -131,7 +131,7 @@
<%-- 14 --%>
<asp:BoundField DataField="CodigoPS" HeaderText="Articulo" ItemStyle-HorizontalAlign="Left" />
<%-- 15 --%>
<asp:BoundField DataField="Costo" HeaderText="Costo" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField DataField="CostoTotal" HeaderText="Costo" ItemStyle-HorizontalAlign="Right" />
<%-- 16 --%>
<asp:BoundField DataField="PLista" HeaderText="P.L." DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<%-- 17 --%>

View File

@@ -207,7 +207,7 @@
<ContentTemplate>
<asp:RadioButtonList runat="server" ID="RblTipoCambio" AutoPostBack="true">
<asp:ListItem Selected="true" Text="Moneda Original" Value="1"></asp:ListItem>
<asp:ListItem Text="Dólares en Tipo Cambio de la Fecha Compra" Value="2"></asp:ListItem>
<asp:ListItem Text="Dólares en Tipo Cambio de Pago" Value="2"></asp:ListItem>
<asp:ListItem Text="Tipo Cambio Especifico" Value="3"></asp:ListItem>
</asp:RadioButtonList>
<div class="row" style="margin-left: 10px;" runat="server" id="LiEspecifico" visible="false">

View File

@@ -219,7 +219,7 @@
<ContentTemplate>
<asp:RadioButtonList runat="server" ID="RblTipoCambio" OnSelectedIndexChanged="RblTipoCambio_SelectedIndexChanged" AutoPostBack="true">
<asp:ListItem Selected="true" Text="Moneda Original" Value="1"></asp:ListItem>
<asp:ListItem Text="Dólares en Tipo Cambio de la Fecha Compra" Value="2"></asp:ListItem>
<asp:ListItem Text="Dólares en Tipo Cambio de Pago" Value="2"></asp:ListItem>
<asp:ListItem Text="Tipo Cambio Especifico" Value="3"></asp:ListItem>
</asp:RadioButtonList>
<div class="row" style="margin-left: 10px;" runat="server" id="LiEspecifico" visible="false">

View File

@@ -216,7 +216,9 @@ Partial Class Ventas_RepVentasUtilidad
e.Row.CssClass = "Totales"
End If
If e.Row.DBCampo("CveVenta").ToEntero > 0 AndAlso Not CBool(e.Row.DBCampo("TienePago")) Then
e.Row.Cells(15).BackColor = Drawing.Color.LightPink
End If
Dim Liga As String = String.Format("/Ventas/RepVentasUtilidadDetalle.aspx?CveVenta={0}&CveVendedor={1}&FechaI={2:d}&FechaF={3:d}&CveCliente={4}&Orden={5}&CveSubProyecto={6}&CvePS={7}&CveClasificacion={8}",

View File

@@ -2952,26 +2952,24 @@
<asp:TextBox ID="TxtImporteCredito" CssClass="form-control input-sm " runat="server" MaxLength="12" Width="100px" ClientIDMode="Static" Style="text-align: right;"></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender1" runat="server" TargetControlID="TxtImporteCredito" FilterType="Custom, Numbers" ValidChars=".," />
</div>
<div class="col-md-6" runat="server" id="DivDdlCuentaTarjetaCredito" style="margin-right:-40px" >
<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>
<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;">
<div class="col-md-3" runat="server" id="DivMesesSinIntereses" visible="false" style="text-align: right;">
<asp:DropDownList ID="DDlMesesSinIntereses" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" Width="80%">
<asp:ListItem Value="-1">MSI</asp:ListItem>
<asp:ListItem Value="3">3M</asp:ListItem>
<asp:ListItem Value="6">6M</asp:ListItem>
<asp:ListItem Value="9">9M</asp:ListItem>
<asp:ListItem Value="12">12M</asp:ListItem>
</asp:DropDownList>
</asp:DropDownList>
<%--<asp:RequiredFieldValidator ID="RFVDDlMesesSinIntereses" runat="server" ControlToValidate="DDlMesesSinIntereses" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />campo <b>''Meses sin intereses''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpAgregarPago"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="CEDDlMesesSinIntereses" runat="server" HighlightCssClass="vco" TargetControlID="RFVDDlMesesSinIntereses" Width="300px"></ajax:ValidatorCalloutExtender>--%>
</div>
</div>
</div>
</div>
<div class="chequesie1">
@@ -3004,8 +3002,8 @@
</div>
</div>
</div>
<div class="chequesie1">
<div class="chequesie1">
<div class="row">
<label class="col-md-2">Transf.:</label>
<div class="col-md-4 input-icon">
@@ -3022,11 +3020,11 @@
</div>
<div class="chequesie1" runat="server" id ="DivContadoOtros" visible="false">
<div class="chequesie1" runat="server" id="DivContadoOtros" visible="false">
<div class="row">
<div class="col-md-2">
<asp:DropDownList runat="server" ID="DdlOtroFormaPago" ClientIDMode="Static" AutoPostBack="true" OnSelectedIndexChanged="DdlOtroFormaPago_SelectedIndexChanged">
<asp:DropDownList runat="server" ID="DdlOtroFormaPago" ClientIDMode="Static" AutoPostBack="true" OnSelectedIndexChanged="DdlOtroFormaPago_SelectedIndexChanged">
<asp:ListItem Value="-1">Otros</asp:ListItem>
<asp:ListItem Value="1">Credito</asp:ListItem>
<asp:ListItem Value="2">Debito</asp:ListItem>
@@ -3040,12 +3038,12 @@
<ajax:FilteredTextBoxExtender ID="FETxtImporteOtrosContado" runat="server" TargetControlID="TxtImporteOtrosContado" FilterType="Custom, Numbers" ValidChars=".," />
</div>
<div class="col-md-6" runat="server" id="DivContadoOtrosCuenta" >
<asp:DropDownList ID="DdlCuentaOtrosContado" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" Width="100%"></asp:DropDownList>
<div class="col-md-6" runat="server" id="DivContadoOtrosCuenta">
<asp:DropDownList ID="DdlCuentaOtrosContado" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" Width="100%"></asp:DropDownList>
<asp:RequiredFieldValidator ID="RequiredFieldValidator12" 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>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender24" runat="server" HighlightCssClass="vco" TargetControlID="RequiredFieldValidator1" Width="300px"></ajax:ValidatorCalloutExtender>
</div>
<div class="col-md-3" runat="server" id="DivMesesSinIntereses2" visible="false">
<asp:DropDownList ID="DdlMesesSinIntereses2" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" Width="100%">
<asp:ListItem Value="-1">Meses</asp:ListItem>
@@ -3053,13 +3051,13 @@
<asp:ListItem Value="6">6M</asp:ListItem>
<asp:ListItem Value="9">9M</asp:ListItem>
<asp:ListItem Value="12">12M</asp:ListItem>
</asp:DropDownList>
</asp:DropDownList>
</div>
</div>
</div>
<div class="chequesie2">
<div class="row">
@@ -3072,14 +3070,25 @@
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender3" runat="server" TargetControlID="TxtImporteContado" FilterType="Custom, Numbers" ValidChars=".," />
<asp:CompareValidator ID="CVImporteContado" runat="server" ControlToValidate="TxtImporteContado" Display="None" ErrorMessage="Importe excedido." Operator="LessThanEqual" Type="Double" ValidationGroup="GrpAgregarPago"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender6" runat="server" HighlightCssClass="vco" TargetControlID="CVImporteContado" Width="300px"></ajax:ValidatorCalloutExtender>
<%-- <asp:CompareValidator ID="CVImporteContado" runat="server" ControlToValidate="TxtImporteContado" Display="None" ErrorMessage="Importe excedido." Operator="LessThanEqual" Type="Double" ValidationGroup="GrpAgregarPago"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender6" runat="server" HighlightCssClass="vco" TargetControlID="CVImporteContado" Width="300px"></ajax:ValidatorCalloutExtender>--%>
<br></br>
</div>
</div>
<div class="row">
<div class="col-md-6">
</div>
<label class="col-md-2">Cambio:</label>
<div class="col-md-4 input-icon">
<i style="margin: 0px;">$</i>
<asp:TextBox ID="TxtCambio" CssClass="form-control input-sm " Enabled="false" runat="server" MaxLength="12" Width="100px" ClientIDMode="Static" Style="text-align: right;"></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="FTBECambio" runat="server" TargetControlID="TxtCambio" FilterType="Custom, Numbers" ValidChars=".," />
<br></br>
</div>
</div>
</div>
@@ -3434,7 +3443,7 @@
<asp:RequiredFieldValidator ID="RFVNCPSAnt" runat="server" InitialValue="-1" ControlToValidate="DdlNCPSAnt" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Concepto''</b> es necesario, por favor ingréselo." ValidationGroup="VGAnticiposClientes"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCERFVNCPSAnt" runat="server" HighlightCssClass="vco" TargetControlID="RFVNCPSAnt" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
</div>
<div class="row" id="DivFechaAnticipoCliente" runat="server" visible="false">
@@ -5763,7 +5772,7 @@
<asp:RequiredFieldValidator ID="RFVNCPS" runat="server" InitialValue="-1" ControlToValidate="DdlNCPS" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Concepto''</b> es necesario, por favor ingréselo." ValidationGroup="GrpModalAplicarNC"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCENCPS" runat="server" HighlightCssClass="vco" TargetControlID="RFVNCPS" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
<div class="col-md-4">
<div class="col-md-4">
<asp:Label ID="LblNCSaldoAnticipo" runat="server" Text=""></asp:Label>
<asp:CheckBox ID="ChkAplicaNCAnticipo" runat="server" Text="Aplicar a Anticipo" Visible="false" />
</div>
@@ -5812,13 +5821,13 @@
</div>
<div class="row form-group">
<div class="col-md-2">
<asp:Literal ID="LtlTitleImportesRem" runat="server" Visible="false" Text="Importe Remisiones:"></asp:Literal>
<asp:Literal ID="LtlTitleImportesRem" runat="server" Visible="false" Text="Importe Remisiones:"></asp:Literal>
</div>
<div class="col-md-4">
<div id="DivTxtRemNC" runat="server" visible="false">
<div class="input-group">
<span class="input-group-addon">$</span>
<asp:TextBox ID="TxtImportesRemisionesNC" ClientIDMode="Static" Text="0.00" CssClass="form-control input-sm" runat="server" Enabled="false"/>
<asp:TextBox ID="TxtImportesRemisionesNC" ClientIDMode="Static" Text="0.00" CssClass="form-control input-sm" runat="server" Enabled="false" />
</div>
<ajax:FilteredTextBoxExtender ID="FTIRNC" runat="server" TargetControlID="TxtImportesRemisionesNC" FilterType="Custom, Numbers" ValidChars=".," />
</div>
@@ -5841,7 +5850,7 @@
</div>
<div class="col-md-4">
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#ModalAplicarRemisionesNC">
Aplicar Remisiones
Aplicar Remisiones
</button>
</div>
<div class="col-md-6">
@@ -5954,7 +5963,7 @@
<input type="text" id="TxtBusquedaRemNC" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaRemNC','{0}')", GvRemisionesNC.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusquedaRemNC','{0}')", GvRemisionesNC.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</div>
<div class="row" style="max-height: 10px">
<div class="row" style="max-height: 10px">
<div class="col-md-12" style="height: 440px; overflow: auto">
<asp:GridView ID="GvRemisionesNC" runat="server" AutoGenerateColumns="False"
DataKeyNames="CveVenta" CssClass="table table-striped table-advance table-hover Widthall mysmallbtn" GridLines="None">
@@ -6370,8 +6379,7 @@
$get('TxtTotalGv').value = FormatoNumero(TotalImportes, 2);
$get('TxtNCImporte').value = FormatoNumero(total, 2);
if ('<%= UsuarioActual.Empresa.Funcionalidad(344) %>' == '1')
{
if ('<%= UsuarioActual.Empresa.Funcionalidad(344) %>' == '1') {
CompararNC();
}
@@ -6400,8 +6408,7 @@
TxtImporte.value = "";
}
if ('<%= UsuarioActual.Empresa.Funcionalidad(344) %>' == '1')
{
if ('<%= UsuarioActual.Empresa.Funcionalidad(344) %>' == '1') {
CompararNC();
}
}
@@ -6413,13 +6420,12 @@
TxtImporte.value = "";
}
if ('<%= UsuarioActual.Empresa.Funcionalidad(344) %>' == '1')
{
if ('<%= UsuarioActual.Empresa.Funcionalidad(344) %>' == '1') {
CompararNC();
}
}
function LimitaCantidadRNCMasivo(TxtImporte,Saldo, Chk) {
function LimitaCantidadRNCMasivo(TxtImporte, Saldo, Chk) {
var ImporteNuevo = TxtImporte.value;
Chk.checked = true;
@@ -6432,8 +6438,7 @@
TxtImporte.value = FormatoNumero(ImporteNuevo, 2);
}
if ('<%= UsuarioActual.Empresa.Funcionalidad(344) %>' == '1')
{
if ('<%= UsuarioActual.Empresa.Funcionalidad(344) %>' == '1') {
CompararNC();
}
}
@@ -6476,8 +6481,7 @@
TxtTotal.value = FormatoNumero(TotalConPorcentaje, 2);
if ('<%= UsuarioActual.Empresa.Funcionalidad(344) %>' == '1')
{
if ('<%= UsuarioActual.Empresa.Funcionalidad(344) %>' == '1') {
CompararNC();
}
}
@@ -6812,15 +6816,20 @@
var TotalOtrosContado = 0;
try{
try {
if ($('#DdlOtroFormaPago').val() != "-1") {
TotalOtrosContado = ToDouble($get("TxtImporteOtrosContado").value);
}
} catch (e) {}
}
} catch (e) { }
var total = totalEfectivo + totalCredito + totalDebito + totalCheque + totalTransferencia + TotalOtrosContado;
var totalVenta = ToDouble($get('TxtTotal').value);
if (total > totalVenta) {
$get("TxtCambio").value = FormatoNumero(total - totalVenta);
} else {
$get("TxtCambio").value = "0.00";
}
$get("TxtImporteContado").value = total;
}
@@ -7431,7 +7440,7 @@
}
}
function showDivEC() {
$('#<%= TxtRFCCliente.ClientID %>').val('');
$('#<%= TxtNombreCliente.ClientID %>').val('');
@@ -7463,7 +7472,7 @@
document.getElementById('<%= TxtNCImporte.ClientID %>').style.border = "2px solid #04B431";
document.getElementById('<%= TxtImportesRemisionesNC.ClientID %>').style.color = "";
document.getElementById('<%= TxtNCImporte.ClientID %>').style.color = "";
}
else {
@@ -7475,8 +7484,7 @@
}
function CerrarModalRemNC() {
if ('<%= UsuarioActual.Empresa.Funcionalidad(344) %>' == '1')
{
if ('<%= UsuarioActual.Empresa.Funcionalidad(344) %>' == '1') {
CompararNC();
}
$('#ModalAplicarRemisionesNC').modal('hide');

View File

@@ -3383,7 +3383,7 @@ Partial Class Ventas
GvPS.DataBind()
'JJMQ 20160506: Se agrego para la validacion de pago de contado.
CVImporteContado.ValueToCompare = TxtTotal.Text.Replace(",", "")
'CVImporteContado.ValueToCompare = TxtTotal.Text.Replace(",", "")
UpContado.Update()
UpPS.Update()
@@ -4102,7 +4102,7 @@ Partial Class Ventas
CalculaTotalesVenta(False)
'JJMQ 20160506: Se agrego para la validacion de pago de contado.
CVImporteContado.ValueToCompare = TxtTotal.Text.Replace(",", "")
'CVImporteContado.ValueToCompare = TxtTotal.Text.Replace(",", "")
'CARGA ANTICIPOS
If Not (CveRemision > 0 Or CveCotizacion > 0) Then
@@ -4333,7 +4333,7 @@ Partial Class Ventas
HdnSubTotalDescuestos.Value = (TxtSubTotal.Text.Replace(",", "").ToDouble - LblDescuentos.Text.Replace(",", "").ToDouble - LblAmortizacion.Text.Trim.Replace(",", "").ToDouble - TxtRetISR.Text.Replace(",", "").ToDouble).FormatoNumero(2)
'JJMQ 20160506: Se agrego para la validacion de pago de contado.
CVImporteContado.ValueToCompare = TxtTotal.Text.Replace(",", "")
'CVImporteContado.ValueToCompare = TxtTotal.Text.Replace(",", "")
If DdlVendedor.SelectedValue.ToEntero > 0 AndAlso Not UsuarioActual.TienePermisoProceso(161) Then
DdlVendedor.Enabled = False
@@ -5865,7 +5865,7 @@ Partial Class Ventas
'JJMQ 20160506: Se agrego para la validacion de pago de contado.
CVImporteContado.ValueToCompare = TxtTotal.Text.Replace(",", "")
'CVImporteContado.ValueToCompare = TxtTotal.Text.Replace(",", "")
UpPS.Update()
UpContado.Update()
@@ -5888,7 +5888,7 @@ Partial Class Ventas
Alert("Eliminado Correctamente.", TipoMensaje.MsgInformacion)
'JJMQ 20160506: Se agrego para la validacion de pago de contado.
CVImporteContado.ValueToCompare = TxtTotal.Text.Replace(",", "")
'CVImporteContado.ValueToCompare = TxtTotal.Text.Replace(",", "")
UpContado.Update()
End Sub
@@ -6997,6 +6997,10 @@ Partial Class Ventas
MensajeAlert.AppendFormat("<br/><br/><b> Se generó una Nota de crédito Folio: {0} amortizando el anticipo </b><br/>", ObjFacturaDevolucion.Folio)
End If
If RBLPago.SelectedValue.ToEntero = 2 And TxtCambio.Text.ToDecimal > 0 Then
MensajeAlert.AppendFormat("<br/><br/>Su cambio es de <b>${0}</b><br/>", TxtCambio.Text.ToDecimal.FormatoNumero(2))
End If
'MUESTA ALERT OK
' si es elrol 1165-Ventas,EMp:80, o la empresa 119, recarga ventas, para seguir registrando-.
Dim Liga = If(UsuarioActual.CveRol = 1165 Or UsuarioActual.CveEmpresa = 119, "document.location.href=""/Ventas/Ventas.aspx?CveVenta=-1"";", If(CveEmpresaCRM > 0, $"document.location.href=""/CRM/EmpresaCRM.aspx?CveEmpresaCRM={CveEmpresaCRM}"";", $"document.location.href=""/Ventas/Clientes.aspx?CveCliente={CveCliente}&Opt=3"";"))
@@ -10300,6 +10304,10 @@ Partial Class Ventas
Exit For
End If
'If DrPago("CveTipoMovimiento").ToString.ToEntero = 8 Then '13
' DrPago("Importe") = DrPago("Importe").ToString.ToDecimal - TxtCambio.Text.ToDecimal
'End If
CveIEPago = ObjBancos.AddBancos_IE(DrPago("CveCuenta").ToString.ToEntero, DrPago("CveTipoMovimiento").ToString.ToEntero, Fecha, FolioIE.ToString, String.Format("PAGO: {0}", TxtFolio.Text), DrPago("Importe").ToString.ToDouble, DdlMoneda.SelectedValue.ToEntero, tipoCambio, DrPago("Observaciones").ToString, "", False, False, -1, ObjFactura.CvePrePoliza, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCorte:=CveCorte, MesesSinIntereses:=DrPago("MesesSinIntereses").ToString.ToEntero)
If CveIEPago > 0 Then
@@ -10816,7 +10824,7 @@ Partial Class Ventas
ViewState("FolioFiscal") = drv("FolioFiscal").ToString
'JJMQ 20160506: Se agrego para la validacion de pago de contado.
CVImporteContado.ValueToCompare = TxtTotal.Text.Replace(",", "")
'CVImporteContado.ValueToCompare = TxtTotal.Text.Replace(",", "")
UpContado.Update()
If factura.CveCliente > 0 Then
@@ -14613,7 +14621,7 @@ Partial Class Ventas
HdnIVAOriginal.Value = TxtIVA.Text
'JJMQ 20160506: Se agrego para la validacion de pago de contado.
CVImporteContado.ValueToCompare = Total.ToString
'CVImporteContado.ValueToCompare = Total.ToString
If MensajeCveSAT IsNot Nothing AndAlso MensajeCveSAT.ToString.Length > 0 Then
Alert($"Los siguientes conceptos hace falta especificar clave SAT <br/><br/> {MensajeCveSAT.ToString}", TipoMensaje.MsgAdvertencia)
@@ -16442,7 +16450,7 @@ Partial Class Ventas
'JJMQ 20160506: Validacion para no pagar de mas a peticion de I.P.
Dim abonado = DtPagos.SUM("Importe")
Dim saldo = TxtTotal.Text.Replace(",", "").ToDouble - abonado
CVImporteContado.ValueToCompare = (saldo.FormatoNumero(2).ToDouble).ToString
'CVImporteContado.ValueToCompare = (saldo.FormatoNumero(2).ToDouble).ToString
CargaGridContado()
UpContado.Update()
@@ -16456,7 +16464,12 @@ Partial Class Ventas
If total <= 0 Then Alert("No se ha ingresado importe", TipoMensaje.MsgAdvertencia) : Exit Sub
If DtPagos.SUM("Importe").ToString.ToDecimal + total > TxtTotal.Text.ToDecimal Then
If TxtCambio.Text.ToDecimal > 0 And TxtImporteEfectivo.Text.ToDecimal < TxtCambio.Text.ToDecimal Then
Alert("Debe haber un pago en efectivo y ser mayor que el cambio. Si no, ser pago exacto.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
If (DtPagos.SUM("Importe").ToString.ToDecimal + total - TxtCambio.Text.ToDecimal) > TxtTotal.Text.ToDecimal Then
Alert("El importe de los pagos no puede exceder el importe de la factura. Por favor rectifique.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
@@ -16469,7 +16482,7 @@ Partial Class Ventas
DrEfectivo("TipoMovimiento") = "Pago en Efectivo"
DrEfectivo("CveCuenta") = DdlCuentaEfectivo.SelectedValue
DrEfectivo("Cuenta") = DdlCuentaEfectivo.SelectedItem.Text
DrEfectivo("Importe") = TxtImporteEfectivo.Text
DrEfectivo("Importe") = TxtImporteEfectivo.Text.ToDecimal - TxtCambio.Text.ToDecimal
DrEfectivo("Folio") = CargaFolioContado(DdlCuentaEfectivo.SelectedValue.ToEntero, 6)
DrEfectivo("Observaciones") = ""
DrEfectivo("Tipo") = "Caja Chica"
@@ -16654,7 +16667,7 @@ Partial Class Ventas
'JJMQ 20160506: Validacion para no pagar de mas a peticion de I.P.
abonado = DtPagos.SUM("Importe")
saldo = TxtTotal.Text.Replace(",", "").ToDouble - abonado
CVImporteContado.ValueToCompare = (saldo.FormatoNumero(2).ToDouble).ToString
'CVImporteContado.ValueToCompare = (saldo.FormatoNumero(2).ToDouble).ToString
CargaGridContado()
UpContado.Update()
@@ -16671,7 +16684,7 @@ Partial Class Ventas
Retorno = True
End If
If DtPagos.SUM("Importe").ToString.ToDecimal > TxtTotal.Text.ToDecimal Then
If (DtPagos.SUM("Importe").ToString.ToDecimal + Total - TxtCambio.Text.ToDecimal) > TxtTotal.Text.ToDecimal Then
Alert("El importe de los pagos no puede exceder el importe de la factura. Por favor verifique.", TipoMensaje.MsgAdvertencia)
Retorno = True
End If