diff --git a/App_Code/ClsCompras.vb b/App_Code/ClsCompras.vb
index f6730e5d0..8737fc436 100644
--- a/App_Code/ClsCompras.vb
+++ b/App_Code/ClsCompras.vb
@@ -505,7 +505,7 @@ Public Class ClsCompras
Public Function UpdateCompraDetalle(CvePS As Integer, Cantidad As Double, PU As Double, IVA As Double, Total As Double, Descuento As Double, Observaciones As String, CveSubProyecto As Integer, CvePresupuestoEgreso As Integer, CveActivoFijo As Integer, CveCompraDetalle As Integer, Optional AplicaCostoIndirecto As Integer = -1, Optional CvePersonal As Integer = -1, Optional CveTipoGasto As Integer = -1,
Optional AF_Medida As Integer = -1, Optional AF_TipoMantenimiento As Integer = -1, Optional Referencia As String = "",
Optional RetIVA As Double = 0, Optional RetISR As Double = 0, Optional IEPSPS As Double = 0, Optional IEPSPSIVA As Double = 0,
- Optional IVAPorcentaje As Double = 0, Optional RetIVAPorcentaje As Double = 0, Optional RetISRPorcentaje As Double = 0, Optional IEPSPSPorcentaje As Double = 0, Optional IEPSPSIVAPorcentaje As Double = 0, Optional NoDeducible As Boolean = False) As Boolean
+ Optional IVAPorcentaje As Double = 0, Optional RetIVAPorcentaje As Double = 0, Optional RetISRPorcentaje As Double = 0, Optional IEPSPSPorcentaje As Double = 0, Optional IEPSPSIVAPorcentaje As Double = 0, Optional NoDeducible As Boolean = False, Optional CveContratoDetalle As Integer = -1) As Boolean
Dim Retorno As Boolean = False
@@ -540,6 +540,8 @@ Public Class ClsCompras
.Add("@IEPSPSPorcentaje", SqlDbType.Float).Value = IEPSPSPorcentaje
.Add("@IEPSPSIVAPorcentaje", SqlDbType.Float).Value = IEPSPSIVAPorcentaje
.Add("@NoDeducible", SqlDbType.Bit).Value = NoDeducible
+ .Add("@CveContratoDetalle", SqlDbType.Int).Value = CveContratoDetalle
+
End With
diff --git a/App_Code/ClsGenerales.vb b/App_Code/ClsGenerales.vb
index 56b39138a..becb87884 100644
--- a/App_Code/ClsGenerales.vb
+++ b/App_Code/ClsGenerales.vb
@@ -3268,6 +3268,65 @@ Public Class ClsGenerales
#End Region
+#Region "C A R T A P O R T E"
+
+ Public Function GetMaterialPeligroso() As Boolean
+ Dim Retorno As Boolean = False
+ DataAdapter("PA_Gral_CP_MaterialPeligrosoGet")
+ 'With SqlAdapter.SelectCommand.Parameters
+ ' .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
+ ' .Add("@CveClasificacionPorcentaje", SqlDbType.Int).Value = CveClasificacionPorcentaje
+ ' .Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion
+ ' .Add("@PorcentajeIVA", SqlDbType.Float).Value = PorcentajeIVA
+ ' .Add("@Opcion", SqlDbType.Int).Value = Opcion
+ 'End With
+ Try
+ SqlAdapter.Fill(Data)
+ Retorno = True
+ Catch ex As Exception
+ OnError("Ocurrió un error al obtener materiales peligrosos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ End Try
+ Return Retorno
+ End Function
+ Public Function GetEmbalajes() As Boolean
+ Dim Retorno As Boolean = False
+ DataAdapter("PA_Gral_CP_EmbalajesGet")
+
+ Try
+ SqlAdapter.Fill(Data)
+ Retorno = True
+ Catch ex As Exception
+ OnError("Ocurrió un error al obtener embalajes.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ End Try
+ Return Retorno
+ End Function
+
+ Public Function GetCartaPorteTipoPermiso() As Boolean
+ Dim Retorno As Boolean = False
+ DataAdapter("PA_Gral_CP_TipoPermisoGet")
+ Try
+ SqlAdapter.Fill(Data)
+ Retorno = True
+ Catch ex As Exception
+ OnError("Ocurrió un error al obtener los permisos de carta porte.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ End Try
+ Return Retorno
+ End Function
+
+ Public Function GetCartaPorteConfigAutoTransportes() As Boolean
+ Dim Retorno As Boolean = False
+ DataAdapter("PA_Gral_CP_ConfigAutoTransportesGet")
+ Try
+ SqlAdapter.Fill(Data)
+ Retorno = True
+ Catch ex As Exception
+ OnError("Ocurrió un error al obtener los configuración de autotransporte de carta porte.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ End Try
+ Return Retorno
+ End Function
+
+#End Region
+
Protected Overridable Sub Dispose(ByVal disposing As Boolean)
If Not disposedValue Then
If disposing Then
diff --git a/App_Code/ClsNominas.vb b/App_Code/ClsNominas.vb
index 5ac824654..f57a14a3c 100644
--- a/App_Code/ClsNominas.vb
+++ b/App_Code/ClsNominas.vb
@@ -2251,7 +2251,30 @@ Public Class ClsNominas
End Try
Return retorno
End Function
- Public Function GetchecadorAdistencia(FechaInicio As DateTime, FechaFin As DateTime, CveEmpresa As Integer) As Boolean
+ Public Function AsistenciaDetallePorTurnoGet(FechaInicio As DateTime, FechaFin As DateTime, CveEmpresa As Integer, Optional CvePersonal As Integer = -1) As Boolean
+ Dim retorno As Boolean = False
+
+ Try
+ DTSet = New DataSet()
+ DataAdapter("PA_RH_AsistenciaDetallePorTurnoGet", CommandType.StoredProcedure)
+ With SqlAdapter.SelectCommand.Parameters
+ .Add("@FechaInicio", SqlDbType.DateTime).Value = FechaInicio
+ .Add("@FechaFin", SqlDbType.DateTime).Value = FechaFin
+ .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
+ .Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal
+ End With
+ SqlAdapter.Fill(DTSet)
+ retorno = True
+ Catch sqEx As SqlException
+ retorno = False
+ OnError("Ocurrió un error al obtener la asistenciadetalle.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ Catch ex As Exception
+ retorno = False
+ OnError("Ocurrió un error al obtener la asistenciadetalle.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ End Try
+ Return retorno
+ End Function
+ Public Function GetchecadorAsistencia(FechaInicio As DateTime, FechaFin As DateTime, CveEmpresa As Integer) As Boolean
Dim retorno As Boolean = False
Try
@@ -2266,10 +2289,10 @@ Public Class ClsNominas
retorno = True
Catch sqEx As SqlException
retorno = False
- OnError("Ocurrió un error al Realizar el calculo de asistencia.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ OnError("Ocurrió un error al realizar el calculo de asistencia.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
Catch ex As Exception
retorno = False
- OnError("Ocurrió un error al Realizar el calculo de asistencia.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ OnError("Ocurrió un error al realizar el calculo de asistencia.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return retorno
End Function
diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb
index ca3dfd4b8..8611e3a83 100644
--- a/App_Code/ClsPaginas.vb
+++ b/App_Code/ClsPaginas.vb
@@ -645,6 +645,63 @@ Public Class ClsPaginas
End Set
End Property
+#Region "C A R T A P O R T E "
+ Property GlobalDTMaterialPeligroso(Optional CveMaterialPeligroso As Integer = -1) As DataTable
+ Get
+
+ Dim AppNombre As String = "GlobalDTMaterialPeligroso"
+ 'sino existe, recarga los datos
+ If Application(AppNombre) Is Nothing Then
+ Dim Obj As New ClsGenerales
+ If Obj.GetMaterialPeligroso() Then Application(AppNombre) = Obj.DtResultados
+ Obj.Dispose()
+ End If
+ If CveMaterialPeligroso > 0 Then
+ Dim Str As New StringBuilder
+ Str.AppendFormat("CveMaterialPeligroso = {0}", CveMaterialPeligroso)
+ Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), Str.ToString(), "", DataViewRowState.CurrentRows)
+ GlobalDTMaterialPeligroso = Dv.ToTable
+ Dv.Dispose()
+ Else
+ GlobalDTMaterialPeligroso = DirectCast(Application(AppNombre), DataTable)
+ End If
+
+ End Get
+ Set(value As DataTable)
+ Dim AppNombre As String = "GlobalDTMaterialPeligroso"
+ Application(AppNombre) = value
+ End Set
+ End Property
+
+ Property GlobalDTEmbalajes(Optional CveEmbalaje As Integer = -1) As DataTable
+ Get
+
+ Dim AppNombre As String = "GlobalDTEmbalajes"
+ 'sino existe, recarga los datos
+ If Application(AppNombre) Is Nothing Then
+ Dim Obj As New ClsGenerales
+ If Obj.GetEmbalajes() Then Application(AppNombre) = Obj.DtResultados
+ Obj.Dispose()
+ End If
+ If CveEmbalaje > 0 Then
+ Dim Str As New StringBuilder
+ Str.AppendFormat("CveEmbalaje = {0}", CveEmbalaje)
+ Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), Str.ToString(), "", DataViewRowState.CurrentRows)
+ GlobalDTEmbalajes = Dv.ToTable
+ Dv.Dispose()
+ Else
+ GlobalDTEmbalajes = DirectCast(Application(AppNombre), DataTable)
+ End If
+
+ End Get
+ Set(value As DataTable)
+ Dim AppNombre As String = "GlobalDTEmbalajes"
+ Application(AppNombre) = value
+ End Set
+ End Property
+#End Region
+
+
Property GlobalDTClasificaciones(Optional CveEmpresa As Integer = -1, Optional CveCategoria As Integer = -1, Optional UsoClasificacion As Integer = -1, Optional CveClasificacion As Integer = -1) As DataTable
Get
@@ -3125,18 +3182,26 @@ Public Class ClsPaginas
Property GlobalDTContaConceptosContables(CveConceptoContable As Integer) As DataTable
Get
+ Dim AppNombre As String = String.Format("GlobalDTContaConceptosContables")
+ 'sino existe, recarga los datos
+ If Application(AppNombre) Is Nothing Then
+ Using ObjContabilidad As New ClsContabilidad
+ If ObjContabilidad.GetConta_ConceptosContables() Then Application(AppNombre) = ObjContabilidad.DtResultados Else Application(AppNombre) = Nothing
+ End Using
+
+ End If
If CveConceptoContable <> -1 Then
- Dim Dv As New DataView(DirectCast(Application("GlobalDTContaConceptosContables"), DataTable), String.Format("CveConceptoContable = {0}", CveConceptoContable), "", DataViewRowState.CurrentRows)
+ Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), String.Format("CveConceptoContable = {0}", CveConceptoContable), "", DataViewRowState.CurrentRows)
GlobalDTContaConceptosContables = Dv.ToTable
Dv.Dispose()
Else
- GlobalDTContaConceptosContables = DirectCast(Application("GlobalDTContaConceptosContables"), DataTable)
+ GlobalDTContaConceptosContables = DirectCast(Application(AppNombre), DataTable)
End If
-
End Get
Set(value As DataTable)
- Application("GlobalDTContaConceptosContables") = value
+ Dim AppNombre As String = String.Format("GlobalDTContaConceptosContables")
+ Application(AppNombre) = value
End Set
End Property
#End Region
@@ -3896,7 +3961,7 @@ Public Class ClsPaginas
If Application("GlobalSIGAppPaginas") Is Nothing Then
PaginaDict = New System.Collections.Hashtable
- PaginaDict.Add("/Nomina/ChecadorAsistencia.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Nomina/ChecadorAsistencia.aspx".ToUpper(), 921)
PaginaDict.Add("/Nomina/ISRCalculoAnual.aspx".ToUpper(), 918)
PaginaDict.Add("/Nomina/MovimientosSUA.aspx".ToUpper(), 919)
'PaginaDict.Add("/Nomina/Acumulados.aspx".ToUpper(), 916)
diff --git a/App_Code/ClsProductosServicios.vb b/App_Code/ClsProductosServicios.vb
index 4af16b530..113c97ce0 100644
--- a/App_Code/ClsProductosServicios.vb
+++ b/App_Code/ClsProductosServicios.vb
@@ -89,6 +89,9 @@ Public Class ClsProductosServicios
Public Property ClaveSATUnidadAduanaDescripcion As String
Public Property ClaveSATFraccionArancelaria As String
Public Property ClaveSATUnidadAduana As String
+ Public Property CveMaterialPeligroso As Integer
+ Public Property CveEmbalaje As Integer
+ Public Property PesoKg As Decimal
'Nuevo Raul: 10/08/2018
Public Property CveUsuarioModifico As Integer
@@ -295,6 +298,10 @@ Public Class ClsProductosServicios
ClaveSATFraccionArancelariaDescripcion = Data.Rows(0)("ClaveSATFraccionArancelariaDescripcion").ToString
ClaveSATUnidadAduanaDescripcion = Data.Rows(0)("ClaveSATUnidadAduanaDescripcion").ToString
+ CveMaterialPeligroso = Data.Rows(0)("CveMaterialPeligroso").ToString.ToEntero
+ CveEmbalaje = Data.Rows(0)("CveEmbalaje").ToString.ToEntero
+ PesoKg = Data.Rows(0)("PesoKg").ToString.ToDecimal
+
'Nuevo Raul: 10/08/2018
CveUsuarioModifico = Data.Rows(0)("CveUsuarioModifico").ToString.ToEntero
UsuarioModifico = Data.Rows(0)("UsuarioModifico").ToString
@@ -408,7 +415,8 @@ Public Class ClsProductosServicios
Optional CveFraccionArancelaria As Integer = -1, Optional CveClasificacionDetalle As Integer = -1, Optional CveTamaño As Integer = -1,
Optional CveModelo As Integer = -1, Optional CveMedida As Integer = -1, Optional CveRinTamaño As Integer = -1, Optional ClaveImpuestoEmpaque As String = "", Optional ClaveImpuestoUM As String = "",
Optional ClaveCategoriaToxicidad As String = "", Optional ClaveImpuestoTipoProducto As String = "", Optional Litraje As Double = -1, Optional EsOutSourcing As Boolean = False, Optional AplicaSerie As Boolean = False, Optional AplicaLote As Boolean = False,
- Optional AplicaCaducidad As Boolean = False, Optional AplicaSeccion As Boolean = False, Optional TiempoCaducidad As Integer = -1, Optional CvePSAdicionalVigencia As Integer = -1, Optional PrecioLibre As Boolean = False) As Integer
+ Optional AplicaCaducidad As Boolean = False, Optional AplicaSeccion As Boolean = False, Optional TiempoCaducidad As Integer = -1, Optional CvePSAdicionalVigencia As Integer = -1, Optional PrecioLibre As Boolean = False,
+ Optional CveMaterialPeligroso As Integer = -1, Optional CveEmbalaje As Integer = -1, Optional PesoKg As Decimal = -1) As Integer
Dim Retorno As Integer = -1
DataAdapter("PA_ProductosServiciosAdd")
@@ -492,6 +500,10 @@ Public Class ClsProductosServicios
.Add("@CvePSAdicionalVigencia", SqlDbType.Int).Value = CvePSAdicionalVigencia
.Add("@PrecioLibre", SqlDbType.Bit).Value = PrecioLibre
+ .Add("@CveMaterialPeligroso", SqlDbType.Int).Value = CveMaterialPeligroso
+ .Add("@CveEmbalaje", SqlDbType.Int).Value = CveEmbalaje
+ .Add("@PesoKg", SqlDbType.SmallMoney).Value = PesoKg
+
End With
Try
@@ -638,7 +650,8 @@ Public Class ClsProductosServicios
Optional CveFraccionArancelaria As Integer = -1, Optional CveUsuarioModifico As Integer = -1,
Optional CveClasificacionDetalle As Integer = -1, Optional CveTamaño As Integer = -1, Optional CveModelo As Integer = -1, Optional CveMedida As Integer = -1, Optional CveRinTamaño As Integer = -1, Optional ClaveImpuestoEmpaque As String = "", Optional ClaveImpuestoUM As String = "",
Optional ClaveCategoriaToxicidad As String = "", Optional ClaveImpuestoTipoProducto As String = "", Optional Litraje As Double = -1, Optional EsOutSourcing As Boolean = False,
- Optional AplicaSerie As Boolean = False, Optional AplicaLote As Boolean = False, Optional AplicaCaducidad As Boolean = False, Optional AplicaSeccion As Boolean = False, Optional TiempoCaducidad As Integer = -1, Optional CvePSAdicionalVigencia As Integer = -1, Optional PrecioLibre As Boolean = False) As Boolean
+ Optional AplicaSerie As Boolean = False, Optional AplicaLote As Boolean = False, Optional AplicaCaducidad As Boolean = False, Optional AplicaSeccion As Boolean = False, Optional TiempoCaducidad As Integer = -1, Optional CvePSAdicionalVigencia As Integer = -1, Optional PrecioLibre As Boolean = False,
+ Optional CveMaterialPeligroso As Integer = -1, Optional CveEmbalaje As Integer = -1, Optional PesoKg As Decimal = -1) As Boolean
Dim Retorno As Boolean = False
@@ -724,6 +737,10 @@ Public Class ClsProductosServicios
.Add("@CvePSAdicionalVigencia", SqlDbType.Int).Value = CvePSAdicionalVigencia
.Add("@PrecioLibre", SqlDbType.Bit).Value = PrecioLibre
+ .Add("@CveMaterialPeligroso", SqlDbType.Int).Value = CveMaterialPeligroso
+ .Add("@CveEmbalaje", SqlDbType.Int).Value = CveEmbalaje
+ .Add("@PesoKg", SqlDbType.SmallMoney).Value = PesoKg
+
End With
Try
diff --git a/App_Code/ClsRH.vb b/App_Code/ClsRH.vb
index c7f26d458..c7d98a06d 100644
--- a/App_Code/ClsRH.vb
+++ b/App_Code/ClsRH.vb
@@ -2438,8 +2438,53 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
End Try
Return Retorno
+ End Function
+
+
+ Public Function UpAsistenciaDetalle(CveEmpresa As Integer, registros As List(Of RequestUpAsistenciaDetalle)) As Boolean
+ Dim Retorno As Boolean = False
+ Dim xmlProductos As System.Xml.Linq.XDocument = Nothing
+ If registros IsNot Nothing AndAlso registros.Count > 0 Then
+ xmlProductos = New System.Xml.Linq.XDocument(New System.Xml.Linq.XElement("registros", From x In registros Select New System.Xml.Linq.XElement("registro", New System.Xml.Linq.XElement("CveAsistenciaDetalle", x.CveAsistenciaDetalle), New System.Xml.Linq.XElement("CvePersonal", x.CvePersonal), New System.Xml.Linq.XElement("CveAsistenciasInasistencias", x.CveAsistenciasInasistencias), New System.Xml.Linq.XElement("CveSubProyecto", x.CveSubProyecto), New System.Xml.Linq.XElement("Fecha", x.Fecha))))
+ End If
+ Data = New DataTable
+ SqlDataAdapter("PA_RH_AsistenciaDetalleUP")
+ With SqlAdapter.SelectCommand.Parameters
+ .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
+ .Add("@xmlRegistros", SqlDbType.Xml).Value = xmlProductos.ToString()
+ End With
+ Try
+ SqlAdapter.Fill(Data)
+ Retorno = True
+ Catch Ex1 As SqlException
+ Me.OnError("Ocurrió un error al guardar la Asistencia.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ Catch ex As Exception
+ OnError("Ocurrió un error al guardar la Asistencia.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
+ End Try
+ Return Retorno
+ End Function
+ Public Function AddChecadorRegistro(CveEmpresa As Integer, registros As List(Of RequestAddChecadorRegistro)) As Boolean
+ Dim Retorno As Boolean = False
+ Dim xmlProductos As System.Xml.Linq.XDocument = Nothing
+ If registros IsNot Nothing AndAlso registros.Count > 0 Then
+ xmlProductos = New System.Xml.Linq.XDocument(New System.Xml.Linq.XElement("registros", From x In registros Select New System.Xml.Linq.XElement("registro", New System.Xml.Linq.XElement("CveChecador", x.CveChecador), New System.Xml.Linq.XElement("CvePersonal", x.CvePersonal), New System.Xml.Linq.XElement("ChecadorID", x.ChecadorID), New System.Xml.Linq.XElement("Fecha", x.Fecha))))
+ End If
+ Data = New DataTable
+ SqlDataAdapter("PA_RH_ChecadorAsistenciaAdd")
+ With SqlAdapter.SelectCommand.Parameters
+ .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
+ .Add("@xmlRegistros", SqlDbType.Xml).Value = xmlProductos.ToString()
+ End With
+ Try
+ SqlAdapter.Fill(Data)
+ Retorno = True
+ Catch Ex1 As SqlException
+ Me.OnError("Ocurrió un error al guardar la Asistencia.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ Catch ex As Exception
+ OnError("Ocurrió un error al guardar la Asistencia.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
+ End Try
+ Return Retorno
End Function
-
Public Function AddAsistenciaMasiva(CvePeriodo As Integer, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
@@ -7088,3 +7133,16 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
End Sub
#End Region
End Class
+Public Class RequestAddChecadorRegistro
+ Public Property CveChecador As Integer
+ Public Property CvePersonal As Integer
+ Public Property ChecadorID As Integer
+ Public Property Fecha As DateTime
+End Class
+Public Class RequestUpAsistenciaDetalle
+ Public Property CveAsistenciaDetalle As Integer
+ Public Property Fecha As DateTime
+ Public Property CvePersonal As Integer
+ Public Property CveAsistenciasInasistencias As Integer
+ Public Property CveSubProyecto As Integer
+End Class
diff --git a/App_Code/ClsSAT.vb b/App_Code/ClsSAT.vb
index b5592d9d8..ec5a7b30e 100644
--- a/App_Code/ClsSAT.vb
+++ b/App_Code/ClsSAT.vb
@@ -345,6 +345,103 @@ Public Class ClsSAT
#End Region
+#Region " C A R T A P O R T E"
+
+
+
+ Public Function GetCartaPorteMaterialPeligroso() As Boolean
+ Dim Retorno As Boolean = False
+
+ DataAdapter("PA_Gral_SAT_CP_MaterialPeligroso")
+
+ 'With SqlAdapter.SelectCommand.Parameters
+ ' .Add("@Tipo", SqlDbType.Int).Value = Tipo
+ ' .Add("@RFC", SqlDbType.VarChar).Value = RFC
+ ' .Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor
+ ' .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
+ 'End With
+
+ Try
+ SqlAdapter.Fill(Data)
+ Retorno = True
+ Catch ex As Exception
+ OnError("Ocurrió un error al obtener los registros de material peligroso", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ End Try
+
+ Return Retorno
+
+ End Function
+
+ Public Function GetCartaPorteTipoPermiso() As Boolean
+ Dim Retorno As Boolean = False
+
+ DataAdapter("PA_Gral_SAT_CP_TipoPermiso")
+
+ 'With SqlAdapter.SelectCommand.Parameters
+ ' .Add("@Tipo", SqlDbType.Int).Value = Tipo
+ ' .Add("@RFC", SqlDbType.VarChar).Value = RFC
+ ' .Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor
+ ' .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
+ 'End With
+
+ Try
+ SqlAdapter.Fill(Data)
+ Retorno = True
+ Catch ex As Exception
+ OnError("Ocurrió un error al obtener los registros de material peligroso", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ End Try
+
+ Return Retorno
+
+ End Function
+
+ Public Function GetCartaPorteConfigAutoTransporte() As Boolean
+ Dim Retorno As Boolean = False
+
+ DataAdapter("PA_Gral_SAT_CP_ConfiAutoTransporte")
+
+ 'With SqlAdapter.SelectCommand.Parameters
+ ' .Add("@Tipo", SqlDbType.Int).Value = Tipo
+ ' .Add("@RFC", SqlDbType.VarChar).Value = RFC
+ ' .Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor
+ ' .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
+ 'End With
+
+ Try
+ SqlAdapter.Fill(Data)
+ Retorno = True
+ Catch ex As Exception
+ OnError("Ocurrió un error al obtener los registros de material peligroso", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ End Try
+
+ Return Retorno
+
+ End Function
+
+ Public Function GetCartaPorteSubTipoRemolque() As Boolean
+ Dim Retorno As Boolean = False
+
+ DataAdapter("PA_Gral_SAT_CP_SubTipoRemolque")
+
+ 'With SqlAdapter.SelectCommand.Parameters
+ ' .Add("@Tipo", SqlDbType.Int).Value = Tipo
+ ' .Add("@RFC", SqlDbType.VarChar).Value = RFC
+ ' .Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor
+ ' .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
+ 'End With
+
+ Try
+ SqlAdapter.Fill(Data)
+ Retorno = True
+ Catch ex As Exception
+ OnError("Ocurrió un error al obtener los registros de material peligroso", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ End Try
+
+ Return Retorno
+
+ End Function
+
+#End Region
#Region "IDisposable Support"
' IDisposable
diff --git a/App_Code/Timbrado.vb b/App_Code/Timbrado.vb
index aa405c7f4..625017e87 100644
--- a/App_Code/Timbrado.vb
+++ b/App_Code/Timbrado.vb
@@ -1320,7 +1320,7 @@ Public Class Timbrado
sw.Start()
' cfdi.saltarValidacion("bNtMuvZockPVhEjaPj0E")
- ' cfdi.Decimales = 4
+ cfdi.Decimales = 4
#Region "Certificado"
cfdi.agregarCertificado(ArchivoCertificado)
#End Region
@@ -1906,7 +1906,7 @@ Public Class Timbrado
sw.Start()
' cfdi.saltarValidacion("bNtMuvZockPVhEjaPj0E")
- ' cfdi.Decimales = 4
+ 'cfdi.Decimales = 4
#Region "Certificado"
cfdi.CertificadoArchivo(ArchivoCertificado)
#End Region
diff --git a/Ashx/SIGWeb.ashx b/Ashx/SIGWeb.ashx
index 8875454bd..57248f917 100644
--- a/Ashx/SIGWeb.ashx
+++ b/Ashx/SIGWeb.ashx
@@ -87,6 +87,10 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
GETPSUSADOS(context)
Case "getumsat"
GETUMSAT(context)
+ Case "getsatmatpeligroso"
+ GETSATMaterialPeligroso(context)
+ Case "getsatembalajes"
+ GETSATEmbalajes(context)
Case "getcliente"
GetClientes(context)
Case "getproveedores"
@@ -1054,6 +1058,84 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
End Function
#End Region
+#Region " GET SAT CARTA PORTE "
+ Private Function GETSATMaterialPeligroso(ByVal context As HttpContext) As String
+ Dim retorno As String = ""
+
+
+ If context.Application("GlobalDTMaterialPeligroso") Is Nothing Then
+ Dim ObjGrales As New ClsGenerales
+ If ObjGrales.GetMaterialPeligroso Then context.Application("GlobalDTMaterialPeligroso") = ObjGrales.DtResultados Else context.Application("GlobalDTMaterialPeligroso") = Nothing
+ ObjGrales.Dispose()
+ End If
+
+ Dim DTUM = DirectCast(context.Application("GlobalDTMaterialPeligroso"), DataTable).AsEnumerable
+ Dim DtPSRetorno As DataTable
+
+ Dim Name = IfNull(context.Request("Name"), "-1").ToString
+
+ If Name <> "-1" Then
+ DTUM = DTUM.Where((Function(a) a!ClaveMaterialPeligrosoDescripcion.ToString.ToLower Like ("*" + Name.ToLower + "*")))
+ End If
+
+ If DTUM.Count > 0 Then
+ DtPSRetorno = New DataView(DTUM.OrderBy(Function(a) a!ClaveMaterialPeligrosoDescripcion).CopyToDataTable).ToTable(True, {"CveMaterialPeligroso", "ClaveMaterialPeligrosoDescripcion"})
+ Else
+ DtPSRetorno = Nothing
+ End If
+
+ If DtPSRetorno IsNot Nothing AndAlso DtPSRetorno.Rows.Count > 0 Then
+ DtPSRetorno.Columns("CveMaterialPeligroso").ColumnName = "id"
+ DtPSRetorno.Columns("ClaveMaterialPeligrosoDescripcion").ColumnName = "text"
+ retorno = JsonConvert.SerializeObject(DtPSRetorno).ToString
+ context.Response.Write(retorno)
+ DtPSRetorno.Dispose()
+ Else
+ context.Response.Write("[]")
+ End If
+ Return retorno
+ End Function
+
+ Private Function GETSATEmbalajes(ByVal context As HttpContext) As String
+ Dim retorno As String = ""
+
+
+ If context.Application("GlobalDTEmbalajes") Is Nothing Then
+ Dim ObjGrales As New ClsGenerales
+ If ObjGrales.GetEmbalajes Then context.Application("GlobalDTEmbalajes") = ObjGrales.DtResultados Else context.Application("GlobalDTEmbalajes") = Nothing
+ ObjGrales.Dispose()
+ End If
+
+ Dim DTUM = DirectCast(context.Application("GlobalDTEmbalajes"), DataTable).AsEnumerable
+ Dim DtPSRetorno As DataTable
+
+ Dim Name = IfNull(context.Request("Name"), "-1").ToString
+
+ If Name <> "-1" Then
+ DTUM = DTUM.Where((Function(a) a!ClaveEmbalajeDescripcion.ToString.ToLower Like ("*" + Name.ToLower + "*")))
+ End If
+
+ If DTUM.Count > 0 Then
+ DtPSRetorno = New DataView(DTUM.OrderBy(Function(a) a!ClaveEmbalajeDescripcion).CopyToDataTable).ToTable(True, {"CveEmbalaje", "ClaveEmbalajeDescripcion"})
+ Else
+ DtPSRetorno = Nothing
+ End If
+
+ If DtPSRetorno IsNot Nothing AndAlso DtPSRetorno.Rows.Count > 0 Then
+ DtPSRetorno.Columns("CveEmbalaje").ColumnName = "id"
+ DtPSRetorno.Columns("ClaveEmbalajeDescripcion").ColumnName = "text"
+ retorno = JsonConvert.SerializeObject(DtPSRetorno).ToString
+ context.Response.Write(retorno)
+ DtPSRetorno.Dispose()
+ Else
+ context.Response.Write("[]")
+ End If
+ Return retorno
+ End Function
+
+
+#End Region
+
#Region " GET FRACCION ARANCELARIA "
Private Function GetFraccionArancelaria(ByVal context As HttpContext) As String
Dim retorno As String = ""
diff --git a/Bancos/IE.aspx b/Bancos/IE.aspx
index ecc119d3f..6a8e7f9bd 100644
--- a/Bancos/IE.aspx
+++ b/Bancos/IE.aspx
@@ -44,7 +44,7 @@
Cheque Devuelto
- Cancelar
+ Cancelar Movimiento y Complemento
<%-- data-original-title="¿Está seguro que desea cancelar el documento?" data-btn-ok-label="si" Style="color: #686868;">
diff --git a/Bin/GoCfdi.dll b/Bin/GoCfdi.dll
index aba020c12..f6da1e75a 100644
Binary files a/Bin/GoCfdi.dll and b/Bin/GoCfdi.dll differ
diff --git a/Bin/Profact.TimbraCFDI.dll b/Bin/Profact.TimbraCFDI.dll
index 9d83b3e6b..5acf6f2f6 100644
Binary files a/Bin/Profact.TimbraCFDI.dll and b/Bin/Profact.TimbraCFDI.dll differ
diff --git a/Compras/Compras.aspx b/Compras/Compras.aspx
index 19f9b146a..ec9888e62 100644
--- a/Compras/Compras.aspx
+++ b/Compras/Compras.aspx
@@ -4835,7 +4835,7 @@
-
+
diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb
index bb6625d18..a389a2184 100644
--- a/Compras/Compras.aspx.vb
+++ b/Compras/Compras.aspx.vb
@@ -6741,13 +6741,6 @@ Partial Class Compras_Compras
End If
Next
- 'Dim Valor = (From dr1 In GlobalDTAcumTamaños().FiltraParametros("CveEmpresa = 140").AsEnumerable()
- ' Join dr2 In TmpDT.AsEnumerable On dr1.Field(Of Integer)("CvePSCargo") Equals dr2.Field(Of Integer)("CvePS")
- ' Select New With
- ' {
- ' .Total = dr2.Field(Of Double)("Total")
- ' }).Sum(Function(item) item.Total)
-
importeMovimiento += Valor
importeMN = importeMovimiento * tipoCambioActual * Multiplicador
End If
@@ -6771,6 +6764,7 @@ Partial Class Compras_Compras
If importeMovimiento > 0 Or TxtTotal.Text.ToDecimal = 0 Then
RegistroCuentaPuente = True
+ Dim ImporteTransito As Decimal = 0
'Conta ContPAQ
If IdCtaContable = 0 Then
CuentasContablesInvalidas.Append(" " & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", 68))("ConceptoContable").ToString)
@@ -6783,10 +6777,58 @@ Partial Class Compras_Compras
IdCtaContable = 0
End If
- If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContabilizacionNC, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), TipoCambio:=tipoCambioActual, CveMovimientoAlmacen:=CveMovimientoDevolucion, Contabilizable:=SeContabiliza) Then
- ErrorPrepoliza = True
+ 'se lleva saldo de Mercancía en tránsito
+
+ If ChkNCInvNC.Checked Then
+ For Each Gvr As GridViewRow In GVNCInv.Rows
+ If Gvr.FCTextBox("TxtCantidadNCInv").Text.ToDouble > 0 Then
+ If Not ObjCompras.ComprasDetalleDevolucionesAdd(Gvr.DataKey("CveCompraDetalle").ToEntero, CveCompra, Gvr.FCTextBox("TxtCantidadNCInv").Text.ToDouble, UsuarioActual.CveEmpresa) Then
+ ErrorMovInv = True
+ Exit For
+ End If
+
+ End If
+ Next
+
+ For Each Gvr As GridViewRow In GVNCInvAlmacen.Rows
+ If Gvr.FCTextBox("TxtCantidadNCInv").Text.ToDouble > 0 Then
+ Dim importeMNTemp As Decimal = 0
+ If Not ObjCompras.ComprasDetalleDevolucionesAdd(Gvr.DataKey("CveCompraDetalle").ToEntero, CveCompra, Gvr.FCTextBox("TxtCantidadNCInv").Text.ToDouble, UsuarioActual.CveEmpresa) Then
+ ErrorMovInv = True
+ Exit For
+ End If
+ importeMNTemp = (Gvr.DataKey("PU").ToDecimal * Gvr.FCTextBox("TxtCantidadNCInv").Text.ToDecimal * Gvr.DataKey("TipoCambio").ToDecimal).RoundSQL
+ ImporteTransito += importeMNTemp
+ 'se registra por cada compra relacionada
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMNTemp, Referencia, ConceptoContabilizacionNC, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveCompraAmortizacion:=Gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedorConcepto, ImporteMX:=importeMNTemp, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), TipoCambio:=Gvr.DataKey("TipoCambio").ToDecimal, CveMovimientoAlmacen:=CveMovimientoDevolucion, Contabilizable:=SeContabiliza) Then
+ ErrorPrepoliza = True
+ End If
+ End If
+ Next
+
+ 'si hay diferencia
+
+ Dim diferenciaTransito As Decimal = ImporteTransito - importeMN.RoundSQL
+
+ If diferenciaTransito <> 0 Then
+ Dim tCveCon As Integer = 65
+ If diferenciaTransito < 0 Then
+ tCveCon = 64
+ End If
+ diferenciaTransito = diferenciaTransito.Abs
+ IdCtaContable = 0
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, If(tCveCon = 64, True, False), diferenciaTransito, Referencia, tCveCon, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteMX:=diferenciaTransito, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), TipoCambio:=1, CveMovimientoAlmacen:=CveMovimientoDevolucion, Contabilizable:=SeContabiliza) Then
+ ErrorPrepoliza = True
+ End If
+ End If
+
+
End If
+ 'If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContabilizacionNC, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), TipoCambio:=tipoCambioActual, CveMovimientoAlmacen:=CveMovimientoDevolucion, Contabilizable:=SeContabiliza) Then
+ ' ErrorPrepoliza = True
+ 'End If
+
End If
@@ -6931,7 +6973,7 @@ Partial Class Compras_Compras
tidctacon = ViewState("CtaProveedorAnticiposExtranjera").ToString.ToEntero
End If
- ElseIf DdlTipoComprobante.SelectedValue = "NC" Then
+ ElseIf DdlTipoComprobante.SelectedValue = "NC" AndAlso UsuarioActual.Empresa.Funcionalidad(405).ToEntero > 0 Then
tcvecon = 259
tidctacon = UsuarioActual.Empresa.Funcionalidad(405).ToEntero
@@ -7151,7 +7193,7 @@ Partial Class Compras_Compras
End If
' FLUCTUACION CAMBIARIA
- If tipoCambioActual <> TipoCambioFactura Then
+ If tipoCambioActual <> TipoCambioFactura AndAlso Not ChkNCInvNC.Checked Then ' que no se esté afectando mercancía en tránsto
importeMovimiento = (importeMovimientoNC * TipoCambioFactura) - (importeMovimientoNC * tipoCambioActual)
If importeMovimiento > 0 Then
@@ -7308,7 +7350,7 @@ Partial Class Compras_Compras
importeMNNC = importeMovimientoNC * tipoCambioActual * Multiplicador
IdCtaContable = CtaProveedorExtranjera
- If ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importeMovimientoNC, Referencia, 272, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimientoNC, ImporteME:=importeMovimientoNC, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then
+ If ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importeMovimientoNC, Referencia, 272, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveCompraAmortizacion:=Ant.CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimientoNC, ImporteME:=importeMovimientoNC, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then
Dim CveConceptoContableComplementaria As Integer = 206
If CveTipoConcepto = 2 Then CveConceptoContableComplementaria = 310 'cuando es acreedor
@@ -10167,7 +10209,7 @@ Partial Class Compras_Compras
If Not ObjCompra.UpdateCompraDetalle(Row("CvePS").ToString.ToEntero, Row("Cantidad").ToString.ToDouble, Row("PU").ToString.ToDouble, Row("IVA").ToString.ToDouble, Row("Total").ToString.ToDouble,
Row("Descuento").ToString.ToDouble, Row("Obs").ToString, Row("CveSubProyecto").ToString.ToEntero, Row("CvePresupuestoEgreso").ToString.ToEntero, CveAF, Row("CveCompraDetalle").ToString.ToEntero, CvePersonal:=CvePersonal, CveTipoGasto:=Row("CveTipoGasto").ToString.ToEntero, AF_Medida:=Row("AFMedida").ToString.ToEntero, AF_TipoMantenimiento:=Row("AFTipoMantenimiento").ToString.ToEntero, Referencia:=Referencia,
RetIVA:=Row("RetIVA").ToString.ToDouble, RetISR:=Row("RetISR").ToString.ToDouble, IEPSPS:=Row("IEPSPS").ToString.ToDouble, IEPSPSIVA:=Row("IEPSPSIVA").ToString.ToDouble,
- IVAPorcentaje:=Row("IVAPorcentaje").ToString.ToDouble, RetIVAPorcentaje:=Row("RetIVAPorcentaje").ToString.ToDouble, RetISRPorcentaje:=Row("RetISRPorcentaje").ToString.ToDouble, IEPSPSPorcentaje:=Row("IEPSPSPorcentaje").ToString.ToDouble, IEPSPSIVAPorcentaje:=Row("IEPSPSIVAPorcentaje").ToString.ToDouble, NoDeducible:=If((Row("NoDeducible").ToString().ToUpper().Contiene("TRUE", "1")) AndAlso EsNoDeducible, True, False)) Then
+ IVAPorcentaje:=Row("IVAPorcentaje").ToString.ToDouble, RetIVAPorcentaje:=Row("RetIVAPorcentaje").ToString.ToDouble, RetISRPorcentaje:=Row("RetISRPorcentaje").ToString.ToDouble, IEPSPSPorcentaje:=Row("IEPSPSPorcentaje").ToString.ToDouble, IEPSPSIVAPorcentaje:=Row("IEPSPSIVAPorcentaje").ToString.ToDouble, NoDeducible:=If((Row("NoDeducible").ToString().ToUpper().Contiene("TRUE", "1")) AndAlso EsNoDeducible, True, False), CveContratoDetalle:=Row("CveContratoDetalle").ToString.ToEntero) Then
Retorno = False
Exit For
@@ -10216,9 +10258,10 @@ Partial Class Compras_Compras
Next
For Each item As String In ClavesBorradas
- Dim ObjCompras As New ClsCompras
- If Not ObjCompras.DeleteCompraDetalle(item.ToEntero) Then
- Retorno = False
+ If item.ToEntero > 0 Then
+ If Not ObjCompra.DeleteCompraDetalle(item.ToEntero) Then
+ Retorno = False
+ End If
End If
Next
@@ -20107,14 +20150,6 @@ Partial Class Compras_Compras
Dim IDPoliza As Integer = 0
- 'EMPIEZA OBJETOS Y TRANSACCIONES
- 'Dim OC As New ClsOC
- 'Dim OCBitacora As New ClsOIEventos(OC.IniciaTransacSQL())
- 'Dim ObjInventarios As New ClsInventarios(OC.IniciaTransacSQL())
- 'Dim ObjConta As New ClsContabilidad(OC.IniciaTransacSQL())
-
-
-
Dim DtInvOC As New DataTable
Dim DtInvOCDiferencias As New DataTable 'Actualizado con diferencia
DtInvOCDiferencias.Columns.Add("CveOrdenCompra", GetType(Integer))
@@ -20142,7 +20177,7 @@ Partial Class Compras_Compras
Dim diferencia As Decimal = (dr2("PU").ToString.ToDecimal - gvr.FCTextBox("TxtPU").Text.ToDecimal) * gvr.FCTextBox("TxtCantidad").Text.ToDecimal
Dim DrInvOCDiferencias As DataRow
- If diferencia <> 0 Then 'And DtInvOC.Rows.Count > 0
+ If diferencia <> 0 Then
DrInvOCDiferencias = DtInvOCDiferencias.NewRow
DrInvOCDiferencias("CveOrdenCompra") = dr2("CveOrdenCompra").ToString.ToEntero
DrInvOCDiferencias("CveOrdenCompraDetalle") = dr2("CveOrdenCompraDetalle").ToString.ToEntero
@@ -20201,7 +20236,7 @@ Partial Class Compras_Compras
If DtInvOCDiferencias.Rows.Count > 0 Then
'VARIABLES
- Dim CveOrdenCompra = -1
+ Dim CveOrdenCompra As Integer = -1
Dim DiferenciaInvOC = 0.0D
Dim CveMovimientoAlmacen = -1
Dim CveOCDetalle = -1
@@ -20284,15 +20319,14 @@ Partial Class Compras_Compras
If DiferenciaInvOC.RoundSQL() <> 0 Then
If CveSubProyecto <= 0 Then
- Alert("Debe de asignar un sub proyecto o centro de constos.", TipoMensaje.MsgAdvertencia)
+ Alert("Debe de asignar un sub proyecto o centro de costos.", TipoMensaje.MsgAdvertencia)
Retorno = False
End If
-
CvePrePoliza = ObjConta.AddPrePolizas("Compras/OC-(OCAlmacen)", 74, DiferenciaInvOC, DiferenciaInvOC, 1, Fecha, ConceptoPartida, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
If CvePrePoliza > 0 Then
- If CveMoneda = 2 And UsuarioActual.CveEmpresa.Contiene(119) Then
+ If CveMoneda = 2 Then
ImporteME = (DiferenciaInvOC / TCInvOC).RoundAD()
ImporteMEComp = ((ImporteME * TCInvOC) - ImporteME).RoundAD()
diff --git a/Contabilidad/RegPrePolizaS.aspx.vb b/Contabilidad/RegPrePolizaS.aspx.vb
index 277f6358a..bb2f95516 100644
--- a/Contabilidad/RegPrePolizaS.aspx.vb
+++ b/Contabilidad/RegPrePolizaS.aspx.vb
@@ -223,7 +223,7 @@ Partial Class ContabilidadC_RegPrePolizaS
Beneficiario = "-1"
Actualizar = False
IdPoliza = -1
-
+ CargaCtaContableE()
If IfNull(Request("Tipo"), "").ToString = "NOMPROV" Then
DivTipoGasto.Visible = True
@@ -452,6 +452,11 @@ Partial Class ContabilidadC_RegPrePolizaS
LnkComplementoPago.Visible = True
End If
+
+ If UsuarioActual.CveEmpresa = 119 Then
+ BtnContabilizar.Visible = True
+ End If
+
If UsuarioActual.Empresa.TipoContabilizacion = 1 Then
If dr("FolioPoliza").ToString.ToEntero > 0 Then
divContabilizada.Visible = True
@@ -636,8 +641,20 @@ Partial Class ContabilidadC_RegPrePolizaS
DdlCuentaContable.Items.Insert(0, New ListItem("Seleccione", "0"))
DdlCuentaContableE.DataBind()
DdlCuentaContableE.Items.Insert(0, New ListItem("Sin Asignar", "0"))
- End Sub
-
+ End Sub
+
+ Private Function CargaCuentasContpaq(CveCuenta As Integer) As Integer
+ Dim Retorno As Integer = -1
+ If CveCuenta > 0 Then
+ Dim ObjConta As New ClsContabilidad
+ If ObjConta.GetCuentas(CveCuenta, "-1", 1, UsuarioActual.CveEmpresa) Then
+ Retorno = ObjConta.DtResultados.Rows(0)("IdCompaq").ToString.ToEntero
+ End If
+ ObjConta.Dispose()
+ End If
+ Return Retorno
+
+ End Function
Private Sub CargaTiposGasto()
DdlTipoGasto.DataSource = GlobalDTTiposGastos(UsuarioActual.CveEmpresa)
DdlTipoGasto.DataBind()
@@ -651,7 +668,7 @@ Partial Class ContabilidadC_RegPrePolizaS
End Sub
Private Sub CargaCompras(CveProveedor As Integer)
- If Not DdlConceptosContables.SelectedValue.ToEntero.Contiene(21) Then
+ If DdlConceptosContables.SelectedValue.ToEntero.Contiene(5, 17, 305, 308, 310, 311, 312) Then
Dim ObjCompras As New ClsCompras
DdlCompras.ClearSelection()
@@ -1039,17 +1056,22 @@ Partial Class ContabilidadC_RegPrePolizaS
End If
End Sub
- Private Sub ActualizarPrePoliza()
-
+ Private Sub ActualizarPrePoliza()
+ Dim contador As Integer = 0
Dim OcurrioError As Boolean = False
Dim ObjContabilidad As New ClsContabilidad
ObjContabilidad.IniciaTransacSQL()
- ObjContabilidad.UpdatePrePoliza(MinFecha, -1, DdlTipoPoliza.SelectedValue.ToEntero, -1, CvePrePoliza, UsuarioActual.CveEmpresa, Concepto:=TxtConcepto.Text, FechaPoliza:=TxtFechaDocumento.Text.ToDate, CveUsuarioModifico:=UsuarioActual.CveUsuario)
+ ObjContabilidad.UpdatePrePoliza(MinFecha, -1, DdlTipoPoliza.SelectedValue.ToEntero, -1, CvePrePoliza, UsuarioActual.CveEmpresa, Concepto:=TxtConcepto.Text, FechaPoliza:=TxtFechaDocumento.Text.ToDate, CveUsuarioModifico:=UsuarioActual.CveUsuario)
+
+ If Not ObjContabilidad.UpdatePrePolizasDetalleBloquear(CvePrePoliza, False) Then
+ OcurrioError = True
+ End If
For Each row As GridViewRow In GvPrePoliza.Rows
If row.DataKey("CvePrePolizaDetalle").ToEntero > 0 Then
If row.FCCheckBox("chkModificado").Checked Then
+ contador = contador + 1
If Not ObjContabilidad.UpdatePrePolizasDetalle(row.DataKey("CvePrePolizaDetalle").ToEntero, row.FCLiteral("TxtConcepto").Text, row.DataKey("CveSubProyecto").ToEntero,
row.DataKey("IdCtaContable").ToEntero, If(row.FCLiteral("TxtCargo").Text.ToDecimal <> 0, False, True), If(row.FCLiteral("TxtCargo").Text.ToDecimal <> 0,
row.FCLiteral("TxtCargo").Text.ToDecimal, row.FCLiteral("TxtAbono").Text.ToDecimal), CveTipoGasto:=If(DdlTipoGasto.Visible, row.DataKey("CveTipoGasto").ToEntero, row.DataKey("CveTipoGasto").ToEntero),
@@ -1061,6 +1083,7 @@ Partial Class ContabilidadC_RegPrePolizaS
End If
End If
Else
+ contador = contador + 1
If Not ObjContabilidad.AddPrePolizasDetalle(CvePrePoliza, If(row.FCLiteral("TxtCargo").Text.ToDecimal <> 0, False, True), If(row.FCLiteral("TxtCargo").Text.ToDecimal <> 0,
row.FCLiteral("TxtCargo").Text.ToDecimal, row.FCLiteral("TxtAbono").Text.ToDecimal), row.DataKey("Referencia").ToString,
row.DataKey("CveConceptoContable").ToEntero, row.FCLiteral("TxtConcepto").Text, Now,
@@ -1087,6 +1110,13 @@ Partial Class ContabilidadC_RegPrePolizaS
ObjContabilidad.Dispose()
CargaPrePoliza()
+
+ If Not OcurrioError Then
+ If IdPoliza > 0 AndAlso contador Then
+ BtnContabilizar_Click(Nothing, Nothing)
+ End If
+
+ End If
End Sub
Protected Sub LnkAddConcepto_Click(sender As Object, e As EventArgs)
RegistraScript(String.Format("$('#{0}').modal();", "DivEditConcepto"))
@@ -1096,10 +1126,8 @@ Partial Class ContabilidadC_RegPrePolizaS
CargaConceptosContablesE()
CargaSubProyectoE()
- CargaTipoGastoE()
- CargaCtaContableE()
-
-
+ CargaTipoGastoE()
+
UpdatePanel1.Update()
End Sub
Protected Sub GvPrePoliza_RowUpdating(sender As Object, e As GridViewUpdateEventArgs) Handles GvPrePoliza.RowUpdating
@@ -1135,9 +1163,12 @@ Partial Class ContabilidadC_RegPrePolizaS
DdlPersonalE.SelectedValueExist(CvePersonal)
- DdlClientesE.SelectedValue = CveCliente
- DdlClientesE.SelectedText = GlobalDTCliente(UsuarioActual.CveEmpresa).FiltroPrimeroValor("NombreComercial", $"CveCliente={CveCliente}")
- DdlClientesE_SelectedIndexChanged(DdlClientesE, e)
+ If CveCliente > 0 Then
+ DdlClientesE.SelectedValue = CveCliente
+ DdlClientesE.SelectedText = GlobalDTCliente(UsuarioActual.CveEmpresa).FiltroPrimeroValor("NombreComercial", $"CveCliente={CveCliente}")
+ DdlClientesE_SelectedIndexChanged(DdlClientesE, e)
+
+ End If
DdlVentasE.SelectedValueExist(CveVenta)
TxtConceptoE.Text = Concepto
@@ -1146,8 +1177,8 @@ Partial Class ContabilidadC_RegPrePolizaS
CargaSubProyectoE()
DdlSubProyectoE.SelectedValueExist(CveSubProyecto)
CargaTipoGastoE()
- DdlTipoGastoE.SelectedValueExist(CveTipoGasto)
- CargaCtaContableE()
+ DdlTipoGastoE.SelectedValueExist(CveTipoGasto)
+
DdlCuentaContableE.SelectedValueExist(CveCuenta)
If Cargo <> 0 Then
@@ -1234,7 +1265,7 @@ Partial Class ContabilidadC_RegPrePolizaS
DdlProveedoresE.Items.Insert(0, New ListItem(" - ", "-1"))
End Sub
Private Sub CargaComprasE(CveProveedor As Integer)
- If Not DdlConceptosContablesE.SelectedValue.ToEntero.Contiene(21) Then
+ If DdlConceptosContables.SelectedValue.ToEntero.Contiene(5, 17, 305, 308, 310, 311, 312) Then
Dim ObjCompras As New ClsCompras
DdlComprasE.ClearSelection()
@@ -1293,9 +1324,10 @@ Partial Class ContabilidadC_RegPrePolizaS
If IndiceGrid = -1 Then
If DtMovimientos Is Nothing Then CreaDT()
- If CvePrePoliza > 0 Then
+ If CvePrePoliza > 0 Then
+ Dim IdCtaContable As Integer = CargaCuentasContpaq(DdlCuentaContableE.SelectedValue.ToEntero)
Dim dr As DataRow = DtMovimientos.NewRow
- dr("IdCtaContable") = DdlCuentaContableE.SelectedValue
+ dr("IdCtaContable") = IdCtaContable
dr("CveCuenta") = DdlCuentaContableE.SelectedValue
dr("ConceptoContable") = DdlConceptosContablesE.SelectedItem.Text
dr("CveConceptoContable") = DdlConceptosContablesE.SelectedValue
@@ -1385,8 +1417,9 @@ Partial Class ContabilidadC_RegPrePolizaS
Dim Rows As DataRow() = DtMovimientos.Select("CvePrePolizaDetalle = " & CvePrePolizaDetalle)
If Rows.Count > 0 Then
- Dim dr As DataRow = Rows(0)
- dr("IdCtaContable") = DdlCuentaContableE.SelectedValue
+ Dim dr As DataRow = Rows(0)
+ Dim IdCtaContable As Integer = CargaCuentasContpaq(DdlCuentaContableE.SelectedValue.ToEntero)
+ dr("IdCtaContable") = IdCtaContable
dr("CveCuenta") = DdlCuentaContableE.SelectedValue
dr("CodigoNombreCuenta") = DdlCuentaContableE.SelectedItem.Text
dr("ConceptoContable") = DdlConceptosContablesE.SelectedItem.Text
@@ -1442,12 +1475,13 @@ Partial Class ContabilidadC_RegPrePolizaS
UpTotalCargo.Update()
UpTotalAbono.Update()
- End If
+ End If
+ RegistraScript("$('#DivEditConcepto').modal('hide')", "hidemodal")
End If
- UpPrePoliza.Update()
- RegistraScript("$('#DivEditConcepto').modal('hide')", "hidemodal")
+ UpPrePoliza.Update()
+
End Sub
Protected Sub GvMov_RowDeleting(sender As Object, e As GridViewDeleteEventArgs) Handles GvMov.RowDeleting
@@ -1831,25 +1865,10 @@ Partial Class ContabilidadC_RegPrePolizaS
TxtObservaciones.Text = ""
Actualizar = False
LbAgregar.Text = "Agregar"
- End Sub
-
- Private Sub BtnContabilizar_Click(sender As Object, e As EventArgs) Handles BtnContabilizar.Click
-
- Dim ObjConta As New ClsContabilidad
-
- If ObjConta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
- Alert(String.Format("Prepóliza contabilizada.
Folio:Ver Póliza", ObjConta.ContaIdPoliza), ModExtensiones.TipoMensaje.MsgInformacion)
- Else
-
- Alert($"Ocurrio un error al contabilizar {ObjConta.AlertaMensaje}", TipoMensaje.MsgAdvertencia)
- End If
-
- ObjConta.Dispose()
-
-
End Sub
+
#Region "COMPLEMENTO DE PAGO"
Private Sub GeneraTimbre(CvePrePoliza As Integer)
@@ -2247,7 +2266,29 @@ Partial Class ContabilidadC_RegPrePolizaS
End Function
#End Region
+ Private Sub BtnContabilizar_Click(sender As Object, e As EventArgs) Handles BtnContabilizar.Click
+ Contabilizar()
+
+ End Sub
+
+ Private Sub Contabilizar()
+
+ Dim ObjConta As New ClsContabilidad
+
+ If IdPoliza > 0 Then 'si está bloqueada, lo desbloqueaprimero
+ ObjConta.UpdatePrePolizasDetalleBloquear(CvePrePoliza, False)
+ End If
+
+ If ObjConta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa, pIDPoliza:=If(IdPoliza > 0, IdPoliza, -1), Concepto:=TxtConcepto.Text, Fecha:=TxtFechaDocumento.Text.ToDateTime()) Then
+ Alert(String.Format("Prepóliza contabilizada.
Folio:Ver Póliza", ObjConta.ContaIdPoliza), ModExtensiones.TipoMensaje.MsgInformacion)
+ Else
+
+ Alert($"Ocurrio un error al contabilizar {ObjConta.AlertaMensaje}", TipoMensaje.MsgAdvertencia)
+ End If
+
+ ObjConta.Dispose()
+ End Sub
#Region "Paquete Egresos"
diff --git a/Contabilidad2/CatCuentasAsignaciones.aspx b/Contabilidad2/CatCuentasAsignaciones.aspx
index ea32e31b3..cd4a6e804 100644
--- a/Contabilidad2/CatCuentasAsignaciones.aspx
+++ b/Contabilidad2/CatCuentasAsignaciones.aspx
@@ -69,7 +69,7 @@
@@ -130,7 +130,7 @@
-
+
@@ -148,7 +148,7 @@
-
+
@@ -181,6 +181,10 @@
+
+
+
+
diff --git a/Contabilidad2/CatCuentasAsignaciones.aspx.vb b/Contabilidad2/CatCuentasAsignaciones.aspx.vb
index 526852767..cc089bec4 100644
--- a/Contabilidad2/CatCuentasAsignaciones.aspx.vb
+++ b/Contabilidad2/CatCuentasAsignaciones.aspx.vb
@@ -79,6 +79,8 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
DdlActivoFijo.DataSource = GlobalDTActivoFijos(UsuarioActual.CveEmpresa)
+ DdlSubProyectos.DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa)
+
Dim ObjBancos As New ClsBancos
If ObjBancos.GetBancosCuentas(-1, CveEmpresa:=UsuarioActual.CveEmpresa) Then
DdlCuentaBancaria.DataSource = ObjBancos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
@@ -94,6 +96,7 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
'DdlPersonal.DataBind()
DdlClasificacion.DataBind()
DdlAlmacen.DataBind()
+ DdlSubProyectos.DataBind()
DdlCuentaBancaria.Items.Insert(0, New ListItem("Seleccione", "-1"))
DdlConceptoNomina.Items.Insert(0, New ListItem("Seleccione", "-1"))
@@ -112,6 +115,10 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
HdnCveCuentaAsignacion.Value = GvRow.DataKey("CveCuentaAsignacion").ToString
If Dr IsNot Nothing Then
+ DdlCconceptosContables.Enabled = False
+ DdlSubProyectos.Enabled = False
+ DdlClasificacion.Enabled = False
+ DdlPersonal.Enabled = False
CveConceptoAsignacion = GvRow.DataKey("CveCuentaAsignacion").ToEntero
DdlCconceptosContables.SelectedValueExist(GvRow.DataKey("CveConceptoContable"))
DdlCuenta.SelectedValueExist(GvRow.DataKey("CveCuenta"))
@@ -126,33 +133,37 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
Dim CveCliente As Integer = GvRow.DataKey("CveCliente").ToEntero
Dim CvePersonal As Integer = GvRow.DataKey("CvePersonal").ToEntero
+ RecargaConcepto(CveConceptoContable)
+
+ DdlClientes.ddl.SelectedValueExist(CveCliente)
+ DdlPersonal.ddl.SelectedValueExist(CvePersonal)
+
+ LbAgregar.Text = "Actualizar"
+ UpModalModulos.Update()
+ RegistraScript("$('#ModalCat').modal();")
+ End If
+
+
+ End Sub
+
+ Private Sub RecargaConcepto(CveConceptoContable As Integer)
+ Dim Dr As DataRow = GlobalDTContaConceptosContables(CveConceptoContable).FiltroPrimero("")
+
+ If Dr IsNot Nothing Then
+
If Dr("AplicaCliente").ToString = "True" Then
divCliente.Visible = True
- If CveCliente > 0 Then
- DdlClientes.setEsWebService(False)
- Dim ObjCliente As New ClsClientes
- If ObjCliente.GetClientes(-1, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa) Then
- DdlClientes.ddl.DataSource = ObjCliente.DtResultados
- End If
- DdlClientes.ddl.DataBind()
- DdlClientes.ddl.SelectedValue = CveCliente
- End If
+ DdlClientes.setEsWebService(True)
End If
+
If Dr("AplicaProveedor").ToString = "True" Then
divProveedor.Visible = True
End If
If Dr("AplicaPersonal").ToString = "True" Then
divPersonal.Visible = True
- If CvePersonal > 0 Then
- DdlPersonal.setEsWebService(False)
- Dim ObjPersonal As New ClsRH
- If ObjPersonal.GetPersonal(-1, "-1", "-1", "-1", "-1", -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, UsuarioActual.CveEmpresa) Then
- DdlPersonal.ddl.DataSource = ObjPersonal.DtResultados
- End If
- DdlPersonal.ddl.DataBind()
- DdlPersonal.ddl.SelectedValueExist(CvePersonal)
- End If
+ DdlPersonal.setEsWebService(True)
+
End If
If Dr("AplicaImpuesto").ToString = "True" Then
@@ -172,20 +183,22 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
divAlmacen.Visible = True
End If
+ If Dr("AplicaSubProyecto").ToString = "True" Then
+ divSubProyectos.Visible = True
+ End If
+
If Dr("AplicaActivoFijo").ToString = "True" Then
divActivoFijo.Visible = True
+ DdlActivoFijo.DataSource = GlobalDTActivoFijos(UsuarioActual.CveEmpresa)
+ DdlActivoFijo.DataBind()
+ ' DdlActivoFijo.SelectedValueExist(GvRow.DataKey("CveActivoFijo"))
End If
If Dr("AplicaNomina").ToString = "True" Then
divConceptoNomina.Visible = True
End If
-
- LbAgregar.Text = "Actualizar"
- UpModalModulos.Update()
- RegistraScript("$('#ModalCat').modal();")
End If
-
End Sub
Protected Sub EliminarRow(sender As Object, e As EventArgs)
@@ -218,7 +231,10 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
Protected Sub BtnAgregarAsignacion_Click(sender As Object, e As EventArgs) Handles BtnAgregarAsignacion.Click
LimpiarDatos()
-
+ DdlCconceptosContables.Enabled = True
+ DdlSubProyectos.Enabled = True
+ DdlClasificacion.Enabled = True
+ DdlPersonal.Enabled = True
LbAgregar.Text = "Agregar"
UpModalModulos.Update()
RegistraScript("$('#ModalCat').modal();")
@@ -249,13 +265,15 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
If HdnCveCuentaAsignacion.Value.ToEntero <= 0 Then
If Not ObjConta.AddCuentasAsignaciones(DdlCconceptosContables.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlCuenta.SelectedValue.ToEntero, TxtIdCuentaContable.Text.ToEntero,
DdlProveedor.SelectedValue.ToEntero, DdlClientes.SelectedValue.ToEntero, DdlPersonal.SelectedValue.ToEntero,
- DdlClasificacion.SelectedValue.ToEntero, DdlAlmacen.SelectedValue.ToEntero, TxtPorcentajeIVA.Text.ToDecimal, CveBancoCuenta:=DdlCuentaBancaria.SelectedValue.ToEntero(), CveConceptoNomina:=DdlConceptoNomina.SelectedValue.ToEntero()) Then
+ DdlClasificacion.SelectedValue.ToEntero, DdlAlmacen.SelectedValue.ToEntero, TxtPorcentajeIVA.Text.ToDecimal, CveBancoCuenta:=DdlCuentaBancaria.SelectedValue.ToEntero(),
+ CveConceptoNomina:=DdlConceptoNomina.SelectedValue.ToEntero(), CveSubProyecto:=DdlSubProyectos.SelectedValue.ToEntero, CveActivoFijo:=DdlActivoFijo.SelectedValue.ToEntero) Then
ErrorString = "Error al agregar"
End If
ElseIf HdnCveCuentaAsignacion.Value.ToEntero > 0 Then
If Not ObjConta.UpdateCuentasAsignaciones(CveConceptoAsignacion, DdlCconceptosContables.SelectedValue.ToEntero, DdlCuenta.SelectedValue.ToEntero, TxtIdCuentaContable.Text.ToEntero,
DdlProveedor.SelectedValue.ToEntero, DdlClientes.SelectedValue.ToEntero, DdlPersonal.SelectedValue.ToEntero,
- DdlClasificacion.SelectedValue.ToEntero, DdlAlmacen.SelectedValue.ToEntero, TxtPorcentajeIVA.Text.ToDecimal, CveBancoCuenta:=DdlCuentaBancaria.SelectedValue.ToEntero(), CveConceptoNomina:=DdlConceptoNomina.SelectedValue.ToEntero()) Then
+ DdlClasificacion.SelectedValue.ToEntero, DdlAlmacen.SelectedValue.ToEntero, TxtPorcentajeIVA.Text.ToDecimal, CveBancoCuenta:=DdlCuentaBancaria.SelectedValue.ToEntero(),
+ CveConceptoNomina:=DdlConceptoNomina.SelectedValue.ToEntero(), CveSubProyecto:=DdlSubProyectos.SelectedValue.ToEntero, CveActivoFijo:=DdlActivoFijo.SelectedValue.ToEntero) Then
ErrorString = "Error al actualizar"
End If
End If
@@ -288,4 +306,8 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
CargaDatosSistema()
UpDatos.Update()
End Sub
+
+ Private Sub DdlCconceptosContables_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlCconceptosContables.SelectedIndexChanged
+ RecargaConcepto(DdlCconceptosContables.SelectedValue.ToEntero)
+ End Sub
End Class
diff --git a/General/ExcelToBD.aspx b/General/ExcelToBD.aspx
new file mode 100644
index 000000000..6b74bf170
--- /dev/null
+++ b/General/ExcelToBD.aspx
@@ -0,0 +1,102 @@
+<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="ExcelToBD.aspx.cs" Inherits="General_ExcelToBD" %>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Paso 1: cargar plantilla
+
+
+
+
+
+
+ ingrese el archivo a cargar
+
+
+ Cargar excel
+
+
+
+
+
+
+
+
+
+
+
+
+ Paso 2: Configuración
+
+
+ Mostrar
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Continuar
+
+
+
+
+
+
+
+
+
+
+
diff --git a/General/ExcelToBD.aspx.cs b/General/ExcelToBD.aspx.cs
new file mode 100644
index 000000000..cabe4ccdb
--- /dev/null
+++ b/General/ExcelToBD.aspx.cs
@@ -0,0 +1,116 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using ClosedXML.Excel;
+using Extensiones;
+
+public partial class General_ExcelToBD : System.Web.UI.Page
+{
+ #region propiedades
+
+ private string URLFile
+ {
+ get
+ {
+ if (ViewState["URLFile"] == null) { return ""; }
+ else { return ViewState["URLFile"].ToString(); }
+ }
+
+ set { ViewState["URLFile"] = value; }
+ }
+ private string extension
+ {
+ get
+ {
+ if (ViewState["extension"] == null) { return ""; }
+ else { return ViewState["extension"].ToString(); }
+ }
+
+ set { ViewState["extension"] = value; }
+ }
+ private List workBooks
+ {
+ get
+ {
+ if (ViewState["workBooks"] == null) { return null; }
+ else { return (List)ViewState["workBooks"]; }
+ }
+
+ set { ViewState["workBooks"] = value; }
+ }
+ #endregion
+ protected void Page_Load(object sender, EventArgs e)
+ {
+
+ }
+
+ protected void LnkCargarArchivo_Click(object sender, EventArgs e)
+ {
+ List filesgral = TxtArchivoXls.getfiles().Archivos;
+ workBooks = new List();
+ foreach (Archivo fileItem in filesgral)
+ {
+ extension = System.IO.Path.GetExtension(string.Format(@"{0}Temp\{1}", AppDomain.CurrentDomain.BaseDirectory, fileItem.filename)).Replace(".", "");
+ URLFile = fileItem.FileUrl;
+ }
+ using (var workbook = new XLWorkbook(URLFile))
+ {
+ int position = 1;
+ foreach (IXLWorksheet wokitem in workbook.Worksheets)
+ {
+ workBooks.Add(new ADSWorksBooks() { Name = wokitem.Name, position = position++ });
+ }
+
+
+ }
+ DdlWorkBooks.DataSource = workBooks;
+ DdlWorkBooks.DataBind();
+ if (workBooks.Count > 0)
+ {
+ DdlWorkBooks.SelectedIndex = 0;
+ DdlWorkBooks_SelectedIndexChanged(null,null);
+ }
+ }
+
+ protected void DdlWorkBooks_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ using (var workbook = new XLWorkbook(URLFile))
+ {
+
+ int Filas = 0;
+ int columnas = 0;
+ IXLWorksheet workSheet = workbook.Worksheet(DdlWorkBooks.SelectedValue.ToEntero());
+ Filas = workSheet.LastColumnUsed().CellCount();
+ columnas = workSheet.LastRowUsed().CellCount();
+ TxtFilas.Text = Filas.ToString();
+ TxtInicia.Text = "1";
+ TxtColumnas.Text = Filas.ToString();
+ }
+
+ }
+
+ protected void Lnkdoit_Click(object sender, EventArgs e)
+ {
+
+ }
+
+ protected void LnkContinuar_Click(object sender, EventArgs e)
+ {
+ int Filas = 0;
+ int columnas = 0;
+ using (var workbook = new XLWorkbook(URLFile))
+ {
+ IXLWorksheet workSheet = workbook.Worksheet(DdlWorkBooks.SelectedValue.ToEntero());
+ }
+ }
+}
+
+[Serializable]
+public class ADSWorksBooks
+{
+ public int position { get; set; }
+ public string Name { get; set; }
+}
\ No newline at end of file
diff --git a/Global.asax b/Global.asax
index 97c839e09..54af6370e 100644
--- a/Global.asax
+++ b/Global.asax
@@ -221,7 +221,7 @@
Using ObjContabilidad As New ClsContabilidad
If ObjContabilidad.GetConta_PlantillasPolizas(-1, -1) Then Application("GlobalDTContaPlantillasPolizas") = ObjContabilidad.DtResultados Else Application("GlobalDTContaPlantillasPolizas") = Nothing
- If ObjContabilidad.GetConta_ConceptosContables() Then Application("GlobalDTContaConceptosContables") = ObjContabilidad.DtResultados Else Application("GlobalDTContaConceptosContables") = Nothing
+ 'If ObjContabilidad.GetConta_ConceptosContables() Then Application("GlobalDTContaConceptosContables") = ObjContabilidad.DtResultados Else Application("GlobalDTContaConceptosContables") = Nothing
If ObjContabilidad.GetConta_PlantillasPolizasDetalle(-1, -1) Then Application("GlobalDTContaPlantillasPolizasDetalle") = ObjContabilidad.DtResultados Else Application("GlobalDTContaPlantillasPolizasDetalle") = Nothing
End Using
diff --git a/Inventarios/EntradasSalidas.aspx.vb b/Inventarios/EntradasSalidas.aspx.vb
index 391bc8d9e..52ae84d9f 100644
--- a/Inventarios/EntradasSalidas.aspx.vb
+++ b/Inventarios/EntradasSalidas.aspx.vb
@@ -4695,7 +4695,7 @@ Partial Class Inventarios_EntradasSalidas
If CvePS > 0 Then
Dim DrPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).Rows(0)
- If DrPS IsNot Nothing AndAlso String.IsNullOrEmpty(UM) Then
+ If DrPS IsNot Nothing Then
CveUM = DrPS("CveUnidadMedida").ToString().ToEntero()
UM = GlobalDTUnidadesMedida(UsuarioActual.CveEmpresa).FiltroPrimeroValor("UnidadMedida", $"CveUnidadMedida={CveUM}")
End If
diff --git a/Inventarios/EntregaAlmacen.aspx.vb b/Inventarios/EntregaAlmacen.aspx.vb
index 7913c74ab..66f0a2f72 100644
--- a/Inventarios/EntregaAlmacen.aspx.vb
+++ b/Inventarios/EntregaAlmacen.aspx.vb
@@ -1819,7 +1819,7 @@ Partial Class Inventarios_EntregaAlmacen
For Each Dr As DataRow In DtDatos.Rows
FechaCaducidad = If(CBool(Dr("AplicaCaducidad")) AndAlso Dr("FechaCaducidad").ToString() <> "", Dr("FechaCaducidad").ToString().ToDate, MinFecha)
- Lote = If(CBool(Dr("AplicaLote")), Dr("Lote").ToString(), "-1")
+ Lote = If(CBool(Dr("AplicaLote")), Dr("Lote").ToString().Trim, "-1")
If Not ValidaLoteCaducidad Then
FechaCaducidad = MinFecha
diff --git a/Inventarios/TraspasoAlmacen.aspx.vb b/Inventarios/TraspasoAlmacen.aspx.vb
index 635df042b..f585987ab 100644
--- a/Inventarios/TraspasoAlmacen.aspx.vb
+++ b/Inventarios/TraspasoAlmacen.aspx.vb
@@ -296,6 +296,10 @@ Partial Class Inventarios_TraspasoAlmacen
dt.Columns.Add("Obs")
dt.Columns.Add("ImporteIVA", Type.GetType("System.Double"))
dt.Columns.Add("PorcentajeIVA", Type.GetType("System.Double"))
+ dt.Columns.Add("ClaveMaterialPeligroso")
+ dt.Columns.Add("ClaveEmbalaje")
+ dt.Columns.Add("Embalaje")
+ dt.Columns.Add("PesoKg", Type.GetType("System.Decimal"))
DtMovimientos = dt
@@ -663,42 +667,48 @@ Partial Class Inventarios_TraspasoAlmacen
Dim CveClasificacion As Integer
Dim DrPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("")
- If DrPS IsNot Nothing Then CveClasificacion = DrPS("CveClasificacion").ToString.ToEntero
+ If DrPS IsNot Nothing Then
+ CveClasificacion = DrPS("CveClasificacion").ToString.ToEntero
+ Dim DrUM = GlobalDTUnidadesMedida(UsuarioActual.CveEmpresa).FiltroPrimero($"CveUnidadMedida = {CveUnidadMedida}")
- Dim DrUM = GlobalDTUnidadesMedida(UsuarioActual.CveEmpresa).FiltroPrimero($"CveUnidadMedida = {CveUnidadMedida}")
+ Dim registro As DataRow = DtMovimientos.NewRow
+ registro.Item("Cantidad") = Cantidad
+ registro.Item("CveUM") = CveUnidadMedida
+ registro.Item("UM") = DrUM("UnidadMedida")
+ registro.Item("UnidadMedida") = DrUM("UnidadMedida")
+ registro.Item("CvePS") = CvePS
+ registro.Item("PS") = DrPS("PSCodigo")
+ registro.Item("Observaciones") = Observaciones
+ registro.Item("Serie") = Serie
+ registro.Item("Lote") = Lote
+ If FechaCaducidad > MinFecha Then registro.Item("FechaCaducidad") = FechaCaducidad
+ registro.Item("CveClasificacion") = CveClasificacion
+ registro.Item("CveAF") = -1
+ registro.Item("EstatusExistencia") = "1"
+ registro.Item("CveSeccionAlmacen") = CveSeccionAlmacen
+ registro.Item("SeccionAlmacen") = SeccionAlmacen
+ registro.Item("CveSeccionAlmacenDestino") = CveSeccionAlmacenDestino
- Dim registro As DataRow = DtMovimientos.NewRow
- registro.Item("Cantidad") = Cantidad
- registro.Item("CveUM") = CveUnidadMedida
- registro.Item("UM") = DrUM("UnidadMedida")
- registro.Item("UnidadMedida") = DrUM("UnidadMedida")
- registro.Item("CvePS") = CvePS
- registro.Item("PS") = DrPS("PSCodigo")
- registro.Item("Observaciones") = Observaciones
- registro.Item("Serie") = Serie
- registro.Item("Lote") = Lote
- If FechaCaducidad > MinFecha Then registro.Item("FechaCaducidad") = FechaCaducidad
- registro.Item("CveClasificacion") = CveClasificacion
- registro.Item("CveAF") = -1
- registro.Item("EstatusExistencia") = "1"
- registro.Item("CveSeccionAlmacen") = CveSeccionAlmacen
- registro.Item("SeccionAlmacen") = SeccionAlmacen
- registro.Item("CveSeccionAlmacenDestino") = CveSeccionAlmacenDestino
+ registro.Item("TotalImporte") = 0
+ registro.Item("PU") = 0
+ registro.Item("Descuento") = 0
+ registro.Item("SATClaveUM") = DrPS("SATClaveUnidadMedida")
+ registro.Item("SATClaveProdServ") = DrPS("SATClavePS")
+ registro.Item("Noidentificacion") = DrPS("Codigo")
+ registro.Item("CuentaPredial") = ""
+ registro.Item("Obs") = ""
+ registro.Item("ImporteIVA") = 0
+ registro.Item("PorcentajeIVA") = 0
+ registro("ClaveMaterialPeligroso") = DrPS("ClaveMaterialPeligroso")
+ registro("ClaveEmbalaje") = DrPS("ClaveEmbalaje")
+ registro("PesoKg") = DrPS("PesoKg")
- registro.Item("TotalImporte") = 0
- registro.Item("PU") = 0
- registro.Item("Descuento") = 0
- registro.Item("SATClaveUM") = DrPS("SATClaveUnidadMedida")
- registro.Item("SATClaveProdServ") = DrPS("SATClavePS")
- registro.Item("Noidentificacion") = DrPS("Codigo")
- registro.Item("CuentaPredial") = ""
- registro.Item("Obs") = ""
- registro.Item("ImporteIVA") = 0
- registro.Item("PorcentajeIVA") = 0
+ DtMovimientos.Rows.Add(registro)
+ RegistraScript("playsonidito('beep-07.wav')")
+
+ End If
- DtMovimientos.Rows.Add(registro)
- RegistraScript("playsonidito('beep-07.wav')")
CargaGvDatos()
If Limpia Then
@@ -2587,7 +2597,7 @@ Partial Class Inventarios_TraspasoAlmacen
ObjFactura.ConvertirPesos = False
ObjFactura.CveMoneda = 1
ObjFactura.Moneda = GlobalDTMonedas.FiltroPrimeroValor("Moneda", $"CveMoneda = {ObjFactura.CveMoneda} ")
- ObjFactura.MonedaSAT = "XXX" 'GlobalDTMonedas.FiltroPrimeroValor("AbreviaturaSAT", "CveMoneda = 1")
+ ObjFactura.MonedaSAT = GlobalDTMonedas.FiltroPrimeroValor("AbreviaturaSAT", "CveMoneda = 1") '"XXX"
ObjFactura.MonedaAbreviatura = GlobalDTMonedas.FiltroPrimeroValor("Abreviatura", $"CveMoneda = {ObjFactura.CveMoneda} ")
ObjFactura.TipoDocto = "Tra"
ObjFactura.RefDocto = ""
@@ -2655,7 +2665,11 @@ Partial Class Inventarios_TraspasoAlmacen
ObjFactura.Inv_CveMovimiento = CveMovimientoTimbrado
- ObjFactura.Timbre = PreParaTimbreCartaPorte(ObjFactura)
+ If UsuarioActual.Empresa.Funcionalidad(161) = "1" Then
+ ObjFactura.Timbre = PreParaTimbreCartaPorte(ObjFactura)
+ Else
+ ObjFactura.Timbre = PreParaTimbre(ObjFactura)
+ End If
End Sub
Private Function PreParaTimbreCartaPorte(Obj As Modelos.Factura) As CFDITimbre
@@ -2698,47 +2712,86 @@ Partial Class Inventarios_TraspasoAlmacen
CartaPorte.Mercancias.UnidadPeso = ""
CartaPorte.Mercancias.CargoporTasacion = 0
- CartaPorte.FiguraTransporte.AutoTransporteFederal.PermSCT = "TPAF01"
- CartaPorte.FiguraTransporte.AutoTransporteFederal.NumPermisoSCT = "1234567890"
- CartaPorte.FiguraTransporte.AutoTransporteFederal.NombreAseg = "GNP"
- CartaPorte.FiguraTransporte.AutoTransporteFederal.NumPolizaSeguro = "P123"
- CartaPorte.FiguraTransporte.AutoTransporteFederal.Vehiculo.ConfigVehicular = "C2"
- CartaPorte.FiguraTransporte.AutoTransporteFederal.Vehiculo.PlacaVM = "WTF757A"
- CartaPorte.FiguraTransporte.AutoTransporteFederal.Vehiculo.AnioModeloVM = 2007
+ Dim Dr As DataRow = DtCamiones.FiltroPrimero(String.Format("CveCamion= {0}", DdlUnidadCamion.SelectedValue))
+
+ If Dr IsNot Nothing Then
+ CartaPorte.FiguraTransporte.AutoTransporteFederal.PermSCT = Dr("TipoPermisoSCT").ToString '"TPAF01"
+ CartaPorte.FiguraTransporte.AutoTransporteFederal.NumPermisoSCT = Dr("NumPermisoSCT").ToString
+ CartaPorte.FiguraTransporte.AutoTransporteFederal.NombreAseg = Dr("NombreAseguradora").ToString
+ CartaPorte.FiguraTransporte.AutoTransporteFederal.NumPolizaSeguro = Dr("NumPolizaSeguro").ToString
+ CartaPorte.FiguraTransporte.AutoTransporteFederal.Vehiculo.ConfigVehicular = Dr("ConfigCartaPorte").ToString '"C2"
+ CartaPorte.FiguraTransporte.AutoTransporteFederal.Vehiculo.PlacaVM = Dr("Placa").ToString
+ CartaPorte.FiguraTransporte.AutoTransporteFederal.Vehiculo.AnioModeloVM = Dr("Anio").ToString.ToEntero
+ End If
+
+ Dim CveSubProyectoOrigen As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=DdlAlmacenOrigen.SelectedValue.ToEntero).FiltroPrimeroValor("CveSubProyecto", "").ToEntero
+ Dim DomOrigen As CFDICartaPorteDomicilio = Nothing
+
+ If CveSubProyectoOrigen > 0 Then
+ Dim drr As DataRow = GlobalDTSubProyectos(-1, CveSubProyecto:=CveSubProyectoOrigen).FiltroPrimero("")
+ DomOrigen = New CFDICartaPorteDomicilio With {.Calle = drr("Calle").ToString,
+ .Colonia = drr("Colonia").ToString,
+ .CP = drr("CP").ToString,
+ .Estado = drr("Estado").ToString,
+ .Pais = drr("Pais").ToString,
+ .Municipio = drr("Municipio").ToString,
+ .Localidad = drr("Localidad").ToString}
+ End If
+
+ Dim CveSubProyectoDestino As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=DdlAlmacenDestino.SelectedValue.ToEntero).FiltroPrimeroValor("CveSubProyecto", "").ToEntero
+ Dim DomDestino As CFDICartaPorteDomicilio = Nothing
+
+ If CveSubProyectoOrigen > 0 Then
+ Dim drr As DataRow = GlobalDTSubProyectos(-1, CveSubProyecto:=CveSubProyectoOrigen).FiltroPrimero("")
+ DomDestino = New CFDICartaPorteDomicilio With {.Calle = drr("Calle").ToString,
+ .Colonia = drr("Colonia").ToString,
+ .CP = drr("CP").ToString,
+ .Estado = drr("Estado").ToString,
+ .Pais = drr("Pais").ToString,
+ .Municipio = drr("Municipio").ToString,
+ .Localidad = drr("Localidad").ToString}
+ End If
- Dim DomOrigen As New CFDICartaPorteDomicilio With {.Calle = "calle",
- .Colonia = "",
- .CP = "45200",
- .Estado = "JAL",
- .Pais = "MEX",
- .Localidad = ""}
- Dim DomDestino As New CFDICartaPorteDomicilio With {.Calle = "calle destino",
- .Colonia = "",
- .CP = "45200",
- .Estado = "JAL",
- .Pais = "MEX",
- .Localidad = ""}
Dim Ubica As New CFDICartaPorteUbicaciones
Ubica.TipoEstacion = "01"
Ubica.DistanciaRecorrida = 6
- Ubica.Origen = New CFDICartaPorteUbicacionOrigen With {.RFCRemitente = "CAMJ841219I33",
- .FechaHoraSalida = "2021-08-23T11:13:01",
- .NombreRemitente = "Empresa",
+ Ubica.Origen = New CFDICartaPorteUbicacionOrigen With {.RFCRemitente = UsuarioActual.Empresa.RFC,
+ .FechaHoraSalida = Now.ToString("yyyy-MM-ddTH:mm:ss"),' "2021-08-23T11:13:01",
+ .NombreRemitente = UsuarioActual.Empresa.Empresa,
.Domicilio = DomOrigen}
- Ubica.Destino = New CFDICartaPorteUbicacionDestino With {.RFCDestinatario = "CAMJ841219I33",
- .FechaHoraProgLlegada = "2021-08-23T11:13:01",
- .NombreDestinatario = "Empresa dest",
+ Ubica.Destino = New CFDICartaPorteUbicacionDestino With {.RFCDestinatario = UsuarioActual.Empresa.RFC,'"CAMJ841219I33",
+ .FechaHoraProgLlegada = TxtFechaEntrega.Text.ToDate.ToString("yyyy-MM-ddT23:59:59"),
+ .NombreDestinatario = UsuarioActual.Empresa.Empresa,
.Domicilio = DomDestino}
CartaPorte.Ubicaciones.Add(Ubica)
CartaPorte.FiguraTransporte.ClaveTransporte = "01"
- CartaPorte.FiguraTransporte.Operadores.Add(New CFDICartaPorteOperador With {.RFCOperador = "CAMJ841219I33",
- .Domicilio = Nothing,
- .NombreOperador = "juan Perez",
- .NumLicencia = "Num Lic",
- .NumRegidTribOperador = "",
- .ResidenciaFiscalOperador = ""})
+
+ Dim ObjAcar As New ClsAcarreos()
+
+ If ObjAcar.GetChofer(DdlChofer.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, 1, -1) Then
+ Dim dro As DataRow = ObjAcar.DtResultados.Rows(0)
+ If dro IsNot Nothing Then
+ Dim DomicilioOperador As New CFDICartaPorteDomicilio With {.Calle = dro("Domicilio").ToString,
+ .NumeroExterior = dro("NumeroExterior").ToString,
+ .NumeroInterior = dro("NumeroInterior").ToString,
+ .Colonia = dro("Colonia").ToString,
+ .Municipio = dro("Ciudad").ToString,
+ .Estado = dro("Estado").ToString,
+ .CP = dro("CP").ToString}
+
+ CartaPorte.FiguraTransporte.Operadores.Add(New CFDICartaPorteOperador With {.RFCOperador = dro("RFC").ToString,
+ .NombreOperador = dro("Chofer").ToString,
+ .NumLicencia = dro("Licencia").ToString,
+ .NumRegidTribOperador = dro("NumRegidTribOperador").ToString,
+ .ResidenciaFiscalOperador = dro("ResidenciaFiscalOperador").ToString,
+ .Domicilio = DomicilioOperador})
+
+ End If
+ End If
+ ObjAcar.Dispose()
+
'concepto único
@@ -2768,18 +2821,19 @@ Partial Class Inventarios_TraspasoAlmacen
End If
Dim conceptoCarta As New CFDICartaPorteMercancia With {
.BienesTransp = drr("SATClaveProdServ").ToString,
- .ClaveSTCC = "01334",
+ .ClaveSTCC = "", 'para metodo ferroviario
.Cantidad = drr("Cantidad").ToString.ToDecimal,
.Descripción = tPS,
.ClaveUnidad = drr("SATClaveUM").ToString,
.Unidad = drr("UM").ToString,
.Dimensiones = "",
- .MaterialPeligroso = "",
- .Embalaje = "",
- .DescripEmbalaje = "",
- .PesoenKg = 203,
+ .MaterialPeligroso = If(drr("ClaveMaterialPeligroso").ToString <> "", "Sí", "No"),
+ .ClaveMaterialPeligroso = drr("ClaveMaterialPeligroso").ToString,
+ .Embalaje = drr("ClaveEmbalaje").ToString,
+ .DescripEmbalaje = drr("Embalaje").ToString,
+ .PesoenKg = drr("PesoKg").ToString.ToDecimal,
.ValorMercancia = drr("PU").ToString.ToDecimal,
- .Moneda = "MXN", 'tempral
+ .Moneda = "MXN", 'temporal
.FraccionArrancelaria = "",
.UUIDComercioExt = ""
}
@@ -2795,6 +2849,75 @@ Partial Class Inventarios_TraspasoAlmacen
Return Timbre
End Function
+ Private Function PreParaTimbre(Obj As Modelos.Factura) As CFDITimbre
+ Dim Timbre As New CFDITimbre
+ Timbre.Comprobante.TipoComprobante = "T"
+ Timbre.Comprobante.Folio = Obj.Folio.ToString
+ Timbre.Comprobante.Serie = Obj.Serie
+ Timbre.Comprobante.Fecha = Obj.Fecha
+ Timbre.Comprobante.FormadePago = Obj.FormaPagoSAT33
+ Timbre.Comprobante.CondicionesdePago = ""
+ Timbre.Comprobante.MetodoPago = Obj.ClaveMetodoPagoSAT
+ Timbre.Comprobante.Subtotal = Obj.SubTotal
+ Timbre.Comprobante.Descuentos = Obj.Descuento
+ Timbre.Comprobante.Moneda = Obj.MonedaSAT
+ Timbre.Comprobante.TipoCambio = If(Obj.CveMoneda = 1, "1", Obj.TipoCambio.ToString)
+ Timbre.Comprobante.Total = Obj.Total
+
+ Timbre.Comprobante.LugarExpedicion = Obj.SubProyecto.CP
+ Timbre.Comprobante.Confirmacion = ""
+
+ Timbre.Receptor.RFC = "XAXX010101000"
+ Timbre.Receptor.Nombre = UsuarioActual.Empresa.Empresa
+ Timbre.Receptor.UsoCFDI = "P01"
+
+ Dim totSubTotal As Decimal = Obj.SubTotal
+ Dim totIVA As Decimal = Obj.IVA
+ Dim totRetIVA As Decimal = Obj.RetIVA
+ Dim totRetISR As Decimal = Obj.RetISR
+ Dim i As Integer = 1
+
+ 'DETALLES
+ Dim tPS As String = ""
+
+ For Each drr As DataRow In Obj.DtDetalle.Rows
+ If drr("PS").ToString.Length = 1 Then
+ tPS = drr("Obs").ToString
+ Else
+ If drr("PS").ToString.Length = 0 Then
+ tPS = ""
+ Else
+ tPS = String.Format("{0} {1}", drr("PS"), drr("Obs"))
+ End If
+ End If
+
+ 'CONDICIONANTE, ESPECIAL
+ If UsuarioActual.CveEmpresa = 15 Then drr("UM") = "" 'LES COMENTAN QUE NO DEBE IR LA ETIQUETA DE LA UNIDAD EN EL PRODUCTO
+
+ Dim concepto As New CFDIConceptos With {.Cantidad = drr("Cantidad").ToString.ToDecimal,
+ .Descripcion = tPS,
+ .ValorUnitario = drr("PU").ToString.ToDecimal,
+ .Importe = drr("TotalImporte").ToString.ToDecimal,
+ .Descuento = drr("Descuento").ToString.ToDecimal,
+ .Unidad = drr("UM").ToString,
+ .ClaveUnidad = drr("SATClaveUM").ToString,
+ .ClaveProdServ = drr("SATClaveProdServ").ToString,
+ .Noidentificacion = drr("Noidentificacion").ToString,
+ .CuentaPredial = drr("CuentaPredial").ToString}
+ 'VERIFICA SUMA SUBTOTALES
+ If i = Obj.DtDetalle.Rows.Count AndAlso totSubTotal <> concepto.Importe Then 'PROCESO DE AJUSTA DE DECIMALES
+ concepto.Importe = totSubTotal
+ End If
+ totSubTotal = totSubTotal - concepto.Importe
+
+ 'SIEMPRE ESTAMOS AGREGANDO EL IVA
+ 'concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "T", .Base = concepto.Importe - concepto.Descuento, .TasaOCuota = drr("PorcentajeIVA").ToString.ToDecimal, .Impuesto = "002", .Importe = drr("ImporteIVA").ToString.ToDecimal})
+
+ Timbre.Conceptos.Add(concepto)
+ i += 1
+ Next
+ Return Timbre
+ End Function
Private Sub PrepararTimbrado(ByRef FM As Modelos.FemsaFactura, ByRef TmpDT7Eleven As DataTable, ByRef TmpDTComplementosTimbrado As DataTable)
FM.AplicaFEMSA = False
FM.FEMSA_NumSociedad = ""
diff --git a/Metronic/assets/global/images/spritemap.png b/Metronic/assets/global/images/spritemap.png
new file mode 100644
index 000000000..d711b0f0e
Binary files /dev/null and b/Metronic/assets/global/images/spritemap.png differ
diff --git a/Metronic/assets/global/images/spritemap@2x.png b/Metronic/assets/global/images/spritemap@2x.png
new file mode 100644
index 000000000..ed29b88b6
Binary files /dev/null and b/Metronic/assets/global/images/spritemap@2x.png differ
diff --git a/Nomina/ChecadorAsistencia.aspx b/Nomina/ChecadorAsistencia.aspx
index e9b06823b..01a90f0c2 100644
--- a/Nomina/ChecadorAsistencia.aspx
+++ b/Nomina/ChecadorAsistencia.aspx
@@ -38,6 +38,9 @@
+
+ Agregar registro
+
@@ -122,12 +125,15 @@
-
- Detalles
+
Asistencia detalle
+
+
+
+
@@ -142,74 +148,109 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <%-- Hora Extra--%>
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
- <%-- Hora Extra--%>
-
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
@@ -266,6 +307,51 @@
+
+
+
+
+
+
+
+
Agregar registro
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Nomina/ChecadorAsistencia.aspx.cs b/Nomina/ChecadorAsistencia.aspx.cs
index 09ee10ce6..f4fa8aec6 100644
--- a/Nomina/ChecadorAsistencia.aspx.cs
+++ b/Nomina/ChecadorAsistencia.aspx.cs
@@ -29,9 +29,17 @@ public partial class Nomina_ChecadorAsistencia : ClsPaginas
DdlTipoAsistencias.DataBind();
+ using (ClsRH ObjPersonal = new ClsRH())
+ {
+ if (ObjPersonal.GetPersonal(-1, UsuarioActual.CveEmpresa))
+ {
+ DdlmcPersonal.DataSource = ObjPersonal.DtResultados;
+ DdlmcPersonal.DataBind();
+ }
+ }
DdlMotivoHoraExtra.DataSource = GlobalDTMotivosHorasExtras.FiltraParametros(string.Format("CveEmpresa = {0}", UsuarioActual.CveEmpresa));
DdlMotivoHoraExtra.DataBind();
-
+ cargaChecadores();
CargarCentrosDeCosto(DdlAsisProyecto, DdlAsisSubProyecto, LblAsisProyecto, LblAsisSubProyecto);
PnlProyecto.Visible = DdlAsisProyecto.Visible;
if (PnlProyecto.Visible)
@@ -67,7 +75,7 @@ public partial class Nomina_ChecadorAsistencia : ClsPaginas
}
using (ClsNominas objnom = new ClsNominas())
{
- if (objnom.GetchecadorAdistencia(FechaI, FechaF, UsuarioActual.CveEmpresa))
+ if (objnom.GetchecadorAsistencia(FechaI, FechaF, UsuarioActual.CveEmpresa))
{
DataTable dtASis = objnom.DTSetResultados.Tables[0];
dtper = objnom.DTSetResultados.Tables[1];
@@ -92,11 +100,11 @@ public partial class Nomina_ChecadorAsistencia : ClsPaginas
string Horas2 = "";
if (dtx.Rows.Count > 1)
{
- Horas2 = drfec["Horas"].ToString();
DataRow drf = dtx.Rows[1];
asistencia2 = "";
TipoAsis = drf["TipoAsistencia"].ToString();
- switch (drfec["Tipo"].ToString().ToEntero())
+ Horas2 = drf["Horas"].ToString();
+ switch (drf["Tipo"].ToString().ToEntero())
{
case 1:
asistencia2 = "";
@@ -113,6 +121,9 @@ public partial class Nomina_ChecadorAsistencia : ClsPaginas
case 5:
asistencia2 = "";
break;
+ case 6:
+ asistencia2 = "
❌
";
+ break;
default:
break;
@@ -137,6 +148,9 @@ public partial class Nomina_ChecadorAsistencia : ClsPaginas
case 5:
asistencia = "";
break;
+ case 6:
+ asistencia = "
Calculos
diff --git a/Scripts/custom.js b/Scripts/custom.js
index 780aa440e..b89a7867c 100644
--- a/Scripts/custom.js
+++ b/Scripts/custom.js
@@ -1028,7 +1028,7 @@ function ADDropzone(txtid) {
var urldown = txt.data('urldown'); if ((urldown) && (urldown != "")) { } else { urldown = domain + "/Ashx/SIGWeb.ashx"; }
var urlget = txt.data('urlget'); if ((urlget) && (urlget != "")) { } else { urlget = domain + "/temp/"; }
- var maxFilesize = txt.data('maxFilesize'); if (maxFilesize) { } else { maxFilesize = 10; }
+ var maxFilesize = txt.data('maxfilesize'); if (maxFilesize) { } else { maxFilesize = 10; }
var maxFile = txt.attr('data-maxFile'); if (maxFile) { } else { maxFile = null; }
var mydiv = $("");
var mypaste = $("")
diff --git a/Ventas/ProductosServicios.aspx b/Ventas/ProductosServicios.aspx
index bae47738f..3d4835b4c 100644
--- a/Ventas/ProductosServicios.aspx
+++ b/Ventas/ProductosServicios.aspx
@@ -991,6 +991,39 @@
+
+
+
+
+ Carta Porte
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Ventas/ProductosServicios.aspx.vb b/Ventas/ProductosServicios.aspx.vb
index db1b20474..7118644ca 100644
--- a/Ventas/ProductosServicios.aspx.vb
+++ b/Ventas/ProductosServicios.aspx.vb
@@ -799,6 +799,20 @@ Partial Class ProductosyServicios
If ObjProductosServicios.ClaveSATUnidadAduanaDescripcion.ToString <> Nothing Then
LblUnidadAduana.Text = ObjProductosServicios.ClaveSATUnidadAduanaDescripcion.ToString
End If
+
+ If ObjProductosServicios.CveMaterialPeligroso > 0 Then
+ DdlMaterialPeligroso.SelectedValue = ObjProductosServicios.CveMaterialPeligroso.ToString
+ DdlMaterialPeligroso.SelectedText = GlobalDTMaterialPeligroso(ObjProductosServicios.CveMaterialPeligroso).FiltroPrimeroValor("ClaveMaterialPeligrosoDescripcion")
+ End If
+ If ObjProductosServicios.CveEmbalaje > 0 Then
+ DdlEmbalaje.SelectedValue = ObjProductosServicios.CveEmbalaje.ToString
+ DdlEmbalaje.SelectedText = GlobalDTEmbalajes(ObjProductosServicios.CveEmbalaje).FiltroPrimeroValor("ClaveEmbalajeDescripcion")
+ End If
+
+ If ObjProductosServicios.PesoKg > 0 Then
+ TxtPesoKg.Text = ObjProductosServicios.PesoKg.ToString
+ End If
+
DdlTipoPSDes.SelectedValueExist(ObjProductosServicios.CveClasificacionDetalle.ToString)
DdlUnidadMedida.SelectedValue = ObjProductosServicios.CveUnidadMedida.ToString
CveUnidadMedida = ObjProductosServicios.CveUnidadMedida.ToString.ToEntero
@@ -940,6 +954,8 @@ Partial Class ProductosyServicios
LnkUnificar.Visible = True
ChkEsOutSourcing.Checked = ObjProductosServicios.EsOutSourcing
ChkPrecioLibre.Checked = ObjProductosServicios.PrecioLibre
+
+
Else
Alert("El Producto o Servicio Solicitado no existe, por favor revise su búsqueda.", TipoMensaje.MsgAdvertencia)
RegistraScript("$('#C_Tab_TabPaquetes_tab').css('display' , 'none')")
@@ -979,6 +995,18 @@ Partial Class ProductosyServicios
Public Sub CargaDdlFraccionArancelaria()
DdlFraccionArancelaria.setEsWebService(True)
DdlFraccionArancelaria.Attributes.Add("data-metodo", "getfraccionarancelaria")
+
+
+ If UsuarioActual.Empresa.Funcionalidad(161) = "1" Then
+ divCartaPorte.Visible = True
+
+ DdlMaterialPeligroso.setEsWebService(True)
+ DdlMaterialPeligroso.Attributes.Add("data-metodo", "getsatmatpeligroso")
+
+ DdlEmbalaje.setEsWebService(True)
+ DdlEmbalaje.Attributes.Add("data-metodo", "getsatembalajes")
+ End If
+
End Sub
Private Sub VerificaRequiereSerieLote()
If UsuarioActual.CveEmpresa.Contiene(80, 72) And DdlClasificacion.SelectedIndex > 0 Then
@@ -1301,7 +1329,8 @@ Partial Class ProductosyServicios
CveClasificacionDetalle:=DdlTipoPSDes.SelectedValue.ToEntero, CveTamaño:=CveTamaño,
CveModelo:=DdlModelo.SelectedValue.ToEntero(), CveMedida:=DdlMedida.SelectedValue.ToEntero(), CveRinTamaño:=DdlRin.SelectedValue.ToEntero(),
ClaveImpuestoEmpaque:=DdlImpEmpaque.SelectedValue.ToString, ClaveImpuestoUM:=DdlImpUM.SelectedValue.ToString, ClaveCategoriaToxicidad:=DdlCategoriaToxicidad.SelectedValue.ToString,
- ClaveImpuestoTipoProducto:=DdlImpTipoProducto.SelectedValue.ToString, EsOutSourcing:=ChkEsOutSourcing.Checked, TiempoCaducidad:=TiempoCaducidad, CvePSAdicionalVigencia:=DdlPSAdicionalVigencia.SelectedValue.ToEntero(), PrecioLibre:=ChkPrecioLibre.Checked) > 0 Then
+ ClaveImpuestoTipoProducto:=DdlImpTipoProducto.SelectedValue.ToString, EsOutSourcing:=ChkEsOutSourcing.Checked, TiempoCaducidad:=TiempoCaducidad, CvePSAdicionalVigencia:=DdlPSAdicionalVigencia.SelectedValue.ToEntero(), PrecioLibre:=ChkPrecioLibre.Checked,
+ CveMaterialPeligroso:=DdlMaterialPeligroso.SelectedValue.ToEntero, CveEmbalaje:=DdlEmbalaje.SelectedValue.ToEntero, PesoKg:=TxtPesoKg.Text.ToDecimal) > 0 Then
ViewState("CvePS") = ObjProductosServicios.CvePS
For Each GVR As GridViewRow In GvImpuestosLocales.Rows
If GVR.FCCheckBox("ChkDeduccion").Checked Then
@@ -1350,7 +1379,8 @@ Partial Class ProductosyServicios
CveModelo:=DdlModelo.SelectedValue.ToEntero(), CveMedida:=DdlMedida.SelectedValue.ToEntero(), CveRinTamaño:=DdlRin.SelectedValue.ToEntero(),
ClaveImpuestoEmpaque:=DdlImpEmpaque.SelectedValue.ToString, ClaveImpuestoUM:=DdlImpUM.SelectedValue.ToString, ClaveCategoriaToxicidad:=DdlCategoriaToxicidad.SelectedValue.ToString,
ClaveImpuestoTipoProducto:=DdlImpTipoProducto.SelectedValue.ToString, EsOutSourcing:=ChkEsOutSourcing.Checked,
- AplicaSerie:=ChkSerie.Checked, AplicaLote:=ChkLote.Checked, AplicaCaducidad:=ChkCaducidad.Checked, AplicaSeccion:=ChkSeccion.Checked, TiempoCaducidad:=TiempoCaducidad, CvePSAdicionalVigencia:=DdlPSAdicionalVigencia.SelectedValue.ToEntero(), PrecioLibre:=ChkPrecioLibre.Checked) Then
+ AplicaSerie:=ChkSerie.Checked, AplicaLote:=ChkLote.Checked, AplicaCaducidad:=ChkCaducidad.Checked, AplicaSeccion:=ChkSeccion.Checked, TiempoCaducidad:=TiempoCaducidad, CvePSAdicionalVigencia:=DdlPSAdicionalVigencia.SelectedValue.ToEntero(), PrecioLibre:=ChkPrecioLibre.Checked,
+ CveMaterialPeligroso:=DdlMaterialPeligroso.SelectedValue.ToEntero, CveEmbalaje:=DdlEmbalaje.SelectedValue.ToEntero, PesoKg:=TxtPesoKg.Text.ToDecimal) Then
If Not ObjProductosServicios.LimpiaImpuestosLocales(CvePS) Then
TieneError = True
@@ -2211,6 +2241,8 @@ Partial Class ProductosyServicios
#End Region
+
+
#Region " ECOMMERCE "
Private Sub InicializaEcommerce()
AplicaEcommerce = False
diff --git a/Ventas/Promociones.aspx.vb b/Ventas/Promociones.aspx.vb
index 15e8a3df5..8a9295822 100644
--- a/Ventas/Promociones.aspx.vb
+++ b/Ventas/Promociones.aspx.vb
@@ -601,7 +601,7 @@ Partial Class Ventas_Promociones
If Not TieneError And Dr("CveTipoPromocion").ToString <> Dr2("CveTipoPromocion").ToString Then
- If Not ObjGral.AddHistorialBitacora(369, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Dr2("TipoPromocion").ToString, $"{Dr("CodigoPS").ToString} - {Dr("TipoPromocion").ToString}", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 1, "Se elimino " & Dr("CodigoPS").ToString, "PS", "", CvePromocion:=CvePromocion) Then
+ If Not ObjGral.AddHistorialBitacora(369, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Dr("TipoPromocion").ToString, $"{Dr("CodigoPS").ToString} - {Dr2("TipoPromocion").ToString}", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 1, "Se elimino " & Dr("CodigoPS").ToString, "PS", "", CvePromocion:=CvePromocion) Then
TieneError = True
Exit For
End If
@@ -609,7 +609,7 @@ Partial Class Ventas_Promociones
If Not TieneError And Dr("CantidadMinima").ToString <> Dr2("CantidadMinima").ToString Then
- If Not ObjGral.AddHistorialBitacora(370, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Dr2("CantidadMinima").ToString, $"{Dr("CodigoPS").ToString} - {Dr("CantidadMinima").ToString}", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 1, "Se elimino " & Dr("CodigoPS").ToString, "PS", "", CvePromocion:=CvePromocion) Then
+ If Not ObjGral.AddHistorialBitacora(370, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Dr("CantidadMinima").ToString, $"{Dr("CodigoPS").ToString} - {Dr2("CantidadMinima").ToString}", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 1, "Se elimino " & Dr("CodigoPS").ToString, "PS", "", CvePromocion:=CvePromocion) Then
TieneError = True
Exit For
End If
@@ -624,14 +624,14 @@ Partial Class Ventas_Promociones
'End If
If Not TieneError And Dr("HoraInicio").ToString <> Dr2("HoraInicio").ToString Then
- If Not ObjGral.AddHistorialBitacora(372, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Dr2("HoraInicio").ToString, $"{Dr("CodigoPS").ToString} - {Dr("HoraInicio").ToString}", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 1, "Se elimino " & Dr("CodigoPS").ToString, "PS", "", CvePromocion:=CvePromocion) Then
+ If Not ObjGral.AddHistorialBitacora(372, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Dr("HoraInicio").ToString, $"{Dr("CodigoPS").ToString} - {Dr2("HoraInicio").ToString}", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 1, "Se elimino " & Dr("CodigoPS").ToString, "PS", "", CvePromocion:=CvePromocion) Then
TieneError = True
Exit For
End If
End If
If Not TieneError And Dr("HoraFin").ToString <> Dr2("HoraFin").ToString Then
- If Not ObjGral.AddHistorialBitacora(373, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Dr2("HoraFin").ToString, $"{Dr("CodigoPS").ToString} - {Dr("HoraFin").ToString}", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 1, "Se elimino " & Dr("CodigoPS").ToString, "PS", "", CvePromocion:=CvePromocion) Then
+ If Not ObjGral.AddHistorialBitacora(373, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Dr("HoraFin").ToString, $"{Dr("CodigoPS").ToString} - {Dr2("HoraFin").ToString}", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 1, "Se elimino " & Dr("CodigoPS").ToString, "PS", "", CvePromocion:=CvePromocion) Then
TieneError = True
Exit For
End If
diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb
index 35d062a27..22857021f 100644
--- a/Ventas/Ventas.aspx.vb
+++ b/Ventas/Ventas.aspx.vb
@@ -10697,7 +10697,7 @@ Partial Class Ventas
Dim concepto As New CFDIConceptos With {.Cantidad = drr("Cantidad").ToString().ToDecimal,
.Descripcion = tPS,
.ValorUnitario = drr("PU").ToString().ToDecimal,
- .Importe = If(UsuarioActual.Empresa.CvePAC = 3, drr("Total").ToString().ToDecimal, drr("TotalImporte").ToString().ToDecimal),
+ .Importe = If(UsuarioActual.Empresa.CvePAC = 3, drr("Total").ToString().ToDecimal.RoundSQL(2), drr("TotalImporte").ToString().ToDecimal),
.Descuento = drr("Descuento").ToString().ToDecimal.RoundSQL(2),
.Unidad = drr("UM").ToString(),
.ClaveUnidad = drr("SATClaveUM").ToString(),
@@ -13318,6 +13318,7 @@ Partial Class Ventas
'El almacen general es el Primer Almacen de Material en la Sucursal
If Not TraspasoAlmacen(ObjInventario, ObjVentas, CveRemision, ObjConta, True, 9) Then
OcurrioError = True
+ ErrorList.Add("Ocurrió un error al verificar inventario de remisiones. Revise su factura y cualquier detalle comuníquese a Soporte Técnico")
Exit For
End If
Next
@@ -13493,11 +13494,13 @@ Partial Class Ventas
'If TotalCosto <> 0 Then
If Not ObjConta.AddPrePolizasDetalle(factura.CvePrePoliza, TipoMovto68, TotalCosto, factura.SerieFolio, 68, factura.SerieFolio, factura.Fecha, IdCtaContable, -1, CveVenta:=factura.CveVenta, CveCliente:=factura.CveCliente, CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=TotalCosto, CveCuenta:=CveCuenta, CveSubProyecto:=factura.CveSubProyecto) Then
OcurrioError = True
+ ErrorList.Add("Ocurrió un error al guardar movimiento de almacen. Revise su factura y cualquier detalle comuníquese a Soporte Técnico")
End If
'End If
Else
OcurrioError = True
+ ErrorList.Add("Ocurrió un error al consultar los movimientos de almacen. Revise su factura y cualquier detalle comuníquese a Soporte Técnico")
End If
factura.Inv_CveMovimiento = CveMovimientoInventario
factura.Inv_ValorInventario = ValorInventario
@@ -13512,6 +13515,7 @@ Partial Class Ventas
If DebeGenerarMovimiento AndAlso UsuarioActual.Empresa.Funcionalidad(558) = "1" AndAlso UsuarioActual.Empresa.Funcionalidad(567) = "1" AndAlso factura.TipoDocto.Contiene("Ing", "Egs", "Rem") Then
If Not (ObjInventario.GetInv_Mov(factura.CveVenta, UsuarioActual.CveEmpresa) AndAlso ObjInventario.DtResultados.Rows.Count > 0) Then
OcurrioError = True
+ ErrorList.Add("Ocurrió un error al verificar inventario. Revise su factura y cualquier detalle comuníquese a Soporte Técnico")
End If
End If
@@ -31146,9 +31150,9 @@ Partial Class Ventas
If resp.Count > 0 Then
Dim Msg As New StringBuilder()
- Msg.AppendFormat("Mensaje Póliza Virtual: {0}", resp(0)("Descripcion").ToString())
+ Msg.AppendFormat("Mensaje Póliza Virtual: {0} - Código: {1}", resp(0)("Descripcion").ToString(), resp(0)("Codigo"))
- If resp(0)("Codigo").ToString().Contiene("500", "501", "502", "503", "504", "505", "506", "507", "508") Then
+ If resp(0)("Codigo").ToString().Contiene("500", "501", "502", "503", "504", "505", "506", "507", "508", "510") Then
Retorno = True
Dim ObjAcum As New ClsAcumuladores
If ObjAcum.UpdateEnvioPolizaVirutal(CvePolizaVirtual, True, Now, obj.product_unique_code) Then
diff --git a/vwd.webinfo b/vwd.webinfo
index cfe841e39..9e94f3578 100644
--- a/vwd.webinfo
+++ b/vwd.webinfo
@@ -312,6 +312,10 @@
+
+
+
+