diff --git a/Bancos/ProveedoresAbonar.aspx b/Bancos/ProveedoresAbonar.aspx
index 5f2389ec7..873bea6e1 100644
--- a/Bancos/ProveedoresAbonar.aspx
+++ b/Bancos/ProveedoresAbonar.aspx
@@ -341,8 +341,7 @@
-
-
+
diff --git a/Bancos/ProveedoresAbonar.aspx.vb b/Bancos/ProveedoresAbonar.aspx.vb
index 411c95aaa..af50a3933 100644
--- a/Bancos/ProveedoresAbonar.aspx.vb
+++ b/Bancos/ProveedoresAbonar.aspx.vb
@@ -324,7 +324,7 @@ Partial Class Bancos_ProveedoresAbonar
If UsuarioActual.TienePermisoProceso(361) Then
'GvCxP.Columns(11).Visible = True
chkaplicaDescuento.Visible = True
- chkaplicaDescuentoMasivo.Visible = True
+ 'chkaplicaDescuentoMasivo.Visible = True
End If
@@ -1673,17 +1673,11 @@ Partial Class Bancos_ProveedoresAbonar
Protected Sub chkaplicaDescuento_CheckedChanged(sender As Object, e As EventArgs)
GvCxP.Columns(11).Visible = chkaplicaDescuento.Checked
+ TxtDescuenoMasivo.Visible = chkaplicaDescuento.Checked
UPCompras.Update()
End Sub
- Protected Sub chkaplicaDescuentoMasivo_CheckedChanged(sender As Object, e As EventArgs)
-
- GvCxP.Columns(11).Visible = chkaplicaDescuentoMasivo.Checked
- TxtDescuenoMasivo.Visible = chkaplicaDescuentoMasivo.Checked
- UPCompras.Update()
- End Sub
-
Private Sub tmpValida()
Dim ValidaSAT As Boolean = True
diff --git a/Compras/Compras.aspx b/Compras/Compras.aspx
index d5a16bb3c..a267bb624 100644
--- a/Compras/Compras.aspx
+++ b/Compras/Compras.aspx
@@ -3735,7 +3735,7 @@
-
+
diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb
index 2ad7c6436..cbce02343 100644
--- a/Compras/PopUpVerFactura.aspx.vb
+++ b/Compras/PopUpVerFactura.aspx.vb
@@ -1577,29 +1577,141 @@ Partial Class PopUpVerFactura
If UrlParametros("OP").ToString = "AMORTIZACIONHIS" Then
'CveViajePasajero
Dim CVEIE As Integer = UrlParametros("CVEIE").ToString.ToEntero
+ Dim CVEVENTAAMORTIZADA As Integer = UrlParametros("CVEVENTAAMORTIZADA").ToString.ToEntero
Dim CVEVENTA As Integer = UrlParametros("CVEVENTA").ToString.ToEntero
Dim CVECLIENTE As Integer = UrlParametros("CVECLIENTE").ToString.ToEntero
+ Dim MONTO As Decimal = UrlParametros("MONTO").ToString.ToDecimal
+ Dim SALDO As Decimal = UrlParametros("SALDO").ToString.ToDecimal
If CVECLIENTE > 0 AndAlso (CVEIE > 0 Or CVEVENTA > 0) Then
- ImprimirSaldosAmortizacion(CVEIE, CVEVENTA, CVECLIENTE)
+ ImprimirSaldosAmortizacion(CVEVENTAAMORTIZADA, CVEIE, CVEVENTA, CVECLIENTE, MONTO, SALDO)
End If
End If
End Sub
- Private Sub ImprimirSaldosAmortizacion(CVEIE As Integer, CVEVENTA As Integer, CVECLIENTE As Integer)
-
- If CVEVENTA > 0 Then
+ Private Sub ImprimirSaldosAmortizacion(CveVentaAmortizada As Integer, CveIE As Integer, CveVenta As Integer, CveCliente As Integer, Monto As Decimal, Saldo As Decimal)
+ Dim ObjMovtos As New ClsMovimientos()
+ Dim SaldoAntNCDev As Decimal = 0
+ Dim DatosSaldoAntNCDev As New DataTable
+ Dim TipoDocto As String = ""
+ Dim Folio As String = ""
+ Dim DTNCVinculadas As New DataTable
+
+
+ If ObjMovtos.GetAnticiposNCIxCCliente(CveCliente) Then
+ DatosSaldoAntNCDev = ObjMovtos.DtResultados
+ End If
+ ObjMovtos.Dispose()
+
+ If DatosSaldoAntNCDev IsNot Nothing AndAlso DatosSaldoAntNCDev.Rows.Count > 0 Then
+
+ SaldoAntNCDev = If(CveVenta > 0,
+ DatosSaldoAntNCDev.FiltroPrimeroValor("Saldo", $"CveVenta={CveVenta}").ToDecimal,
+ DatosSaldoAntNCDev.FiltroPrimeroValor("Saldo", $"CveIE={CveIE}").ToDecimal)
+
+ TipoDocto = If(CveVenta > 0,
+ DatosSaldoAntNCDev.FiltroPrimeroValor("Tipo", $"CveVenta={CveVenta}"),
+ DatosSaldoAntNCDev.FiltroPrimeroValor("Tipo", $"CveIE={CveIE}"))
+
+ Folio = If(CveVenta > 0,
+ DatosSaldoAntNCDev.FiltroPrimeroValor("Folio", $"CveVenta={CveVenta}"),
+ DatosSaldoAntNCDev.FiltroPrimeroValor("Folio", $"CveIE={CveIE}"))
+
+
+ If CveIE > 0 Then
+ CveVenta = DatosSaldoAntNCDev.FiltroPrimeroValor("CveVenta", $"CveIE={CveIE}").ToEntero
+ End If
End If
- If CVEIE > 0 Then
+ If TipoDocto.Contiene("Egs", "Dev", "Ant") Then
+ Dim AplicaAmortizacion As Boolean = False
+ If TipoDocto.Contiene("Ant") Then AplicaAmortizacion = True
+
+ Dim ObjVentas As New ClsVentas
+ If ObjVentas.GetVentasAntNC(-1, CveVenta, AplicaAmortizacion) Then
+ DTNCVinculadas = ObjVentas.DtResultados.Copy()
+ End If
+ ObjVentas.Dispose()
+ End If
+
+ If DTNCVinculadas IsNot Nothing Then
+
+ Dim params As New List(Of ReportParameter)
+
+ Dim ObjVentas As New ClsVentas
+ If ObjVentas.GetVenta(CveVentaAmortizada, UsuarioActual.CveEmpresa) Then
+ Dim DbRowVenta = ObjVentas.DtResultados.Copy().FiltroPrimero("")
+
+ If DbRowVenta IsNot Nothing Then
+ 'Dim VentaActual As New Venta(UsuarioActual)
+ 'VentaActual.CveVenta = CveVentaAmortizada
+ 'VentaActual.TipoDocto = DbRowVenta("TipoDocto").ToString
+ 'VentaActual.Fecha = DbRowVenta("Fecha").ToString.ToDate
+ 'VentaActual.CveCliente = DbRowVenta("CveCliente").ToString.ToEntero
+ 'VentaActual.CveMoneda = DbRowVenta("CveMoneda").ToString.ToEntero
+ 'VentaActual.SerieFolio = DbRowVenta("SerieFolio").ToString
+ 'VentaActual.ClienteNombre = DbRowVenta("ClienteNombre").ToString
+ 'VentaActual.TC = DbRowVenta("TipoCambio").ToString.ToDecimal
+ 'VentaActual.Total = DbRowVenta("Total").ToString.ToDecimal
+ 'VentaActual.IVA = DbRowVenta("IVA").ToString.ToDecimal
+ 'VentaActual.IEPS = DbRowVenta("IEPS").ToString.ToDecimal
+ 'VentaActual.RetIVA = DbRowVenta("RetIVA").ToString.ToDecimal
+ 'VentaActual.RetISR = DbRowVenta("RetISR").ToString.ToDecimal
+
+ 'VentaActual.PorcentajeIVA = DbRowVenta("PorcentajeIVA").ToString.ToDecimal
+ 'VentaActual.UsuarioActual = UsuarioActual
+ 'VentaActual.CveSubProyecto = DbRowVenta("CveSubProyecto").ToString.ToEntero
+
+ 'VentaActual.CveMoneda = DbRowVenta("CveMoneda").ToString.ToEntero
+ 'VentaActual.SerieFolio = DbRowVenta("SerieFolio").ToString
+
+ params.Add(New ReportParameter("SerieFolio", DbRowVenta("SerieFolio").ToString))
+ params.Add(New ReportParameter("Moneda", DbRowVenta("Moneda").ToString))
+ params.Add(New ReportParameter("Cliente", DbRowVenta("Cliente").ToString))
+
+ End If
+
+ End If
+ ObjVentas.Dispose()
+
+
+
+ Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
+
+
+ params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
+ 'params.Add(New ReportParameter("FechaInicio", FechaI))
+ 'params.Add(New ReportParameter("FechaFin", FechaF))
+ params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
+ params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
+ params.Add(New ReportParameter("FechaImpresion", NowADS().ToString))
+ 'params.Add(New ReportParameter("AgrupadoPor", $"Agrupado Por: {Grupo}{FechaIn}{FechaFn}"))
+ params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
+
+ params.Add(New ReportParameter("SaldoAntNCDev", SaldoAntNCDev.ToString))
+ params.Add(New ReportParameter("Monto", Monto.ToString))
+ params.Add(New ReportParameter("Saldo", Saldo.ToString))
+
+ Dim NombreArchivo As String = "SaldoAntNCDev.rdlc"
+
+ Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos\{1}", UsuarioActual.Empresa.Ruta, NombreArchivo))
+
+ If Archivo.Exists Then
+ ImprimirPDF(Archivo.FullName, DTNCVinculadas, params, "OrdenesdeCompraporvincular ", Opcion)
+ Else
+ ImprimirPDF($"Empresas/Grales/Formatos/{NombreArchivo}", DTNCVinculadas, params, "OrdenesdeCompraporvincular", Opcion)
+ End If
End If
+
+
+
End Sub
Private Function Parametros(Cadena As String) As Hashtable
diff --git a/OC/RepOCxSurtir.aspx b/OC/RepOCxSurtir.aspx
index 447d01ca5..e4d3994c2 100644
--- a/OC/RepOCxSurtir.aspx
+++ b/OC/RepOCxSurtir.aspx
@@ -69,7 +69,9 @@
- Centro de Costo
+
@@ -125,6 +127,7 @@
+
diff --git a/OC/RepOCxSurtir.aspx.vb b/OC/RepOCxSurtir.aspx.vb
index 1b4eafdc7..0430ecb81 100644
--- a/OC/RepOCxSurtir.aspx.vb
+++ b/OC/RepOCxSurtir.aspx.vb
@@ -39,7 +39,6 @@ Partial Class OC_RepOCxSurtir
Protected Sub OC_RepOCxSurtir_Load(sender As Object, e As EventArgs) Handles Me.Load
If Not IsPostBack Then
InicializaValores()
-
End If
End Sub
@@ -92,6 +91,10 @@ Partial Class OC_RepOCxSurtir
End If
+ CargarCentrosDeCosto(Nothing, Nothing, Nothing, LblSubProyecto)
+
+ GvDatosPorOC.Columns(3).HeaderText = LblSubProyecto.Text
+
UPFiltros.Update()
End Sub
#End Region
@@ -207,7 +210,7 @@ Partial Class OC_RepOCxSurtir
Dim FechaIF, FechaFF As String
FechaIF = If(IsDate(TxtFechaI.Text.Trim()), TxtFechaI.Text.Trim(), "-1")
FechaFF = If(IsDate(TxtFechaF.Text.Trim()), TxtFechaF.Text.Trim(), "-1")
- Dim FechaICapturaF, FechaFCapturaF As String
+
'FechaICapturaF = If(IsDate(TxtFechaICaptura.Text.Trim()), TxtFechaICaptura.Text.Trim(), "-1")
'FechaFCapturaF = If(IsDate(TxtFechaFCaptura.Text.Trim()), TxtFechaFCaptura.Text.Trim(), "-1")
@@ -243,7 +246,13 @@ Partial Class OC_RepOCxSurtir
Dim NombreArchivo As String = If(DdlGrupo.SelectedValue.ToEntero = 1, "RepOCxSurtir.rdlc", "RepOCxSurtirPorOC.rdlc")
+ If DdlGrupo.SelectedValue.ToEntero = 2 Then
+ params.Add(New ReportParameter("TipoCentroCosto", LblSubProyecto.Text))
+ End If
+
+
Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos\{1}", UsuarioActual.Empresa.Ruta, NombreArchivo))
+
If Archivo.Exists Then
ImprimirPDF(Archivo.FullName, If(DdlGrupo.SelectedValue.ToEntero = 1, DtDatos, DtDatosPorOC), params, "OrdenesdeCompraporvincular ", Opcion)
Else
diff --git a/Ventas/PVCobranza.aspx.vb b/Ventas/PVCobranza.aspx.vb
index 822e49f31..a390b3601 100644
--- a/Ventas/PVCobranza.aspx.vb
+++ b/Ventas/PVCobranza.aspx.vb
@@ -963,6 +963,8 @@ Partial Class Ventas_PVCobranza
Dim Retorno As Modelos.Factura.MMensajeFactura = Nothing
Dim SbAlert As New StringBuilder()
Dim SBAmortizaciones As New StringBuilder
+ Dim DtAnticipos As New DataTable()
+
Try
Dim DtRemisiones As New DataTable
@@ -1060,7 +1062,7 @@ Partial Class Ventas_PVCobranza
If HdnTipoAmortizacion.Value = "4" Then
- Dim DtAnticipos As New DataTable()
+
DtAnticipos.Columns.Add("CveVenta", GetType(Integer))
DtAnticipos.Columns.Add("Importe", GetType(Decimal))
DtAnticipos.Columns.Add("CveConceptoContable", GetType(Integer))
@@ -1095,8 +1097,6 @@ Partial Class Ventas_PVCobranza
DtAnticipos.Rows.Add(CveVenta, Importe, CveConceptoContable, CveIE, FolioFiscal, Descuentos, TotalAnticipo, SubTotalAnticipo, CveMoneda, Fecha, TipoCambioPago, Folio, Tipo)
- SBAmortizaciones.AppendLine($"
Imprimir historial {Folio}
")
-
End If
Next
@@ -1122,6 +1122,18 @@ Partial Class Ventas_PVCobranza
Next
SbAlert.AppendFormat("
", Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=1&GUARDAR=1", Retorno.CveVenta)))
+
+ For Each dr As DataRow In DtAnticipos.Rows
+ SBAmortizaciones.AppendLine($"
Imprimir historial {dr("Folio").ToString}
")
+ Next
+
+
SbAlert.Append(SBAmortizaciones.ToString)
Else