diff --git a/Ventas/ProductosServicios.aspx.vb b/Ventas/ProductosServicios.aspx.vb index 2b5831fcf..b87dce484 100644 --- a/Ventas/ProductosServicios.aspx.vb +++ b/Ventas/ProductosServicios.aspx.vb @@ -124,7 +124,7 @@ Partial Class ProductosyServicios Private Property GeneraServicioAF As Integer Get - Return ViewState("GeneraServicioAF").ToString.ToEntero + Return IfNull(ViewState("GeneraServicioAF"), "-1", ViewState("GeneraServicioAF")).ToString().ToEntero() End Get Set(value As Integer) ViewState("GeneraServicioAF") = value diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index c278c0bdd..d7a6ea8a7 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -4646,6 +4646,8 @@ Partial Class Ventas TmpDT.Columns.Add("CveVentaDetalleRNC", GetType(Integer)) TmpDT.Columns.Add("TieneProntoPago", GetType(String)) TmpDT.Columns.Add("ImporteProntoPago", GetType(Decimal)) + TmpDT.Columns.Add("AFDepreciacion", GetType(Decimal)) + TmpDT.Columns.Add("AFValorInicial", GetType(Decimal)) End If CargaAFVenta() @@ -14819,7 +14821,7 @@ Partial Class Ventas If DT.Rows.Count > 0 Then 'Se agrega movimiento separado por la cuenta de ventas (ER) For Each Row2 As DataRow In DT.Rows - importeMovimiento = (TmpDTDetalle.SUM("TotalImporte", String.Format("CveClasificacion = {0} And CveSubProyecto = {1} AND PorcentajeIVA = {2} AND CveActivoFijo = {3}", Row2("CveClasificacion"), Row2("CveSubProyecto"), Row2("PorcentajeIVA"), Row2("CveActivoFijo"))).ToString().ToDecimal()) * ValorMultiplicador + importeMovimiento = (TmpDTDetalle.SUM("TotalImporte", String.Format("CveClasificacion = {0} And CveSubProyecto = {1} AND PorcentajeIVA = {2} AND ISNULL(CveActivoFijo,-1) = {3}", Row2("CveClasificacion"), Row2("CveSubProyecto"), Row2("PorcentajeIVA"), If(Row2("CveActivoFijo").ToString().ToEntero() > 0, Row2("CveActivoFijo").ToString().ToEntero(), -1))).ToString().ToDecimal()) * ValorMultiplicador importeMX = importeMovimiento * tipoCambio * Multiplicador FechaMovimiento = ObjFactura.FechaPago Concepto = $"{ObjFactura.SerieFolio} {If(Row2("CveClasificacion").ToString().ToEntero() > 0, GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString()}"), "")} - {If(Row2("CveSubProyecto").ToString().ToEntero() > 0, GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa).FiltroPrimeroValor("SubProyecto", $"CveSubProyecto = {Row2("CveSubProyecto").ToString()}"), "Sin SubProyecto Asignado")}" @@ -30059,7 +30061,7 @@ Partial Class Ventas TmpDT.Columns.Add("CveVentaDetalleRNC", GetType(Integer)) TmpDT.Columns.Add("TieneProntoPago", GetType(String)) TmpDT.Columns.Add("ImporteProntoPago", GetType(Decimal)) - TmpDT.Columns.Add("CveActivoFijo", GetType(Integer)) + 'TmpDT.Columns.Add("CveActivoFijo", GetType(Integer)) TmpDT.Columns.Add("AFDepreciacion", GetType(Decimal)) TmpDT.Columns.Add("AFValorInicial", GetType(Decimal)) End If @@ -35225,6 +35227,8 @@ Partial Class Ventas TmpDT = ObjVentas.DtResultados TmpDT.Columns.Add("EntregaDirecta", GetType(Integer)) TmpDT.Columns.Add("CveMovimientoDetallePedido", GetType(Integer)) + TmpDT.Columns.Add("AFDepreciacion", GetType(Decimal)) + TmpDT.Columns.Add("AFValorInicial", GetType(Decimal)) End If If ObjVentas.GetVenta(CveVentaNC, UsuarioActual.CveEmpresa, VerificaAlmacen:=False) Then