diff --git a/App_Code/CalendarEvent.vb b/App_Code/CalendarEvent.vb
index c2edf807a..da3261896 100644
--- a/App_Code/CalendarEvent.vb
+++ b/App_Code/CalendarEvent.vb
@@ -48,6 +48,8 @@ Public Class CalendarEvent
Public Property CveVenta As Integer
Public Property SerieFolioVenta As String
Public Property CveActivoFijo As Integer
+ Public Property CveTipoAF As Integer
+
Public Property AFCodigo As String
Public Property CveMovimiento As Integer
Public Property MovimientoFolio As String
diff --git a/App_Code/ClsCompras.vb b/App_Code/ClsCompras.vb
index 84ee4f34b..4a59454ca 100644
--- a/App_Code/ClsCompras.vb
+++ b/App_Code/ClsCompras.vb
@@ -1630,7 +1630,7 @@ Public Class ClsCompras
#Region "N O T A S - C R E D I T O"
- Public Function GetNotasCreditoRep(CveProveedor As Integer, Opcion As Integer, FechaI As String, FechaF As String, CveEmpresa As Integer, Optional TipoReporte As Integer = 1) As Boolean
+ Public Function GetNotasCreditoRep(CveProveedor As Integer, Opcion As Integer, FechaI As String, FechaF As String, CveEmpresa As Integer, Optional TipoReporte As Integer = 1, Optional CveComprasAmortizadas As String = "-1") As Boolean
Dim Retorno As Boolean = False
@@ -1643,6 +1643,8 @@ Public Class ClsCompras
.Add("@FechaF", SqlDbType.VarChar).Value = FechaF
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@TipoReporte", SqlDbType.Int).Value = TipoReporte
+ .Add("@CveComprasAmortizadas", SqlDbType.VarChar).Value = CveComprasAmortizadas
+
End With
@@ -1776,6 +1778,39 @@ Public Class ClsCompras
End Function
+ Public Function AddBitacoraFactura(ByVal Serie As String, ByVal Folio As String, ByVal RFCDe As String, ByVal Observacion As String, ByVal Estatus As Integer, ByVal CveUsuario As Integer, ByVal CveEmpresa As Integer, ByVal Correo As String, ByVal Proveedor As String, ByVal Importe As Decimal, ByVal TipoDeComprobante As String) As Boolean
+
+ Dim Retorno As Boolean = False
+
+
+ DataAdapter("PA_Comp_FacturasBitacoraAdd")
+ With SqlAdapter.SelectCommand.Parameters
+ .Add("@Serie", SqlDbType.VarChar).Value = Serie
+ .Add("@Folio", SqlDbType.VarChar).Value = Folio
+ .Add("@RFCDE", SqlDbType.VarChar).Value = If(RFCDe Is Nothing, "", RFCDe)
+ .Add("@Observacion", SqlDbType.VarChar).Value = Observacion
+ .Add("@Estatus", SqlDbType.Int).Value = Estatus
+ .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
+ .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
+ .Add("@Correo", SqlDbType.VarChar).Value = Correo
+ .Add("@Proveedor", SqlDbType.VarChar).Value = Proveedor
+ .Add("@Importe", SqlDbType.Decimal).Value = Importe
+ .Add("@TipoDeComprobante", SqlDbType.VarChar).Value = TipoDeComprobante
+ End With
+
+ Try
+ SqlAdapter.Fill(Data)
+ Retorno = True
+ Catch ex As Exception
+ Me.OnError("Ocurrió un error al intentar Guardar la bitácora.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ End Try
+
+ Return Retorno
+
+ End Function
+
+
+
'Public Function AddFactura(Serie As String, Folio As String, FechaFactura As DateTime, NombreProveedor As String, RFCDe As String, SubTotal As Double,
'IVA As Double, Total As Double, UUID As String, RFCPara As String, XML As String, PDF As String,
'VersionCFD As String, Descuento As Double, Moneda As String, TipodeComprobante As String, TipoCambio As Double, FueValidado As Integer,
diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb
index 161feb1ab..f3365603a 100644
--- a/App_Code/ClsPaginas.vb
+++ b/App_Code/ClsPaginas.vb
@@ -7776,7 +7776,7 @@ Public Class ClsPaginas
If CveSubProyectoEntrega > 0 Then
- Dim DTSubProyectoEntrega As DataTable = GlobalDTSubProyectos(-1, CveSubProyectoEntrega)
+ Dim DTSubProyectoEntrega As DataTable = GlobalDTSubProyectos(-1, CveSubProyectoEntrega, UsuarioActual.CveEmpresa)
params.Add(New ReportParameter("SubProyectoEntrega", DTSubProyectoEntrega(0)("SubProyecto").ToString))
diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb
index c6e67d0a9..4323620af 100644
--- a/App_Code/ClsVentas.vb
+++ b/App_Code/ClsVentas.vb
@@ -2803,13 +2803,13 @@ Public Class ClsVentas
Return Retorno
End Function
- Public Function GetMotivoDevolucion(CveMotivoDevolucion As Integer, Estatus As Boolean, CveEmpresa As Integer) As Boolean
+ Public Function GetMotivoDevolucion(CveMotivoDevolucion As Integer, Estatus As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Vta_VentasMotivosDevolucionGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveMotivoDevolucion", SqlDbType.Int).Value = CveMotivoDevolucion
- .Add("@Estatus", SqlDbType.Bit).Value = Estatus
+ .Add("@Estatus", SqlDbType.Int).Value = Estatus
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
diff --git a/Ashx/CargaEventos.ashx b/Ashx/CargaEventos.ashx
index 871d8fab2..d5dbda671 100644
--- a/Ashx/CargaEventos.ashx
+++ b/Ashx/CargaEventos.ashx
@@ -518,7 +518,8 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
cevent.Dolares = dr("Importe").ToString.ToDecimal
cevent.Pesos = dr("ImporteMax").ToString.ToDecimal
cevent.Anticipo = dr("ImporteMin").ToString.ToDecimal
- cevent.CveActivoFijo = dr("CveAF").ToString.ToEntero
+ cevent.CveActivoFijo = dr("CveAF").ToString.ToEntero
+ cevent.CveTipoAF = dr("CveTipoAF").ToString.ToEntero
cevent.backgroundColor = dr("BackgroundColor").ToString
cevent.CantidadPasajeros = dr("CantidadPasajeros").ToString
cevent.NumeroContrato = dr("NumeroContrato").ToString
@@ -581,6 +582,7 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
cevent.CveCliente = dr("CveCliente").ToString.ToEntero
cevent.NombreComercial = dr("NombreComercial").ToString
cevent.NombreAcercamiento = dr("Ubicacion").ToString
+ cevent.CveActivoFijo = dr("CveAF").ToString.ToEntero
cevent.CveActivoFijo = dr("CveAF").ToString.ToEntero
cevent.CvePersonal = dr("CveChofer").ToString.ToEntero
@@ -607,6 +609,7 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
cevent.start = String.Format("{0:s}", dr("FechaInicial").ToString.ToDateTime)
cevent.end = If(tipoVista = "fecha", String.Format("{0:s}", dr("FechaInicial").ToString.ToDateTime.AddHours(1)), String.Format("{0:s}", dr("FechaFinal").ToString.ToDateTime))
cevent.NombreAcercamiento = dr("Ubicacion").ToString
+ cevent.CveActivoFijo = dr("CveAF").ToString.ToEntero
cevent.CveActivoFijo = dr("CveAF").ToString.ToEntero
cevent.allDay = False
diff --git a/Compras/Compras.aspx b/Compras/Compras.aspx
index 32c51a0c3..60aa183be 100644
--- a/Compras/Compras.aspx
+++ b/Compras/Compras.aspx
@@ -540,15 +540,15 @@
-
--%>
@@ -875,6 +875,7 @@
+
@@ -954,6 +955,51 @@
+
+
+
+
+
+
+
+
+
+
+
+ Factura
+
+
+
+
+
+ Fecha
+
+
+
+
+
+ Saldo
+
+
+
+
+
+
+ Moneda
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb
index 73230e99f..8485f0651 100644
--- a/Compras/Compras.aspx.vb
+++ b/Compras/Compras.aspx.vb
@@ -12,6 +12,7 @@ Imports Extensiones
Imports MoreLinq
Imports System.Data.SqlClient
Imports ClsPaginas
+Imports System.Activities.Expressions
Partial Class Compras_Compras
Inherits ClsPaginas
@@ -1192,17 +1193,7 @@ Partial Class Compras_Compras
End Set
End Property
- Private Property ImporteRNCSaldar As Decimal
- Get
- If ViewState("ImporteRNCSaldar") Is Nothing Then
- ViewState("ImporteRNCSaldar") = 0D
- End If
- Return ViewState("ImporteRNCSaldar").ToString.ToDecimal
- End Get
- Set(value As Decimal)
- ViewState("ImporteRNCSaldar") = value
- End Set
- End Property
+
Private Property DTRemisionesNotaDeCredito As DataTable
Get
@@ -1220,53 +1211,10 @@ Partial Class Compras_Compras
End Property
- Private Property SerieFolioProntoPago As String
- Get
- If ViewState("SerieFolioProntoPago") Is Nothing Then
- ViewState("SerieFolioProntoPago") = ""
- End If
- Return ViewState("SerieFolioProntoPago").ToString
- End Get
- Set(value As String)
- ViewState("SerieFolioProntoPago") = value
- End Set
- End Property
- Private Property TipoCambioProntoPago As Decimal
- Get
- If ViewState("TipoCambioProntoPago") Is Nothing Then
- ViewState("TipoCambioProntoPago") = 0D
- End If
- Return ViewState("TipoCambioProntoPago").ToString.ToDecimal
- End Get
- Set(value As Decimal)
- ViewState("TipoCambioProntoPago") = value
- End Set
- End Property
- Private Property FechaProntoPago As Date
- Get
- If ViewState("FechaProntoPago") Is Nothing Then
- ViewState("FechaProntoPago") = MinFecha
- End If
- Return ViewState("FechaProntoPago").ToString.ToDate
- End Get
- Set(value As Date)
- ViewState("FechaProntoPago") = value
- End Set
- End Property
- Private Property CveMonedaProntoPago As Integer
- Get
- If ViewState("CveMonedaProntoPago") Is Nothing Then
- ViewState("CveMonedaProntoPago") = 0D
- End If
- Return ViewState("CveMonedaProntoPago").ToString.ToEntero
- End Get
- Set(value As Integer)
- ViewState("CveMonedaProntoPago") = value
- End Set
- End Property
+
'ImporteRNCSaldar = 0
'SerieFolioProntoPago = ""
@@ -1278,6 +1226,17 @@ Partial Class Compras_Compras
#End Region
+ 'Public Property ListaFacturasRealcionadasRNC As List(Of String)
+ ' Get
+ ' If ViewState("ListaFacturasRealcionadasRNC") Is Nothing Then
+ ' ViewState("ListaFacturasRealcionadasRNC") = New List(Of String)
+ ' End If
+ ' Return DirectCast(ViewState("ListaFacturasRealcionadasRNC"), List(Of String))
+ ' End Get
+ ' Set(value As List(Of String))
+ ' ViewState("ListaFacturasRealcionadasRNC") = value
+ ' End Set
+ 'End Property
@@ -1687,6 +1646,18 @@ Partial Class Compras_Compras
DdlTipoComprobante.Items.Add(New ListItem("Devolución", "DEV"))
DdlTipoComprobante.SelectedValueExist("DEV")
End If
+
+
+
+ If UsuarioActual.Empresa.Funcionalidad(574).ToEntero = 1 AndAlso DdlTipoComprobante.SelectedValue = "NC" Then
+
+
+
+ ConfiguraseleccionRemisionNotaCredito()
+
+
+ End If
+
End If
'SE OCUPAN AFUERA DEL POSTBACK ??
@@ -1719,6 +1690,56 @@ Partial Class Compras_Compras
End Sub
+ Private Sub ConfiguraseleccionRemisionNotaCredito()
+
+ Dim AutoSelRNC As Boolean = False
+ DdlTipoComprobante_SelectedIndexChanged(Nothing, Nothing)
+ DdlTipoCompra.SelectedValueExist(15)
+ DdlTipoCompra_SelectedIndexChanged(Nothing, Nothing)
+
+
+ 'For Each gvRow As GridViewRow In GvFacturaNC.Rows
+ ' If gvRow.DataKey("CveCompra").ToEntero > 0 AndAlso gvRow.FCCheckBox("ChkFacturaNC").Checked Then
+ ' Dim SerieFolioFacura As String = ObtenerUltimaParte(gvRow.DataKey("SerieFolio"))
+ ' Dim seleccion As String = ""
+
+ ' For Each item As ListItem In DdlRemisionNotaCredito.Items
+ ' Dim serieFolioItem As String = ObtenerUltimaParte(item.Text)
+ ' If SerieFolioFacura = serieFolioItem Then
+ ' 'seleccion = item.Value
+ ' AutoSelRNC = True
+ ' DdlRemisionNotaCredito.SelectedValueExist(item.Value)
+ ' Exit For
+ ' End If
+
+ ' Next
+
+ ' If AutoSelRNC Then
+ ' Exit For
+ ' End If
+
+ ' End If
+ 'Next
+
+ If AutoSelRNC Then
+ 'DdlRemisionNotaCredito_SelectedIndexChanged(Nothing, Nothing)
+ End If
+
+ HLAplicaNCFact.Visible = True
+ UpPS.Update()
+ UpEstatus.Update()
+
+ End Sub
+
+ Public Function ObtenerUltimaParte(SerieFolioFactura As String) As String
+ Dim posicionUltimoGuion As Integer = SerieFolioFactura.LastIndexOf("-")
+ If posicionUltimoGuion <> -1 Then
+ Return SerieFolioFactura.Substring(posicionUltimoGuion + 1)
+ Else
+ Return SerieFolioFactura
+ End If
+ End Function
+
#Region "C A R G A S"
Private Sub MostrarOcultarColumnaIEPS()
@@ -7046,26 +7067,44 @@ Partial Class Compras_Compras
End If
End If
Next
+
If UsuarioActual.Empresa.Funcionalidad(574) = "1" Then
- If DdlRemisionNotaCredito.SelectedValue.ToEntero > 0 AndAlso ImporteRNCSaldar > 0 Then
- If Not ErrorPrepoliza Then
- If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteRNCSaldar, ImporteRNCSaldar, 373, Referencia, Concepto, CveCompra:=DdlRemisionNotaCredito.SelectedValue.ToEntero, CveProveedor:=Me.CveProveedor, ImporteME:=If(TipoCambio = 1, 0, ImporteRNCSaldar), TipoCambio:=TipoCambio,
- CveClasificacion:=-1, CveSubProyecto:=CompraActual.CveSubProyecto, Contabilizable:=True) Then
- ErrorPrepoliza = True
- End If
+
+ For Each gvRow As GridViewRow In GVRemisionesNotaDeCredito.Rows
+
+ If gvRow.FCCheckBox("Chk").Checked Then
+
+ Dim ImporteRNCSaldar As Decimal = gvRow.DataKey("Saldo").ToDecimal
+ Dim CveCompraRNC As Integer = gvRow.DataKey("CveCompra").ToEntero
If Not ErrorPrepoliza Then
- Dim ConPrePNC As ConceptosTipoSaldo = ObtenerCveConceptoPrePoliza(15, CompraActual.CveMoneda, True, CompraActual.CveTipoConceptoProveedor)
-
- If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteRNCSaldar, ImporteRNCSaldar, ConPrePNC.CveConcepto, Referencia, Concepto, CveCompra:=CompraActual.CveCompra, CveProveedor:=Me.CveProveedor, ImporteME:=If(TipoCambio = 1, 0, ImporteRNCSaldar), TipoCambio:=TipoCambio,
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteRNCSaldar, ImporteRNCSaldar, 373, Referencia, Concepto, CveCompra:=CveCompraRNC, CveProveedor:=Me.CveProveedor, ImporteME:=If(TipoCambio = 1, 0, ImporteRNCSaldar), TipoCambio:=TipoCambio,
CveClasificacion:=-1, CveSubProyecto:=CompraActual.CveSubProyecto, Contabilizable:=True) Then
ErrorPrepoliza = True
+ Exit For
+ End If
+
+ If Not ErrorPrepoliza Then
+ Dim ConPrePNC As ConceptosTipoSaldo = ObtenerCveConceptoPrePoliza(15, CompraActual.CveMoneda, True, CompraActual.CveTipoConceptoProveedor)
+
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteRNCSaldar, ImporteRNCSaldar, ConPrePNC.CveConcepto, Referencia, Concepto, CveCompra:=CompraActual.CveCompra, CveProveedor:=Me.CveProveedor, ImporteME:=If(TipoCambio = 1, 0, ImporteRNCSaldar), TipoCambio:=TipoCambio,
+ CveClasificacion:=-1, CveSubProyecto:=CompraActual.CveSubProyecto, Contabilizable:=True) Then
+ ErrorPrepoliza = True
+ Exit For
+ End If
End If
End If
End If
- End If
+
+
+ Next
+
+
+
+
+
If ErrorPrepoliza Then
ErrorMovtosCxP = True
@@ -15688,7 +15727,7 @@ Partial Class Compras_Compras
Protected Sub DdlProveedores_SelectedIndexChanged(sender As Object, e As EventArgs)
CargarFacturas()
If UsuarioActual.Empresa.Funcionalidad(574).ToEntero = 1 Then
- CargaDdlRemisionNotaCredito()
+ CargaGVRemisionNotaCredito()
End If
End Sub
@@ -16222,7 +16261,7 @@ Partial Class Compras_Compras
End If
Next
- UpINV.Update()
+ UpInv.Update()
UpSerie.Update()
TxtSerieLote.Focus()
RegistraScript(String.Format("$('#DivSerie').on('shown.bs.modal', function () {{$('#DivSerie').focus(); $('#{0}').trigger(jQuery.Event('keypress', {{which: 13}})); }});$('#DivSerie').modal('show'); ", TxtSerieLote.ClientID))
@@ -18649,7 +18688,7 @@ Partial Class Compras_Compras
GvInvMov.Visible = True
ObjVentas.Dispose()
- UpINV.Update()
+ UpInv.Update()
End Sub
Private Sub GvInvMov_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvInvMov.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
@@ -19719,12 +19758,11 @@ Partial Class Compras_Compras
If DdlTipoCompra.SelectedValue = "15" Then 'Remisión de nota de crédito
If DdlTipoComprobante.SelectedValue = "NC" Then
- CargaDdlRemisionNotaCredito()
- 'bloquear la vinculación a la compra
+ CargaGVRemisionNotaCredito()
HLAplicaNCFact.Visible = False
Else
Alert("Para elegir Remisión de Nota de Crédito el tipo de documento debe de ser Nota de Crédito.", TipoMensaje.MsgAdvertencia)
- DdlRemisionNotaCredito.SelectedValueExist(-1)
+ 'DdlRemisionNotaCredito.SelectedValueExist(-1)
DdlTipoCompra.SelectedValueExist(-1)
End If
End If
@@ -20387,6 +20425,7 @@ Partial Class Compras_Compras
End Function
Private Sub NCSeleccionFacturasRelacionadas(UUIDSListRelacionados As List(Of String))
+ 'ListaFacturasRealcionadasRNC.Clear()
If UUIDSListRelacionados.Count > 0 Then
Dim SaldoNota As Decimal = TxtTotal.Text.ToDecimal
@@ -20422,17 +20461,20 @@ Partial Class Compras_Compras
SaldoNotaPorAplicar = SaldoNotaPorAplicar - SaldoFactura
GvRow.FCTextBox("TxtImporte").Text = SaldoFactura.FormatoNumero
GvRow.FCCheckBox("ChkFacturaNC").Checked = True
+ 'ListaFacturasRealcionadasRNC.Add(GvRow.DataKey("CveCompra"))
Else
If SaldoFactura >= SaldoNotaPorAplicar Then
GvRow.FCTextBox("TxtImporte").Text = SaldoNotaPorAplicar.FormatoNumero
GvRow.FCCheckBox("ChkFacturaNC").Checked = True
+ 'ListaFacturasRealcionadasRNC.Add(GvRow.DataKey("CveCompra"))
SaldoNotaPorAplicar = 0
TeminarAmortizacion = True
Else
GvRow.FCTextBox("TxtImporte").Text = SaldoFactura.FormatoNumero
GvRow.FCCheckBox("ChkFacturaNC").Checked = True
+ 'ListaFacturasRealcionadasRNC.Add(GvRow.DataKey("CveCompra"))
SaldoNotaPorAplicar = SaldoNotaPorAplicar - SaldoFactura
TeminarAmortizacion = True
@@ -21140,51 +21182,59 @@ Partial Class Compras_Compras
End Sub
- Private Sub CargaDdlRemisionNotaCredito()
- DvDdlRemisionNotaCredito.Visible = True
+ Private Sub CargaGVRemisionNotaCredito()
+ 'DvDdlRemisionNotaCredito.Visible = True
DTRemisionesNotaDeCredito = New DataTable
+ GVRemisionesNotaDeCredito.DataSource = Nothing
+ GVRemisionesNotaDeCredito.Visible = False
+
+ Dim CveComprasAmortizadas As New List(Of String)
+
+ For Each gvRow As GridViewRow In GvFacturaNC.Rows
+ If gvRow.DataKey("CveCompra").ToEntero > 0 AndAlso gvRow.FCCheckBox("ChkFacturaNC").Checked Then
+ CveComprasAmortizadas.Add(gvRow.DataKey("CveCompra"))
+ gvRow.FCCheckBox("ChkFacturaNC").Checked = False
+ End If
+ Next
Dim ObjCompras As New ClsCompras
- If ObjCompras.GetNotasCreditoRep(DdlProveedor.SelectedValue.ToEntero, 0, "-1", "-1", UsuarioActual.CveEmpresa, 2) Then
- DdlRemisionNotaCredito.DataSource = ObjCompras.DtResultados
+ If ObjCompras.GetNotasCreditoRep(DdlProveedor.SelectedValue.ToEntero, 0, "-1", "-1", UsuarioActual.CveEmpresa, 2, String.Join(",", CveComprasAmortizadas)) Then
+ 'DdlRemisionNotaCredito.DataSource = ObjCompras.DtResultados
DTRemisionesNotaDeCredito = ObjCompras.DtResultados
+ GVRemisionesNotaDeCredito.DataSource = DTRemisionesNotaDeCredito
+ GVRemisionesNotaDeCredito.Visible = True
End If
ObjCompras.Dispose()
- DdlRemisionNotaCredito.DataBind()
- DdlRemisionNotaCredito.Items.Insert(0, New ListItem("-", "-1"))
+
+ GVRemisionesNotaDeCredito.DataBind()
+
+ 'DdlRemisionNotaCredito.DataBind()
+ 'DdlRemisionNotaCredito.Items.Insert(0, New ListItem("-", "-1"))
+ UpPS.Update()
UpEstatus.Update()
End Sub
- Protected Sub DdlRemisionNotaCredito_SelectedIndexChanged(sender As Object, e As EventArgs)
+ 'Protected Sub DdlRemisionNotaCredito_SelectedIndexChanged(sender As Object, e As EventArgs)
- ImporteRNCSaldar = 0
- SerieFolioProntoPago = ""
- TipoCambioProntoPago = 1
- FechaProntoPago = MinFecha
- CveMonedaProntoPago = 1
+ ' ImporteRNCSaldar = 0
+ ' SerieFolioProntoPago = ""
+ ' TipoCambioProntoPago = 1
+ ' FechaProntoPago = MinFecha
+ ' CveMonedaProntoPago = 1
- If DdlRemisionNotaCredito.SelectedValue.ToEntero > 0 Then
- ImporteRNCSaldar = DTRemisionesNotaDeCredito.FiltroPrimeroValor("Saldo", $" CveCompra = {DdlRemisionNotaCredito.SelectedValue.ToEntero} ").ToDecimal
- SerieFolioProntoPago = DTRemisionesNotaDeCredito.FiltroPrimeroValor("SerieFolio", $" CveCompra = {DdlRemisionNotaCredito.SelectedValue.ToEntero} ")
- TipoCambioProntoPago = DTRemisionesNotaDeCredito.FiltroPrimeroValor("TipoCambio", $" CveCompra = {DdlRemisionNotaCredito.SelectedValue.ToEntero} ").ToDecimal
- FechaProntoPago = DTRemisionesNotaDeCredito.FiltroPrimeroValor("Fecha", $" CveCompra = {DdlRemisionNotaCredito.SelectedValue.ToEntero} ").ToString.ToDate
- CveMonedaProntoPago = DTRemisionesNotaDeCredito.FiltroPrimeroValor("CveMoneda", $" CveCompra = {DdlRemisionNotaCredito.SelectedValue.ToEntero} ").ToEntero
- End If
-
- ''Alert(ImporteRNCSaldar.ToString)
- 'CompraPago.SerieFolio = Gvr.DataKey("SerieFolio")
- 'CompraPago.TC = Gvr.DataKey("TipoCambio").ToDecimal
- 'CompraPago.Fecha = Gvr.DataKey("Fecha").ToDate
- 'CompraPago.CveMoneda = Gvr.DataKey("CveMoneda").ToEntero
-
- 'CompraPago.Total = Gvr.DataKey("Total").ToDecimal
- 'CompraPago.CveTipoConceptoProveedor = CveTipoConcepto
+ ' If DdlRemisionNotaCredito.SelectedValue.ToEntero > 0 Then
+ ' ImporteRNCSaldar = DTRemisionesNotaDeCredito.FiltroPrimeroValor("Saldo", $" CveCompra = {DdlRemisionNotaCredito.SelectedValue.ToEntero} ").ToDecimal
+ ' SerieFolioProntoPago = DTRemisionesNotaDeCredito.FiltroPrimeroValor("SerieFolio", $" CveCompra = {DdlRemisionNotaCredito.SelectedValue.ToEntero} ")
+ ' TipoCambioProntoPago = DTRemisionesNotaDeCredito.FiltroPrimeroValor("TipoCambio", $" CveCompra = {DdlRemisionNotaCredito.SelectedValue.ToEntero} ").ToDecimal
+ ' FechaProntoPago = DTRemisionesNotaDeCredito.FiltroPrimeroValor("Fecha", $" CveCompra = {DdlRemisionNotaCredito.SelectedValue.ToEntero} ").ToString.ToDate
+ ' CveMonedaProntoPago = DTRemisionesNotaDeCredito.FiltroPrimeroValor("CveMoneda", $" CveCompra = {DdlRemisionNotaCredito.SelectedValue.ToEntero} ").ToEntero
+ ' End If
- End Sub
+ 'End Sub
#End Region
diff --git a/Compras/eFacturas.aspx.vb b/Compras/eFacturas.aspx.vb
index 39f14166c..0c556ae5a 100644
--- a/Compras/eFacturas.aspx.vb
+++ b/Compras/eFacturas.aspx.vb
@@ -1513,6 +1513,11 @@ Partial Class Compras_eFacturas
DTLOG.Columns.Add("Proveedor", GetType(String))
DTLOG.Columns.Add("Importe", GetType(Decimal))
DTLOG.Columns.Add("Motivo", GetType(String))
+ DTLOG.Columns.Add("RFCde", GetType(String))
+ DTLOG.Columns.Add("Estatus", GetType(Integer))
+ DTLOG.Columns.Add("Tipo", GetType(String))
+
+
'Serie Folio Fecha Proveedor Importe Motivo
Dim sw As New Diagnostics.Stopwatch
@@ -1667,6 +1672,10 @@ Partial Class Compras_eFacturas
rowLog("Proveedor") = ""
rowLog("Importe") = 0
rowLog("Motivo") = ""
+ rowLog("RFCde") = ""
+ rowLog("Estatus") = 0
+ rowLog("Tipo") = ""
+
Dim fInfoXML As New FileInfo(filePathXML)
@@ -1884,10 +1893,13 @@ Partial Class Compras_eFacturas
RegistraScript(String.Format("$('#{0}').modal('hide');", "ModalFacturas"))
RegistraScript("$('#ModalBitacoraEfacturas').modal()")
- CargaDatosBitacora()
+
mesajeFaturasSubidas(DTLOG)
+
+ CargaDatosBitacora()
+
'Alert(String.Format("Se cargaron {0} Facturas", Arreglo.Count), TipoMensaje.MsgInformacion)
End Sub
@@ -1900,6 +1912,7 @@ Partial Class Compras_eFacturas
Dim conta As Integer = 1
Str.Append("Se procesó la información con la siguiente información:
| Serie | Folio | Fecha | Proveedor | Importe | Motivo |
")
+ Dim objCompra As New ClsCompras
For Each dr As DataRow In DTLOG.Rows
@@ -1909,13 +1922,18 @@ Partial Class Compras_eFacturas
Str.AppendFormat("{0} | ", dr("Folio"))
Str.AppendFormat("{0} | ", If(dr("Fecha").ToString <> "", dr("Fecha").ToString.ToDate.ToShortDateString, ""))
Str.AppendFormat("{0} | ", dr("Proveedor"))
- Str.AppendFormat("{0} | ", dr("Importe").ToString.ToDouble.FormatoNumero)
+ Str.AppendFormat("{0} | ", dr("Importe").ToString.ToDecimal.FormatoNumero)
Str.AppendFormat("{0} | ", dr("Motivo"))
Str.Append("")
conta += 1
+
+ objCompra.AddBitacoraFactura(dr("Serie").ToString, dr("Folio").ToString, dr("RFCde").ToString, dr("Motivo").ToString, dr("Estatus").ToString.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, "Modulo eFacturas",
+ dr("Proveedor").ToString, dr("Importe").ToString.ToDecimal, dr("Tipo").ToString)
Next
+ 'RFCde,Estatus,Tipo
+ objCompra.Dispose()
If DTLOG.Rows.Count > 0 Then 'si las facturas no recividas son matores a cero se muestra el mensaje
Alert(Str.ToString, TipoMensaje.MsgInformacion)
@@ -7950,6 +7968,12 @@ Namespace ADS.eFacturas
rowLog("Importe") = Fact.Total
rowLog("Motivo") = ""
+ rowLog("RFCde") = Fact.EmisorRFC
+ rowLog("Estatus") = 0
+ rowLog("Tipo") = Fact.TipoComprobante
+
+
+
If Registrar Then
If Fact.ReceptorRFC = RFCEmpresa Then
@@ -7963,6 +7987,8 @@ Namespace ADS.eFacturas
If Fact.RespuestaInsert >= 0 Then
+ rowLog("Estatus") = 1
+
Dim Destino As String = $"{DirectorioEmpresa}\Compras\"
Try
diff --git a/Contabilidad/RepIVA.aspx.cs b/Contabilidad/RepIVA.aspx.cs
index 1a90339d7..43b56f5e5 100644
--- a/Contabilidad/RepIVA.aspx.cs
+++ b/Contabilidad/RepIVA.aspx.cs
@@ -255,14 +255,14 @@ public partial class Contabilidad_RepIVA : ClsPaginas
Ruta = string.Format("{0}Formatos\\{1}", UsuarioActual.Empresa.Ruta, Formato);
//ImprimirbytesPDF(ImprimirPDFCrystal(Ruta, Dt, para, "Reporte de IVA", Opcion), "Reporte de IVA", Opcion);
- if (UsuarioActual.Empresa.Funcionalidad(713).ToEntero() == 1)
+ if (UsuarioActual.Empresa.Funcionalidad(713).ToEntero() == 1 && !Ruta.Contains( "RepIVAAcreditable.rpt"))
{
ImprimirbytesPDF(ImprimirSubRepPDFCrystal(Ruta, Dt, para, DtIEPSA, DtIVAA, "RepIEPSPorcentaje.rpt", "RepIVAPorcentaje.rpt", "Reporte de IVA", Opcion), "Reporte de IVA", Opcion);
}
else
{
- //ImprimirbytesPDF(ImprimirPDFCrystal(Ruta, Dt, para, "Reporte de IVA", Opcion), "Reporte de IVA", Opcion);
- ImprimirbytesPDF(ImprimirSubRepPDFCrystal(Ruta, Dt, para, new DataTable(), new DataTable(), "RepIEPSPorcentaje.rpt", "RepIVAPorcentaje.rpt", "Reporte de IVA", Opcion), "Reporte de IVA", Opcion);
+ ImprimirbytesPDF(ImprimirPDFCrystal(Ruta, Dt, para, "Reporte de IVA", Opcion), "Reporte de IVA", Opcion);
+ //ImprimirbytesPDF(ImprimirSubRepPDFCrystal(Ruta, Dt, para, new DataTable(), new DataTable(), "RepIEPSPorcentaje.rpt", "RepIVAPorcentaje.rpt", "Reporte de IVA", Opcion), "Reporte de IVA", Opcion);
}
}else
diff --git a/Empresas/119/Formatos/RepIVAAcreditable.rpt b/Empresas/119/Formatos/RepIVAAcreditable.rpt
index 384b35d05..dcfbc35fd 100644
Binary files a/Empresas/119/Formatos/RepIVAAcreditable.rpt and b/Empresas/119/Formatos/RepIVAAcreditable.rpt differ
diff --git a/Empresas/197/Formatos/OC.rdlc b/Empresas/197/Formatos/OC.rdlc
index 2497110a5..694ca2c40 100644
--- a/Empresas/197/Formatos/OC.rdlc
+++ b/Empresas/197/Formatos/OC.rdlc
@@ -1754,7 +1754,7 @@
@@ -1762,7 +1762,7 @@
=IIF(LEN(Parameters!SubProyectoEntrega.Value) > 0,"Lugar de Entrega: " + Parameters!SubProyectoEntrega.Value,"")
@@ -1770,7 +1770,7 @@
@@ -1785,8 +1785,8 @@
=Parameters!SubProyectoEntregaDir.Value
@@ -1867,7 +1867,7 @@
=Parameters!RFC.Value
@@ -1884,7 +1884,7 @@
"(" & Mid(Parameters!Telefono.Value, 1, 3) & ") " & Mid(Parameters!Telefono.Value, 4))
@@ -1899,7 +1899,7 @@
USO CFDI:
@@ -1907,7 +1907,7 @@
=Parameters!UsoCFDI.Value
diff --git a/Empresas/Grales/Formatos/CartaPorteTimbrado.rdlc b/Empresas/Grales/Formatos/CartaPorteTimbrado.rdlc
index eb97b6a19..5bd34f062 100644
--- a/Empresas/Grales/Formatos/CartaPorteTimbrado.rdlc
+++ b/Empresas/Grales/Formatos/CartaPorteTimbrado.rdlc
@@ -4241,7 +4241,7 @@
- =Parameters!CartaPorteVersion.Value
+ =IIF(Parameters!RFC.Value = "BBD021220APA", "3.1", Parameters!CartaPorteVersion.Value)