This commit is contained in:
2024-07-22 09:54:20 -07:00
12 changed files with 360 additions and 346 deletions

View File

@@ -0,0 +1,18 @@
Imports ClosedXML.Excel.XLPredefinedFormat
Imports System.Buffers
Imports Microsoft.VisualBasic
Public NotInheritable Class CLSErrorMessage
Public Shared Function GetErrorMesagge(mesage As String, ex As Exception, tipoMensaje As Extensiones.ModExtensiones.TipoMensaje) As Tuple(Of String, Extensiones.ModExtensiones.TipoMensaje)
Dim newmesage As String = mesage
Dim newtipoMensaje As Extensiones.ModExtensiones.TipoMensaje = tipoMensaje
If ex.ToString().ToLower().Contains("chk_rh_personalsalarioimss") Then
newmesage = "El salario base cotización no puede ser menor al salario diario integrado"
newtipoMensaje = Extensiones.ModExtensiones.TipoMensaje.MsgAdvertencia
End If
Return Tuple.Create(newmesage, newtipoMensaje)
End Function
End Class

View File

@@ -1630,7 +1630,7 @@ Public Class ClsCompras
#Region "N O T A S - C R E D I T O" #Region "N O T A S - C R E D I T O"
Public Function GetNotasCreditoRep(CveProveedor As Integer, Opcion As Integer, FechaI As String, FechaF As String, CveEmpresa As Integer, Optional TipoReporte As Integer = 1) As Boolean Public Function GetNotasCreditoRep(CveProveedor As Integer, Opcion As Integer, FechaI As String, FechaF As String, CveEmpresa As Integer, Optional TipoReporte As Integer = 1, Optional CveComprasAmortizadas As String = "-1") As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
@@ -1643,6 +1643,8 @@ Public Class ClsCompras
.Add("@FechaF", SqlDbType.VarChar).Value = FechaF .Add("@FechaF", SqlDbType.VarChar).Value = FechaF
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@TipoReporte", SqlDbType.Int).Value = TipoReporte .Add("@TipoReporte", SqlDbType.Int).Value = TipoReporte
.Add("@CveComprasAmortizadas", SqlDbType.VarChar).Value = CveComprasAmortizadas
End With End With

View File

@@ -642,6 +642,22 @@ Public Class ClsNominas
retorno = RunQuery("Ocurrió un error al obtener el valor de la UMA.") retorno = RunQuery("Ocurrió un error al obtener el valor de la UMA.")
Return retorno Return retorno
End Function End Function
Public Function GetEfectivaleXLS(CvePeriodo As Int32, CveEmpresa As Int32, CvePersonal As Int32) As Boolean
Dim retorno As Boolean = False
DataAdapter("PA_Nom_EfectivaleXLSGet", CommandType.StoredProcedure)
With SqlAdapter.SelectCommand.Parameters
.Add("@CvePeriodo", SqlDbType.Int).Value = CvePeriodo
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal
End With
Try
SqlAdapter.Fill(Data)
retorno = True
Catch ex As Exception
OnError("Ocurrió un error al obtener el layout de nóminas(Efetivale).", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return retorno
End Function
'Public Function GetDispersionnominaXLS(CvePeriodo As Int32, CveEmpresa As Int32) As Boolean 'Public Function GetDispersionnominaXLS(CvePeriodo As Int32, CveEmpresa As Int32) As Boolean
' Dim retorno As Boolean = False ' Dim retorno As Boolean = False
' DataAdapter("PA_Nom_DispersionnominaXLS", CommandType.StoredProcedure) ' DataAdapter("PA_Nom_DispersionnominaXLS", CommandType.StoredProcedure)
@@ -657,9 +673,9 @@ Public Class ClsNominas
' End Try ' End Try
' Return retorno ' Return retorno
'End Function 'End Function
Public Function GetDispersionNomina(CvePeriodo As Int32, CveEmpresa As Int32, CveSATBanco As Int32) As Boolean Public Function GetDispersionnomina(CvePeriodo As Int32, CveEmpresa As Int32, CveSATBanco As Int32) As Boolean
Dim retorno As Boolean = False Dim retorno As Boolean = False
DataAdapter("PA_Nom_DispersionNomina", CommandType.StoredProcedure) DataAdapter("PA_Nom_Dispersionnomina", CommandType.StoredProcedure)
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@CvePeriodo", SqlDbType.Int).Value = CvePeriodo .Add("@CvePeriodo", SqlDbType.Int).Value = CvePeriodo
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
@@ -1456,7 +1472,7 @@ Public Class ClsNominas
Public Function AddConcepto(Codigo As String, Concepto As String, Tipo As String, Formula As String, Sistema As Boolean, Estado As Boolean, CveConceptoPadre As Integer, CveUsuario As Integer, CveEmpresa As Integer, Public Function AddConcepto(Codigo As String, Concepto As String, Tipo As String, Formula As String, Sistema As Boolean, Estado As Boolean, CveConceptoPadre As Integer, CveUsuario As Integer, CveEmpresa As Integer,
EsRetencion As Boolean, CveClasificacion As Integer, CveTipoGasto As Integer, TipoCalculo As Boolean, CveConceptoContable As Integer, EsRetencion As Boolean, CveClasificacion As Integer, CveTipoGasto As Integer, TipoCalculo As Boolean, CveConceptoContable As Integer,
AplicaFiniquito As Integer, AutomaticoGlobal As Integer, Especie As Integer, Imprimir As Integer, CveSATConcepto As Integer, AplicaFiniquito As Integer, AutomaticoGlobal As Integer, Especie As Integer, Imprimir As Integer, CveSATConcepto As Integer,
ctaImporteNegativoProv As Integer, contabiliza As Integer, CargoOAbono As Integer, cveConceptoContableB As Integer, CveCuentaB As Integer, CveConceptoContablePasivo As Integer) As Integer ctaImporteNegativoProv As Integer, contabiliza As Integer, CargoOAbono As Integer, cveConceptoContableB As Integer, CveCuentaB As Integer, CveConceptoContablePasivo As Integer, Optional AplicaEfectivale As Integer = 0) As Integer
Dim Retorno As Integer = -1 Dim Retorno As Integer = -1
DataAdapter("PA_Nom_ConceptosAdd") DataAdapter("PA_Nom_ConceptosAdd")
@@ -1489,6 +1505,7 @@ Public Class ClsNominas
.Add("CveConceptoContableB", SqlDbType.Int).Value = cveConceptoContableB .Add("CveConceptoContableB", SqlDbType.Int).Value = cveConceptoContableB
.Add("CveCuentaB", SqlDbType.Int).Value = CveCuentaB .Add("CveCuentaB", SqlDbType.Int).Value = CveCuentaB
.Add("CveConceptoContablePasivo", SqlDbType.Int).Value = CveConceptoContablePasivo .Add("CveConceptoContablePasivo", SqlDbType.Int).Value = CveConceptoContablePasivo
.Add("AplicaEfectivale", SqlDbType.Int).Value = AplicaEfectivale
End With End With
@@ -1515,7 +1532,8 @@ Public Class ClsNominas
Public Function UpdateConcepto(Codigo As String, Concepto As String, Tipo As String, Formula As String, Sistema As Boolean, Estado As Boolean, CveConceptoPadre As Integer, CveConcepto As Integer, Public Function UpdateConcepto(Codigo As String, Concepto As String, Tipo As String, Formula As String, Sistema As Boolean, Estado As Boolean, CveConceptoPadre As Integer, CveConcepto As Integer,
EsRetencion As Boolean, CveClasificacion As Integer, CveTipoGasto As Integer, TipoCalculo As Boolean, CveConceptoContable As Integer, EsRetencion As Boolean, CveClasificacion As Integer, CveTipoGasto As Integer, TipoCalculo As Boolean, CveConceptoContable As Integer,
AplicaFiniquito As Integer, AutomaticoGlobal As Integer, Especie As Integer, Imprimir As Integer, CveSATConcepto As Integer, CveEmpresa As Integer, AplicaFiniquito As Integer, AutomaticoGlobal As Integer, Especie As Integer, Imprimir As Integer, CveSATConcepto As Integer, CveEmpresa As Integer,
ctaImporteNegativoProv As Integer, contabiliza As Integer, CargoOAbono As Integer, cveConceptoContableB As Integer, CveCuentaB As Integer, CveConceptoContablePasivo As Integer) As Boolean ctaImporteNegativoProv As Integer, contabiliza As Integer, CargoOAbono As Integer, cveConceptoContableB As Integer, CveCuentaB As Integer,
CveConceptoContablePasivo As Integer, Optional AplicaEfectivale As Integer = 0) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_Nom_ConceptosUpdate") DataAdapter("PA_Nom_ConceptosUpdate")
@@ -1547,6 +1565,7 @@ Public Class ClsNominas
.Add("CveConceptoContableB", SqlDbType.Int).Value = cveConceptoContableB .Add("CveConceptoContableB", SqlDbType.Int).Value = cveConceptoContableB
.Add("CveCuentaB", SqlDbType.Int).Value = CveCuentaB .Add("CveCuentaB", SqlDbType.Int).Value = CveCuentaB
.Add("CveConceptoContablePasivo", SqlDbType.Int).Value = CveConceptoContablePasivo .Add("CveConceptoContablePasivo", SqlDbType.Int).Value = CveConceptoContablePasivo
.Add("AplicaEfectivale", SqlDbType.Int).Value = AplicaEfectivale
End With End With
Try Try

View File

@@ -2552,12 +2552,10 @@ concep.DescripcionesEspecificas.NumeroSerie)
Dim Carta As CFDICartaPorte = ObjCFDITimbre.Complementos.CartaPorte Dim Carta As CFDICartaPorte = ObjCFDITimbre.Complementos.CartaPorte
If UsuarioActual.CveEmpresa.Contiene(1, 140) Then ''DATOS GENERALES
''DATOS GENERALES cfdi.CartaPorte31("", Carta.TranspInternac, Carta.EntradaSalidaMercancia, Carta.PaisOrigenDestino, Carta.ViaEntradaSalida, Carta.TotalDistanciaRecorrida, Carta.RegistroISTMO, Carta.UbicacionPoloOrigen, Carta.UbicacionPoloDestino)
cfdi.CartaPorte31("", Carta.TranspInternac, Carta.EntradaSalidaMercancia, Carta.PaisOrigenDestino, Carta.ViaEntradaSalida, Carta.TotalDistanciaRecorrida, Carta.RegistroISTMO, Carta.UbicacionPoloOrigen, Carta.UbicacionPoloDestino) 'UBICACIONES
If Carta.Ubicaciones IsNot Nothing AndAlso Carta.Ubicaciones.Count > 0 Then
'UBICACIONES
If Carta.Ubicaciones IsNot Nothing AndAlso Carta.Ubicaciones.Count > 0 Then
For Each ubica As CFDICartaPorteUbicacion In Carta.Ubicaciones For Each ubica As CFDICartaPorteUbicacion In Carta.Ubicaciones
'origen 'origen
cfdi.CartaPorte31Ubicacion(ubica.TipoUbicacion, ubica.IDUbicacion, ubica.RFCRemitenteDestinatario, ubica.NombreRemitenteDestinatario, ubica.NumRegIdTrib, ubica.ResidenciaFiscal, ubica.NumEstacion, ubica.NombreEstacion, ubica.NavegacionTrafico, ubica.FechaHoraSalidaLlegada, ubica.TipoEstacion, ubica.DistanciaRecorrida) cfdi.CartaPorte31Ubicacion(ubica.TipoUbicacion, ubica.IDUbicacion, ubica.RFCRemitenteDestinatario, ubica.NombreRemitenteDestinatario, ubica.NumRegIdTrib, ubica.ResidenciaFiscal, ubica.NumEstacion, ubica.NombreEstacion, ubica.NavegacionTrafico, ubica.FechaHoraSalidaLlegada, ubica.TipoEstacion, ubica.DistanciaRecorrida)
@@ -2566,123 +2564,56 @@ concep.DescripcionesEspecificas.NumeroSerie)
Next Next
End If End If
'MERCANCIAS 'MERCANCIAS
If Carta.Mercancias IsNot Nothing Then If Carta.Mercancias IsNot Nothing Then
cfdi.CartaPorte31Mercancias(Carta.Mercancias.PesoBrutoTotal, Carta.Mercancias.UnidadPeso, Carta.Mercancias.PesoNetoTotal, Carta.Mercancias.NumTotalMercancias, Carta.Mercancias.CargoporTasacion, Carta.Mercancias.LogisticaInversaRecoleccionDevolucion) cfdi.CartaPorte31Mercancias(Carta.Mercancias.PesoBrutoTotal, Carta.Mercancias.UnidadPeso, Carta.Mercancias.PesoNetoTotal, Carta.Mercancias.NumTotalMercancias, Carta.Mercancias.CargoporTasacion, Carta.Mercancias.LogisticaInversaRecoleccionDevolucion)
If Carta.Mercancias IsNot Nothing AndAlso Carta.Mercancias.Mercancias.Count > 0 Then If Carta.Mercancias IsNot Nothing AndAlso Carta.Mercancias.Mercancias.Count > 0 Then
For Each concep As CFDICartaPorteMercancia In Carta.Mercancias.Mercancias For Each concep As CFDICartaPorteMercancia In Carta.Mercancias.Mercancias
If concep.ValorMercancia <= 0 Then concep.Moneda = "" If concep.ValorMercancia <= 0 Then concep.Moneda = ""
cfdi.CartaPorte31Mercancia(concep.BienesTransp, concep.ClaveSTCC, concep.Descripción, concep.Cantidad, concep.ClaveUnidad, concep.Unidad, concep.Dimensiones, concep.MaterialPeligroso, concep.ClaveMaterialPeligroso, If(concep.ClaveMaterialPeligroso <> "", concep.Embalaje, ""), If(concep.ClaveMaterialPeligroso <> "", concep.DescripEmbalaje, ""), cfdi.CartaPorte31Mercancia(concep.BienesTransp, concep.ClaveSTCC, concep.Descripción, concep.Cantidad, concep.ClaveUnidad, concep.Unidad, concep.Dimensiones, concep.MaterialPeligroso, concep.ClaveMaterialPeligroso, If(concep.ClaveMaterialPeligroso <> "", concep.Embalaje, ""), If(concep.ClaveMaterialPeligroso <> "", concep.DescripEmbalaje, ""),
concep.SectorCOFEPRIS, concep.NombreIngredienteActivo, concep.NomQuimico, concep.DenominacionGenericaProd, concep.DenominacionDistintivaProd, concep.Fabricante, concep.FechaCaducidad, concep.LoteMedicamento, concep.FormaFarmaceutica, concep.CondicionesEspTransp, concep.RegistroSanitarioFolioAutorizacion, concep.SectorCOFEPRIS, concep.NombreIngredienteActivo, concep.NomQuimico, concep.DenominacionGenericaProd, concep.DenominacionDistintivaProd, concep.Fabricante, concep.FechaCaducidad, concep.LoteMedicamento, concep.FormaFarmaceutica, concep.CondicionesEspTransp, concep.RegistroSanitarioFolioAutorizacion,
If(Carta.TranspInternac <> "No", concep.PermisoImportacion, ""), If(Carta.TranspInternac <> "No", concep.FolioImpoVUCEM, ""), concep.NumCAS, If(Carta.TranspInternac <> "No", concep.RazonSocialEmpImp, ""), concep.NumRegSanPlagCOFEPRIS, concep.DatosFabricante, concep.DatosFormulador, concep.DatosMaquilador, concep.UsoAutorizado, If(Carta.TranspInternac <> "No", concep.PermisoImportacion, ""), If(Carta.TranspInternac <> "No", concep.FolioImpoVUCEM, ""), concep.NumCAS, If(Carta.TranspInternac <> "No", concep.RazonSocialEmpImp, ""), concep.NumRegSanPlagCOFEPRIS, concep.DatosFabricante, concep.DatosFormulador, concep.DatosMaquilador, concep.UsoAutorizado,
concep.PesoenKg, concep.ValorMercancia, concep.Moneda, concep.FraccionArrancelaria, concep.UUIDComercioExt, concep.TipoMateria, If(concep.TipoMateria = "05", concep.TipoMateriaDescripcion, "")) concep.PesoenKg, concep.ValorMercancia, concep.Moneda, concep.FraccionArrancelaria, concep.UUIDComercioExt, concep.TipoMateria, If(concep.TipoMateria = "05", concep.TipoMateriaDescripcion, ""))
For Each transp As CFDICartaPorteMercanciaTransporta In concep.MercanciasCantidadTransporta For Each transp As CFDICartaPorteMercanciaTransporta In concep.MercanciasCantidadTransporta
cfdi.CartaPorte31CantidadTransporta(transp.Cantidad, transp.IDOrigen, transp.IDDestino, transp.CvesTransportes) cfdi.CartaPorte31CantidadTransporta(transp.Cantidad, transp.IDOrigen, transp.IDDestino, transp.CvesTransportes)
Next
Next Next
End If
End If
'
If Carta.FiguraTransporte IsNot Nothing Then
If Carta.FiguraTransporte.AutoTransporte IsNot Nothing Then
cfdi.CartaPorte31Autotransporte(Carta.FiguraTransporte.AutoTransporte.PermisoSCT, Carta.FiguraTransporte.AutoTransporte.NumPermisoSCT)
cfdi.CartaPorte31IdentificacionVehicular(Carta.FiguraTransporte.AutoTransporte.Vehiculo.ConfigVehicular, Carta.FiguraTransporte.AutoTransporte.Vehiculo.PesoBrutoVehicular, Carta.FiguraTransporte.AutoTransporte.Vehiculo.PlacaVM, Carta.FiguraTransporte.AutoTransporte.Vehiculo.AnioModeloVM)
If Carta.Mercancias.Mercancias.Max(Function(x) x.MaterialPeligroso) = "" Then 'si no hay material peligro se limpian los valores
Carta.FiguraTransporte.AutoTransporte.NombreSeguroMedioAmbiente = ""
Carta.FiguraTransporte.AutoTransporte.PolizaSeguroMedioAmbiente = ""
End If
cfdi.CartaPorte31Seguros(Carta.FiguraTransporte.AutoTransporte.NombreSeguroResponsabilidadCivil, Carta.FiguraTransporte.AutoTransporte.PolizaSeguroResponsabilidadCivil,
Carta.FiguraTransporte.AutoTransporte.NombreSeguroMedioAmbiente, Carta.FiguraTransporte.AutoTransporte.PolizaSeguroMedioAmbiente,
Carta.FiguraTransporte.AutoTransporte.NombreSeguroCarga, Carta.FiguraTransporte.AutoTransporte.PolizaSeguroCarga,
Carta.FiguraTransporte.AutoTransporte.PrimaSeguro)
If Carta.FiguraTransporte.AutoTransporte.Remolques IsNot Nothing AndAlso Carta.FiguraTransporte.AutoTransporte.Remolques.Count > 0 Then
For Each concep As CFDICartaPorteRemolque In Carta.FiguraTransporte.AutoTransporte.Remolques
cfdi.CartaPorte31Remolque(concep.SubTipoRemolque, concep.Placa)
Next
End If
End If
If Carta.FiguraTransporte.Operadores IsNot Nothing AndAlso Carta.FiguraTransporte.Operadores.Count > 0 Then
For Each concep As CFDICartaPorteOperador In Carta.FiguraTransporte.Operadores
cfdi.CartaPorte31TiposFigura(concep.TipoFigura, concep.RFCFigura, concep.NumLicencia, concep.NombreFigura, concep.NumRegidTribFigura, If(concep.ResidenciaFiscalFigura <> "MEX", concep.ResidenciaFiscalFigura, ""))
If concep.TipoFigura.Contiene("02", "03") Then ' “02”- Propietario o “03” -Arrendador
cfdi.CartaPorte31PartesTransporte("PT01")
cfdi.CartaPorte31PartesTransporteDomicilio(concep.Domicilio.Calle, concep.Domicilio.NumeroExterior, concep.Domicilio.NumeroInterior, concep.Domicilio.Colonia, concep.Domicilio.Localidad, concep.Domicilio.Referencia, concep.Domicilio.Municipio, concep.Domicilio.Estado, concep.Domicilio.Pais, concep.Domicilio.CP)
End If
Next
End If
End If
Else
''DATOS GENERALES
cfdi.CartaPorte30("", Carta.TranspInternac, Carta.RegimenAduanero, Carta.EntradaSalidaMercancia, Carta.PaisOrigenDestino, Carta.ViaEntradaSalida, Carta.TotalDistanciaRecorrida, Carta.RegistroISTMO, Carta.UbicacionPoloOrigen, Carta.UbicacionPoloDestino)
'UBICACIONES
If Carta.Ubicaciones IsNot Nothing AndAlso Carta.Ubicaciones.Count > 0 Then
For Each ubica As CFDICartaPorteUbicacion In Carta.Ubicaciones
'origen
cfdi.CartaPorte30Ubicacion(ubica.TipoUbicacion, ubica.IDUbicacion, ubica.RFCRemitenteDestinatario, ubica.NombreRemitenteDestinatario, ubica.NumRegIdTrib, ubica.ResidenciaFiscal, ubica.NumEstacion, ubica.NombreEstacion, ubica.NavegacionTrafico, ubica.FechaHoraSalidaLlegada, ubica.TipoEstacion, ubica.DistanciaRecorrida)
'cfdi.CartaPorteOrigen(ubica.Origen.IDOrigen, ubica.Origen.RFCRemitente, ubica.Origen.NombreRemitente, ubica.NumRegIdTrib, ubica.Origen.ResidenciaFiscal, ubica.Origen.NumEstacion, ubica.Origen.NombreEstacion, ubica.Origen.NavegacionTrafico, ubica.Origen.FechaHoraSalida)
cfdi.CartaPorte30Domicilio(ubica.Domicilio.Calle, ubica.Domicilio.NumeroExterior, ubica.Domicilio.NumeroInterior, ubica.Domicilio.Colonia, ubica.Domicilio.Localidad, ubica.Domicilio.Referencia, ubica.Domicilio.Municipio, ubica.Domicilio.Estado, ubica.Domicilio.Pais, ubica.Domicilio.CP)
Next Next
End If End If
End If
'
If Carta.FiguraTransporte IsNot Nothing Then
'MERCANCIAS If Carta.FiguraTransporte.AutoTransporte IsNot Nothing Then
If Carta.Mercancias IsNot Nothing Then
cfdi.CartaPorte30Mercancias(Carta.Mercancias.PesoBrutoTotal, Carta.Mercancias.UnidadPeso, Carta.Mercancias.PesoNetoTotal, Carta.Mercancias.NumTotalMercancias, Carta.Mercancias.CargoporTasacion, Carta.Mercancias.LogisticaInversaRecoleccionDevolucion) cfdi.CartaPorte31Autotransporte(Carta.FiguraTransporte.AutoTransporte.PermisoSCT, Carta.FiguraTransporte.AutoTransporte.NumPermisoSCT)
If Carta.Mercancias IsNot Nothing AndAlso Carta.Mercancias.Mercancias.Count > 0 Then
For Each concep As CFDICartaPorteMercancia In Carta.Mercancias.Mercancias cfdi.CartaPorte31IdentificacionVehicular(Carta.FiguraTransporte.AutoTransporte.Vehiculo.ConfigVehicular, Carta.FiguraTransporte.AutoTransporte.Vehiculo.PesoBrutoVehicular, Carta.FiguraTransporte.AutoTransporte.Vehiculo.PlacaVM, Carta.FiguraTransporte.AutoTransporte.Vehiculo.AnioModeloVM)
If concep.ValorMercancia <= 0 Then concep.Moneda = ""
cfdi.CartaPorte30Mercancia(concep.BienesTransp, concep.ClaveSTCC, concep.Descripción, concep.Cantidad, concep.ClaveUnidad, concep.Unidad, concep.Dimensiones, concep.MaterialPeligroso, concep.ClaveMaterialPeligroso, If(concep.ClaveMaterialPeligroso <> "", concep.Embalaje, ""), If(concep.ClaveMaterialPeligroso <> "", concep.DescripEmbalaje, ""), If Carta.Mercancias.Mercancias.Max(Function(x) x.MaterialPeligroso) = "" Then 'si no hay material peligro se limpian los valores
concep.SectorCOFEPRIS, concep.NombreIngredienteActivo, concep.NomQuimico, concep.DenominacionGenericaProd, concep.DenominacionDistintivaProd, concep.Fabricante, concep.FechaCaducidad, concep.LoteMedicamento, concep.FormaFarmaceutica, concep.CondicionesEspTransp, concep.RegistroSanitarioFolioAutorizacion, Carta.FiguraTransporte.AutoTransporte.NombreSeguroMedioAmbiente = ""
If(Carta.TranspInternac <> "No", concep.PermisoImportacion, ""), If(Carta.TranspInternac <> "No", concep.FolioImpoVUCEM, ""), concep.NumCAS, If(Carta.TranspInternac <> "No", concep.RazonSocialEmpImp, ""), concep.NumRegSanPlagCOFEPRIS, concep.DatosFabricante, concep.DatosFormulador, concep.DatosMaquilador, concep.UsoAutorizado, Carta.FiguraTransporte.AutoTransporte.PolizaSeguroMedioAmbiente = ""
concep.PesoenKg, concep.ValorMercancia, concep.Moneda, concep.FraccionArrancelaria, concep.UUIDComercioExt, concep.TipoMateria, If(concep.TipoMateria = "05", concep.TipoMateriaDescripcion, "")) End If
For Each transp As CFDICartaPorteMercanciaTransporta In concep.MercanciasCantidadTransporta
cfdi.CartaPorte30CantidadTransporta(transp.Cantidad, transp.IDOrigen, transp.IDDestino, transp.CvesTransportes) cfdi.CartaPorte31Seguros(Carta.FiguraTransporte.AutoTransporte.NombreSeguroResponsabilidadCivil, Carta.FiguraTransporte.AutoTransporte.PolizaSeguroResponsabilidadCivil,
Next Carta.FiguraTransporte.AutoTransporte.NombreSeguroMedioAmbiente, Carta.FiguraTransporte.AutoTransporte.PolizaSeguroMedioAmbiente,
Carta.FiguraTransporte.AutoTransporte.NombreSeguroCarga, Carta.FiguraTransporte.AutoTransporte.PolizaSeguroCarga,
Carta.FiguraTransporte.AutoTransporte.PrimaSeguro)
If Carta.FiguraTransporte.AutoTransporte.Remolques IsNot Nothing AndAlso Carta.FiguraTransporte.AutoTransporte.Remolques.Count > 0 Then
For Each concep As CFDICartaPorteRemolque In Carta.FiguraTransporte.AutoTransporte.Remolques
cfdi.CartaPorte31Remolque(concep.SubTipoRemolque, concep.Placa)
Next Next
End If End If
End If End If
'
If Carta.FiguraTransporte IsNot Nothing Then
If Carta.FiguraTransporte.AutoTransporte IsNot Nothing Then If Carta.FiguraTransporte.Operadores IsNot Nothing AndAlso Carta.FiguraTransporte.Operadores.Count > 0 Then
For Each concep As CFDICartaPorteOperador In Carta.FiguraTransporte.Operadores
cfdi.CartaPorte30Autotransporte(Carta.FiguraTransporte.AutoTransporte.PermisoSCT, Carta.FiguraTransporte.AutoTransporte.NumPermisoSCT) cfdi.CartaPorte31TiposFigura(concep.TipoFigura, concep.RFCFigura, concep.NumLicencia, concep.NombreFigura, concep.NumRegidTribFigura, If(concep.ResidenciaFiscalFigura <> "MEX", concep.ResidenciaFiscalFigura, ""))
If concep.TipoFigura.Contiene("02", "03") Then ' “02”- Propietario o “03” -Arrendador
cfdi.CartaPorte30IdentificacionVehicular(Carta.FiguraTransporte.AutoTransporte.Vehiculo.ConfigVehicular, Carta.FiguraTransporte.AutoTransporte.Vehiculo.PesoBrutoVehicular, Carta.FiguraTransporte.AutoTransporte.Vehiculo.PlacaVM, Carta.FiguraTransporte.AutoTransporte.Vehiculo.AnioModeloVM) cfdi.CartaPorte31PartesTransporte("PT01")
cfdi.CartaPorte31PartesTransporteDomicilio(concep.Domicilio.Calle, concep.Domicilio.NumeroExterior, concep.Domicilio.NumeroInterior, concep.Domicilio.Colonia, concep.Domicilio.Localidad, concep.Domicilio.Referencia, concep.Domicilio.Municipio, concep.Domicilio.Estado, concep.Domicilio.Pais, concep.Domicilio.CP)
If Carta.Mercancias.Mercancias.Max(Function(x) x.MaterialPeligroso) = "" Then 'si no hay material peligro se limpian los valores
Carta.FiguraTransporte.AutoTransporte.NombreSeguroMedioAmbiente = ""
Carta.FiguraTransporte.AutoTransporte.PolizaSeguroMedioAmbiente = ""
End If End If
Next
cfdi.CartaPorte30Seguros(Carta.FiguraTransporte.AutoTransporte.NombreSeguroResponsabilidadCivil, Carta.FiguraTransporte.AutoTransporte.PolizaSeguroResponsabilidadCivil,
Carta.FiguraTransporte.AutoTransporte.NombreSeguroMedioAmbiente, Carta.FiguraTransporte.AutoTransporte.PolizaSeguroMedioAmbiente,
Carta.FiguraTransporte.AutoTransporte.NombreSeguroCarga, Carta.FiguraTransporte.AutoTransporte.PolizaSeguroCarga,
Carta.FiguraTransporte.AutoTransporte.PrimaSeguro)
If Carta.FiguraTransporte.AutoTransporte.Remolques IsNot Nothing AndAlso Carta.FiguraTransporte.AutoTransporte.Remolques.Count > 0 Then
For Each concep As CFDICartaPorteRemolque In Carta.FiguraTransporte.AutoTransporte.Remolques
cfdi.CartaPorte30Remolque(concep.SubTipoRemolque, concep.Placa)
Next
End If
End If
If Carta.FiguraTransporte.Operadores IsNot Nothing AndAlso Carta.FiguraTransporte.Operadores.Count > 0 Then
For Each concep As CFDICartaPorteOperador In Carta.FiguraTransporte.Operadores
cfdi.CartaPorte30TiposFigura(concep.TipoFigura, concep.RFCFigura, concep.NumLicencia, concep.NombreFigura, concep.NumRegidTribFigura, If(concep.ResidenciaFiscalFigura <> "MEX", concep.ResidenciaFiscalFigura, ""))
If concep.TipoFigura.Contiene("02", "03") Then ' “02”- Propietario o “03” -Arrendador
cfdi.CartaPorte30PartesTransporte("PT01")
cfdi.CartaPorte30PartesTransporteDomicilio(concep.Domicilio.Calle, concep.Domicilio.NumeroExterior, concep.Domicilio.NumeroInterior, concep.Domicilio.Colonia, concep.Domicilio.Localidad, concep.Domicilio.Referencia, concep.Domicilio.Municipio, concep.Domicilio.Estado, concep.Domicilio.Pais, concep.Domicilio.CP)
End If
Next
End If
End If End If
End If End If
End If End If

View File

@@ -600,6 +600,9 @@ Namespace Extensiones
<Runtime.CompilerServices.Extension()> <Runtime.CompilerServices.Extension()>
Public Sub OnError(Obj As Object, Mensaje As String, Exeption As Exception, Optional InfoAdicional As String = "", Optional TipoMensaje As TipoMensaje = TipoMensaje.MsgError) Public Sub OnError(Obj As Object, Mensaje As String, Exeption As Exception, Optional InfoAdicional As String = "", Optional TipoMensaje As TipoMensaje = TipoMensaje.MsgError)
GuardaLog(String.Format("{0} DESCRIPCIÓN DETALLADA: {1} {2} {3}", Mensaje, Exeption.ToString, vbCrLf, InfoAdicional)) GuardaLog(String.Format("{0} DESCRIPCIÓN DETALLADA: {1} {2} {3}", Mensaje, Exeption.ToString, vbCrLf, InfoAdicional))
Dim resultado = CLSErrorMessage.GetErrorMesagge(Mensaje, Exeption, TipoMensaje)
Mensaje = resultado.Item1
TipoMensaje = resultado.Item2
Alert(Obj, Mensaje, TipoMensaje) Alert(Obj, Mensaje, TipoMensaje)
If WebConfigurationManager.AppSettings("SiteName") IsNot Nothing AndAlso WebConfigurationManager.AppSettings("SiteName").ToString = "1" Then MandaCorreoError(String.Format("{0} DESCRIPCIÓN DETALLADA: {1} {2} {3}", Mensaje, Exeption.ToString, vbCrLf, InfoAdicional)) If WebConfigurationManager.AppSettings("SiteName") IsNot Nothing AndAlso WebConfigurationManager.AppSettings("SiteName").ToString = "1" Then MandaCorreoError(String.Format("{0} DESCRIPCIÓN DETALLADA: {1} {2} {3}", Mensaje, Exeption.ToString, vbCrLf, InfoAdicional))
End Sub End Sub

View File

@@ -540,15 +540,15 @@
</div> </div>
</div> </div>
<div class="form-group proveedoreespes" runat="server" id="DvDdlRemisionNotaCredito" visible="false" > <%--<div class="form-group proveedoreespes" runat="server" id="DvDdlRemisionNotaCredito" visible="false" >
<span class="whitoutcol proveedoreespes">Remisión Nota de Crédito</span> <span class="whitoutcol proveedoreespes">Remisión Nota de Crédito</span>
<div class="whitoutcol whitoutcol"> <div class="whitoutcol whitoutcol">
<asp:DropDownList ID="DdlRemisionNotaCredito" runat="server" DataTextField="SerieFolio" DataValueField="CveCompra" CssClass="form-control input-sm input-small select2me" AutoPostBack="true" > <asp:DropDownList ID="DdlRemisionNotaCredito" runat="server" DataTextField="SerieFolio" DataValueField="CveCompra" CssClass="form-control input-sm input-small select2me" AutoPostBack="true" >
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem> <asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
<%--<asp:Button ID="Button3" runat="server" Text="Resta" CssClass="default" OnClick="BtnFolioGarantiaRestantes_Click" />--%>
</div> </div>
</div>
</div>--%>
@@ -957,43 +957,46 @@
<asp:UpdatePanel ID="UpGVRemisionesNotaDeCredito" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UpGVRemisionesNotaDeCredito" runat="server" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<div style="width:381px!important">
<asp:GridView ID="GVRemisionesNotaDeCredito" runat="server" CssClass="table table-striped table-hover ScrollAD" Width="380px" AutoGenerateColumns="False" Visible="false"
DataKeyNames="Tipo,CveCompra,Fecha,TipoDocto,SerieFolio,CveIE,Original,Abonado,Saldo,CveProveedor,RazonSocial,Descripcion,CveMoneda,Moneda,Abreviatura,Referencia,CvePersonal,TipoCambio,CveSubProyecto,CveTipoConcepto" ClientIDMode="Static" EmptyDataText="" data-height="200"
GridLines="None">
<Columns>
<asp:TemplateField ItemStyle-Width="40px">
<ItemTemplate>
<asp:CheckBox runat="server" ID="Chk" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-Width="100px">
<HeaderTemplate>Factura</HeaderTemplate>
<ItemTemplate>
<asp:HyperLink ID="HplFactura" runat="server" CssClass="Texto" Text='<%# Eval("SerieFolio") %>' NavigateUrl='<%# Eval("CveCompra", "/Compras/Compras.aspx?CveCompra={0}")%>'></asp:HyperLink>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-Width="80px">
<HeaderTemplate>Fecha</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("Fecha", "{0:d}") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-Width="100px">
<HeaderTemplate>Saldo</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlSaldo" runat="server" Text='<%# Eval("Saldo", "{0:N2}") %>'></asp:Literal>
</ItemTemplate>
<ItemStyle HorizontalAlign="Right"></ItemStyle>
</asp:TemplateField>
<asp:TemplateField ItemStyle-Width="60px">
<HeaderTemplate>Moneda</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlMoneda" runat="server" Text='<%# Eval("Abreviatura") %>'></asp:Literal>&nbsp;
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</div>
<asp:GridView ID="GVRemisionesNotaDeCredito" runat="server" CssClass="table table-striped table-hover ScrollAD" Width="100%" AutoGenerateColumns="False" Visible="false"
DataKeyNames="Tipo,CveCompra,Fecha,TipoDocto,SerieFolio,CveIE,Original,Abonado,Saldo,CveProveedor,RazonSocial,Descripcion,CveMoneda,Moneda,Abreviatura,Referencia,CvePersonal,TipoCambio,CveSubProyecto,CveTipoConcepto" ClientIDMode="Static" EmptyDataText="" data-height="200"
GridLines="None">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:CheckBox runat="server" ID="Chk" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>Factura</HeaderTemplate>
<ItemTemplate>
<asp:HyperLink ID="HplFactura" runat="server" CssClass="Texto" Text='<%# Eval("SerieFolio") %>' NavigateUrl='<%# Eval("CveCompra", "/Compras/Compras.aspx?CveCompra={0}")%>'></asp:HyperLink>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>Fecha</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("Fecha", "{0:d}") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>Saldo</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlSaldo" runat="server" Text='<%# Eval("Saldo", "{0:N2}") %>'></asp:Literal>
</ItemTemplate>
<ItemStyle Width="80px" HorizontalAlign="Right"></ItemStyle>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>Mon</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlMoneda" runat="server" Text='<%# Eval("Moneda") %>'></asp:Literal>&nbsp;
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>

View File

@@ -12,6 +12,7 @@ Imports Extensiones
Imports MoreLinq Imports MoreLinq
Imports System.Data.SqlClient Imports System.Data.SqlClient
Imports ClsPaginas Imports ClsPaginas
Imports System.Activities.Expressions
Partial Class Compras_Compras Partial Class Compras_Compras
Inherits ClsPaginas Inherits ClsPaginas
@@ -1225,6 +1226,17 @@ Partial Class Compras_Compras
#End Region #End Region
'Public Property ListaFacturasRealcionadasRNC As List(Of String)
' Get
' If ViewState("ListaFacturasRealcionadasRNC") Is Nothing Then
' ViewState("ListaFacturasRealcionadasRNC") = New List(Of String)
' End If
' Return DirectCast(ViewState("ListaFacturasRealcionadasRNC"), List(Of String))
' End Get
' Set(value As List(Of String))
' ViewState("ListaFacturasRealcionadasRNC") = value
' End Set
'End Property
@@ -1648,8 +1660,8 @@ Partial Class Compras_Compras
End If End If
'SE OCUPAN AFUERA DEL POSTBACK ?? 'SE OCUPAN AFUERA DEL POSTBACK ??
cargaddlVinculacionServcios() cargaddlVinculacionServcios()
If UsuarioActual.TienePermisoProceso(117) Then If UsuarioActual.TienePermisoProceso(117) Then
HplAddClasificacion.Visible = False HplAddClasificacion.Visible = False
@@ -1686,28 +1698,28 @@ Partial Class Compras_Compras
DdlTipoCompra_SelectedIndexChanged(Nothing, Nothing) DdlTipoCompra_SelectedIndexChanged(Nothing, Nothing)
For Each gvRow As GridViewRow In GvFacturaNC.Rows 'For Each gvRow As GridViewRow In GvFacturaNC.Rows
If gvRow.DataKey("CveCompra").ToEntero > 0 AndAlso gvRow.FCCheckBox("ChkFacturaNC").Checked Then ' If gvRow.DataKey("CveCompra").ToEntero > 0 AndAlso gvRow.FCCheckBox("ChkFacturaNC").Checked Then
Dim SerieFolioFacura As String = ObtenerUltimaParte(gvRow.DataKey("SerieFolio")) ' Dim SerieFolioFacura As String = ObtenerUltimaParte(gvRow.DataKey("SerieFolio"))
Dim seleccion As String = "" ' Dim seleccion As String = ""
For Each item As ListItem In DdlRemisionNotaCredito.Items ' For Each item As ListItem In DdlRemisionNotaCredito.Items
Dim serieFolioItem As String = ObtenerUltimaParte(item.Text) ' Dim serieFolioItem As String = ObtenerUltimaParte(item.Text)
If SerieFolioFacura = serieFolioItem Then ' If SerieFolioFacura = serieFolioItem Then
'seleccion = item.Value ' 'seleccion = item.Value
AutoSelRNC = True ' AutoSelRNC = True
DdlRemisionNotaCredito.SelectedValueExist(item.Value) ' DdlRemisionNotaCredito.SelectedValueExist(item.Value)
Exit For ' Exit For
End If ' End If
Next ' Next
If AutoSelRNC Then ' If AutoSelRNC Then
Exit For ' Exit For
End If ' End If
End If ' End If
Next 'Next
If AutoSelRNC Then If AutoSelRNC Then
'DdlRemisionNotaCredito_SelectedIndexChanged(Nothing, Nothing) 'DdlRemisionNotaCredito_SelectedIndexChanged(Nothing, Nothing)
@@ -19747,11 +19759,10 @@ Partial Class Compras_Compras
If DdlTipoComprobante.SelectedValue = "NC" Then If DdlTipoComprobante.SelectedValue = "NC" Then
CargaGVRemisionNotaCredito() CargaGVRemisionNotaCredito()
'bloquear la vinculación a la compra
HLAplicaNCFact.Visible = False HLAplicaNCFact.Visible = False
Else Else
Alert("Para elegir Remisión de Nota de Crédito el tipo de documento debe de ser Nota de Crédito.", TipoMensaje.MsgAdvertencia) Alert("Para elegir Remisión de Nota de Crédito el tipo de documento debe de ser Nota de Crédito.", TipoMensaje.MsgAdvertencia)
DdlRemisionNotaCredito.SelectedValueExist(-1) 'DdlRemisionNotaCredito.SelectedValueExist(-1)
DdlTipoCompra.SelectedValueExist(-1) DdlTipoCompra.SelectedValueExist(-1)
End If End If
End If End If
@@ -20414,6 +20425,7 @@ Partial Class Compras_Compras
End Function End Function
Private Sub NCSeleccionFacturasRelacionadas(UUIDSListRelacionados As List(Of String)) Private Sub NCSeleccionFacturasRelacionadas(UUIDSListRelacionados As List(Of String))
'ListaFacturasRealcionadasRNC.Clear()
If UUIDSListRelacionados.Count > 0 Then If UUIDSListRelacionados.Count > 0 Then
Dim SaldoNota As Decimal = TxtTotal.Text.ToDecimal Dim SaldoNota As Decimal = TxtTotal.Text.ToDecimal
@@ -20449,17 +20461,20 @@ Partial Class Compras_Compras
SaldoNotaPorAplicar = SaldoNotaPorAplicar - SaldoFactura SaldoNotaPorAplicar = SaldoNotaPorAplicar - SaldoFactura
GvRow.FCTextBox("TxtImporte").Text = SaldoFactura.FormatoNumero GvRow.FCTextBox("TxtImporte").Text = SaldoFactura.FormatoNumero
GvRow.FCCheckBox("ChkFacturaNC").Checked = True GvRow.FCCheckBox("ChkFacturaNC").Checked = True
'ListaFacturasRealcionadasRNC.Add(GvRow.DataKey("CveCompra"))
Else Else
If SaldoFactura >= SaldoNotaPorAplicar Then If SaldoFactura >= SaldoNotaPorAplicar Then
GvRow.FCTextBox("TxtImporte").Text = SaldoNotaPorAplicar.FormatoNumero GvRow.FCTextBox("TxtImporte").Text = SaldoNotaPorAplicar.FormatoNumero
GvRow.FCCheckBox("ChkFacturaNC").Checked = True GvRow.FCCheckBox("ChkFacturaNC").Checked = True
'ListaFacturasRealcionadasRNC.Add(GvRow.DataKey("CveCompra"))
SaldoNotaPorAplicar = 0 SaldoNotaPorAplicar = 0
TeminarAmortizacion = True TeminarAmortizacion = True
Else Else
GvRow.FCTextBox("TxtImporte").Text = SaldoFactura.FormatoNumero GvRow.FCTextBox("TxtImporte").Text = SaldoFactura.FormatoNumero
GvRow.FCCheckBox("ChkFacturaNC").Checked = True GvRow.FCCheckBox("ChkFacturaNC").Checked = True
'ListaFacturasRealcionadasRNC.Add(GvRow.DataKey("CveCompra"))
SaldoNotaPorAplicar = SaldoNotaPorAplicar - SaldoFactura SaldoNotaPorAplicar = SaldoNotaPorAplicar - SaldoFactura
TeminarAmortizacion = True TeminarAmortizacion = True
@@ -21168,13 +21183,23 @@ Partial Class Compras_Compras
End Sub End Sub
Private Sub CargaGVRemisionNotaCredito() Private Sub CargaGVRemisionNotaCredito()
DvDdlRemisionNotaCredito.Visible = True 'DvDdlRemisionNotaCredito.Visible = True
DTRemisionesNotaDeCredito = New DataTable DTRemisionesNotaDeCredito = New DataTable
GVRemisionesNotaDeCredito.DataSource = Nothing GVRemisionesNotaDeCredito.DataSource = Nothing
GVRemisionesNotaDeCredito.Visible = False GVRemisionesNotaDeCredito.Visible = False
Dim CveComprasAmortizadas As New List(Of String)
For Each gvRow As GridViewRow In GvFacturaNC.Rows
If gvRow.DataKey("CveCompra").ToEntero > 0 AndAlso gvRow.FCCheckBox("ChkFacturaNC").Checked Then
CveComprasAmortizadas.Add(gvRow.DataKey("CveCompra"))
gvRow.FCCheckBox("ChkFacturaNC").Checked = False
End If
Next
Dim ObjCompras As New ClsCompras Dim ObjCompras As New ClsCompras
If ObjCompras.GetNotasCreditoRep(DdlProveedor.SelectedValue.ToEntero, 0, "-1", "-1", UsuarioActual.CveEmpresa, 2) Then If ObjCompras.GetNotasCreditoRep(DdlProveedor.SelectedValue.ToEntero, 0, "-1", "-1", UsuarioActual.CveEmpresa, 2, String.Join(",", CveComprasAmortizadas)) Then
'DdlRemisionNotaCredito.DataSource = ObjCompras.DtResultados 'DdlRemisionNotaCredito.DataSource = ObjCompras.DtResultados
DTRemisionesNotaDeCredito = ObjCompras.DtResultados DTRemisionesNotaDeCredito = ObjCompras.DtResultados
GVRemisionesNotaDeCredito.DataSource = DTRemisionesNotaDeCredito GVRemisionesNotaDeCredito.DataSource = DTRemisionesNotaDeCredito

View File

@@ -1754,7 +1754,7 @@
<TextRun> <TextRun>
<Value xml:space="preserve"> </Value> <Value xml:space="preserve"> </Value>
<Style> <Style>
<FontFamily>Myriad Pro Light</FontFamily> <FontFamily>Calibri</FontFamily>
<FontSize>9.16pt</FontSize> <FontSize>9.16pt</FontSize>
<FontWeight>SemiBold</FontWeight> <FontWeight>SemiBold</FontWeight>
</Style> </Style>
@@ -1762,7 +1762,7 @@
<TextRun> <TextRun>
<Value>=IIF(LEN(Parameters!SubProyectoEntrega.Value) &gt; 0,"Lugar de Entrega: " + Parameters!SubProyectoEntrega.Value,"")</Value> <Value>=IIF(LEN(Parameters!SubProyectoEntrega.Value) &gt; 0,"Lugar de Entrega: " + Parameters!SubProyectoEntrega.Value,"")</Value>
<Style> <Style>
<FontFamily>Myriad Pro Light</FontFamily> <FontFamily>Calibri</FontFamily>
<FontSize>9.16pt</FontSize> <FontSize>9.16pt</FontSize>
<FontWeight>SemiBold</FontWeight> <FontWeight>SemiBold</FontWeight>
</Style> </Style>
@@ -1770,7 +1770,7 @@
<TextRun> <TextRun>
<Value xml:space="preserve"> </Value> <Value xml:space="preserve"> </Value>
<Style> <Style>
<FontFamily>Myriad Pro Light</FontFamily> <FontFamily>Calibri</FontFamily>
<FontSize>9.16pt</FontSize> <FontSize>9.16pt</FontSize>
<FontWeight>SemiBold</FontWeight> <FontWeight>SemiBold</FontWeight>
</Style> </Style>
@@ -1785,8 +1785,8 @@
<TextRun> <TextRun>
<Value>=Parameters!SubProyectoEntregaDir.Value</Value> <Value>=Parameters!SubProyectoEntregaDir.Value</Value>
<Style> <Style>
<FontFamily>Myriad Pro Light</FontFamily> <FontFamily>Calibri</FontFamily>
<FontSize>9pt</FontSize> <FontSize>8.5pt</FontSize>
<FontWeight>Normal</FontWeight> <FontWeight>Normal</FontWeight>
</Style> </Style>
</TextRun> </TextRun>
@@ -1867,7 +1867,7 @@
<Value>=Parameters!RFC.Value</Value> <Value>=Parameters!RFC.Value</Value>
<Style> <Style>
<FontFamily>calibri</FontFamily> <FontFamily>calibri</FontFamily>
<FontSize>9pt</FontSize> <FontSize>8.5pt</FontSize>
<FontWeight>Normal</FontWeight> <FontWeight>Normal</FontWeight>
</Style> </Style>
</TextRun> </TextRun>
@@ -1884,7 +1884,7 @@
"(" &amp; Mid(Parameters!Telefono.Value, 1, 3) &amp; ") " &amp; Mid(Parameters!Telefono.Value, 4))</Value> "(" &amp; Mid(Parameters!Telefono.Value, 1, 3) &amp; ") " &amp; Mid(Parameters!Telefono.Value, 4))</Value>
<Style> <Style>
<FontFamily>calibri</FontFamily> <FontFamily>calibri</FontFamily>
<FontSize>9pt</FontSize> <FontSize>8.5pt</FontSize>
<FontWeight>Normal</FontWeight> <FontWeight>Normal</FontWeight>
</Style> </Style>
</TextRun> </TextRun>
@@ -1899,7 +1899,7 @@
<Value>USO CFDI: </Value> <Value>USO CFDI: </Value>
<Style> <Style>
<FontFamily>calibri</FontFamily> <FontFamily>calibri</FontFamily>
<FontSize>9pt</FontSize> <FontSize>8.5pt</FontSize>
<FontWeight>Normal</FontWeight> <FontWeight>Normal</FontWeight>
</Style> </Style>
</TextRun> </TextRun>
@@ -1907,7 +1907,7 @@
<Value>=Parameters!UsoCFDI.Value</Value> <Value>=Parameters!UsoCFDI.Value</Value>
<Style> <Style>
<FontFamily>calibri</FontFamily> <FontFamily>calibri</FontFamily>
<FontSize>9pt</FontSize> <FontSize>8.5pt</FontSize>
<FontWeight>Normal</FontWeight> <FontWeight>Normal</FontWeight>
</Style> </Style>
</TextRun> </TextRun>

View File

@@ -424,12 +424,16 @@
</div> </div>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<label class="col-md-3 truncate ">Movimiento Permanente:</label> <label class="col-md-3 truncate ">Movimiento Permanente:</label>
<div class="col-md-3"> <div class="col-md-3">
<asp:CheckBox ID="ChkMovtoPermanente" AutoPostBack="true" OnCheckedChanged="ChkMovtoPermanente_CheckedChanged" CssClass="chksino" Text=" " runat="server" /> <asp:CheckBox ID="ChkMovtoPermanente" AutoPostBack="true" OnCheckedChanged="ChkMovtoPermanente_CheckedChanged" CssClass="chksino" Text=" " runat="server" />
</div> </div>
<label class="col-md-3 truncate ">Aplica EfectiVale:</label>
<div class="col-md-3">
<asp:CheckBox ID="chkAplicaEfectivale" AutoPostBack="true" OnCheckedChanged="chkAplicaEfectivale_CheckedChanged" CssClass="chksino" Text=" " runat="server" />
</div>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -362,7 +362,7 @@ public partial class Nomina_CatConcepto : ClsPaginas
int CveConceptoContablePasivo = DdlConceptoContablePasivo.SelectedValue.ToEntero(); int CveConceptoContablePasivo = DdlConceptoContablePasivo.SelectedValue.ToEntero();
int IdCtaContableB = (DdlCtaContableB.DataValueField == "Id" ? DdlCtaContableB.SelectedValue.ToEntero() : 0); int IdCtaContableB = (DdlCtaContableB.DataValueField == "Id" ? DdlCtaContableB.SelectedValue.ToEntero() : 0);
int CveCuentaB = (DdlCtaContableB.DataValueField == "Id" ? 0 : DdlCtaContableB.SelectedValue.ToEntero()); int CveCuentaB = (DdlCtaContableB.DataValueField == "Id" ? 0 : DdlCtaContableB.SelectedValue.ToEntero());
int AplicaEfectivale = chkAplicaEfectivale.Checked ? 1 : 0;
ClsNominas ObjNomina = new ClsNominas(); ClsNominas ObjNomina = new ClsNominas();
ObjNomina.IniciaTransacSQL(); ObjNomina.IniciaTransacSQL();
@@ -372,7 +372,7 @@ public partial class Nomina_CatConcepto : ClsPaginas
{ {
TieneError = !ObjNomina.UpdateConcepto(codigo, concepto, tipo, formula, sistema, estado, CveConceptoPadre, CveConcepto, retencion, CveClasificacion, TieneError = !ObjNomina.UpdateConcepto(codigo, concepto, tipo, formula, sistema, estado, CveConceptoPadre, CveConcepto, retencion, CveClasificacion,
CveTipoGasto, tipoCalculo, CveConceptoContable, AplicaFiniquito, AutomaticoGlobal, Especie, Imprimir, CveSATConcepto, CveTipoGasto, tipoCalculo, CveConceptoContable, AplicaFiniquito, AutomaticoGlobal, Especie, Imprimir, CveSATConcepto,
UsuarioActual.CveEmpresa, ctaImporteNegativoProv, contabiliza, CargoOAbono, cveConceptoContableB , CveCuentaB, CveConceptoContablePasivo); UsuarioActual.CveEmpresa, ctaImporteNegativoProv, contabiliza, CargoOAbono, cveConceptoContableB , CveCuentaB, CveConceptoContablePasivo, AplicaEfectivale);
if (!TieneError) if (!TieneError)
{ {
@@ -404,7 +404,7 @@ public partial class Nomina_CatConcepto : ClsPaginas
{ {
CveConcepto = ObjNomina.AddConcepto(codigo, concepto, tipo, formula, sistema, estado, CveConceptoPadre, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveConcepto = ObjNomina.AddConcepto(codigo, concepto, tipo, formula, sistema, estado, CveConceptoPadre, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa,
retencion, CveClasificacion, CveTipoGasto, tipoCalculo, CveConceptoContable, AplicaFiniquito, AutomaticoGlobal, Especie, Imprimir, retencion, CveClasificacion, CveTipoGasto, tipoCalculo, CveConceptoContable, AplicaFiniquito, AutomaticoGlobal, Especie, Imprimir,
CveSATConcepto, ctaImporteNegativoProv, contabiliza, CargoOAbono, cveConceptoContableB, CveCuentaB, CveConceptoContablePasivo); CveSATConcepto, ctaImporteNegativoProv, contabiliza, CargoOAbono, cveConceptoContableB, CveCuentaB, CveConceptoContablePasivo, AplicaEfectivale);
@@ -502,6 +502,7 @@ public partial class Nomina_CatConcepto : ClsPaginas
ChkEstado.Checked = drow["Estado"].Equals("Activo"); ChkEstado.Checked = drow["Estado"].Equals("Activo");
ChkSistema.Checked = drow["Sistema"].Equals("Sí"); ChkSistema.Checked = drow["Sistema"].Equals("Sí");
ChkAutomaticoLiquidacion.Checked = drow["AplicaFiniquito"].ToString().ToUpper().Contiene(new string[] { "1", "TRUE" }); ChkAutomaticoLiquidacion.Checked = drow["AplicaFiniquito"].ToString().ToUpper().Contiene(new string[] { "1", "TRUE" });
chkAplicaEfectivale.Checked = drow["AplicaEfectivale"].ToString().ToUpper().Contiene(new string[] { "1", "TRUE" });
ChkContabiliza.Checked = drow["Contabiliza"].ToString().ToUpper().Contiene(new string[] { "1", "TRUE" }); ChkContabiliza.Checked = drow["Contabiliza"].ToString().ToUpper().Contiene(new string[] { "1", "TRUE" });
chkCtaImporteNegativoProv.Checked = drow["CtaImporteNegativoProv"].ToString().ToUpper().Contiene(new string[] { "1", "TRUE" }); chkCtaImporteNegativoProv.Checked = drow["CtaImporteNegativoProv"].ToString().ToUpper().Contiene(new string[] { "1", "TRUE" });
ChkAutomaticoGlobal.Checked = drow["AutomaticoGlobal"].ToString().ToUpper().Contiene(new string[] { "1", "TRUE" }); ChkAutomaticoGlobal.Checked = drow["AutomaticoGlobal"].ToString().ToUpper().Contiene(new string[] { "1", "TRUE" });
@@ -671,4 +672,9 @@ public partial class Nomina_CatConcepto : ClsPaginas
//} //}
} }
protected void chkAplicaEfectivale_CheckedChanged(object sender, EventArgs e)
{
}
} }

View File

@@ -710,8 +710,8 @@ public partial class Nomina_Nomina2 : ClsPaginas
LnkTimbrarTodos.Visible = (dtempleados.Rows.Count > 0 && LnkTimbrarTodos.Visible = (dtempleados.Rows.Count > 0 &&
dtempleados.COUNT("CvePersonal", "SeTimbro=0 AND CvePersonal >0 AND NomAutorizado =1") > 0); dtempleados.COUNT("CvePersonal", "SeTimbro=0 AND CvePersonal >0 AND NomAutorizado =1") > 0);
} }
} }
} }
if (CvePersonal > 0) if (CvePersonal > 0)
@@ -7198,12 +7198,12 @@ public partial class Nomina_Nomina2 : ClsPaginas
} }
using (ClsNominas ObjMovt = new ClsNominas()) using (ClsNominas ObjMovt = new ClsNominas())
{ {
ObjMovt.GetMovtoPermanenteSaldos(UsuarioActual.CveEmpresa, SRCvePersonal, CcveMovtoPermanente); ObjMovt.GetMovtoPermanenteSaldos(UsuarioActual.CveEmpresa, SRCvePersonal, CcveMovtoPermanente);
GVMovtoPermanenteSaldos.DataSource = ObjMovt.DtResultados; GVMovtoPermanenteSaldos.DataSource = ObjMovt.DtResultados;
GVMovtoPermanenteSaldos.DataBind(); GVMovtoPermanenteSaldos.DataBind();
} }
CargaConcepto(); CargaConcepto();
DdlConcepto.SelectedValueExist(cveConcepto); DdlConcepto.SelectedValueExist(cveConcepto);
TxtDescripcion.Text = descripcion.ToString(); TxtDescripcion.Text = descripcion.ToString();
@@ -8797,7 +8797,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
protected void BtnGeneratepdf_Click(object sender, EventArgs e) protected void BtnGeneratepdf_Click(object sender, EventArgs e)
{ {
byte[] pdf = new byte[1]; byte[] pdf = new byte[1];
string nombre = $"recibos {LtlPeriodoseleccionado.Text}"; string nombre = $"recibos {LtlPeriodoseleccionado.Text}";
bool confiniquito = false; bool confiniquito = false;
int CvePersonal = TxtCvePersonal.Text.ToEntero(); int CvePeriodo = TxtCvePeriodo.Text.ToEntero(); int CvePersonal = TxtCvePersonal.Text.ToEntero(); int CvePeriodo = TxtCvePeriodo.Text.ToEntero();
if (CvePersonal > 0) if (CvePersonal > 0)
@@ -8806,7 +8806,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
{ {
if (ObjNomina.GetNom_Nominas(-1, TxtCvePersonal.Text.ToEntero(), TxtCvePeriodo.Text.ToEntero(), -1, UsuarioActual.CveEmpresa)) if (ObjNomina.GetNom_Nominas(-1, TxtCvePersonal.Text.ToEntero(), TxtCvePeriodo.Text.ToEntero(), -1, UsuarioActual.CveEmpresa))
{ {
nombre = $"{ObjNomina.Codigo}{ObjNomina.Nombre} {ObjNomina.SerieFolio}"; nombre = $"{ObjNomina.Codigo}{ObjNomina.Nombre} {ObjNomina.SerieFolio}";
} }
if (ObjNomina.GetNom_NominasDetalles(-1, CvePersonal, CvePeriodo, "-1")) if (ObjNomina.GetNom_NominasDetalles(-1, CvePersonal, CvePeriodo, "-1"))
@@ -9894,7 +9894,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
} }
protected void DdlCuenta_SelectedIndexChanged(object sender, EventArgs e) protected void DdlCuenta_SelectedIndexChanged(object sender, EventArgs e)
{ {
ConvenioPagoElectronico = string.Empty; ConvenioPagoElectronico = string.Empty;
DivModalLayoutBancosFecha.Visible = false; DivModalLayoutBancosFecha.Visible = false;
@@ -9984,76 +9984,79 @@ public partial class Nomina_Nomina2 : ClsPaginas
Response.AddHeader("content-disposition", string.Format("attachment;filename={0}.xlsx", "ListadePago")); Response.AddHeader("content-disposition", string.Format("attachment;filename={0}.xlsx", "ListadePago"));
Response.BinaryWrite(memoryStream.ToArray()); Response.BinaryWrite(memoryStream.ToArray());
Response.End(); Response.End();
}
}
protected void BtnEfectivaleXLS_Click(object sender, EventArgs e)
{
ClosedXML.Excel.XLWorkbook wb = new ClosedXML.Excel.XLWorkbook();
var libro = wb.AddWorksheet("Layout");
int row = 1;
int column = 1;
libro.Cell(row, column++).Value = "XSUBTOTAL";
//libro.Cell(row, column++).Value = "";
row = row + 1;
column = 1;
libro.Cell(row, column++).Value = "XCLIENTE";
libro.Cell(row, column++).Value = "XTIPOPEDIDO";
libro.Cell(row, column++).Value = "XNUMERO";
libro.Cell(row, column++).Value = "XIMPORTE";
//libro.Cell(row, column++).Value = "CLABE";
//libro.Cell(row, column++).Value = "Neto";
int maxxolumn = column;
libro.Range(row, 1, row, column - 1).Style.Font.FontColor = ClosedXML.Excel.XLColor.White;
libro.Range(row, 1, row, column - 1).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(79, 129, 189));
DataRow dcon;
decimal subtotal = 0;
if (dtempleados != null && dtempleados.Rows.Count > 0 && dtConceptos != null && dtConceptos.Rows.Count > 0 && (dcon = dtConceptos.FiltroPrimero("Tipo ='P' AND Codigo = 'P028' ")) != null)
{
foreach (DataRow dRow in dtempleados.FiltraParametros("CvePersonal > 0").Rows)
{
decimal importe = dRow[string.Format("V_{0}", dcon["CveConcepto"])].ToString().ToDecimal();
if (importe > 0)
{
subtotal = subtotal + importe;
row++;
column = 1;
libro.Cell(row, column++).Value = "'103646-1";
libro.Cell(row, column++).Value = "'DISPERSION";
libro.Cell(row, column++).Value = string.Format("'{0}", dRow["Codigo"]);
libro.Cell(row, column++).Value = importe;
}
}
} }
libro.Cell(1, 2).Value = subtotal; }
protected void BtnEfectivaleXLS_Click(object sender, EventArgs e)
libro.Columns().AdjustToContents(); // Adjust columns to fit content {
System.IO.Stream fs = new System.IO.MemoryStream();
wb.SaveAs(fs);
fs.Position = 0;
System.IO.MemoryStream memoryStream = new System.IO.MemoryStream();
using (System.IO.Stream input = fs)
{
input.CopyTo(memoryStream);
}
memoryStream.Position = 0;
Response.Clear(); ClosedXML.Excel.XLWorkbook wb = new ClosedXML.Excel.XLWorkbook();
Response.Buffer = true;
var libro = wb.AddWorksheet("Layout");
Response.ContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"; int row = 1;
Response.AddHeader("content-disposition", string.Format("attachment;filename={0}.xlsx", "ListadePago")); int column = 1;
Response.BinaryWrite(memoryStream.ToArray());
Response.End(); libro.Cell(row, column++).Value = "XSUBTOTAL";
//libro.Cell(row, column++).Value = "";
row = row + 1;
} column = 1;
libro.Cell(row, column++).Value = "XCLIENTE";
libro.Cell(row, column++).Value = "XTIPOPEDIDO";
libro.Cell(row, column++).Value = "XNUMERO";
libro.Cell(row, column++).Value = "XIMPORTE";
int maxxolumn = column;
libro.Range(row, 1, row, column - 1).Style.Font.FontColor = ClosedXML.Excel.XLColor.White;
libro.Range(row, 1, row, column - 1).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(79, 129, 189));
DataRow dcon;
decimal subtotal = 0;
DataTable dt = null;
using (ClsNominas objnom = new ClsNominas())
{
objnom.GetEfectivaleXLS(CvePeriodoSeleccionado, UsuarioActual.CveEmpresa, -1);
dt = objnom.DtResultados;
}
if (dt != null && dt.Rows.Count > 0)
{
foreach (DataRow dRow in dt.Rows)
{
decimal importe = dRow["Importe"].ToString().ToDecimal();
subtotal = subtotal + importe;
row++;
column = 1;
libro.Cell(row, column++).Value = string.Format("'{0}", dRow["XCLIENTE"]);
libro.Cell(row, column++).Value = string.Format("'{0}", dRow["XTIPOPEDIDO"]);
libro.Cell(row, column++).Value = string.Format("'{0}", dRow["CodigoDispersionVale"]);
libro.Cell(row, column++).Value = importe;
}
}
libro.Cell(1, 2).Value = subtotal;
libro.Columns().AdjustToContents(); // Adjust columns to fit content
System.IO.Stream fs = new System.IO.MemoryStream();
wb.SaveAs(fs);
fs.Position = 0;
System.IO.MemoryStream memoryStream = new System.IO.MemoryStream();
using (System.IO.Stream input = fs)
{
input.CopyTo(memoryStream);
}
memoryStream.Position = 0;
Response.Clear();
Response.Buffer = true;
Response.ContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
Response.AddHeader("content-disposition", string.Format("attachment;filename={0}.xlsx", "ListadePago"));
Response.BinaryWrite(memoryStream.ToArray());
Response.End();
}
protected void BtnModalBancosProcesar_Click(object sender, EventArgs e) protected void BtnModalBancosProcesar_Click(object sender, EventArgs e)
{ {
@@ -10076,7 +10079,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
CrearLayoutNominaBanorte(objnom.DtResultados, ConvenioPagoElectronico, 1); CrearLayoutNominaBanorte(objnom.DtResultados, ConvenioPagoElectronico, 1);
} }
} }
} }
else if (Banco == Bancos.Banamex) else if (Banco == Bancos.Banamex)
{ {
using (ClsNominas objnom = new ClsNominas()) using (ClsNominas objnom = new ClsNominas())
@@ -10126,8 +10129,8 @@ public partial class Nomina_Nomina2 : ClsPaginas
SbErrores.AppendLine($"- {Nombre} el importe debe de ser mayor a 0 importe {Importe}"); // importe mayot a 0 SbErrores.AppendLine($"- {Nombre} el importe debe de ser mayor a 0 importe {Importe}"); // importe mayot a 0
ErroresValidaciones = true; ErroresValidaciones = true;
} }
} }
if (!ErroresValidaciones) if (!ErroresValidaciones)
{ {
int Count = 1; int Count = 1;
@@ -10150,14 +10153,14 @@ public partial class Nomina_Nomina2 : ClsPaginas
Nombre = Nombre.Substring(0, 40); Nombre = Nombre.Substring(0, 40);
SbLinea.Append(Nombre.Trim().PadRight(40)); SbLinea.Append(Nombre.Trim().PadRight(40));
if (modalidadnomina == 2) if (modalidadnomina == 2)
{ {
SbLinea.Append("001"); SbLinea.Append("001"); SbLinea.Append("001"); SbLinea.Append("001");
} }
else else
{ {
SbLinea.Append("012"); SbLinea.Append("000"); SbLinea.Append("012"); SbLinea.Append("000");
} }
sb.AppendLine(SbLinea.ToString()); sb.AppendLine(SbLinea.ToString());
Count = Count + 1; Count = Count + 1;
} }
@@ -10168,9 +10171,9 @@ public partial class Nomina_Nomina2 : ClsPaginas
Response.ContentType = "text/plain"; Response.ContentType = "text/plain";
//Response.AppendHeader("Content-Disposition", $"attachment;filename=\"Nomina{NowADS().ToString("yyyyMMddhhmmss").ToString()}.txt\""); //Response.AppendHeader("Content-Disposition", $"attachment;filename=\"Nomina{NowADS().ToString("yyyyMMddhhmmss").ToString()}.txt\"");
Response.AppendHeader("Content-Disposition", $"attachment;filename=\"Nomina_BBVA_{DdlPeriodo.SelectedItem.Text}.txt\""); Response.AppendHeader("Content-Disposition", $"attachment;filename=\"Nomina_BBVA_{DdlPeriodo.SelectedItem.Text}.txt\"");
Response.Write(sb.ToString()); Response.Write(sb.ToString());
//RegistraScript("$('#ModalLayoutBancos').modal('hide');"); //RegistraScript("$('#ModalLayoutBancos').modal('hide');");
// Response.Flush(); // Response.Flush();
Response.End(); Response.End();
} }
else else
@@ -10300,8 +10303,8 @@ public partial class Nomina_Nomina2 : ClsPaginas
} }
} }
private void CrearLayoutNominaBanamex(DataTable DTNomina) private void CrearLayoutNominaBanamex(DataTable DTNomina)
{ {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
@@ -10342,55 +10345,55 @@ public partial class Nomina_Nomina2 : ClsPaginas
} }
} }
ErroresValidaciones = false; ErroresValidaciones = false;
//LAYOUT “C” FORMATOS PARA IMPORTACIÓN (TEF / TEF INTELAR) //LAYOUT “C” FORMATOS PARA IMPORTACIÓN (TEF / TEF INTELAR)
//DOC: https://www.banamex.com/resources/bancanets/premium/esp/contenedor/archivos/TEF_Version_C_PagosCobros_Masivos.pdf //DOC: https://www.banamex.com/resources/bancanets/premium/esp/contenedor/archivos/TEF_Version_C_PagosCobros_Masivos.pdf
if (!ErroresValidaciones) if (!ErroresValidaciones)
{ {
DataRow RowCuenta = get_GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveCuenta: DdlCuenta.SelectedValue.ToEntero(), CveEmpresa: UsuarioActual.CveEmpresa).FiltroPrimero(""); DataRow RowCuenta = get_GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveCuenta: DdlCuenta.SelectedValue.ToEntero(), CveEmpresa: UsuarioActual.CveEmpresa).FiltroPrimero("");
var ClaveMoneda = "001"; // PESOS MEXICANOS var ClaveMoneda = "001"; // PESOS MEXICANOS
//REGISTRO DE CONTROL - IMPORTACIÓN //REGISTRO DE CONTROL - IMPORTACIÓN
var TipoRegistro = "1"; var TipoRegistro = "1";
var NumeroCliente = RowCuenta["ConvenioPagoElectronico"].ToString().Trim().PadLeft(12, '0'); //CONVENIO var NumeroCliente = RowCuenta["ConvenioPagoElectronico"].ToString().Trim().PadLeft(12, '0'); //CONVENIO
var Fecha = TxtModalLayoutBancosFecha.Text.ToDate(); var Fecha = TxtModalLayoutBancosFecha.Text.ToDate();
var FechaPago = $"{Fecha.Day.ToString().PadLeft(2, '0')}{Fecha.ToString("MM")}{Fecha.Year.ToString().Replace("20", "")}"; var FechaPago = $"{Fecha.Day.ToString().PadLeft(2, '0')}{Fecha.ToString("MM")}{Fecha.Year.ToString().Replace("20", "")}";
var Secuencia = (1).ToString("0000"); var Secuencia = (1).ToString("0000");
var RazonSocial = (UsuarioActual.Empresa.Empresa).Replace("-Prueba", "").Trim().PadRight(36); var RazonSocial = (UsuarioActual.Empresa.Empresa).Replace("-Prueba", "").Trim().PadRight(36);
var Descripcion = ("NOMINA").Trim().PadRight(20); var Descripcion = ("NOMINA").Trim().PadRight(20);
var Naturaleza = "05"; //= 12 Pagos interbancarios CLABE, 05 Nomina banamex var Naturaleza = "05"; //= 12 Pagos interbancarios CLABE, 05 Nomina banamex
var Instrucciones = ("").Trim().PadRight(40); var Instrucciones = ("").Trim().PadRight(40);
var Version = "C"; var Version = "C";
var Volumen = "0"; var Volumen = "0";
var Caracteristicas = "1"; // 0= Si es modificable, 1 = Solo lectura var Caracteristicas = "1"; // 0= Si es modificable, 1 = Solo lectura
sb.AppendLine($"{TipoRegistro}{NumeroCliente}{FechaPago}{Secuencia}{RazonSocial}{Descripcion}{Naturaleza}{Instrucciones}{Version}{Volumen}{Caracteristicas}"); sb.AppendLine($"{TipoRegistro}{NumeroCliente}{FechaPago}{Secuencia}{RazonSocial}{Descripcion}{Naturaleza}{Instrucciones}{Version}{Volumen}{Caracteristicas}");
//REGISTRO GLOBAL - IMPORTACIÓN //REGISTRO GLOBAL - IMPORTACIÓN
var TipoReg2 = "2"; var TipoReg2 = "2";
var TipoOpe2 = "1"; //0 = Si es Abono, 1 = Si es Cargo var TipoOpe2 = "1"; //0 = Si es Abono, 1 = Si es Cargo
var ImporteTotal = DTNomina.SUMD("Importe").ToString("0000000000000000.00").Replace(".", "");//16 enteros y 2 decimales var ImporteTotal = DTNomina.SUMD("Importe").ToString("0000000000000000.00").Replace(".", "");//16 enteros y 2 decimales
var TipoCuenta = "01"; //CUENTA DE CHEQUES var TipoCuenta = "01"; //CUENTA DE CHEQUES
var Sucursal = RowCuenta["NumeroSucursal"].ToString(); var Sucursal = RowCuenta["NumeroSucursal"].ToString();
var NumCuenta = RowCuenta["NumCuenta"].ToString().Trim().PadLeft(20, '0'); //OBTENER DE BANCOS CUENTAS var NumCuenta = RowCuenta["NumCuenta"].ToString().Trim().PadLeft(20, '0'); //OBTENER DE BANCOS CUENTAS
var Espacio = ("").Trim().PadRight(20); var Espacio = ("").Trim().PadRight(20);
sb.AppendLine($"{TipoReg2}{TipoOpe2}{ClaveMoneda}{ImporteTotal}{TipoCuenta}{Sucursal}{NumCuenta}{Espacio}"); sb.AppendLine($"{TipoReg2}{TipoOpe2}{ClaveMoneda}{ImporteTotal}{TipoCuenta}{Sucursal}{NumCuenta}{Espacio}");
//REGISTRO DE CARGOS O ABONOS INDIVIDUALES - IMPORTACIÓN //REGISTRO DE CARGOS O ABONOS INDIVIDUALES - IMPORTACIÓN
int Count = 0; int Count = 0;
decimal SumaImportes = 0; decimal SumaImportes = 0;
foreach (DataRow dRow in DTNomina.Rows) foreach (DataRow dRow in DTNomina.Rows)
{ {
var TipoReg3 = "3"; //Registro de Movtos. Individuales var TipoReg3 = "3"; //Registro de Movtos. Individuales
var TipoOpe3 = "0"; //0 = Si es Abono, 1 = Si es Cargo (solo aplica para cobros) var TipoOpe3 = "0"; //0 = Si es Abono, 1 = Si es Cargo (solo aplica para cobros)
string Nombres = dRow["Nombres"].ToString().Replace("ñ,Ñ", "n").Replace("*,#,$,%,=,+", ""); string Nombres = dRow["Nombres"].ToString().Replace("ñ,Ñ", "n").Replace("*,#,$,%,=,+", "");
string APaterno = dRow["APaterno"].ToString().Replace("ñ,Ñ", "n").Replace("*,#,$,%,=,+", ""); string APaterno = dRow["APaterno"].ToString().Replace("ñ,Ñ", "n").Replace("*,#,$,%,=,+", "");
string AMaterno = dRow["AMaterno"].ToString().Replace("ñ,Ñ", "n").Replace("*,#,$,%,=,+", ""); string AMaterno = dRow["AMaterno"].ToString().Replace("ñ,Ñ", "n").Replace("*,#,$,%,=,+", "");
//string BancoNumCuenta = dRow["BancoNumCuenta"].ToString(); //string BancoNumCuenta = dRow["BancoNumCuenta"].ToString();
@@ -10400,14 +10403,14 @@ public partial class Nomina_Nomina2 : ClsPaginas
var StrImporte = Importe.ToString("0000000000000000.00").Replace(".", ""); var StrImporte = Importe.ToString("0000000000000000.00").Replace(".", "");
var StrTipoCuenta = "03";// 01- Cheques / CLABE, 03=Plástico var StrTipoCuenta = "03";// 01- Cheques / CLABE, 03=Plástico
var StrCuenta = BancoNumCuenta.Trim().PadLeft(20, '0'); //USARA TARJETA DE DEBITO var StrCuenta = BancoNumCuenta.Trim().PadLeft(20, '0'); //USARA TARJETA DE DEBITO
var ReferenciaAlfa = (dRow["Codigo"].ToString()).PadRight(10); //si banamex debe ser de 10 digitos, y agregar 30 espacios var ReferenciaAlfa = (dRow["Codigo"].ToString()).PadRight(10); //si banamex debe ser de 10 digitos, y agregar 30 espacios
var EspacioRefBen = ("").PadRight(30); var EspacioRefBen = ("").PadRight(30);
var Beneficiario = ($"{Nombres},{APaterno}/{AMaterno}").PadRight(55); var Beneficiario = ($"{Nombres},{APaterno}/{AMaterno}").PadRight(55);
var Inst3 = ("PAGO").PadRight(40); var Inst3 = ("PAGO").PadRight(40);
var DescTEF = ("").PadRight(24); var DescTEF = ("").PadRight(24);
var ClaveBanco = ("0000").PadRight(4); //No se ocupa si es nomina banamex var ClaveBanco = ("0000").PadRight(4); //No se ocupa si es nomina banamex
var ReferenciaNum = ("").PadRight(7, '0'); //QUE TOME DE LA CvePersonal como folio , SOLO PARA INTERBANCARIOS var ReferenciaNum = ("").PadRight(7, '0'); //QUE TOME DE LA CvePersonal como folio , SOLO PARA INTERBANCARIOS
var Plazo = ""; // 00 - MISMO DIA , 24 HRS var Plazo = ""; // 00 - MISMO DIA , 24 HRS
sb.AppendLine($"{TipoReg3}{TipoOpe3}{ClaveMoneda}{StrImporte}{StrTipoCuenta}{StrCuenta}{ReferenciaAlfa}{EspacioRefBen}{Beneficiario}{Inst3}{DescTEF}{ClaveBanco}{ReferenciaNum}{Plazo}00"); sb.AppendLine($"{TipoReg3}{TipoOpe3}{ClaveMoneda}{StrImporte}{StrTipoCuenta}{StrCuenta}{ReferenciaAlfa}{EspacioRefBen}{Beneficiario}{Inst3}{DescTEF}{ClaveBanco}{ReferenciaNum}{Plazo}00");
Count += 1; Count += 1;
@@ -10415,13 +10418,13 @@ public partial class Nomina_Nomina2 : ClsPaginas
} }
//REGISTRO DE TOTALES - IMPORTACIÓN //REGISTRO DE TOTALES - IMPORTACIÓN
var TipoReg4 = "4"; var TipoReg4 = "4";
// LOS ABONOS A LOS EMPLEADOS // LOS ABONOS A LOS EMPLEADOS
var NumAbonos = Count.ToString("000000"); var NumAbonos = Count.ToString("000000");
//EL CARGO QUE SE LE HIZO A LA CUENTA DE LA EMPRESA //EL CARGO QUE SE LE HIZO A LA CUENTA DE LA EMPRESA
var NumCargos = (1).ToString("000000"); var NumCargos = (1).ToString("000000");
var StrImportes = SumaImportes.ToString("0000000000000000.00").Replace(".", ""); var StrImportes = SumaImportes.ToString("0000000000000000.00").Replace(".", "");
sb.Append($"{TipoReg4}{ClaveMoneda}{NumAbonos}{StrImportes}{NumCargos}{StrImportes}"); sb.Append($"{TipoReg4}{ClaveMoneda}{NumAbonos}{StrImportes}{NumCargos}{StrImportes}");
Response.Clear(); Response.Clear();

View File

@@ -16182,7 +16182,7 @@ Partial Class Ventas
If Not TraspasoAlmacen(ObjInventario, ObjVentas, CveRemision, ObjConta, True, 9, TmpDTDetalle) Then If Not TraspasoAlmacen(ObjInventario, ObjVentas, CveRemision, ObjConta, True, 9, TmpDTDetalle) Then
OcurrioError = True OcurrioError = True
ErrorList.Add("Ocurrió un error al verificar inventario de remisiones.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico") ErrorList.Add("Ocurrió un error al verificar inventario de remisiones.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico")
ModExtensiones.GuardaLog("Ocurrió un error al verificar inventario de remisiones.Revise su factura y cualquier detalle comuníquese a Soporte Técnico") ModExtensiones.GuardaLog("Ocurrió un error al verificar inventario de remisiones.Revise su factura y cualquier detalle comuníquese a Soporte Técnico: CveVenta:" & CveRemision & " ")
Exit For Exit For
End If End If
Next Next