Clientes abonar Liquidacion, ventas formato PU crear apartir de, IE correcion cancelacion de movimiento y complemento
This commit is contained in:
@@ -4606,7 +4606,7 @@ Partial Class Bancos_IE
|
||||
End If
|
||||
|
||||
|
||||
If Not ErrorCancelarComplemento Then
|
||||
If CveMotivoCancelacion > 0 AndAlso CveSATMotivoCancelacion > 0 Then
|
||||
|
||||
Dim ObjCancelacion As New Timbrado
|
||||
If EstatusSATCancelado(FolioFiscalCancelar, UsuarioActual.Empresa.RFC, RFCReceptorCancelar) Then
|
||||
@@ -4621,7 +4621,7 @@ Partial Class Bancos_IE
|
||||
Else
|
||||
If ObjCancelacion.CFDICancelar(UsuarioActual.Empresa, FolioFiscalCancelar, 0, RFCReceptorCancelar, UsuarioActual.Empresa.RFC, CvePACCancelacion, CveSATMotivoCancelacion:=CveSATMotivoCancelacion) Then
|
||||
|
||||
If Banc.UpdateComplementoPago(CveComplementoPagoCancelar, "-1", -1, UsuarioActual.CveEmpresa, 2, CvePACCancelacion, FechaCancelacion:=ObjCancelacion.CancelacionFecha, SelloCancelacion:=ObjCancelacion.CancelacionAcuse) Then
|
||||
If Banc.UpdateComplementoPago(CveComplementoPagoCancelar, "-1", -1, UsuarioActual.CveEmpresa, 2, CvePACCancelacion, FechaCancelacion:=ObjCancelacion.CancelacionFecha, SelloCancelacion:=ObjCancelacion.CancelacionAcuse, CveSATMotivoCancelacion:=CveSATMotivoCancelacion) Then
|
||||
CargaComplementosPago()
|
||||
RegistraScript("$('#ModalCancelarComplemetno').modal('hide');")
|
||||
ErrorCancelarComplemento = False
|
||||
|
||||
@@ -187,11 +187,18 @@
|
||||
<asp:TextBox ID="TxtTotal" runat="server" CssClass="form-control input-sm" Visible="false" MaxLength="12" Width="140px" placeholder="Total" Enabled="false" ClientIDMode="Static" Style="text-align: right;"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" runat="server" id="rowComisiones">
|
||||
<label class="col-md-2" runat="server" id="lblpagocomisiones">Otros Ingresos:</label>
|
||||
<div class="col-md-3">
|
||||
<div class="row">
|
||||
<div class="col-md-2" runat="server" id="rowComisiones1">Otros Ingresos:</div>
|
||||
<div class="col-md-3" runat="server" id="rowComisiones2">
|
||||
<asp:CheckBox ID="ChkAjusteOI" runat="server" AutoPostBack="true" />
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-2" runat="server" id="DvLiquidacion1" visible="false">Liquidación:</div>
|
||||
<div class="col-md-3" runat="server" id="DvLiquidacion2" visible="false">
|
||||
<asp:CheckBox ID="ChkLiquidacion" OnCheckedChanged="ChkLiquidacion_CheckedChanged" runat="server" AutoPostBack="true" />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<asp:UpdatePanel ID="UpCuentaDeposito" UpdateMode="Conditional" runat="server">
|
||||
@@ -264,6 +271,8 @@
|
||||
DataKeyNames="TipoDocto,CveVenta,CveCliente,SerieFolio,Original,SubTotal,IVA,IEPS,RetIVA,RetISR,Num3,CveSubProyecto,CveMoneda,Saldo,TipoCambio, RFC,UUID,Fecha,PorcentajeIVA,DescuentoProntoPago,CveTipoRetencion,Descuento,ClaveMetodoPagoSAT"
|
||||
CssClass="table table-striped table-advance table-hover Widthall" Style="text-align: center;" GridLines="None">
|
||||
<Columns>
|
||||
|
||||
<%--0--%>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<input type="checkbox" id="ChkAll" onclick="CheckAll();" />
|
||||
@@ -272,58 +281,84 @@
|
||||
<asp:CheckBox ID="Chk" CssClass="chkgv" runat="server"></asp:CheckBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--1--%>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left">
|
||||
<HeaderTemplate>Venta</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HplF" CssClass="Texto" NavigateUrl='<%# Eval("CveVenta", "/Ventas/Ventas.aspx?CveVenta={0}")%>' Text='<%# Eval("SerieFolio")%>' runat="server"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="Tipo Docto" DataField="TipoDocto" ItemStyle-HorizontalAlign="Center" />
|
||||
<%--<asp:HyperLinkField DataNavigateUrlFields="CveCompra" DataNavigateUrlFormatString="/Compras/Compras.aspx?CveCompra={0}" DataTextField="SerieFolio" HeaderText="Factura" ControlStyle-CssClass="Texto" />--%>
|
||||
<%--2--%>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center">
|
||||
<HeaderTemplate>Fecha Venta</HeaderTemplate>
|
||||
<HeaderTemplate>Tipo<br> Docto</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlTipoDocto" runat="server" Text='<%# Eval("TipoDocto") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--3--%>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center">
|
||||
<HeaderTemplate>Fecha<br> Venta</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("Fecha", "{0:d}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--4--%>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center">
|
||||
<HeaderTemplate>Fecha Vencimiento</HeaderTemplate>
|
||||
<HeaderTemplate>Fecha <br> Vencimiento</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFechaVenci" runat="server" Text='<%# Eval("FechaVencimiento", "{0:d}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--5--%>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center">
|
||||
<HeaderTemplate>Días Vencidos</HeaderTemplate>
|
||||
<HeaderTemplate>Días<br> Vencidos</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlDiasVencido" runat="server" Text='<%# Eval("DiasVencidos", "{0}") %>'></asp:Literal>
|
||||
<asp:Literal ID="LtlDiasVencido" runat="server" Text='<%# Eval("DiasVencidos", "{0}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="Método de Pago" DataField="ClaveMetodoPagoSAT" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Forma de Pago" DataField="FormaPago" ItemStyle-HorizontalAlign="Left" />
|
||||
<%--6--%>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left">
|
||||
<HeaderTemplate>Método<br> de Pago</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlMetodoPago" runat="server" Text='<%# Eval("ClaveMetodoPagoSAT", "{0}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--7--%>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left">
|
||||
<HeaderTemplate>Forma<br> de Pago</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFormaPago" runat="server" Text='<%# Eval("FormaPago", "{0}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--8--%>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right">
|
||||
<HeaderTemplate>Monto Compra</HeaderTemplate>
|
||||
<HeaderTemplate>Monto <br> Compra</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlSaldoOriginal" runat="server" Text='<%# Eval("Original", "{0:N2}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--9--%>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center">
|
||||
<HeaderTemplate></HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="LtlMoneda" runat="server" Text='<%# Eval("TMoneda", "{0}") %>' Style="text-decoration: none" Enabled="false" ForeColor="#333333"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--10--%>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Abonado</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlAbonado" runat="server" Text='<%# Eval("Abonado", "{0:N2}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--11--%>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Saldo</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlSaldo" runat="server" Text='<%# Eval("Saldo", "{0:N2}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--12--%>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center">
|
||||
<HeaderTemplate>Abonar</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
@@ -331,6 +366,7 @@
|
||||
<asp:RangeValidator ID="RVAbonar" runat="server" Enabled="false" Type="Currency" MinimumValue="0" MaximumValue='<%# Eval("Saldo", "{0:N2}") %>' ErrorMessage="*" ControlToValidate="TxtAbonar" Display="Dynamic"></asp:RangeValidator>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--13--%>
|
||||
<asp:TemplateField Visible="false">
|
||||
<HeaderTemplate>Ot. Ing.</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
@@ -338,33 +374,96 @@
|
||||
<asp:RangeValidator ID="RVComision" runat="server" Enabled="false" ErrorMessage="*" ControlToValidate="TxtComision" Display="Dynamic" Type="Double"></asp:RangeValidator>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--14--%>
|
||||
<asp:TemplateField Visible="false" ItemStyle-HorizontalAlign="Center">
|
||||
<HeaderTemplate>Descuento Pronto Pago</HeaderTemplate>
|
||||
<HeaderTemplate>Descuento<br>Pronto Pago</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlDescuentoProntoPago" runat="server" Text='<%# Eval("DescuentoProntoPago", "{0:N2}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Generar NC" Visible="false" >
|
||||
<%--15--%>
|
||||
<asp:TemplateField Visible="false" >
|
||||
<HeaderTemplate>Generar<br> NC</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="ChkGenerarNC" CssClass="chkgv" runat="server" Visible="false" Enabled="false"></asp:CheckBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<%--16--%>
|
||||
<asp:TemplateField Visible="false">
|
||||
<HeaderTemplate>Col. 1</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtLiquidacionCol1" Width="50px" runat="server" Style="text-align: right;" ></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--17--%>
|
||||
<asp:TemplateField Visible="false">
|
||||
<HeaderTemplate>Col. 2</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtLiquidacionCol2" Width="50px" runat="server" Style="text-align: right;" ></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--18--%>
|
||||
<asp:TemplateField Visible="false">
|
||||
<HeaderTemplate>Col. 3</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtLiquidacionCol3" Width="50px" runat="server" Style="text-align: right;" ></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--19--%>
|
||||
<asp:TemplateField Visible="false">
|
||||
<HeaderTemplate>Col. 4</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtLiquidacionCol4" Width="50px" runat="server" Style="text-align: right;" ></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--20--%>
|
||||
<asp:TemplateField Visible="false">
|
||||
<HeaderTemplate>Col. 5</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtLiquidacionCol5" Width="50px" runat="server" Style="text-align: right;" ></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--21--%>
|
||||
<asp:TemplateField Visible="false">
|
||||
<HeaderTemplate>Col. 6</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtLiquidacionCol6" Width="50px" runat="server" Style="text-align: right;" ></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--22--%>
|
||||
<asp:TemplateField Visible="false">
|
||||
<HeaderTemplate>Col. 7</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtLiquidacionCol7" Width="50px" runat="server" Style="text-align: right;" ></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--23--%>
|
||||
<asp:TemplateField Visible="false">
|
||||
<HeaderTemplate>Total<br>Liquidación</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtLiquidacionCol8" Width="50px" runat="server" Style="text-align: right;" onkeypress="return disablekeys();"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<%--24--%>
|
||||
<asp:TemplateField ItemStyle-Width="300px">
|
||||
<HeaderTemplate>Auxiliar</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlAux" runat="server"></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--25--%>
|
||||
<asp:TemplateField Visible="False">
|
||||
<HeaderTemplate>CveVenta</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HplF2" CssClass="btn-success" Text='<%# Eval("CveVenta")%>' runat="server"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<%--26--%>
|
||||
<asp:TemplateField >
|
||||
<HeaderTemplate>Complemento Pago</HeaderTemplate>
|
||||
<HeaderTemplate>Complemento<br> Pago</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal runat="server" ID="LtlComplemento" Text="<i class='fa fa-check text-success ' aria-hidden='true'></i>" ></asp:Literal>
|
||||
</ItemTemplate>
|
||||
@@ -508,7 +607,7 @@
|
||||
<script type="text/javascript">
|
||||
var Ventas = '';
|
||||
|
||||
function FnSuma(t, txt, importe) {
|
||||
function FnSuma(t, txt, importe, CveVenta) {
|
||||
|
||||
var chkPesosBancos = $get("ChkPagarPesos");
|
||||
var chkDolaresBancos = $get("ChkPagarDolares");
|
||||
@@ -518,6 +617,14 @@
|
||||
txt.value = FormatoNumero(importe, 2);
|
||||
} else {
|
||||
txt.value = "";
|
||||
|
||||
let ClsSelLiquidacionVenta = ".ClsSelLiquidacionVenta" + CveVenta;
|
||||
let ClsSelLiquidacionVentaTotal = ".ClsSelLiquidacionVentaTotal" + CveVenta;
|
||||
|
||||
$(ClsSelLiquidacionVenta).val('');
|
||||
$(ClsSelLiquidacionVentaTotal).val('');
|
||||
|
||||
|
||||
}
|
||||
//if (typeof t2 === "undefined") {
|
||||
|
||||
@@ -548,6 +655,8 @@
|
||||
var facDolares = false;
|
||||
var div = document.getElementById("DivTC")
|
||||
|
||||
let totalLiquidacion = 0.0;
|
||||
|
||||
if ($get('TxtTC') != null) {
|
||||
tc = ToDouble($get('TxtTC').value);
|
||||
}
|
||||
@@ -602,6 +711,22 @@
|
||||
}
|
||||
$get('TxtObservaciones').value = $get('HdnObs').value + ' Ventas: ' + Ventas;
|
||||
|
||||
|
||||
|
||||
|
||||
$(".ClsSelLiquidacion").each(function () {
|
||||
|
||||
let valorString = $(this).val();
|
||||
valorString = valorString.replace(/,/g, '');
|
||||
|
||||
if (valorString.trim().length > 0) {
|
||||
totalLiquidacion = totalLiquidacion + parseFloat(valorString);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
if ($get('TxtOtrosImportes') != null) {
|
||||
if (pagoMultiple != 0) {
|
||||
$get('TxtOtrosImportes').value = FormatoNumero(Comision, 2);
|
||||
@@ -612,12 +737,12 @@
|
||||
|
||||
}
|
||||
else {
|
||||
return Importe + parseFloat(Comision);
|
||||
return Importe + parseFloat(Comision) - totalLiquidacion;
|
||||
}
|
||||
|
||||
}
|
||||
else {
|
||||
return Importe
|
||||
return Importe - totalLiquidacion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -790,5 +915,44 @@
|
||||
TipoCambioActual = TipoCambioTxt;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
function SumaLiquidacion(txt, CveVenta, pagoMultiple, monedaPago) {
|
||||
|
||||
let ClsSelLiquidacionVenta = ".ClsSelLiquidacionVenta" + CveVenta;
|
||||
let ClsSelLiquidacionVentaTotal = ".ClsSelLiquidacionVentaTotal" + CveVenta;
|
||||
let Total = 0.0;
|
||||
|
||||
|
||||
$( ClsSelLiquidacionVenta).each(function () {
|
||||
|
||||
let valorString = $(this).val();
|
||||
valorString = valorString.replace(/,/g, '');
|
||||
|
||||
if (valorString.trim().length > 0) {
|
||||
Total = Total + parseFloat(valorString);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
$(ClsSelLiquidacionVentaTotal).each(function () {
|
||||
$(this).val(Total);
|
||||
FormatoMoneda2($(this));
|
||||
});
|
||||
|
||||
|
||||
FormatoMoneda(txt);
|
||||
|
||||
var Suma = SumaValores(pagoMultiple, monedaPago);
|
||||
$get('TxtImporte').value = FormatoNumero(Suma, 2);
|
||||
|
||||
}
|
||||
|
||||
function disablekeys()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
</script>
|
||||
</asp:Content>
|
||||
|
||||
@@ -257,7 +257,7 @@ Partial Class Ventas_ClientesAbonar
|
||||
|
||||
IdCuentaBancaria = 0
|
||||
|
||||
TxtOtrosImportes.Attributes.Add("onKeyUp", String.Format("FnSuma(this,{0},{1});", "TxtTotal", 0))
|
||||
TxtOtrosImportes.Attributes.Add("onKeyUp", String.Format("FnSuma(this,{0},{1},-1);", "TxtTotal", 0))
|
||||
|
||||
If CveMoneda > 0 Then LbTipoMoneda.Text = String.Format("Pago en {0}", GlobalDTMonedas.FiltraParametros(String.Format("CveMoneda = {0}", CveMoneda)).Rows(0)("Moneda"))
|
||||
|
||||
@@ -292,6 +292,12 @@ Partial Class Ventas_ClientesAbonar
|
||||
|
||||
RVTxtFechaDocumento.MaximumValue = Now.ToString("dd/MM/yyyy")
|
||||
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(590) = "1" Then
|
||||
DvLiquidacion1.Visible = True
|
||||
DvLiquidacion2.Visible = True
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
If (CveMonedaFiltro = 2 And ChkPagarPesos.Checked) Then
|
||||
@@ -497,6 +503,7 @@ Partial Class Ventas_ClientesAbonar
|
||||
End Sub
|
||||
|
||||
Protected Sub GvCxC_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvCxC.RowDataBound
|
||||
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
Dim moneda As Integer = 0
|
||||
If e.Row.RowIndex = 0 Then
|
||||
@@ -507,6 +514,19 @@ Partial Class Ventas_ClientesAbonar
|
||||
e.Row.Cells(3).Visible = False
|
||||
e.Row.Cells(4).Visible = False
|
||||
e.Row.BackColor = Drawing.Color.LightGray
|
||||
|
||||
|
||||
e.Row.FCTextBox("TxtLiquidacionCol1").Visible = False
|
||||
e.Row.FCTextBox("TxtLiquidacionCol2").Visible = False
|
||||
e.Row.FCTextBox("TxtLiquidacionCol3").Visible = False
|
||||
e.Row.FCTextBox("TxtLiquidacionCol4").Visible = False
|
||||
e.Row.FCTextBox("TxtLiquidacionCol5").Visible = False
|
||||
e.Row.FCTextBox("TxtLiquidacionCol6").Visible = False
|
||||
e.Row.FCTextBox("TxtLiquidacionCol7").Visible = False
|
||||
e.Row.FCTextBox("TxtLiquidacionCol8").Visible = False
|
||||
|
||||
|
||||
|
||||
End If
|
||||
If e.Row.RowIndex = 1 Then
|
||||
e.Row.Cells(0).Width = Unit.Pixel(25)
|
||||
@@ -548,9 +568,9 @@ Partial Class Ventas_ClientesAbonar
|
||||
End Select
|
||||
|
||||
If e.Row.DBCampo("DescuentoProntoPago").ToDecimal() > 0 Then
|
||||
e.Row.FCCheckBox("Chk").Attributes.Add("onclick", String.Format("FnSuma(this,{0},{1}); FnCambia({2},this,{1},0,{3},{4}); FnSeleccionaNC({5},{6},{0});", e.Row.FCTextBox("TxtAbonar").ClientID, e.Row.DBCampo("Saldo"), e.Row.FCCheckBox("Chk").ClientID, CveMonedaFiltro, moneda, e.Row.FCCheckBox("Chk").ClientID, e.Row.FCCheckBox("ChkGenerarNC").ClientID))
|
||||
e.Row.FCCheckBox("Chk").Attributes.Add("onclick", String.Format("FnSuma(this,{0},{1},{5}); FnCambia({2},this,{1},0,{3},{4}); FnSeleccionaNC({5},{6},{0});", e.Row.FCTextBox("TxtAbonar").ClientID, e.Row.DBCampo("Saldo"), e.Row.FCCheckBox("Chk").ClientID, CveMonedaFiltro, moneda, e.Row.FCCheckBox("Chk").ClientID, e.Row.FCCheckBox("ChkGenerarNC").ClientID, e.Row.DBCampo("CveVenta")))
|
||||
Else
|
||||
e.Row.FCCheckBox("Chk").Attributes.Add("onclick", String.Format("FnSuma(this,{0},{1}); FnCambia({2},this,{1},0,{3},{4});", e.Row.FCTextBox("TxtAbonar").ClientID, e.Row.DBCampo("Saldo"), e.Row.FCCheckBox("Chk").ClientID, CveMonedaFiltro, moneda))
|
||||
e.Row.FCCheckBox("Chk").Attributes.Add("onclick", String.Format("FnSuma(this,{0},{1},{5}); FnCambia({2},this,{1},0,{3},{4},{5});", e.Row.FCTextBox("TxtAbonar").ClientID, e.Row.DBCampo("Saldo"), e.Row.FCCheckBox("Chk").ClientID, CveMonedaFiltro, moneda, e.Row.DBCampo("CveVenta")))
|
||||
End If
|
||||
|
||||
If Not UsuarioActual.Empresa.Funcionalidad(536) = "1" Then
|
||||
@@ -578,9 +598,32 @@ Partial Class Ventas_ClientesAbonar
|
||||
|
||||
If e.Row.DBCampo("DescuentoProntoPago").ToDecimal() > 0 AndAlso e.Row.DBCampo("DiasVencidos").ToEntero() <= 0 Then
|
||||
e.Row.FCCheckBox("ChkGenerarNC").Visible = True
|
||||
e.Row.FCCheckBox("ChkGenerarNC").Attributes.Add("onclick", String.Format("FnSuma(this,{0},{1}); FnCambia({2},this,{1},0,{3},{4}); FnEditarImporte({2}, {0});", e.Row.FCTextBox("TxtAbonar").ClientID, e.Row.DBCampo("Saldo").ToDecimal - e.Row.DBCampo("DescuentoProntoPago").ToDecimal, e.Row.FCCheckBox("ChkGenerarNC").ClientID, CveMonedaFiltro, moneda))
|
||||
e.Row.FCCheckBox("ChkGenerarNC").Attributes.Add("onclick", String.Format("FnSuma(this,{0},{1},{5}); FnCambia({2},this,{1},0,{3},{4}); FnEditarImporte({2}, {0});", e.Row.FCTextBox("TxtAbonar").ClientID, e.Row.DBCampo("Saldo").ToDecimal - e.Row.DBCampo("DescuentoProntoPago").ToDecimal, e.Row.FCCheckBox("ChkGenerarNC").ClientID, CveMonedaFiltro, moneda, e.Row.DBCampo("CveVenta")))
|
||||
End If
|
||||
|
||||
e.Row.FCTextBox("TxtLiquidacionCol1").Attributes.Add("class", $"ClsSelLiquidacion ClsSelLiquidacionVenta{e.Row.DBCampo("CveVenta").ToEntero}")
|
||||
e.Row.FCTextBox("TxtLiquidacionCol2").Attributes.Add("class", $"ClsSelLiquidacion ClsSelLiquidacionVenta{e.Row.DBCampo("CveVenta").ToEntero}")
|
||||
e.Row.FCTextBox("TxtLiquidacionCol3").Attributes.Add("class", $"ClsSelLiquidacion ClsSelLiquidacionVenta{e.Row.DBCampo("CveVenta").ToEntero}")
|
||||
e.Row.FCTextBox("TxtLiquidacionCol4").Attributes.Add("class", $"ClsSelLiquidacion ClsSelLiquidacionVenta{e.Row.DBCampo("CveVenta").ToEntero}")
|
||||
e.Row.FCTextBox("TxtLiquidacionCol5").Attributes.Add("class", $"ClsSelLiquidacion ClsSelLiquidacionVenta{e.Row.DBCampo("CveVenta").ToEntero}")
|
||||
e.Row.FCTextBox("TxtLiquidacionCol6").Attributes.Add("class", $"ClsSelLiquidacion ClsSelLiquidacionVenta{e.Row.DBCampo("CveVenta").ToEntero}")
|
||||
e.Row.FCTextBox("TxtLiquidacionCol7").Attributes.Add("class", $"ClsSelLiquidacion ClsSelLiquidacionVenta{e.Row.DBCampo("CveVenta").ToEntero}")
|
||||
e.Row.FCTextBox("TxtLiquidacionCol8").Attributes.Add("class", $"ClsSelLiquidacionVentaTotal{e.Row.DBCampo("CveVenta").ToEntero}")
|
||||
|
||||
|
||||
e.Row.FCTextBox("TxtLiquidacionCol1").Attributes.Add("onkeyup", $"SumaLiquidacion(this,{e.Row.DBCampo("CveVenta").ToString},{CveMonedaFiltro},{ moneda})")
|
||||
e.Row.FCTextBox("TxtLiquidacionCol2").Attributes.Add("onkeyup", $"SumaLiquidacion(this,{e.Row.DBCampo("CveVenta").ToString},{CveMonedaFiltro},{ moneda})")
|
||||
e.Row.FCTextBox("TxtLiquidacionCol3").Attributes.Add("onkeyup", $"SumaLiquidacion(this,{e.Row.DBCampo("CveVenta").ToString},{CveMonedaFiltro},{ moneda})")
|
||||
e.Row.FCTextBox("TxtLiquidacionCol4").Attributes.Add("onkeyup", $"SumaLiquidacion(this,{e.Row.DBCampo("CveVenta").ToString},{CveMonedaFiltro},{ moneda})")
|
||||
e.Row.FCTextBox("TxtLiquidacionCol5").Attributes.Add("onkeyup", $"SumaLiquidacion(this,{e.Row.DBCampo("CveVenta").ToString},{CveMonedaFiltro},{ moneda})")
|
||||
e.Row.FCTextBox("TxtLiquidacionCol6").Attributes.Add("onkeyup", $"SumaLiquidacion(this,{e.Row.DBCampo("CveVenta").ToString},{CveMonedaFiltro},{ moneda})")
|
||||
e.Row.FCTextBox("TxtLiquidacionCol7").Attributes.Add("onkeyup", $"SumaLiquidacion(this,{e.Row.DBCampo("CveVenta").ToString},{CveMonedaFiltro},{ moneda})")
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Else
|
||||
e.Row.FCTextBox("TxtAbonar").Visible = False
|
||||
e.Row.FCTextBox("TxtComision").Visible = False
|
||||
@@ -823,7 +866,9 @@ Partial Class Ventas_ClientesAbonar
|
||||
|
||||
'inserto las ventas que voy a pagar
|
||||
For Each gvr As GridViewRow In GvCxC.Rows
|
||||
|
||||
If gvr.FCCheckBox("Chk").Checked Then
|
||||
|
||||
Dim ObjFactura As Modelos.Factura = Nothing
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||
@@ -861,6 +906,7 @@ Partial Class Ventas_ClientesAbonar
|
||||
If gvr.DataKey("TipoDocto") = "Ant" AndAlso UsuarioActual.CveEmpresa.Contiene(1, 119, 158) Then EsAnticipoEspecial = True
|
||||
|
||||
If dtConceptos IsNot Nothing Then
|
||||
|
||||
For Each Row As DataRow In dtConceptos.Rows
|
||||
|
||||
Dim ConceptoContable = Row("CveConcepto").ToString.ToEntero
|
||||
@@ -1487,7 +1533,84 @@ Partial Class Ventas_ClientesAbonar
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
|
||||
Dim ImporteLiquidacion1 As Decimal = gvr.FCTextBox("TxtLiquidacionCol1").Text.ToDecimal
|
||||
Dim ImporteLiquidacion2 As Decimal = gvr.FCTextBox("TxtLiquidacionCol2").Text.ToDecimal
|
||||
Dim ImporteLiquidacion3 As Decimal = gvr.FCTextBox("TxtLiquidacionCol3").Text.ToDecimal
|
||||
Dim ImporteLiquidacion4 As Decimal = gvr.FCTextBox("TxtLiquidacionCol4").Text.ToDecimal
|
||||
Dim ImporteLiquidacion5 As Decimal = gvr.FCTextBox("TxtLiquidacionCol5").Text.ToDecimal
|
||||
Dim ImporteLiquidacion6 As Decimal = gvr.FCTextBox("TxtLiquidacionCol6").Text.ToDecimal
|
||||
Dim ImporteLiquidacion7 As Decimal = gvr.FCTextBox("TxtLiquidacionCol7").Text.ToDecimal
|
||||
|
||||
Dim CveClasificacionCol1 As Integer = 21267
|
||||
Dim CveClasificacionCol2 As Integer = 21229
|
||||
Dim CveClasificacionCol3 As Integer = 21520
|
||||
Dim CveClasificacionCol4 As Integer = 21519
|
||||
Dim CveClasificacionCol5 As Integer = 21547
|
||||
Dim CveClasificacionCol6 As Integer = 21572
|
||||
Dim CveClasificacionCol7 As Integer = 21571
|
||||
|
||||
Dim CveSubProyectoLiquidacion As Integer = gvr.DataKey("CveSubProyecto").ToEntero
|
||||
|
||||
Dim CveConceptoLiquidacion As Integer = 51
|
||||
|
||||
If ImporteLiquidacion1 <> 0 Then
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiquidacion1, "Liquidacion Col 1", CveConceptoLiquidacion, "Liquidacion Col 2", Now, -1, -1, CveIE, gvr.FCHyperLink("HplF2").Text.ToEntero, -1, CveSubProyectoLiquidacion, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteLiquidacion1 * tipoCambioPago, TipoCambio:=TipoCambioGeneral, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol1) Then
|
||||
MsgError = "No se pudo insertar la póliza"
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
|
||||
If ImporteLiquidacion2 <> 0 Then
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiquidacion2, "Liquidacion Col 2", CveConceptoLiquidacion, "Liquidacion Col 2", Now, -1, -1, CveIE, gvr.FCHyperLink("HplF2").Text.ToEntero, -1, CveSubProyectoLiquidacion, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteLiquidacion2 * tipoCambioPago, TipoCambio:=TipoCambioGeneral, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol2) Then
|
||||
MsgError = "No se pudo insertar la póliza"
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
|
||||
If ImporteLiquidacion3 <> 0 Then
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiquidacion3, "Liquidacion Col 4", CveConceptoLiquidacion, "Liquidacion Col 3", Now, -1, -1, CveIE, gvr.FCHyperLink("HplF2").Text.ToEntero, -1, CveSubProyectoLiquidacion, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteLiquidacion3 * tipoCambioPago, TipoCambio:=TipoCambioGeneral, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol3) Then
|
||||
MsgError = "No se pudo insertar la póliza"
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
If ImporteLiquidacion4 <> 0 Then
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiquidacion4, "Liquidacion Col 4", CveConceptoLiquidacion, "Liquidacion Col 4", Now, -1, -1, CveIE, gvr.FCHyperLink("HplF2").Text.ToEntero, -1, CveSubProyectoLiquidacion, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteLiquidacion4 * tipoCambioPago, TipoCambio:=TipoCambioGeneral, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol4) Then
|
||||
MsgError = "No se pudo insertar la póliza"
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
If ImporteLiquidacion5 <> 0 Then
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiquidacion5, "Liquidacion Col 5", CveConceptoLiquidacion, "Liquidacion Col 5", Now, -1, -1, CveIE, gvr.FCHyperLink("HplF2").Text.ToEntero, -1, CveSubProyectoLiquidacion, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteLiquidacion5 * tipoCambioPago, TipoCambio:=TipoCambioGeneral, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol5) Then
|
||||
MsgError = "No se pudo insertar la póliza"
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
|
||||
If ImporteLiquidacion6 <> 0 Then
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiquidacion6, "Liquidacion Col 6", CveConceptoLiquidacion, "Liquidacion Col 6", Now, -1, -1, CveIE, gvr.FCHyperLink("HplF2").Text.ToEntero, -1, CveSubProyectoLiquidacion, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteLiquidacion6 * tipoCambioPago, TipoCambio:=TipoCambioGeneral, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol6) Then
|
||||
MsgError = "No se pudo insertar la póliza"
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
|
||||
If ImporteLiquidacion7 <> 0 Then
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiquidacion7, "Liquidacion Col 7", CveConceptoLiquidacion, "Liquidacion Col 7", Now, -1, -1, CveIE, gvr.FCHyperLink("HplF2").Text.ToEntero, -1, CveSubProyectoLiquidacion, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteLiquidacion7 * tipoCambioPago, TipoCambio:=TipoCambioGeneral, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol7) Then
|
||||
MsgError = "No se pudo insertar la póliza"
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End If
|
||||
If gvr.FCCheckBox("ChkGenerarNC").Checked AndAlso ObjFactura IsNot Nothing Then
|
||||
ObjFactura.DescuentoProntoPago = gvr.DataKey("DescuentoProntoPago").ToDecimal()
|
||||
@@ -3136,4 +3259,46 @@ Partial Class Ventas_ClientesAbonar
|
||||
Calendario.EndDate = DateTime.Now
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
#Region "LIQUIDACION"
|
||||
|
||||
Protected Sub ChkLiquidacion_CheckedChanged(sender As Object, e As EventArgs)
|
||||
|
||||
|
||||
If ChkLiquidacion.Checked Then
|
||||
'16-23
|
||||
GvCxC.Columns(16).Visible = True
|
||||
GvCxC.Columns(17).Visible = True
|
||||
GvCxC.Columns(18).Visible = True
|
||||
GvCxC.Columns(19).Visible = True
|
||||
GvCxC.Columns(20).Visible = True
|
||||
GvCxC.Columns(21).Visible = True
|
||||
GvCxC.Columns(22).Visible = True
|
||||
GvCxC.Columns(23).Visible = True
|
||||
|
||||
GvCxC.Columns(26).Visible = False
|
||||
|
||||
Else
|
||||
GvCxC.Columns(16).Visible = False
|
||||
GvCxC.Columns(17).Visible = False
|
||||
GvCxC.Columns(18).Visible = False
|
||||
GvCxC.Columns(19).Visible = False
|
||||
GvCxC.Columns(20).Visible = False
|
||||
GvCxC.Columns(21).Visible = False
|
||||
GvCxC.Columns(22).Visible = False
|
||||
GvCxC.Columns(23).Visible = False
|
||||
|
||||
GvCxC.Columns(26).Visible = True
|
||||
|
||||
|
||||
End If
|
||||
|
||||
UPVentas.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
@@ -1170,11 +1170,13 @@
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:Literal ID="LtlPU" runat="server" Text='<%# Eval("PU") %>' Visible="false"></asp:Literal>
|
||||
<asp:TextBox ID="TxtPrecio" runat="server" CausesValidation="true" MaxLength="12" Text='<%# Eval("PU") %>' ValidationGroup="GprGV" Width="78px" Height="24px"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtPrecio" runat="server" CausesValidation="true" MaxLength="12" Text='<%# Eval("PU", "{0:0.00####}") %>' ValidationGroup="GprGV" Width="78px" Height="24px"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="SoloNumeros" runat="server" TargetControlID="TxtPrecio" FilterType="Custom, Numbers" ValidChars="." />
|
||||
<asp:RequiredFieldValidator ID="RFVPrecio" runat="server" ControlToValidate="TxtPrecio" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Precio''</b> es necesario, por favor ingréselo." ValidationGroup="GprGV"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCPrecio" runat="server" HighlightCssClass="vco" TargetControlID="RFVPrecio" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
<asp:CustomValidator ID="CVPrecioEdit" runat="server" ClientValidationFunction="ValidaDecimal6digits" ControlToValidate="TxtPrecio" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Precio''</b> no tiene el formato correcto. Por favor rectifique y vuelva a intentar." ValidateEmptyText="True" ValidationGroup="GprGV"></asp:CustomValidator>
|
||||
|
||||
<ajax:ValidatorCalloutExtender ID="VCEPrecioEdit" runat="server" HighlightCssClass="vco" TargetControlID="CVPrecioEdit" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
Reference in New Issue
Block a user