Agregando una nueva columna al grid de DescuentoProntoPago
This commit is contained in:
@@ -261,7 +261,7 @@
|
||||
<asp:UpdatePanel ID="UPVentas" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvCxC" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Cuentas por Cobrar Pendientes"
|
||||
DataKeyNames="TipoDocto,CveVenta,CveCliente,SerieFolio,Original,SubTotal,IVA,IEPS,RetIVA,RetISR,Num3,CveSubProyecto,CveMoneda,Saldo,TipoCambio, RFC,UUID,Fecha,PorcentajeIVA"
|
||||
DataKeyNames="TipoDocto,CveVenta,CveCliente,SerieFolio,Original,SubTotal,IVA,IEPS,RetIVA,RetISR,Num3,CveSubProyecto,CveMoneda,Saldo,TipoCambio, RFC,UUID,Fecha,PorcentajeIVA,DescuentoProntoPago"
|
||||
CssClass="table table-striped table-advance table-hover Widthall" Style="text-align: center;" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
@@ -338,6 +338,12 @@
|
||||
<asp:RangeValidator ID="RVComision" runat="server" Enabled="false" ErrorMessage="*" ControlToValidate="TxtComision" Display="Dynamic" Type="Double"></asp:RangeValidator>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField Visible="false" ItemStyle-HorizontalAlign="Center">
|
||||
<HeaderTemplate>Descuento Pronto Pago</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlDescuentoProntoPago" runat="server" Text='<%# Eval("DescuentoProntoPago", "{0:N2}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-Width="300px">
|
||||
<HeaderTemplate>Auxiliar</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
|
||||
@@ -445,16 +445,22 @@ Partial Class Ventas_ClientesAbonar
|
||||
|
||||
Dim FechaCorte As Date = IIf(CveIESustitucion > 0, (FechaCorteIE.ToDate).ToShortDateString, DateTime.Now.AddYears(1).ToShortDateString).ToString.ToDate
|
||||
|
||||
Dim SumDescuentoProntoPago As Double = 0.0
|
||||
If Mov.GetCxCClienteDetalle(ViewState("CveCliente").ToString.ToEntero, FechaI, FechaF, pCveMoneda, CveSubProyecto, UsuarioActual.CveEmpresa, CveClienteSucursal, FechaCorte:=FechaCorte, CveIESustitucion:=CveIESustitucion) Then
|
||||
Dim TmpCxCAux As DataTable
|
||||
TmpCxCAux = Mov.DtResultados.FiltraParametros("Saldo > 0", "Fecha,SerieFolio")
|
||||
SumDescuentoProntoPago = TmpCxCAux.SUM("DescuentoProntoPago")
|
||||
|
||||
GvCxC.DataSource = Mov.DtResultados.FiltraParametros("Saldo > 0", "Fecha,SerieFolio")
|
||||
GvCxC.DataBind()
|
||||
CveMoneda = pCveMoneda
|
||||
End If
|
||||
|
||||
End If
|
||||
TxtImporte.Text = ""
|
||||
TxtObservaciones.Text = ""
|
||||
|
||||
If SumDescuentoProntoPago > 0.0 Then
|
||||
GvCxC.Columns("DescuentoProntoPago").Visible = True
|
||||
End If
|
||||
|
||||
Mov.Dispose()
|
||||
UPVentas.Update()
|
||||
@@ -608,8 +614,7 @@ Partial Class Ventas_ClientesAbonar
|
||||
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))
|
||||
|
||||
If Not UsuarioActual.Empresa.Funcionalidad(536) = "1" Then
|
||||
'si es remisión y factura no timbrada
|
||||
If e.Row.DBCampo("TipoDocto") = "Rem" OrElse (e.Row.DBCampo("TipoDocto") = "Ing" AndAlso e.Row.DBCampo("FolioFiscal") = "") Then
|
||||
If e.Row.DBCampo("TipoDocto") = "Rem" Then
|
||||
e.Row.FCCheckBox("Chk").Visible = False ' que no se pueda pagar si es remisión
|
||||
e.Row.Cells(0).ToolTip = "El documento es remisión y no se puede realizar el pago"
|
||||
End If
|
||||
@@ -872,6 +877,7 @@ Partial Class Ventas_ClientesAbonar
|
||||
CveVentasPago.Add(gvr.DataKey("CveVenta").ToEntero)
|
||||
SeriesPago.Add(gvr.DataKey("SerieFolio"))
|
||||
|
||||
Dim tipoCambioVentaDiferenciaCambiaria As Double = 1
|
||||
Dim EsAnticipoEspecial As Boolean = False
|
||||
|
||||
If gvr.DataKey("TipoDocto") = "Ant" AndAlso UsuarioActual.CveEmpresa.Contiene(1, 119) Then EsAnticipoEspecial = True
|
||||
@@ -1243,7 +1249,7 @@ Partial Class Ventas_ClientesAbonar
|
||||
If CveMoneda <> 1 OrElse gvr.DataKey("CveMoneda").ToEntero <> 1 Then
|
||||
IdCtaContable = UsuarioActual.Empresa.IdCuentaGananciaCambiaria
|
||||
CveCuenta = UsuarioActual.Empresa.CveCuentaGananciaCambiaria
|
||||
|
||||
tipoCambioVentaDiferenciaCambiaria = If(gvr.DataKey("Fecha").ToDate < FechaUltimaFluctuacion, TipoCambioFluctuacion, gvr.DataKey("TipoCambio").ToDecimal)
|
||||
Dim TCImpuestos As Decimal = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioVenta)
|
||||
|
||||
|
||||
@@ -1281,7 +1287,7 @@ Partial Class Ventas_ClientesAbonar
|
||||
If CveMoneda <> 1 OrElse gvr.DataKey("CveMoneda").ToEntero <> 1 Then
|
||||
IdCtaContable = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria
|
||||
CveCuenta = UsuarioActual.Empresa.CveCuentaPerdidaCambiaria
|
||||
|
||||
tipoCambioVentaDiferenciaCambiaria = If(gvr.DataKey("Fecha").ToDate < FechaUltimaFluctuacion, TipoCambioFluctuacion, gvr.DataKey("TipoCambio").ToDecimal)
|
||||
Dim TCImpuestos As Decimal = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioVenta)
|
||||
|
||||
Dim Diferencia As Decimal = ((gvr.FCTextBox("TxtAbonar").Text.ToDecimal) * tipoCambioVentaValuacion) - ((gvr.FCTextBox("TxtAbonar").Text.ToDecimal) * tipoCambioPago) 'Añadimos la diferencia de perdida en la venta
|
||||
|
||||
Reference in New Issue
Block a user