diff --git a/App_Code/CalendarEvent.vb b/App_Code/CalendarEvent.vb
index 58abbdf3b..b9d3ff484 100644
--- a/App_Code/CalendarEvent.vb
+++ b/App_Code/CalendarEvent.vb
@@ -23,5 +23,7 @@ Public Class CalendarEvent
Public Property CveTipoEvento As Integer
Public Property Importe As Double
Public Property EmpresaCRM As String
+ Public Property SubProyecto As String
+ Public Property CveSubProyecto As Integer
End Class
diff --git a/App_Code/ClsMovimientos.vb b/App_Code/ClsMovimientos.vb
index 7553f2d76..4b90021f3 100644
--- a/App_Code/ClsMovimientos.vb
+++ b/App_Code/ClsMovimientos.vb
@@ -613,7 +613,7 @@ Public Class ClsMovimientos
'CveAplicaNC
Public Function GetCxPProveedor(CveProveedor As Integer, FechaI As String, FechaF As String, CveUsuarioProgramo As Integer, CveUsuarioRegistro As Integer,
CveUsuarioResponsable As Integer, CveClasificacionProveedor As Integer, CveMoneda As Integer, CveEstatus As Integer, CveProveedorSucursal As Integer, CveAplicaNC As Integer,
- Optional FechaVI As String = "-1", Optional FechaVF As String = "-1", Optional CodigoProgramacion As String = "-1") As Boolean
+ Optional FechaVI As String = "-1", Optional FechaVF As String = "-1", Optional CodigoProgramacion As String = "-1", Optional CveSubProyecto As Integer = -1) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Comp_ProveedorCxP")
With SqlAdapter.SelectCommand.Parameters
@@ -631,6 +631,7 @@ Public Class ClsMovimientos
.Add("@FechaVI", SqlDbType.VarChar).Value = FechaVI
.Add("@FechaVF", SqlDbType.VarChar).Value = FechaVF
.Add("@CodigoProgramacion", SqlDbType.VarChar).Value = CodigoProgramacion
+ .Add("@CveSubProyecto", SqlDbType.SmallInt).Value = CveSubProyecto
End With
diff --git a/App_Code/ClsNominas.vb b/App_Code/ClsNominas.vb
index a2d3ffa62..22921dad9 100644
--- a/App_Code/ClsNominas.vb
+++ b/App_Code/ClsNominas.vb
@@ -3218,8 +3218,7 @@ Public Class ClsNominas
End Function
- Public Function SATSolicitudTimbreIngresosRep(CveEmpresa As Integer, FechaInicio As Date, FechaFin As DateTime, Opcion As Integer) As Boolean
-
+ Public Function SATSolicitudTimbreIngresosRep(CveEmpresa As Integer, FechaInicio As Date, FechaFin As DateTime, Opcion As Integer, Vista As Integer) As Boolean
Dim retorno As Boolean = False
Try
@@ -3229,6 +3228,7 @@ Public Class ClsNominas
.Add("@FechaInicio", SqlDbType.Date).Value = FechaInicio
.Add("@FechaFin", SqlDbType.DateTime).Value = FechaFin
.Add("@Opcion", SqlDbType.Int).Value = Opcion
+ .Add("@Vista", SqlDbType.Int).Value = Vista
End With
SqlAdapter.Fill(Data)
diff --git a/App_Code/ClsOIEventos.vb b/App_Code/ClsOIEventos.vb
index 41770f405..05ec2309d 100644
--- a/App_Code/ClsOIEventos.vb
+++ b/App_Code/ClsOIEventos.vb
@@ -1853,7 +1853,7 @@ Public Class ClsOIEventos
Return Retorno
End Function
- Public Function FinalizaEvento(FechaFin As DateTime, CveEventoEstatus As Integer, Geom As String, CveEvento As Integer) As Boolean
+ Public Function FinalizaEvento(FechaFin As DateTime, CveEventoEstatus As Integer, Geom As String, CveEvento As Integer, Optional CveOS As Integer = -1, Optional CveUsuario As Integer = -1) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_OI_EventoFinalizar")
@@ -1863,6 +1863,8 @@ Public Class ClsOIEventos
.Add("@Geom", SqlDbType.VarChar).Value = Geom
.Add("@FechaFin", SqlDbType.DateTime).Value = FechaFin
.Add("@CveEvento", SqlDbType.Int).Value = CveEvento
+ .Add("@CveOS", SqlDbType.Int).Value = CveOS
+ .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
End With
Try
@@ -2432,12 +2434,13 @@ Public Class ClsOIEventos
Optional CveOS As Integer = -1, Optional CveOC As Integer = -1, Optional CvePersonal As Integer = -1, Optional CveProveedor As Integer = -1, Optional CveEventoPadre As Integer = -1,
Optional RecurrenciaTipo As Integer = -1, Optional Frecuencia As Integer = -1, Optional DiasSemana As String = "-1", Optional Dia As Integer = -1, Optional Mes As Integer = -1,
Optional RecurrenciaFin As String = "-1", Optional CveTipoEvento As Integer = 2, Optional Importe As Double = -1,
- Optional CveEmpresaCRM As Integer = -1, Optional CveContactoCRM As Integer = -1, Optional CveAcercamientoCRM As Integer = -1, Optional CveTipoProcesoCRM As Integer = -1, Optional CveEtapaProcesoCRM As Integer = -1) As Boolean
+ Optional CveEmpresaCRM As Integer = -1, Optional CveContactoCRM As Integer = -1, Optional CveAcercamientoCRM As Integer = -1, Optional CveTipoProcesoCRM As Integer = -1, Optional CveEtapaProcesoCRM As Integer = -1,
+ Optional CveSubProyecto As Integer = -1) As Boolean
Dim Retorno As Boolean = False
Retorno = AddEvento(CveTipoEvento, CveAgendaTipo, Asunto, Descripcion, Prioridad, -1, CveUsuarioIng, FechaInicio, FechaFin, -1, -1, "-1", CveUsuarioIng, CveEmpresa, CveActivoFijo, CveIE, CveProspecto, CveCliente, CveOS, CveOC,
CvePersonal, CvePersonal, CveEventoPadre:=CveEventoPadre, RecurrenciaTipo:=RecurrenciaTipo, Frecuencia:=Frecuencia, DiasSemana:=DiasSemana, Dia:=Dia, Mes:=Mes, RecurrenciaFin:=RecurrenciaFin, Importe:=Importe,
- CveEmpresaCRM:=CveEmpresaCRM, CveContactoCRM:=CveContactoCRM, CveAcercamientoCRM:=CveAcercamientoCRM, CveTipoProcesoCRM:=CveTipoProcesoCRM, CveEtapaProcesoCRM:=CveEtapaProcesoCRM)
+ CveEmpresaCRM:=CveEmpresaCRM, CveContactoCRM:=CveContactoCRM, CveAcercamientoCRM:=CveAcercamientoCRM, CveTipoProcesoCRM:=CveTipoProcesoCRM, CveEtapaProcesoCRM:=CveEtapaProcesoCRM, CveSubProyecto:=CveSubProyecto)
Return Retorno
End Function
diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb
index e3d5653d6..c0d1df576 100644
--- a/App_Code/ClsPaginas.vb
+++ b/App_Code/ClsPaginas.vb
@@ -5195,6 +5195,7 @@ Public Class ClsPaginas
PaginaDict.Add("/OS/PopUpOS_PS_Especificaciones.aspx".ToUpper(), 135)
PaginaDict.Add("/OS/PopUpMateriales.aspx".ToUpper(), 135)
PaginaDict.Add("/OS/Asignaciones.aspx".ToUpper(), 125)
+ PaginaDict.Add("/OS/RepServicioDomicilio.aspx".ToUpper(), 1330)
#End Region
'OC
#Region "OC"
@@ -5606,7 +5607,7 @@ Public Class ClsPaginas
PaginaDict.Add("/Contabilidad/OCDetalleAlmacen.aspx".ToUpper(), -1)
PaginaDict.Add("/Agropecuaria/CierreCultivo.aspx".ToUpper(), 1326)
-
+
PaginaDict.Add("/Inventarios/RepRSCO.aspx".ToUpper(), 1328)
@@ -5643,6 +5644,9 @@ Public Class ClsPaginas
+
+
+
'ECOMMERCE
PaginaDict.Add("/Ecommerce/Insignias.aspx".ToUpper(), 7002)
@@ -7041,6 +7045,54 @@ Public Class ClsPaginas
Vta.SelloCFDi = "Sin Timbrar"
Vta.SelloSAT = "Sin Timbrar"
+
+#Region "COMERCIO EXTERIOR VARIABLES Y TABLAS"
+
+ Dim CETipoOperacion = "", CEClavePedimento As String = "", CEIncoterm As String = "", CEId As String = "", CEMotivoTraslado As String = "", CETipoCambio As String = ""
+ Dim RCETipoOperacion As String = "", RCEClavePedimento As String = "", RCEIncoterm As String = "", RCEMotivoTraslado As String = ""
+
+
+ Dim CE_DT_Cabecera As New DataTable
+
+
+ CE_DT_Cabecera.Columns.Add("Version")
+ CE_DT_Cabecera.Columns.Add("MotivoTraslado")
+ CE_DT_Cabecera.Columns.Add("TipoOperacion")
+ CE_DT_Cabecera.Columns.Add("ClaveDePedimento")
+ CE_DT_Cabecera.Columns.Add("CertificadoOrigen")
+ CE_DT_Cabecera.Columns.Add("Incoterm")
+ CE_DT_Cabecera.Columns.Add("Subdivision")
+ CE_DT_Cabecera.Columns.Add("TipoCambioUSD", GetType(Decimal))
+ CE_DT_Cabecera.Columns.Add("TotalUSD", GetType(Decimal))
+
+
+ Dim CE_DT_Emisor As New DataTable
+ CE_DT_Emisor.Columns.Add("Calle")
+ CE_DT_Emisor.Columns.Add("NumeroExterior")
+ CE_DT_Emisor.Columns.Add("Colonia")
+ CE_DT_Emisor.Columns.Add("Municipio")
+ CE_DT_Emisor.Columns.Add("Estado")
+ CE_DT_Emisor.Columns.Add("Pais")
+ CE_DT_Emisor.Columns.Add("CodigoPostal")
+ CE_DT_Emisor.Columns.Add("Tipo", GetType(Integer))
+
+ Dim CE_DT_Receptor As New DataTable
+ Dim CE_DT_Destinatario As New DataTable
+
+ CE_DT_Receptor = CE_DT_Emisor.Copy
+ CE_DT_Destinatario = CE_DT_Emisor.Copy
+
+
+ Dim CE_DT_Mercancias As New DataTable
+ CE_DT_Mercancias.Columns.Add("NoIdentificacion")
+ CE_DT_Mercancias.Columns.Add("FraccionArancelaria")
+ CE_DT_Mercancias.Columns.Add("CantidadAduana")
+ CE_DT_Mercancias.Columns.Add("UnidadAduana")
+ CE_DT_Mercancias.Columns.Add("ValorUnitarioAduana", GetType(Decimal))
+ CE_DT_Mercancias.Columns.Add("ValorDolares", GetType(Decimal))
+#End Region
+
+
'SI ESTA TIMBRADA - CON XML
If File.Exists(PathXML) AndAlso Vta.Serie <> "VistaPrevia" Then 'Cuando es vista previe y coincide la serie y folio se ponen los datos fiscales
Dim XmlDoc As New System.Xml.XmlDocument
@@ -7077,6 +7129,130 @@ Public Class ClsPaginas
Vta.SelloCFDi = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("SelloCFD").InnerText
Vta.SelloSAT = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("SelloSAT").InnerText
End If
+
+
+#Region "COMERCIO EXTERIOR LECTURA DATOS XML"
+ If XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Name = "cce11:ComercioExterior" Then
+
+ Dim nRowCECabecera As DataRow = CE_DT_Cabecera.NewRow
+
+ CETipoOperacion = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("TipoOperacion").InnerText
+ CEClavePedimento = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("ClaveDePedimento").InnerText
+ CEIncoterm = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("Incoterm").InnerText
+
+
+ nRowCECabecera("Version") = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("Version").InnerText
+ nRowCECabecera("MotivoTraslado") = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("MotivoTraslado").InnerText
+ nRowCECabecera("TipoOperacion") = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("TipoOperacion").InnerText
+ nRowCECabecera("ClaveDePedimento") = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("ClaveDePedimento").InnerText
+ nRowCECabecera("CertificadoOrigen") = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("CertificadoOrigen").InnerText
+ nRowCECabecera("Incoterm") = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("Incoterm").InnerText
+ nRowCECabecera("Subdivision") = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("Subdivision").InnerText
+ nRowCECabecera("TipoCambioUSD") = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("TipoCambioUSD").InnerText.ToDecimal
+ nRowCECabecera("TotalUSD") = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("TotalUSD").InnerText.ToDecimal
+
+ CE_DT_Cabecera.Rows.Add(nRowCECabecera)
+
+ Dim nodo As XmlNode = XmlDoc.DocumentElement
+ Dim VersionCFDI As String = ValorXML(nodo, "version")
+
+ Dim cfdVer As String = ""
+ If VersionCFDI = "3.2" Then
+ cfdVer = "http://www.sat.gob.mx/cfd/2"
+ ElseIf VersionCFDI = "3.3" Then
+ cfdVer = "http://www.sat.gob.mx/cfd/3"
+ Else ' se considera que es la version 4.0
+ cfdVer = "http://www.sat.gob.mx/cfd/4"
+ End If
+
+ Dim namespaces As XmlNamespaceManager = New XmlNamespaceManager(XmlDoc.NameTable)
+
+ namespaces.AddNamespace("cfdi", cfdVer)
+ namespaces.AddNamespace("cce11", "http://www.sat.gob.mx/ComercioExterior11")
+
+ CEId = ""
+ Try
+ CEId = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).SelectSingleNode("//cce11:Destinatario", namespaces).Attributes("NumRegIdTrib").InnerText 'XmlDoc.SelectNodes("//cfdi:Complemento/tfd:TimbreFiscalDigital/cce11:Destinatario")
+ Catch ex As Exception
+
+ End Try
+
+
+ CEMotivoTraslado = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("MotivoTraslado").InnerText
+ CETipoCambio = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("TipoCambioUSD").InnerText
+
+
+ RCETipoOperacion = GlobalDTTipoOperacion.FiltroPrimeroValor("Descripcion", $"ClaveSATTipoOperacion = '{CETipoOperacion}'")
+ RCEClavePedimento = GlobalDTClavePedimento.FiltroPrimeroValor("Descripcion", $"ClaveSATPedimento = '{CEClavePedimento}'")
+ RCEIncoterm = GlobalDTIncoterm.FiltroPrimeroValor("Descripcion", $"ClaveSATIncoterm = '{CEIncoterm}'")
+ RCEMotivoTraslado = GlobalDTSATMotivoTraslado.FiltroPrimeroValor("MotivoTraslado", $"ClaveSATMotivoTraslado = '{CEMotivoTraslado}'")
+
+
+ Dim CENodosEmisor As XmlNodeList = XmlDoc.DocumentElement.SelectNodes("//cfdi:Complemento/cce11:ComercioExterior/cce11:Emisor", namespaces) 'XmlDoc.SelectNodes("cfdi:Complemento/{0}:Traslados", "")
+ Dim CENodosReceptor As XmlNodeList = XmlDoc.DocumentElement.SelectNodes("//cfdi:Complemento/cce11:ComercioExterior/cce11:Receptor", namespaces)
+ Dim CEnodosDestinatario As XmlNodeList = XmlDoc.DocumentElement.SelectNodes("//cfdi:Complemento/cce11:ComercioExterior/cce11:Destinatario", namespaces)
+ Dim CEnodosMercancias As XmlNodeList = XmlDoc.DocumentElement.SelectNodes("//cfdi:Complemento/cce11:ComercioExterior/cce11:Mercancias", namespaces)
+
+
+ For Each node As XmlNode In CENodosEmisor
+ Dim nRowEmisor As DataRow = CE_DT_Emisor.NewRow
+ nRowEmisor("Calle") = ValorNodoXML(node.FirstChild, "Calle")
+ nRowEmisor("NumeroExterior") = ValorXML(node.FirstChild, "NumeroExterior")
+ nRowEmisor("Colonia") = ValorXML(node.FirstChild, "Colonia")
+ nRowEmisor("Municipio") = ValorXML(node.FirstChild, "Municipio")
+ nRowEmisor("Estado") = ValorXML(node.FirstChild, "Estado")
+ nRowEmisor("Pais") = ValorXML(node.FirstChild, "Pais")
+ nRowEmisor("CodigoPostal") = ValorXML(node.FirstChild, "CodigoPostal")
+ nRowEmisor("Tipo") = 1
+ CE_DT_Emisor.Rows.Add(nRowEmisor)
+ Exit For
+ Next
+
+ For Each node As XmlNode In CENodosReceptor
+ Dim nRowReceptor As DataRow = CE_DT_Receptor.NewRow
+ nRowReceptor("Calle") = ValorXML(node.FirstChild, "Calle")
+ nRowReceptor("NumeroExterior") = ValorXML(node.FirstChild, "NumeroExterior")
+ nRowReceptor("Colonia") = ValorXML(node.FirstChild, "Colonia")
+ nRowReceptor("Municipio") = ValorXML(node.FirstChild, "Municipio")
+ nRowReceptor("Estado") = ValorXML(node.FirstChild, "Estado")
+ nRowReceptor("Pais") = ValorXML(node.FirstChild, "Pais")
+ nRowReceptor("CodigoPostal") = ValorXML(node.FirstChild, "CodigoPostal")
+ nRowReceptor("Tipo") = 2
+ CE_DT_Receptor.Rows.Add(nRowReceptor)
+ Exit For
+ Next
+
+ For Each node As XmlNode In CEnodosDestinatario
+ Dim nRowDestinatario As DataRow = CE_DT_Destinatario.NewRow
+ nRowDestinatario("Calle") = ValorXML(node.FirstChild, "Calle")
+ nRowDestinatario("NumeroExterior") = ValorXML(node.FirstChild, "NumeroExterior")
+ nRowDestinatario("Colonia") = ValorXML(node.FirstChild, "Colonia")
+ nRowDestinatario("Municipio") = ValorXML(node.FirstChild, "Municipio")
+ nRowDestinatario("Estado") = ValorXML(node.FirstChild, "Estado")
+ nRowDestinatario("Pais") = ValorXML(node.FirstChild, "Pais")
+ nRowDestinatario("CodigoPostal") = ValorXML(node.FirstChild, "CodigoPostal")
+ nRowDestinatario("Tipo") = 3
+ CE_DT_Destinatario.Rows.Add(nRowDestinatario)
+ Exit For
+ Next
+
+ For Each node As XmlNode In CEnodosMercancias
+ Dim nRowMercancias As DataRow = CE_DT_Mercancias.NewRow
+ nRowMercancias("NoIdentificacion") = ValorXML(node.FirstChild, "NoIdentificacion")
+ nRowMercancias("FraccionArancelaria") = ValorXML(node.FirstChild, "FraccionArancelaria")
+ nRowMercancias("CantidadAduana") = ValorXML(node.FirstChild, "CantidadAduana")
+ nRowMercancias("UnidadAduana") = ValorXML(node.FirstChild, "UnidadAduana")
+ nRowMercancias("ValorUnitarioAduana") = ValorXML(node.FirstChild, "ValorUnitarioAduana").ToDecimal
+ nRowMercancias("ValorDolares") = ValorXML(node.FirstChild, "ValorDolares").ToDecimal
+ CE_DT_Mercancias.Rows.Add(nRowMercancias)
+ Next
+ Dim asddd As String = ""
+
+ End If
+#End Region
+
+
+
Next
End If
@@ -7191,6 +7367,17 @@ Public Class ClsPaginas
Dim params As New List(Of ReportParameter)
+
+ If RCETipoOperacion.Trim.Length > 0 Then
+ params.Add(New ReportParameter("CETipoOperacion", RCETipoOperacion))
+ params.Add(New ReportParameter("CEClavePedimento", RCEClavePedimento))
+ params.Add(New ReportParameter("CEIncoterm", RCEIncoterm))
+ params.Add(New ReportParameter("CEId", CEId))
+ params.Add(New ReportParameter("CEMotivoTraslado", RCEMotivoTraslado))
+ params.Add(New ReportParameter("CETipoCamvio", CETipoCambio))
+ End If
+
+
If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
params.Add(New ReportParameter("CFDIVersion", Vta.Version))
If Vta.Cliente.CodigoRegimenFiscal.ToString.Length > 0 Then
@@ -7776,6 +7963,26 @@ Public Class ClsPaginas
Dim rds5 As New ReportDataSource With {.Name = "DataSet5", .Value = If(Vta.DtNCVinculadas IsNot Nothing, Vta.DtNCVinculadas, New DataTable)} ' sino esta creado el objeto, lo creamos, para que no truene el reporte
lrds.Add(rds5)
+
+ If RCETipoOperacion.Trim.Length > 0 Then
+ Dim rds6 As New ReportDataSource With {.Name = "CE_DT_Emisor", .Value = CE_DT_Emisor}
+ lrds.Add(rds6)
+
+ Dim rds7 As New ReportDataSource With {.Name = "CE_DT_Receptor", .Value = CE_DT_Receptor}
+ lrds.Add(rds7)
+
+ Dim rds8 As New ReportDataSource With {.Name = "CE_DT_Destinatario", .Value = CE_DT_Destinatario}
+ lrds.Add(rds8)
+
+ Dim rds9 As New ReportDataSource With {.Name = "CE_DT_Mercancias", .Value = CE_DT_Mercancias}
+ lrds.Add(rds9)
+
+ Dim rds10 As New ReportDataSource With {.Name = "CE_DT_Cabecera", .Value = CE_DT_Cabecera}
+ lrds.Add(rds10)
+
+ End If
+
+
If UsuarioActual.CveEmpresa.Contiene(141, 152, 159, 160, 161, 162, 163) AndAlso (RutaFormato.Contains("Factura") Or RutaFormato.Contains("Cotizacion")) Then
params.Add(New ReportParameter("Kilometraje", Vta.Kilometraje.ToString))
End If
@@ -7915,7 +8122,7 @@ Public Class ClsPaginas
Dim payload As New JObject(
New JProperty("formato", Formato),
New JProperty("ruta", RutaReporte),
- New JProperty("UsarFormatoCompilado", false),
+ New JProperty("UsarFormatoCompilado", False),
New JProperty("parametros", paramsArray),
New JProperty("dataSource", dataSourceArray)
)
@@ -9363,8 +9570,7 @@ Public Class ClsPaginas
#Region "P A G O D E C O M P R A S "
-
- Public Function AplicaPrePolizaPago(CompraActual As Compra, Pago As CompraPago, CvePrePoliza As Integer, ByRef ObjConta As ClsContabilidad) As Boolean
+ Public Function AplicaPrePolizaPagoCompra(CompraActual As Compra, Pago As CompraPago, CvePrePoliza As Integer, ByRef ObjConta As ClsContabilidad) As Boolean
Dim ErrorMovtos As Boolean = False
Dim PorcentajePago As Decimal = Pago.ImportePago / CompraActual.Total
Dim ImporteMovimiento As Decimal = 0
@@ -9470,14 +9676,18 @@ Public Class ClsPaginas
ImporteMovimiento = (PorcentajePago * CompraActual.RetISR).RoundSQL
ImporteMN = (ImporteMovimiento * CompraActual.TC).RoundSQL
If CompraActual.CveMoneda > 1 Then ImporteME = ImporteMovimiento
+ Dim ContabilizableISR As Boolean = False
+ If UsuarioActual.CveEmpresa = 140 Then
+ ContabilizableISR = True
+ End If
Dim Ret As ConceptosRetenciones = CompraActual.ConceptoPrePolizaRetISR
- If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, ImporteMN, Ret.CveConceptoxAcreditar, CompraActual.SerieFolio, Concepto, Ret.IdCtaContablexAcreditar, CveCompra:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME) Then ErrorMovtos = True
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, ImporteMN, Ret.CveConceptoxAcreditar, CompraActual.SerieFolio, Concepto, Ret.IdCtaContablexAcreditar, CveCompra:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME, Contabilizable:=ContabilizableISR) Then ErrorMovtos = True
'si tiene funcionalidad para tomar el TC de pago. se recalcula el importe
If FuncionalidadFluctuacionImpuestos Then ImporteMN = (ImporteMovimiento * Pago.TCPago).RoundSQL
- If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteMovimiento, ImporteMN, Ret.CveConceptoAcreditable, CompraActual.SerieFolio, Concepto, Ret.IdCtaContableAcreditable, CveCompra:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME) Then ErrorMovtos = True
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteMovimiento, ImporteMN, Ret.CveConceptoAcreditable, CompraActual.SerieFolio, Concepto, Ret.IdCtaContableAcreditable, CveCompra:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME, Contabilizable:=ContabilizableISR) Then ErrorMovtos = True
End If
@@ -9509,15 +9719,17 @@ Public Class ClsPaginas
If Not ErrorMovtos AndAlso ImporteMovimiento <> 0 Then
Dim tOtCveCon As Integer = 211
Dim tOtTipoMovto As Boolean = False
+ Dim IdCta As Integer = If(UsuarioActual.Empresa.TipoContabilidad = 2, UsuarioActual.Empresa.Funcionalidad(266).ToEntero(), 0)
If ImporteMovimiento < 0 Then
tOtTipoMovto = True : tOtCveCon = 78
ImporteMovimiento = Math.Abs(ImporteMovimiento)
+ IdCta = If(UsuarioActual.Empresa.TipoContabilidad = 2, UsuarioActual.Empresa.IdCuentaOtrosIngresos, 0)
End If
- If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, tOtTipoMovto, ImporteMovimiento, ImporteMovimiento, tOtCveCon, CompraActual.SerieFolio, Concepto, 0, CveCompra:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, CveSubProyecto:=CompraActual.CveSubProyecto, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME) Then ErrorMovtos = True
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, tOtTipoMovto, ImporteMovimiento, ImporteMovimiento, tOtCveCon, CompraActual.SerieFolio, Concepto, IdCta, CveCompra:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, CveSubProyecto:=CompraActual.CveSubProyecto, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME) Then ErrorMovtos = True
End If
- If Not ErrorMovtos AndAlso CompraActual.TC <> Pago.TCPago Then
+ If Not ErrorMovtos AndAlso TCValuacion <> Pago.TCPago Then
Dim ConceptoContable, IdCtaContable As Integer
Dim TipoMovimiento As Boolean
Dim Diferencia As Decimal = 0
@@ -9625,50 +9837,52 @@ Public Class ClsPaginas
Public ReadOnly Property ConceptoPrePolizaRetIVA As ConceptosRetenciones
Get
Dim Ret As New ConceptosRetenciones
- Dim Funcionalidad As Integer
+ Dim Funcionalidad, FuncionalidadxAcred As Integer
If CveConceptoRetIVA = 1 Then
- Funcionalidad = 308
+ Funcionalidad = 308 : FuncionalidadxAcred = 307
Ret.CveConceptoAcreditable = 22
Ret.CveConceptoxAcreditar = 15
ElseIf CveConceptoRetIVA = 2 Then
- Funcionalidad = 310
+ Funcionalidad = 310 : FuncionalidadxAcred = 309
Ret.CveConceptoAcreditable = 184
Ret.CveConceptoxAcreditar = 183
ElseIf CveConceptoRetIVA = 3 Then
- Funcionalidad = 312
+ Funcionalidad = 312 : FuncionalidadxAcred = 311
Ret.CveConceptoAcreditable = 186
Ret.CveConceptoxAcreditar = 185
ElseIf CveConceptoRetIVA = 4 Then
- Funcionalidad = 314
+ Funcionalidad = 314 : FuncionalidadxAcred = 313
Ret.CveConceptoAcreditable = 249
Ret.CveConceptoxAcreditar = 248
ElseIf CveConceptoRetIVA = 5 Then
- Funcionalidad = 578
+ Funcionalidad = 578 : FuncionalidadxAcred = 578
Ret.CveConceptoAcreditable = 286
Ret.CveConceptoxAcreditar = 285
ElseIf CveConceptoRetIVA = 6 Then
- Funcionalidad = 578
+ Funcionalidad = 578 : FuncionalidadxAcred = 578
Ret.CveConceptoAcreditable = 333
Ret.CveConceptoxAcreditar = 334
End If
If UsuarioActual.Empresa.TipoContabilidad = 2 Then
- If UsuarioActual.Empresa.Funcionalidad(Funcionalidad).ToEntero > 0 Then
- Ret.IdCtaContablexAcreditar = UsuarioActual.Empresa.Funcionalidad(Funcionalidad).ToEntero
+
+ Dim ObjConta As New ClsContabilidad
+ If UsuarioActual.Empresa.Funcionalidad(FuncionalidadxAcred).ToEntero > 0 Then
+ Ret.IdCtaContablexAcreditar = UsuarioActual.Empresa.Funcionalidad(FuncionalidadxAcred).ToEntero
Else
- Dim ObjConta As New ClsContabilidad
- If ObjConta.GetRetCuenta(Ret.CveConceptoAcreditable, UsuarioActual.CveEmpresa) Then
- If ObjConta.DtResultados.Rows.Count > 0 Then
- Ret.IdCtaContablexAcreditar = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
- End If
- End If
If ObjConta.GetRetCuenta(Ret.CveConceptoxAcreditar, UsuarioActual.CveEmpresa) Then
- If ObjConta.DtResultados.Rows.Count > 0 Then
- Ret.IdCtaContableAcreditable = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
- End If
+ If ObjConta.DtResultados.Rows.Count > 0 Then Ret.IdCtaContablexAcreditar = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
End If
- ObjConta.Dispose()
End If
+
+ If UsuarioActual.Empresa.Funcionalidad(Funcionalidad).ToEntero > 0 Then
+ Ret.IdCtaContableAcreditable = UsuarioActual.Empresa.Funcionalidad(Funcionalidad).ToEntero
+ Else
+ If ObjConta.GetRetCuenta(Ret.CveConceptoAcreditable, UsuarioActual.CveEmpresa) Then
+ If ObjConta.DtResultados.Rows.Count > 0 Then Ret.IdCtaContableAcreditable = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
+ End If
+ End If
+ ObjConta.Dispose()
End If
Return Ret
@@ -9677,38 +9891,41 @@ Public Class ClsPaginas
Public ReadOnly Property ConceptoPrePolizaRetISR As ConceptosRetenciones
Get
Dim Ret As New ConceptosRetenciones
- Dim Funcionalidad As Integer
+ Dim Funcionalidad, FuncionalidadxAcred As Integer
If CveConceptoRetISR = 1 Then
- Funcionalidad = 316
+ Funcionalidad = 316 : FuncionalidadxAcred = 315
Ret.CveConceptoAcreditable = 23
Ret.CveConceptoxAcreditar = 16
ElseIf CveConceptoRetISR = 2 Then
- Funcionalidad = 318
+ Funcionalidad = 318 : FuncionalidadxAcred = 317
Ret.CveConceptoAcreditable = 244
Ret.CveConceptoxAcreditar = 243
ElseIf CveConceptoRetISR = 3 Then
- Funcionalidad = 348
+ Funcionalidad = 349 : FuncionalidadxAcred = 348
Ret.CveConceptoAcreditable = 328
Ret.CveConceptoxAcreditar = 327
End If
If UsuarioActual.Empresa.TipoContabilidad = 2 Then
+
+ Dim ObjConta As New ClsContabilidad
+ If UsuarioActual.Empresa.Funcionalidad(FuncionalidadxAcred).ToEntero > 0 Then
+ Ret.IdCtaContablexAcreditar = UsuarioActual.Empresa.Funcionalidad(FuncionalidadxAcred).ToEntero
+ Else
+ If ObjConta.GetRetCuenta(Ret.CveConceptoxAcreditar, UsuarioActual.CveEmpresa) Then
+ If ObjConta.DtResultados.Rows.Count > 0 Then Ret.IdCtaContablexAcreditar = ObjConta.DtResultados.Rows(0)("IdCuentaRetISRCirculacion").ToString.ToEntero
+ End If
+ End If
+
If UsuarioActual.Empresa.Funcionalidad(Funcionalidad).ToEntero > 0 Then
Ret.IdCtaContableAcreditable = UsuarioActual.Empresa.Funcionalidad(Funcionalidad).ToEntero
Else
- Dim ObjConta As New ClsContabilidad
- If ObjConta.GetRetCuenta(Ret.CveConceptoxAcreditar, UsuarioActual.CveEmpresa) Then
- If ObjConta.DtResultados.Rows.Count > 0 Then
- Ret.IdCtaContablexAcreditar = ObjConta.DtResultados.Rows(0)("IdCuentaRetISRCirculacion").ToString.ToEntero
- End If
- End If
If ObjConta.GetRetCuenta(Ret.CveConceptoAcreditable, UsuarioActual.CveEmpresa) Then
- If ObjConta.DtResultados.Rows.Count > 0 Then
- Ret.IdCtaContableAcreditable = ObjConta.DtResultados.Rows(0)("IdCuentaRetISRCirculacion").ToString.ToEntero
- End If
+ If ObjConta.DtResultados.Rows.Count > 0 Then Ret.IdCtaContableAcreditable = ObjConta.DtResultados.Rows(0)("IdCuentaRetISRCirculacion").ToString.ToEntero
End If
- ObjConta.Dispose()
End If
+ ObjConta.Dispose()
+
End If
Return Ret
@@ -9751,7 +9968,9 @@ Public Class ClsPaginas
Pago.CveConceptoPago = If(Pago.CveConceptoPago = -1, 2, Pago.CveConceptoPago) 'si viene en parametro lo toma com primera opcion, sino el 2
- If VentaActual.CveMoneda <> 1 Then Pago.CveConceptoPago = 292
+ If VentaActual.CveMoneda <> 1 Then
+ If Pago.TipoPago = "NC" Then Pago.CveConceptoPago = 301 : Pago.CveConceptoPago = 292
+ End If
Dim Concepto As String = String.Format("{0} F:{1}", VentaActual.ClienteNombre, VentaActual.SerieFolio)
Dim FuncionalidadFluctuacionImpuestos As Boolean = If(UsuarioActual.Empresa.Funcionalidad(159) = "1", True, False)
diff --git a/App_Code/ClsSisUsuarios.vb b/App_Code/ClsSisUsuarios.vb
index fb2337fa3..613bc8b9a 100644
--- a/App_Code/ClsSisUsuarios.vb
+++ b/App_Code/ClsSisUsuarios.vb
@@ -720,7 +720,7 @@ Public Class ClsSisUsuarios
#End Region
#Region "U S U A R I O S"
- Public Function GetUsuarios(CveUsuario As Integer, Optional CveRol As Integer = -1, Optional CveUsuarioControlado As Integer = -1) As Boolean
+ Public Function GetUsuarios(CveUsuario As Integer, Optional CveRol As Integer = -1, Optional CveUsuarioControlado As Integer = -1, Optional Estatus As Integer = -1) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Sis_UsuariosGet")
@@ -731,6 +731,9 @@ Public Class ClsSisUsuarios
.Add("@Usuario", SqlDbType.VarChar).Value = "-1"
.Add("@Contraseña", SqlDbType.VarChar).Value = "-1"
.Add("@EsLogIn", SqlDbType.Bit).Value = 0
+ .Add("@Estatus", SqlDbType.Int).Value = Estatus
+
+
End With
Try
diff --git a/App_Code/Timbrado.vb b/App_Code/Timbrado.vb
index 09b82768c..9dc3d44bd 100644
--- a/App_Code/Timbrado.vb
+++ b/App_Code/Timbrado.vb
@@ -4832,7 +4832,7 @@ Public Class Timbrado
If ObjCFDITimbre.Conceptos IsNot Nothing AndAlso ObjCFDITimbre.Conceptos.Count > 0 Then
For Each concep As CFDIConceptos In ObjCFDITimbre.Conceptos
- cfdi.Concepto(concep.ClaveProdServ, concep.Noidentificacion, concep.Cantidad.ToString("0.00####").ToDouble(), concep.ClaveUnidad, concep.Unidad, concep.Descripcion, concep.ValorUnitario.ToString("0.00####").ToDouble(), concep.Importe, concep.Descuento, concep.ObjetoImpuesto)
+ cfdi.Concepto(concep.ClaveProdServ, concep.Noidentificacion, concep.Cantidad.ToString("0.00####"), concep.ClaveUnidad, concep.Unidad, concep.Descripcion, concep.ValorUnitario.ToString("0.00####"), concep.Importe, concep.Descuento, concep.ObjetoImpuesto)
For Each imp As CFDIConceptosImpuestos In concep.Impuestos
If imp.TrasladooRetencion = "T" Then
cfdi.ConceptoTraslado(imp.Base, imp.Impuesto, imp.TipoFactor, imp.TasaOCuota, imp.Importe)
@@ -4919,81 +4919,81 @@ Public Class Timbrado
#End Region
-
#Region "Comercio Exterior"
- 'If Ventas.Cliente.AplicaComercioExterior And ObjCFDITimbre.Complementos.ComercioExterior11.AplicaComercioExteriorSubProyecto Then
- ' If ObjCFDITimbre.Complementos.ComercioExterior11 IsNot Nothing Then
+ If Ventas.Cliente.AplicaComercioExterior And ObjCFDITimbre.Complementos.ComercioExterior11.AplicaComercioExteriorSubProyecto Then
+ If ObjCFDITimbre.Complementos.ComercioExterior11 IsNot Nothing Then
- ' 'DATOS GENERALES
- ' cfdi.ComercioExterior11(ObjCFDITimbre.Complementos.ComercioExterior11.MotivoTraslado,
- ' ObjCFDITimbre.Complementos.ComercioExterior11.TipoOperacion,
- ' ObjCFDITimbre.Complementos.ComercioExterior11.ClavedePedimento,
- ' ObjCFDITimbre.Complementos.ComercioExterior11.CertificadoOrigen,
- ' ObjCFDITimbre.Complementos.ComercioExterior11.NumCertificadoOrigen,
- ' ObjCFDITimbre.Complementos.ComercioExterior11.NumeroExportadorConfiable,
- ' ObjCFDITimbre.Complementos.ComercioExterior11.Incoterm,
- ' ObjCFDITimbre.Complementos.ComercioExterior11.Subdivision,
- ' ObjCFDITimbre.Complementos.ComercioExterior11.Observaciones,
- ' ObjCFDITimbre.Complementos.ComercioExterior11.TipoCambioUSD,
- ' ObjCFDITimbre.Complementos.ComercioExterior11.TotalUSD)
- ' 'EMISOR
- ' cfdi.ComercioExterior11Emisor(If(EmisorRFC.Length >= 12, "", ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.CURP))
- ' cfdi.ComercioExterior11Domicilio(ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.Calle,
- ' ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.NumeroExterior,
- ' ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.NumeroInterior,
- ' ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.Colonia,
- ' ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.Localidad,
- ' ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.Referencia,
- ' ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.Municipio,
- ' ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.Estado,
- ' ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.Pais,
- ' ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.CP)
- ' 'RECEPTOR
- ' cfdi.ComercioExterior11Receptor(ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.NumRegIdTrib)
- ' cfdi.ComercioExterior11DomicilioReceptor(ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.Calle,
- ' ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.NumeroExterior,
- ' ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.NumeroInterior,
- ' ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.Colonia,
- ' ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.Localidad,
- ' ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.Referencia,
- ' ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.Municipio,
- ' ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.Estado,
- ' ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.Pais,
- ' ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.CP)
- ' cfdi.ComercioExterior11Destinatario(ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.NumRegIdTrib,
- ' ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.Nombre,
- ' ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.Calle,
- ' ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.NumeroExterior,
- ' ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.NumeroInterior,
- ' ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.Colonia,
- ' ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.Localidad,
- ' ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.Referencia,
- ' ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.Municipio,
- ' ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.Estado,
- ' ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.Pais,
- ' ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.CP)
- ' 'MERCANCIAS
- ' If ObjCFDITimbre.Complementos.ComercioExterior11.Mercancias IsNot Nothing AndAlso ObjCFDITimbre.Complementos.ComercioExterior11.Mercancias.Count > 0 Then
- ' For Each concep As CFDIComercioExterior11Mercancias In ObjCFDITimbre.Complementos.ComercioExterior11.Mercancias
- ' cfdi.ComercioExterior11Mercancia(concep.NoIdentificacion, concep.FraccionArancelaria, concep.CantidadAduana, concep.UnidadAduana, concep.ValorUnitarioAduana, concep.ValorDolares)
- ' If concep.DescripcionesEspecificas.Marca <> "" Then
- ' cfdi.ComercioExterior11MercanciaDescripcionesEspeciales(concep.DescripcionesEspecificas.Marca,
- ' concep.DescripcionesEspecificas.Modelo,
- ' concep.DescripcionesEspecificas.SubModelo,
- ' concep.DescripcionesEspecificas.NumeroSerie)
- ' End If
- ' Next
+ 'DATOS GENERALES
+ cfdi.ComercioExterior11(ObjCFDITimbre.Complementos.ComercioExterior11.MotivoTraslado,
+ ObjCFDITimbre.Complementos.ComercioExterior11.TipoOperacion,
+ ObjCFDITimbre.Complementos.ComercioExterior11.ClavedePedimento,
+ ObjCFDITimbre.Complementos.ComercioExterior11.CertificadoOrigen,
+ ObjCFDITimbre.Complementos.ComercioExterior11.NumCertificadoOrigen,
+ ObjCFDITimbre.Complementos.ComercioExterior11.NumeroExportadorConfiable,
+ ObjCFDITimbre.Complementos.ComercioExterior11.Incoterm,
+ ObjCFDITimbre.Complementos.ComercioExterior11.Subdivision,
+ ObjCFDITimbre.Complementos.ComercioExterior11.Observaciones,
+ ObjCFDITimbre.Complementos.ComercioExterior11.TipoCambioUSD,
+ ObjCFDITimbre.Complementos.ComercioExterior11.TotalUSD)
+ 'EMISOR
+ cfdi.ComercioExterior11Emisor(If(EmisorRFC.Length >= 12, "", ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.CURP))
+ cfdi.ComercioExterior11Domicilio(ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.Calle,
+ ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.NumeroExterior,
+ ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.NumeroInterior,
+ ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.Colonia,
+ ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.Localidad,
+ ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.Referencia,
+ ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.Municipio,
+ ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.Estado,
+ ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.Pais,
+ ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.CP)
+ 'RECEPTOR
+ cfdi.ComercioExterior11Receptor(ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.NumRegIdTrib)
+ cfdi.ComercioExterior11DomicilioReceptor(ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.Calle,
+ ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.NumeroExterior,
+ ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.NumeroInterior,
+ ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.Colonia,
+ ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.Localidad,
+ ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.Referencia,
+ ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.Municipio,
+ ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.Estado,
+ ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.Pais,
+ ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.CP)
+ cfdi.ComercioExterior11Destinatario(ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.NumRegIdTrib,
+ ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.Nombre,
+ ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.Calle,
+ ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.NumeroExterior,
+ ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.NumeroInterior,
+ ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.Colonia,
+ ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.Localidad,
+ ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.Referencia,
+ ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.Municipio,
+ ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.Estado,
+ ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.Pais,
+ ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.CP)
+ 'MERCANCIAS
+ If ObjCFDITimbre.Complementos.ComercioExterior11.Mercancias IsNot Nothing AndAlso ObjCFDITimbre.Complementos.ComercioExterior11.Mercancias.Count > 0 Then
+ For Each concep As CFDIComercioExterior11Mercancias In ObjCFDITimbre.Complementos.ComercioExterior11.Mercancias
+ cfdi.ComercioExterior11Mercancia(concep.NoIdentificacion, concep.FraccionArancelaria, concep.CantidadAduana, concep.UnidadAduana, concep.ValorUnitarioAduana, concep.ValorDolares)
+ If concep.DescripcionesEspecificas.Marca <> "" Then
+ cfdi.ComercioExterior11MercanciaDescripcionesEspeciales(concep.DescripcionesEspecificas.Marca,
+ concep.DescripcionesEspecificas.Modelo,
+ concep.DescripcionesEspecificas.SubModelo,
+ concep.DescripcionesEspecificas.NumeroSerie)
+ End If
+ Next
- ' End If
+ End If
- ' End If
- 'End If
+ End If
+ End If
#End Region
+
End If
diff --git a/Ashx/CargaEventos.ashx b/Ashx/CargaEventos.ashx
index f74549f7e..b25e72291 100644
--- a/Ashx/CargaEventos.ashx
+++ b/Ashx/CargaEventos.ashx
@@ -22,22 +22,60 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
Dim FI As Date
Dim FF As Date
- If context.Request("U").ToEntero > 0 Then
- CveUsuario = context.Request("U").ToEntero
- CveEmpresa = context.Request("E").ToEntero
- FI = context.Request("start").ToDate
+ If context.Request("METODO") IsNot Nothing Then
- FF = context.Request("end").ToDate
- If Not GetEventos(CveUsuario, CveEmpresa, FI, FF) Then
- 'Convierte el objeto de Eventos en JSON
- 'Dim oSerializer As System.Web.Script.Serialization.JavaScriptSerializer = New System.Web.Script.Serialization.JavaScriptSerializer
- Dim sJSON As String = Newtonsoft.Json.JsonConvert.SerializeObject(events)
+ Select Case context.Request("METODO")
+ Case "servicio_domicilio"
+
+ If context.Request("U").ToEntero > 0 Then
+
+ CveUsuario = context.Request("U").ToEntero
+ CveEmpresa = context.Request("E").ToEntero
+ FI = context.Request("start").ToDate
+ FF = context.Request("end").ToDate
+
+ If Not GetEventos(CveUsuario, CveEmpresa, FI, FF, CveOS:=-2) Then
+ 'Convierte el objeto de Eventos en JSON
+ 'Dim oSerializer As System.Web.Script.Serialization.JavaScriptSerializer = New System.Web.Script.Serialization.JavaScriptSerializer
+ Dim sJSON As String = Newtonsoft.Json.JsonConvert.SerializeObject(events)
+
+ context.Response.Write(sJSON)
+ End If
+
+ End If
+
+
+ Exit Select
+ Case Else
+ Exit Select
+ End Select
+
+
+
+ Else
+ If context.Request("U").ToEntero > 0 Then
+ CveUsuario = context.Request("U").ToEntero
+ CveEmpresa = context.Request("E").ToEntero
+ FI = context.Request("start").ToDate
+
+ FF = context.Request("end").ToDate
+ If Not GetEventos(CveUsuario, CveEmpresa, FI, FF) Then
+ 'Convierte el objeto de Eventos en JSON
+ 'Dim oSerializer As System.Web.Script.Serialization.JavaScriptSerializer = New System.Web.Script.Serialization.JavaScriptSerializer
+ Dim sJSON As String = Newtonsoft.Json.JsonConvert.SerializeObject(events)
+
+ context.Response.Write(sJSON)
+ End If
- context.Response.Write(sJSON)
End If
-
End If
+
+
+
+
+
+
End Sub
Public ReadOnly Property IsReusable() As Boolean Implements IHttpHandler.IsReusable
@@ -47,14 +85,15 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
End Property
- Private Function GetEventos(CveUsuario As Integer, CveEmpresa As Integer, pFI As Date, pFF As Date) As Boolean
+ Private Function GetEventos(CveUsuario As Integer, CveEmpresa As Integer, pFI As Date, pFF As Date, Optional CveOS As Integer = -1) As Boolean
Dim ObjEventos As New ClsOIEventos
Dim ErrorEventos = False
Dim CveEmpresaCRM As Integer = 0
- If ObjEventos.GetEventos(-1, -1, -1, "-1", "-1", -1, CveUsuario, CveUsuario, -1, -1, -1, "-1", -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, CveUsuario, CveUsuario, CveUsuario, CveEmpresa, pFI, pFF) Then
+ If ObjEventos.GetEventos(-1, -1, -1, "-1", "-1", -1, CveUsuario, CveUsuario, -1, -1, -1, "-1", -1, -1, -1, -1, CveOS, -1, -1, -1, -1, -1, CveUsuario, CveUsuario, CveUsuario, CveEmpresa, pFI, pFF) Then
If ObjEventos.DtResultados.Rows.Count > 0 Then
events = New List(Of CalendarEvent)
+
Try
For Each dr As DataRow In ObjEventos.DtResultados.Rows
Dim cevent As CalendarEvent = New CalendarEvent()
@@ -78,6 +117,8 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
cevent.Prospecto = dr("Prospecto").ToString
cevent.CveTipoEvento = dr("Prospecto").ToString.ToEntero
cevent.EmpresaCRM = dr("EmpresaCRM").ToString
+ cevent.SubProyecto = dr("SubProyecto").ToString
+ cevent.CveSubProyecto = dr("CveSubProyecto").ToString.ToEntero
'11/05/2018 - Evento Gasto Recurrente
cevent.CveTipoEvento = dr("CveTipoEvento").ToString.ToEntero
diff --git a/Bancos/DepositosCaja.aspx.vb b/Bancos/DepositosCaja.aspx.vb
index 97b6df623..069a5dd6c 100644
--- a/Bancos/DepositosCaja.aspx.vb
+++ b/Bancos/DepositosCaja.aspx.vb
@@ -314,7 +314,7 @@ Partial Class Bancos_DepositosCaja
CveIEDestino = ObjBancos.AddBancos_IE(DdlCajaChica.SelectedValue.ToEntero, 2, Fecha, FolioIE.ToString, String.Format("Depósito Bancario: {0}", SerieFolio), Importe, CveMoneda, 1, TxtObservaciones.Text, "", False, False, -1, NuevaCvePrePoliza, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
- If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, True, Importe, SerieFolio, 30, String.Format("Depósito Bancario: {0}", SerieFolio), Fecha, IdCuentaBancariaDestino, -1, CveClasificacion:=CveClasificacion, CveSubProyecto:=CveSubProyecto, CveVenta:=CveVenta, CveIE:=CveIEDestino, ImporteMX:=Importe * TipoCambio, CveCuenta:=CveCuentaBancariaDestino) Then
+ If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, True, Importe, SerieFolio, 30, String.Format("Depósito Bancario: {0}", SerieFolio), Fecha, IdCuentaBancariaDestino, -1, CveClasificacion:=CveClasificacion, CveSubProyecto:=CveSubProyecto, CveVenta:=CveVenta, CveIE:=CveIEDestino, ImporteMX:=Importe * TipoCambio) Then
OcurrioError = True
Exit For
End If
diff --git a/Bancos/PagoDeudor.aspx.cs b/Bancos/PagoDeudor.aspx.cs
index c4e0bac4f..611b02810 100644
--- a/Bancos/PagoDeudor.aspx.cs
+++ b/Bancos/PagoDeudor.aspx.cs
@@ -365,7 +365,7 @@ public partial class Bancos_PagoDeudor : ClsPaginas
{
MsgError = "No se pudo insertar concepto de bancos complementaria";
}
- s
+
// BANCOS
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, true, TxtImportePrestamo.Text.ToDecimal(), Ref, CveConceptoContableBanco, Conc, IDCtaContableBancosPrestamo, CveIE, CveProveedor: DdlProveedorPrestamo.SelectedValue.ToEntero(), ImporteMX: TxtImportePrestamo.Text.ToDecimal(), ImporteME: TxtImportePrestamo.Text.ToDecimal(), TipoCambio: tipoCambio, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero()))
{
diff --git a/Bancos/ProveedoresAbonar.aspx.vb b/Bancos/ProveedoresAbonar.aspx.vb
index dcd828b1a..b552cb479 100644
--- a/Bancos/ProveedoresAbonar.aspx.vb
+++ b/Bancos/ProveedoresAbonar.aspx.vb
@@ -203,6 +203,21 @@ Partial Class Bancos_ProveedoresAbonar
End Set
End Property
+
+ Private Property CveSubProyectoFiltro As Integer
+ Get
+ If ViewState("CveSubProyectoFiltro") Is Nothing Then
+ ViewState("CveSubProyectoFiltro") = -1
+ End If
+ Return ViewState("CveSubProyectoFiltro").ToString.ToEntero
+
+ End Get
+ Set(value As Integer)
+ ViewState("CveSubProyectoFiltro") = value
+ End Set
+ End Property
+
+
Private Property DtDatos As DataTable
Get
Return DirectCast(ViewState("DtDatos"), DataTable)
@@ -278,6 +293,7 @@ Partial Class Bancos_ProveedoresAbonar
CveAplicaNC = IfNull(Request("CveAplicaNC"), "-1").ToString.ToEntero
CveProveedorSucursal = IfNull(Request("CveProveedorSucursal"), "-1").ToString.ToEntero
CodigoProgramacion = IfNull(Request("CodigoProgramacion"), "-1").ToString
+ CveSubProyectoFiltro = IfNull(Request("CveSubProyecto"), -1).ToString.ToEntero
TxtOtrosImportes.Attributes.Add("onKeyUp", String.Format("FnSuma(this,{0},{1});", "TxtTotal", 0))
@@ -382,7 +398,7 @@ Partial Class Bancos_ProveedoresAbonar
TxtImporte.Text = ""
TxtTotal.Text = ""
- If Mov.GetCxPProveedor(CveProveedor, FechaI, FechaF, CveUsuarioProgramo, CveUsuarioRegistro, CveUsuarioResponsable, CveClasificacionProveedor, tCveMoneda, CveEstatus, CveProveedorSucursal, CveAplicaNC, "-1", "-1", CodigoProgramacion) Then
+ If Mov.GetCxPProveedor(CveProveedor, FechaI, FechaF, CveUsuarioProgramo, CveUsuarioRegistro, CveUsuarioResponsable, CveClasificacionProveedor, tCveMoneda, CveEstatus, CveProveedorSucursal, CveAplicaNC, "-1", "-1", CodigoProgramacion, CveSubProyecto:=CveSubProyectoFiltro) Then
DtDatos = Mov.DtResultados.FiltraParametros("Saldo > 0", "Fecha,SerieFolio")
GvCxP.DataSource = DtDatos
DtDatos.Columns.Add("Movimiento")
@@ -488,7 +504,7 @@ Partial Class Bancos_ProveedoresAbonar
If e.Row.DBCampo("Saldo").ToDouble < 0 Then e.Row.Cells(7).ForeColor = Drawing.Color.Red
If e.Row.DBCampo("DiasVencidos").ToDouble > 0 AndAlso CType(sender, GridView).ID = "GvCxC" Then e.Row.Cells(4).ForeColor = Drawing.Color.Red
- If e.Row.DBCampo("Original").ToDouble = 0 Then DirectCast(e.Row.FindControl("LtlSaldoOriginal"), Literal).Text = ""
+ If e.Row.DBCampo("TotalOriginal").ToDouble = 0 Then DirectCast(e.Row.FindControl("LtlSaldoOriginal"), Literal).Text = ""
If e.Row.DBCampo("Abonado").ToDouble = 0 Then DirectCast(e.Row.FindControl("LtlAbonado"), Literal).Text = ""
If e.Row.DBCampo("Saldo").ToDouble = 0 Then DirectCast(e.Row.FindControl("LtlSaldo"), Literal).Text = ""
@@ -835,6 +851,7 @@ Partial Class Bancos_ProveedoresAbonar
CompraActual.EsImportacion = gvr.DataKey("EsImportacion") = "True"
CompraActual.UsuarioActual = UsuarioActual
CompraActual.CveSubProyecto = gvr.DataKey("CveSubProyecto").ToEntero
+ CompraActual.IdCtaContableProv = CtaProveedor
'Importe de pago
Pago.ImportePago = gvr.FCTextBox("TxtAbonar").Text.ToDecimal
@@ -850,6 +867,8 @@ Partial Class Bancos_ProveedoresAbonar
If gvr.FCTextBox("TxtComision").Text.ToDecimal <> 0 Then
Pago.OtroGastoIngreso = gvr.FCTextBox("TxtComision").Text.ToDecimal
+ Else
+ Pago.OtroGastoIngreso = 0
End If
If AplicaPrePolizaPago(CompraActual, Pago, CvePrePoliza, ObjMov) Then
@@ -867,7 +886,8 @@ Partial Class Bancos_ProveedoresAbonar
Dim UsaComplementariaBancos As Boolean = Not UsuarioActual.CveEmpresa.Contiene(7, 11, 122, 145)
Dim ConceptoMovimiento As String = $"{TxtPagueseA.Text.Trim} - {TxtObservaciones.Text} {If(Pago.TCPago > 1, $" TC:{Pago.TCPago}", "")}"
Dim Referencia As String = $"{HdnTipoTransaccionAbreviatura.Value}: {TxtFolio.Text.Trim}"
- Dim tImporteMN As Decimal = Pago.ImportePago
+ Dim tImporteMN As Decimal = TxtImporte.Text.ToDecimal
+ Pago.ImportePago = tImporteMN
If DivTarjeta.Visible AndAlso DdlTarjeta.SelectedValue.ToEntero > 0 Then
Dim ObjCreditos As New ClsBancos
@@ -891,7 +911,7 @@ Partial Class Bancos_ProveedoresAbonar
MsgError = "No se pudo insertar la póliza"
End If
- If UsaComplementariaBancos Then
+ If Pago.CveMonedaPago = 2 AndAlso UsaComplementariaBancos Then
If MsgError = "" AndAlso Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, (Pago.ImportePago * Pago.TCPago - Pago.ImportePago).RoundSQL, 204, Referencia, ConceptoMovimiento, IdCuentaBancariaComplementaria, CveIE:=CveIE, CveProveedor:=CveProveedor, ImporteME:=Pago.ImportePago, TipoCambio:=Pago.TCPago, CveSubProyecto:=CveSubProyecto) Then
MsgError = "No se pudo insertar la póliza"
End If
@@ -1001,7 +1021,7 @@ Partial Class Bancos_ProveedoresAbonar
For Each gvr As GridViewRow In GvCxP.Rows
If gvr.FCCheckBox("Chk").Checked Then
'obtengo su poliza para ver que presupuestos afecto
- If gvr.DataKey("Original").ToDouble > 0 Then PorcentajePago = gvr.FCTextBox("TxtAbonar").Text.ToDouble / gvr.DataKey("Original").ToDouble Else PorcentajePago = 1
+ If gvr.DataKey("TotalOriginal").ToDouble > 0 Then PorcentajePago = gvr.FCTextBox("TxtAbonar").Text.ToDouble / gvr.DataKey("TotalOriginal").ToDouble Else PorcentajePago = 1
If ObjComp.GetPresupuestosCompras(gvr.DataKey("CveCompra").ToEntero) Then
dtAC.Merge(ObjComp.DtResultados)
@@ -1890,7 +1910,7 @@ Partial Class Bancos_ProveedoresAbonar
End If
End If
- Dim PorcentajePago As Decimal = gr.DataKey("Saldo").ToDecimal / gr.DataKey("Original").ToDecimal
+ Dim PorcentajePago As Decimal = gr.DataKey("Saldo").ToDecimal / gr.DataKey("TotalOriginal").ToDecimal
If MsgError = "" AndAlso gr.DataKey("IVA").ToDecimal > 0 Then
Dim PorcentajeImpuesto As Decimal = gr.DataKey("PorcentajeIVA").ToDecimal
diff --git a/Bancos/RepProveedoresPagos.aspx.vb b/Bancos/RepProveedoresPagos.aspx.vb
index c8562b697..cae394bf3 100644
--- a/Bancos/RepProveedoresPagos.aspx.vb
+++ b/Bancos/RepProveedoresPagos.aspx.vb
@@ -162,7 +162,8 @@ Partial Class Bancos_RepProveedoresPagos
CveUsuarioProgramo = DdlUsuarioProgramo.SelectedValue.ToEntero
End If
- e.Row.FCHyperLink("ImgAbonar").NavigateUrl = String.Format("/Bancos/ProveedoresAbonar.aspx?CveProveedor={0}&FechaI={1}&FechaF={2}&CveUsuarioProgramo={3}&TipoPago={4}&CveUsuarioRegistro={5}&CveUsuarioResponsable={6}&CveClasificacion={7}&CveMoneda={8}&CveEstatus={9}&CveProveedorSucursal={10}&CveAplicaNC={11}&CodigoProgramacion={12}", e.Row.DBCampo("CveProveedor"), If(txtFechaI.Text <> "", txtFechaI.Text, "-1"), If(txtFechaF.Text <> "", txtFechaF.Text, "-1"), CveUsuarioProgramo, -1, DdlUsuarioRegistro.SelectedValue, DdlUsuarioResponsable.SelectedValue, DdlProveedoresClasificaciones.SelectedValue, e.Row.DBCampo("CveMoneda"), DdlEstatusCompra.SelectedValue, e.Row.DBCampo("CveProveedorSucursal"), AplicaNC.SelectedValue, DdlCodigoProgramacion.SelectedValue)
+ e.Row.FCHyperLink("ImgAbonar").NavigateUrl = String.Format("/Bancos/ProveedoresAbonar.aspx?CveProveedor={0}&FechaI={1}&FechaF={2}&CveUsuarioProgramo={3}&TipoPago={4}&CveUsuarioRegistro={5}&CveUsuarioResponsable={6}&CveClasificacion={7}&CveMoneda={8}&CveEstatus={9}&CveProveedorSucursal={10}&CveAplicaNC={11}&CodigoProgramacion={12}&CveSubProyecto={13}", e.Row.DBCampo("CveProveedor"), If(txtFechaI.Text <> "", txtFechaI.Text, "-1"), If(txtFechaF.Text <> "", txtFechaF.Text, "-1"), CveUsuarioProgramo, -1, DdlUsuarioRegistro.SelectedValue, DdlUsuarioResponsable.SelectedValue, DdlProveedoresClasificaciones.SelectedValue, e.Row.DBCampo("CveMoneda"), DdlEstatusCompra.SelectedValue, e.Row.DBCampo("CveProveedorSucursal"), AplicaNC.SelectedValue, DdlCodigoProgramacion.SelectedValue, DdlSubProyecto.SelectedValue)
+
End If
End Sub
diff --git a/Compras/Compras.aspx b/Compras/Compras.aspx
index f0da08cbc..a55268f82 100644
--- a/Compras/Compras.aspx
+++ b/Compras/Compras.aspx
@@ -6246,7 +6246,9 @@
});
$('input[name*=HdnOC1IVA]').each(function () {
- SumaIVA += ToDouble($(this).val());
+
+ let tmpiva = (ToDouble($(this).val())).toFixed(2)
+ SumaIVA += ToDouble(tmpiva);
});
$('input[name*=HdnOC1RetIVA]').each(function () {
diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb
index fe2fe1bfd..a6f617e3a 100644
--- a/Compras/Compras.aspx.vb
+++ b/Compras/Compras.aspx.vb
@@ -5385,7 +5385,7 @@ Partial Class Compras_Compras
End If
- 'agregamos la salida gasto
+ 'agregamos la salida
folio = ObjInventario.GetFolioSiguiente(3, UsuarioActual.CveEmpresa)
cvemovimientosalidagasto = ObjInventario.AddMovimiento(tcvealmacen, 3, DdlMoneda.SelectedValue.ToEntero, fecha.AddSeconds(1), folio, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCompra, -1, -1, -1, Modulo:="Comp/G3")
If cvemovimientosalidagasto <= 0 Then
@@ -5965,7 +5965,7 @@ Partial Class Compras_Compras
Pago.CveCompraAmortizacion = -1
Pago.CveCreditoDetalle = CveCreditoDetalle
- ErrorMovtosCxP = AplicaPrePolizaPago(CompraActual, Pago, CvePrePoliza, ObjConta)
+ ErrorMovtosCxP = AplicaPrePolizaPagoCompra(CompraActual, Pago, CvePrePoliza, ObjConta)
End If
@@ -6036,7 +6036,7 @@ Partial Class Compras_Compras
Pago.CveCompraAmortizacion = -1
'Pago.CveConceptoPago = CveConceptoPago
- ErrorMovtosCxP = AplicaPrePolizaPago(CompraActual, Pago, CvePrePoliza, ObjConta)
+ ErrorMovtosCxP = AplicaPrePolizaPagoCompra(CompraActual, Pago, CvePrePoliza, ObjConta)
End If
Case 14 'IVA X Acreditar
@@ -6091,14 +6091,6 @@ Partial Class Compras_Compras
End If
End If
- 'Case 224 'Otros impuestos
- ' If Not DdlTipoComprobante.SelectedValue.Contiene("Ant") Then
- ' importeMovimiento = OtrosImpuestos
- ' importeMN = Math.Round(importeMovimiento, 2) * tipoCambioActual * Multiplicador
- ' If tipoCambioActual > 1 Then Concepto += $" TC{tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}"
- ' IdCtaContable = If(UsuarioActual.CveEmpresa = 119, 1171, -1)
- ' End If
-
Case 15 'RetIVA X Acreditar Honorarios/Serv. Prof.
If Not DdlTipoComprobante.SelectedValue.Contiene("Ant") Then
If DdlRetIVAConcepto.Items.Count > 0 AndAlso DdlRetIVAConcepto.SelectedValue.ToEntero() > 0 Then
@@ -6157,7 +6149,7 @@ Partial Class Compras_Compras
funcionalidad = 317
ConceptoContable = 243
ElseIf DdlRetISRConcepto.SelectedValue.ToEntero = 3 Then
- funcionalidad = 348
+ funcionalidad = 349
ConceptoContable = 327
End If
importeMovimiento = CompraActual.RetISR
@@ -6269,10 +6261,12 @@ Partial Class Compras_Compras
DT = TmpDT.FiltraParametros("ISNULL(TipoAF,0) <> 2 And ISNULL(CveAlmacen,0) > 0", "", {"CveAlmacen"})
'RECORREMOS PARA DETECTAR LA MODALIDAD DEL ALMACEN, EN CASO DE SER SOLO EXISTENCIA LIMPIAMOS CVEALMACEN
'SI LA COMPRA ES DE TIPO GASTO CON ALMACEN DEBE REGISTRAR MOVIMIENTO
+ Dim AlmacenSoloExistencia As Boolean = False
If DdlTipoCompra.SelectedValue <> "10" Then
For Each Dr As DataRow In DT.Rows
If DtAlmacenes.FiltroPrimeroValor("Modalidad", $"CveAlmacen = {Dr("CveAlmacen").ToString.ToEntero}").ToString = "Solo Existencia" Then
Dr("CveAlmacen") = 0
+ AlmacenSoloExistencia = True
End If
Dr.AcceptChanges()
Next
@@ -6296,7 +6290,6 @@ Partial Class Compras_Compras
End If
End If
-
If importeMN <> 0 Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMN, Referencia, 6, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveIE:=CveIE, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), TipoCambio:=tipoCambioActual,
CveClasificacion:=RowDetalle("CveClasificacion").ToString().ToEntero(), CveSubProyecto:=RowDetalle("CveSubProyecto").ToString().ToEntero(), Contabilizable:=SeContabiliza) Then
@@ -6317,15 +6310,14 @@ Partial Class Compras_Compras
IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCtaContable").ToString.ToEntero
End If
End If
- End If
-
-
- If importeMN <> 0 Then
'Conta ContPAQ
If IdCtaContable = 0 Then
CuentasContablesInvalidas.Append("
" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", 68))("ConceptoContable").ToString)
idCuentaContabilizacion = 0
End If
+ End If
+
+ If importeMN <> 0 Then
'SI ES GASTO CON ALMACEN NO DEBE CONTABILIZAR CONCEPTO 68
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMN, Referencia, 68, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveIE:=CveIE, CvePersonal:=CvePersonal, CveMovimientoAlmacen:=CveMovimientoInventario, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), TipoCambio:=tipoCambioActual, Contabilizable:=If(DdlTipoCompra.SelectedValue = "10", False, SeContabiliza)) Then
@@ -6349,9 +6341,6 @@ Partial Class Compras_Compras
importeMovimiento = 0
IdCtaContable = 0
- ''FLETES
- 'If UsuarioActual.CveEmpresa.Contiene(119) And UsuarioActual.Empresa.UsaInventarios And DdlTipoComprobante.SelectedValue <> "NC" And Not UsuarioActual.Empresa.Funcionalidad(126) = "1" And CveConceptoContableAlmacen.Contiene(237, 240) Then
-
'End If
Dim CostoIndirectoAcum176 As Decimal = 0
'INV [MERCANCIA RECIBIDA POR ADELANTADO (OC) | MERCANCIA PENDIENTE POR RECIBIR (COMPRA) ]
@@ -7047,7 +7036,6 @@ Partial Class Compras_Compras
End If
End If
End If
-
End If
Next
@@ -7096,7 +7084,7 @@ Partial Class Compras_Compras
Pago.CveIE = -1
Pago.CvePersonal = CvePersonal
- ErrorPrepoliza = AplicaPrePolizaPago(CompraActual, Pago, CvePrePoliza, ObjConta)
+ ErrorPrepoliza = AplicaPrePolizaPagoCompra(CompraActual, Pago, CvePrePoliza, ObjConta)
End If
@@ -7250,7 +7238,7 @@ Partial Class Compras_Compras
Pago.CveIE = Ant.CveIE
Pago.CveMonedaPago = 1
- ErrorMovtosCxP = AplicaPrePolizaPago(CompraActual, Pago, CvePrePoliza, ObjConta)
+ ErrorMovtosCxP = AplicaPrePolizaPagoCompra(CompraActual, Pago, CvePrePoliza, ObjConta)
End If
@@ -7293,7 +7281,7 @@ Partial Class Compras_Compras
Pago.TCPago = Ant.TCCompra
Pago.CveMonedaPago = If(Ant.TCCompra > 1, 2, 1)
- ErrorPrepoliza = AplicaPrePolizaPago(CompraActual, Pago, CvePrePoliza, ObjConta)
+ ErrorPrepoliza = AplicaPrePolizaPagoCompra(CompraActual, Pago, CvePrePoliza, ObjConta)
End If
@@ -7405,9 +7393,6 @@ Partial Class Compras_Compras
End If
End If
-
-
-
'' A N T I C I P O S
If UsuarioActual.Empresa.UsaAC Then
If ArrAnticipos.Count > 0 Then
@@ -7475,7 +7460,6 @@ Partial Class Compras_Compras
End If
End If
-
'' F U N C I O N A R I O S Y E M P L E A D O S
If RBLContado.SelectedValue = "2" AndAlso DdlFuncionarioEmpleado.SelectedValue.ToEntero > 0 Then
TxtDocumentoImporte.Text = TxtDocumentoImporteFE.Text
@@ -7489,25 +7473,20 @@ Partial Class Compras_Compras
'se agrego un movimiento de pago
If CveIE > 0 Then
-
If ImporteCompra <> 0 Then
'inserto los movimientos de la conta para abonar al saldo
Dim Pago As New CompraPago
Pago.ImportePago = ImporteCompra
Pago.CveIE = CveIE
Pago.CveMonedaPago = 1
-
- ErrorMovtosCxP = AplicaPrePolizaPago(CompraActual, Pago, CvePrePoliza, ObjConta)
+ ErrorMovtosCxP = AplicaPrePolizaPagoCompra(CompraActual, Pago, CvePrePoliza, ObjConta)
End If
-
Else
ErrorMovtosIE = True
End If
-
End If
-
'movimiento de compra
'[IPP] PARCHE PROVISIONAL DE CLASIFICACION Y SUBPROYECTO [CveClasificacion:=TmpDT.FiltroPrimeroValor("CveClasificacion").ToString.ToEntero] [CveSubProyecto:=TmpDT.FiltroPrimeroValor("CveSubProyecto").ToString.ToEntero]
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimientoCompra, TxtSubTotal2.Text.ToDecimal, " ", CveConceptoCompra, " ", TxtFechaPago.Text.ToDate, 0, -1, CveClasificacion:=TmpDT.FiltroPrimeroValor("CveClasificacion").ToString.ToEntero, CveSubProyecto:=TmpDT.FiltroPrimeroValor("CveSubProyecto").ToString.ToEntero, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveIE:=CveIE, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=TxtSubTotal2.Text.ToDecimal) Then
@@ -7622,7 +7601,7 @@ Partial Class Compras_Compras
Pago.CveCompraAmortizacion = CveCompraNC
Pago.CveConceptoPago = CveConceptoPago
- ErrorMovtosCxP = AplicaPrePolizaPago(CompraActual, Pago, CvePrePoliza, ObjConta)
+ ErrorMovtosCxP = AplicaPrePolizaPagoCompra(CompraActual, Pago, CvePrePoliza, ObjConta)
Else
ErrorMovtosCxP = True
@@ -7730,7 +7709,7 @@ Partial Class Compras_Compras
Pago.CveIE = CveIE
Pago.CveMonedaPago = 1
- ErrorMovtosCxP = AplicaPrePolizaPago(CompraActual, Pago, CvePrePoliza, ObjConta)
+ ErrorMovtosCxP = AplicaPrePolizaPagoCompra(CompraActual, Pago, CvePrePoliza, ObjConta)
Else
ErrorMovtosCxP = True
@@ -8983,16 +8962,6 @@ Partial Class Compras_Compras
End If
- '[IPP] COMENTADO PORQUE REUNIFICABA AMORTIZACIÓN NC 27/Agosto/2018
- 'If Not CompraUnificada Then
- ' 'Unificacion de PrePolizas
- ' If UsuarioActual.Empresa.Funcionalidad(219) = "1" Then
- ' If Not ObjConta.PrePolizaUnificacion(gvr.DataKey("CvePrePoliza").ToEntero, CvePrepolizaPadre) Then
- ' ErrorMovtosCxP = 1
- ' Alert("No se pudo unificar la prepoliza", TipoMensaje.MsgError)
- ' End If
- ' End If
- 'End If
End If
Next
@@ -9011,8 +8980,6 @@ Partial Class Compras_Compras
ErrorMovtosCxP = 1
End If
End If
-
-
End If
End If
@@ -10055,17 +10022,17 @@ Partial Class Compras_Compras
If UsuarioActual.Empresa.UsaInventarios AndAlso Not UsuarioActual.Empresa.Funcionalidad(126) = "1" And ConceptoContabilizacionAlmacen = 0 Then
DT = TmpDT.FiltraParametros("ISNULL(TipoAF,0) <> 2 AND ISNULL(CveAlmacen,0) > 0", "", {"CveAlmacen"})
'RECORREMOS PARA DETECTAR LA MODALIDAD DEL ALMACEN, EN CASO DE SER SOLO EXISTENCIA LIMPIAMOS CVEALMACEN
- If DdlTipoCompra.SelectedValue <> "10" Then
- For Each Dr As DataRow In DT.Rows
- If DtAlmacenes.FiltroPrimeroValor("Modalidad", $"CveAlmacen = {Dr("CveAlmacen").ToString.ToEntero}").ToString = "Solo Existencia" Then
- Dr("CveAlmacen") = 0
- End If
- Dr.AcceptChanges()
- Next
- End If
+
+ 'For Each Dr As DataRow In DT.Rows
+ ' If DtAlmacenes.FiltroPrimeroValor("Modalidad", $"CveAlmacen = {Dr("CveAlmacen").ToString.ToEntero}").ToString = "Solo Existencia" Then
+ ' Dr("CveAlmacen") = 0
+ ' End If
+ ' Dr.AcceptChanges()
+ 'Next
+
DT.AcceptChanges()
DT = DT.FiltraParametros("ISNULL(CveAlmacen,0) > 0")
- If DT.Rows.Count > 0 AndAlso Not DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV", "Ant") Then
+ If (DT.Rows.Count > 0) AndAlso Not DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV", "Ant") Then
For Each Row2 As DataRow In DT.Rows
importeMovimiento = TmpDT.SUM("Total", $"CveAlmacen = {Row2("CveAlmacen")}").ToString.ToDecimal + TmpDT.SUM("CostoIndirectoAlmacen", $"CveAlmacen = {Row2("CveAlmacen")}").ToString.ToDecimal 'Row2("Total").ToString.ToDecimal + Row2("CostoIndirectoAlmacen").ToString.ToDecimal
@@ -10186,17 +10153,10 @@ Partial Class Compras_Compras
End If
End If
- ''SEGMENTO DE NEGOCIO
- Dim IdSegmentoNegocio As Integer = -1
- 'Dim drT As DataRow = GlobalDTSubProyectos(-1, CveSubProyecto:=Row2("CveSubProyecto").ToString.ToEntero).FiltroPrimero(String.Format("CveSubProyecto = {0} ", Row2("CveSubProyecto").ToString.ToEntero))
- 'If drT IsNot Nothing Then
- ' IdSegmentoNegocio = drT("IdSegNeg").ToString.ToEntero
- 'End If
-
'AGREGA MOVIMIENTO
If importeMovimiento <> 0 AndAlso Not DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV", "Ant") Then
Concepto = $"{NombreProveedor} {TxtSerie.Text} - {TxtFolio.Text}"
- If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, 6, Concepto, FechaMovimiento, IdCtaContable, IdSegmentoNegocio, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveIE:=CveIE, CveCreditoDetalle:=CveCreditoDetalle, CveClasificacion:=Row2("CveClasificacion").ToString.ToEntero, CveSubProyecto:=Row2("CveSubProyecto").ToString.ToEntero, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveTipoGasto:=Row2("CveTipoGasto").ToString.ToEntero) Then
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, 6, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveIE:=CveIE, CveCreditoDetalle:=CveCreditoDetalle, CveClasificacion:=Row2("CveClasificacion").ToString.ToEntero, CveSubProyecto:=Row2("CveSubProyecto").ToString.ToEntero, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveTipoGasto:=Row2("CveTipoGasto").ToString.ToEntero) Then
ErrorPrepoliza = True
End If
End If
@@ -15027,7 +14987,7 @@ Partial Class Compras_Compras
Dim Cont As Integer = 0
For Each gvr As GridViewRow In GvOC1.Rows
- RegistraScript($"CalculaTotalOCEdit('{gvr.DataKey("PS").Replace("'", "")}', {gvr.DataKey("Cantidad").ToString.ToDouble}, {gvr.FCTextBox("TxtCantidad").ClientID}, {gvr.FCTextBox("TxtPU").ClientID}, {gvr.FCTextBox("TxtTotalOC1").ClientID}, {gvr.DataKey("IEPSPS").ToString.ToDouble},{gvr.FCHiddenField("HdnOC1IEPSImporte").ClientID}, {gvr.DataKey("IVA").ToString.ToDouble},{gvr.FCHiddenField("HdnOC1IVA").ClientID},{gvr.DataKey("RetIVA").ToString.ToDouble},{gvr.FCHiddenField("HdnOC1RetIVA").ClientID},{gvr.DataKey("RetISR").ToString.ToDouble},{gvr.FCHiddenField("HdnOC1RetISR").ClientID},{gvr.DataKey("IEPSPS").ToString.ToDouble},{gvr.FCHiddenField("HdnOC1IEPSIVA").ClientID},{gvr.DataKey("Descuento")},{gvr.FCHiddenField("HdnOC1Descuento").ClientID},{gvr.DataKey("IVAPorcentaje").ToString.ToDouble},{gvr.DataKey("RetIVAPorcentaje").ToString.ToDouble},{gvr.DataKey("RetISRPorcentaje").ToString.ToDouble},{gvr.DataKey("IEPSPSPorcentaje").ToString.ToDouble},{gvr.DataKey("IEPSPSIVAPorcentaje").ToString.ToDouble});", $"Gv{Cont}")
+ RegistraScript($"CalculaTotalOCEdit('{ gvr.DataKey("PS").Replace("'", "").Replace(vbLf, " ").Replace(vbCrLf, " ") }', {gvr.DataKey("Cantidad").ToString.ToDouble}, {gvr.FCTextBox("TxtCantidad").ClientID}, {gvr.FCTextBox("TxtPU").ClientID}, {gvr.FCTextBox("TxtTotalOC1").ClientID}, {gvr.DataKey("IEPSPS").ToString.ToDouble},{gvr.FCHiddenField("HdnOC1IEPSImporte").ClientID}, {gvr.DataKey("IVA").ToString.ToDouble},{gvr.FCHiddenField("HdnOC1IVA").ClientID},{gvr.DataKey("RetIVA").ToString.ToDouble},{gvr.FCHiddenField("HdnOC1RetIVA").ClientID},{gvr.DataKey("RetISR").ToString.ToDouble},{gvr.FCHiddenField("HdnOC1RetISR").ClientID},{gvr.DataKey("IEPSPS").ToString.ToDouble},{gvr.FCHiddenField("HdnOC1IEPSIVA").ClientID},{gvr.DataKey("Descuento")},{gvr.FCHiddenField("HdnOC1Descuento").ClientID},{gvr.DataKey("IVAPorcentaje").ToString.ToDouble},{gvr.DataKey("RetIVAPorcentaje").ToString.ToDouble},{gvr.DataKey("RetISRPorcentaje").ToString.ToDouble},{gvr.DataKey("IEPSPSPorcentaje").ToString.ToDouble},{gvr.DataKey("IEPSPSIVAPorcentaje").ToString.ToDouble});", $"Gv{Cont}")
Cont += 1
Next
@@ -15043,7 +15003,7 @@ Partial Class Compras_Compras
Protected Sub GvOC1_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvOC1.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
- Dim JSCambiaScript = $"CalculaTotalOCEdit('{e.Row.DBCampo("PS").Replace("'", "")}', {e.Row.DBCampo("Cantidad").ToString.ToDouble}, {e.Row.FCTextBox("TxtCantidad").ClientID}, {e.Row.FCTextBox("TxtPU").ClientID}, {e.Row.FCTextBox("TxtTotalOC1").ClientID}, {e.Row.DBCampo("IEPSPS").ToString.ToDouble},{e.Row.FCHiddenField("HdnOC1IEPSImporte").ClientID}, {e.Row.DBCampo("IVA").ToString.ToDouble},{e.Row.FCHiddenField("HdnOC1IVA").ClientID},{e.Row.DBCampo("RetIVA").ToString.ToDouble},{e.Row.FCHiddenField("HdnOC1RetIVA").ClientID},{e.Row.DBCampo("RetISR").ToString.ToDouble},{e.Row.FCHiddenField("HdnOC1RetISR").ClientID},{e.Row.DBCampo("IEPSPS").ToString.ToDouble},{e.Row.FCHiddenField("HdnOC1IEPSIVA").ClientID},{e.Row.DBCampo("Descuento")},{e.Row.FCHiddenField("HdnOC1Descuento").ClientID},{e.Row.DBCampo("IVAPorcentaje").ToString.ToDouble},{e.Row.DBCampo("RetIVAPorcentaje").ToString.ToDouble},{e.Row.DBCampo("RetISRPorcentaje").ToString.ToDouble},{e.Row.DBCampo("IEPSPSPorcentaje").ToString.ToDouble},{e.Row.DBCampo("IEPSPSIVAPorcentaje").ToString.ToDouble});"
+ Dim JSCambiaScript = $"CalculaTotalOCEdit('{e.Row.DBCampo("PS").Replace("'", "").Replace(vbLf, " ").Replace(vbCrLf, " ")}', {e.Row.DBCampo("Cantidad").ToString.ToDouble}, {e.Row.FCTextBox("TxtCantidad").ClientID}, {e.Row.FCTextBox("TxtPU").ClientID}, {e.Row.FCTextBox("TxtTotalOC1").ClientID}, {e.Row.DBCampo("IEPSPS").ToString.ToDouble},{e.Row.FCHiddenField("HdnOC1IEPSImporte").ClientID}, {e.Row.DBCampo("IVA").ToString.ToDouble},{e.Row.FCHiddenField("HdnOC1IVA").ClientID},{e.Row.DBCampo("RetIVA").ToString.ToDouble},{e.Row.FCHiddenField("HdnOC1RetIVA").ClientID},{e.Row.DBCampo("RetISR").ToString.ToDouble},{e.Row.FCHiddenField("HdnOC1RetISR").ClientID},{e.Row.DBCampo("IEPSPS").ToString.ToDouble},{e.Row.FCHiddenField("HdnOC1IEPSIVA").ClientID},{e.Row.DBCampo("Descuento")},{e.Row.FCHiddenField("HdnOC1Descuento").ClientID},{e.Row.DBCampo("IVAPorcentaje").ToString.ToDouble},{e.Row.DBCampo("RetIVAPorcentaje").ToString.ToDouble},{e.Row.DBCampo("RetISRPorcentaje").ToString.ToDouble},{e.Row.DBCampo("IEPSPSPorcentaje").ToString.ToDouble},{e.Row.DBCampo("IEPSPSIVAPorcentaje").ToString.ToDouble});"
e.Row.FCTextBox("TxtCantidad").Attributes.Add("onkeyup", $"LimitaCantidadOC({e.Row.DBCampo("CantidadPendienteVincular")}, this);{JSCambiaScript}")
e.Row.FCTextBox("TxtPU").Attributes.Add("onkeyup", JSCambiaScript)
diff --git a/Compras/ReembolsosComprobaciones.aspx.vb b/Compras/ReembolsosComprobaciones.aspx.vb
index a682a10fd..103f9c9a0 100644
--- a/Compras/ReembolsosComprobaciones.aspx.vb
+++ b/Compras/ReembolsosComprobaciones.aspx.vb
@@ -113,6 +113,7 @@ Partial Class Compras_ReembolsosComprobaciones
CveCuentaBancaria = -1
ViewState("CveMoneda") = 1
CveMonedaPago = 1
+ TipoCambioPago = 1
Folio = ""
'Cargar Filtros
@@ -376,7 +377,7 @@ Partial Class Compras_ReembolsosComprobaciones
ChkOtrosIngresosCheque.Visible = True
- If UsuarioActual.TienePermisoProceso(113) Then TrChequeExcedente.Visible = True
+ 'If UsuarioActual.TienePermisoProceso(113) Then TrChequeExcedente.Visible = True
CargaDatos(DDlCheques.SelectedValue.ToEntero)
@@ -392,7 +393,7 @@ Partial Class Compras_ReembolsosComprobaciones
ChkOtrosIngresosCheque.Visible = False
- If UsuarioActual.TienePermisoProceso(113) Then TableExpedirCheque.Visible = True
+ 'If UsuarioActual.TienePermisoProceso(113) Then TableExpedirCheque.Visible = True
LimpiaDatos()
@@ -547,7 +548,7 @@ Partial Class Compras_ReembolsosComprobaciones
End If
Else
If drp IsNot Nothing Then
- If drp("IdPoliza").ToString.ToEntero > 0 Then
+ If drp("FolioPoliza").ToString.ToEntero > 0 Then
CvePrePolizaIERegistrado = ObjMov.AddPrePolizas("Compras/Comprobaciones2", 9, TxtImporteVinculado.Text.ToDecimal, TxtImporteVinculado.Text.ToDecimal, CveMoneda, TxtFechaPrePoliza.Text.ToDate, If(TxtObservaciones.Text.Trim = "", concepto, TxtObservaciones.Text.Trim), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
IdPoliza = drp("IdPoliza").ToString.ToEntero
Else
@@ -749,7 +750,7 @@ Partial Class Compras_ReembolsosComprobaciones
End If
End If
- If AplicaPrePolizaPago(CompraActual, Pago, CvePrePolizaPago, ObjMov) Then
+ If AplicaPrePolizaPagoCompra(CompraActual, Pago, CvePrePolizaPago, ObjMov) Then
MsgError = "Detalle"
End If
End If
@@ -798,6 +799,7 @@ Partial Class Compras_ReembolsosComprobaciones
CveIEPago = 0
Dim FolioIENew = ObjIE.GetNextFolio(CveCajaChica, 6).ToString
CveIEPago = ObjIE.AddBancos_IE(CveCajaChica, 6, TxtFechaPrePoliza.Text.ToDate, FolioIENew, gvr.DataKey("Proveedor"), ImporteMovto, CveMoneda, 0.0, $"{gvr.DataKey("Proveedor")} F:{gvr.DataKey("SerieFolio")} {If(DdlPersonal.Visible, DdlPersonal.SelectedItem.Text, DdlCajaChica.SelectedItem.Text)}", "", False, True, -1, CvePrePolizaPago, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FueConciliado:=If(ChkReembolsarSinBancos.Checked Or CveCajaChica > 0, True, False))
+ TipoCambioPago = 1
End If
End If
@@ -811,7 +813,7 @@ Partial Class Compras_ReembolsosComprobaciones
MsgError = "no se pudo insertar el detalle de la poliza"
End If
- If Not AplicaPrePolizaPago(CompraActual, Pago, CvePrePolizaPago, ObjMov) Then
+ If Not AplicaPrePolizaPagoCompra(CompraActual, Pago, CvePrePolizaPago, ObjMov) Then
MsgError = "Detalle"
End If
diff --git a/Contabilidad/PopUpAuxiliar.aspx.vb b/Contabilidad/PopUpAuxiliar.aspx.vb
index b324091bd..250bd30f0 100644
--- a/Contabilidad/PopUpAuxiliar.aspx.vb
+++ b/Contabilidad/PopUpAuxiliar.aspx.vb
@@ -210,11 +210,11 @@ Partial Class PopUpAuxiliar
e.Row.FCLiteral("LtlConcepto").Text = String.Format("{0}{1}", Liga, e.Row.DBCampo("ConceptoContable"))
End If
- If e.Row.DBCampo("CveConceptoContable").Contiene("91", "251") Then 'desaplicar NC
+ If e.Row.DBCampo("CveConceptoContable").Contiene("91", "251", "301") Then 'desaplicar NC
e.Row.FCLinkButton("LnkDesAplicar").Visible = True
e.Row.FCLinkButton("imgD").Visible = False
- If e.Row.DBCampo("CveConceptoContable").Contiene("251") Then
+ If e.Row.DBCampo("CveConceptoContable").Contiene("251", "301") Then
e.Row.FCLinkButton("LnkDesAplicar").CommandArgument = String.Format("{0}|{1}|{2}", e.Row.DBCampo("CvePrePoliza"), e.Row.DBCampo("CveVenta"), e.Row.DBCampo("CveVentaAmortizacion"))
Else
e.Row.FCLinkButton("LnkDesAplicar").CommandArgument = String.Format("{0}|{1}|{2}", e.Row.DBCampo("CvePrePoliza"), e.Row.DBCampo("CveVentaAmortizacion"), e.Row.DBCampo("CveVenta"))
diff --git a/Contabilidad/RegPrePolizaS.aspx.vb b/Contabilidad/RegPrePolizaS.aspx.vb
index af366386b..2b6a245a2 100644
--- a/Contabilidad/RegPrePolizaS.aspx.vb
+++ b/Contabilidad/RegPrePolizaS.aspx.vb
@@ -434,6 +434,10 @@ Partial Class ContabilidadC_RegPrePolizaS
' TxtEstatus.Text = If(Boolean.Parse(dr("Estatus").ToString), "Activa", "Inactiva")
CvePlantillaPoliza = dr("CvePlantillaPoliza").ToString
+ If UsuarioActual.CveRol = 1 Then
+ TxtUsuarioElaboro.ToolTip = dr("Modulo").ToString
+ End If
+
If UsuarioActual.CveRol = 1 OrElse UsuarioActual.TienePermisoProceso(221) Then
'DivAgregarConceptos.Visible = True
LnkAddConcepto.Visible = True
@@ -2417,7 +2421,7 @@ Partial Class ContabilidadC_RegPrePolizaS
End If
TipoMov = GlobalDTTipoTransacciones.FiltroPrimeroValor("CveTipoTransaccion", String.Format("TipoTransaccion = '{0}' ", Row("TipoTransferencia"))).ToEntero
- TipoNaturaleza = GlobalDTTipoTransacciones.FiltroPrimeroValor("Tipo", String.Format("TipoTransaccion = '{0}' ", Row("TipoTransferencia"))).ToEntero
+ TipoNaturaleza = GlobalDTTipoTransacciones.FiltroPrimeroValor("Tipo", String.Format("TipoTransaccion = '{0}' ", Row("TipoTransferencia")))
FolioExcel = Row("Folio").ToString.ToEntero
CveTipoTransaccion = TipoMov
@@ -2438,11 +2442,19 @@ Partial Class ContabilidadC_RegPrePolizaS
Exit Sub
End If
- If Row("Abono").ToString.ToDecimal > 0 And TipoNaturaleza = "Ing" Or Row("Cargo").ToString.ToDecimal > 0 And TipoNaturaleza = "Egs" Then
+
+ If Not (TipoNaturaleza = "Ing" And ((TipoMovto = False And ImporteDocumento >= 0) Or (TipoMovto = True And ImporteDocumento <= 0)) Or
+ TipoNaturaleza = "Egs" And ((TipoMovto = True And ImporteDocumento >= 0) Or (TipoMovto = False And ImporteDocumento <= 0))) Then
Alert($"El movimiento con cuenta: {NombreCuenta} , importe: {ImporteDocumento.ToString("###,###,###.00")} (registro {ContadorRegistros}), no tiene la naturaleza correcta", TipoMensaje.MsgAdvertencia)
Exit Sub
+
End If
+ 'If Row("Abono").ToString.ToDecimal > 0 And TipoNaturaleza = "Ing" Or Row("Cargo").ToString.ToDecimal > 0 And TipoNaturaleza = "Egs" Then
+ ' Alert($"El movimiento con cuenta: {NombreCuenta} , importe: {ImporteDocumento.ToString("###,###,###.00")} (registro {ContadorRegistros}), no tiene la naturaleza correcta", TipoMensaje.MsgAdvertencia)
+ ' Exit Sub
+ 'End If
+
End If
If Row("Abono").ToString.ToDecimal > 0 And Row("Cargo").ToString.ToDecimal > 0 Then
diff --git a/Contabilidad2/RepAnexoCatalogoAnual.aspx.vb b/Contabilidad2/RepAnexoCatalogoAnual.aspx.vb
index a4fcaef1c..ef64e84a7 100644
--- a/Contabilidad2/RepAnexoCatalogoAnual.aspx.vb
+++ b/Contabilidad2/RepAnexoCatalogoAnual.aspx.vb
@@ -181,6 +181,11 @@ Partial Class Contabilidad2_RepAnexoCatalogoAnual
Private Sub CargaDatos()
+ If CveCuenta <= -1 Then
+ Alert("No hay una cuenta expecificada.", TipoMensaje.MsgAdvertencia)
+ Exit Sub
+ End If
+
DTHeaders = New DataTable
DTDatos = New DataTable
diff --git a/Contabilidad2/RepSituacionFinanciera.aspx b/Contabilidad2/RepSituacionFinanciera.aspx
index f44b3bb98..448192f6a 100644
--- a/Contabilidad2/RepSituacionFinanciera.aspx
+++ b/Contabilidad2/RepSituacionFinanciera.aspx
@@ -20,7 +20,7 @@
<%--