This commit is contained in:
@@ -8689,7 +8689,7 @@ Public Class ClsPaginas
|
|||||||
End If
|
End If
|
||||||
DTPercepciones = ObjNomina.DtResultados.FiltraParametros($"((Tipo = 'P' OR (Tipo = 'D' AND Importe <0)) AND Importe <>0 AND EsPadre = 1 AND SoloVisible =0) {filtrop}")
|
DTPercepciones = ObjNomina.DtResultados.FiltraParametros($"((Tipo = 'P' OR (Tipo = 'D' AND Importe <0)) AND Importe <>0 AND EsPadre = 1 AND SoloVisible =0) {filtrop}")
|
||||||
DTDeducciones = ObjNomina.DtResultados.FiltraParametros($"(Tipo = 'D' AND Importe >0 AND EsPadre = 1 AND SoloVisible =0) {friltrod}")
|
DTDeducciones = ObjNomina.DtResultados.FiltraParametros($"(Tipo = 'D' AND Importe >0 AND EsPadre = 1 AND SoloVisible =0) {friltrod}")
|
||||||
DTDeducciones2 = ObjNomina.DtResultados.FiltraParametros($"((Tipo = 'D' AND Importe >0 AND EsPadre = 1 AND SoloVisible =0) OR CveSistema IN (20,21)){friltrod}")
|
DTDeducciones2 = ObjNomina.DtResultados.FiltraParametros($"((Tipo = 'D' AND Importe >0 AND EsPadre = 1 AND SoloVisible =0) OR CveSistema IN (20,21) OR CveConcepto =4714){friltrod}")
|
||||||
|
|
||||||
ajusteindemnizacion = ObjNomina.DtResultados.FiltraParametros($"((Tipo = 'P' OR (Tipo = 'D' AND Importe <0)) AND Importe <>0 AND EsPadre = 1 AND SoloVisible =0) AND CveSistema IN(10,11,32)").SUM("Importe") -
|
ajusteindemnizacion = ObjNomina.DtResultados.FiltraParametros($"((Tipo = 'P' OR (Tipo = 'D' AND Importe <0)) AND Importe <>0 AND EsPadre = 1 AND SoloVisible =0) AND CveSistema IN(10,11,32)").SUM("Importe") -
|
||||||
ObjNomina.DtResultados.FiltraParametros($"(Tipo = 'D' AND Importe >0 AND EsPadre = 1 AND SoloVisible =0) AND CveSistema =47").SUM("Importe")
|
ObjNomina.DtResultados.FiltraParametros($"(Tipo = 'D' AND Importe >0 AND EsPadre = 1 AND SoloVisible =0) AND CveSistema =47").SUM("Importe")
|
||||||
|
|||||||
@@ -198,6 +198,13 @@ Partial Class PopUpVerFactura
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
If Request("onlyPrint") IsNot Nothing Then
|
If Request("onlyPrint") IsNot Nothing Then
|
||||||
|
If Request("onlyPrint").ToString() = "GeneraPDFNomina" AndAlso Not IsNothing(Request("CvePersonal")) AndAlso
|
||||||
|
Not IsNothing(Request("CvePeriodo")) AndAlso Not IsNothing(Request("indemnizacion")) Then
|
||||||
|
Dim CveEmpresa As Integer = UsuarioActual.CveEmpresa
|
||||||
|
Dim RutaEmpresa As String = UsuarioActual.Empresa.Ruta
|
||||||
|
Dim indemnizacion As Boolean = Request("indemnizacion").ToString.ToEntero() = 1
|
||||||
|
GeneraPDFNomina(Request("CvePersonal").ToString.ToEntero(), Request("CvePeriodo").ToString.ToEntero(), CveEmpresa, RutaEmpresa, indemnizacion)
|
||||||
|
End If
|
||||||
If Request("onlyPrint").ToString() = "Pallet" AndAlso Not IsNothing(Request("CvePallet")) Then
|
If Request("onlyPrint").ToString() = "Pallet" AndAlso Not IsNothing(Request("CvePallet")) Then
|
||||||
imprimirpallet2(Request("CvePallet").ToString.ToEntero())
|
imprimirpallet2(Request("CvePallet").ToString.ToEntero())
|
||||||
End If
|
End If
|
||||||
@@ -227,6 +234,297 @@ Partial Class PopUpVerFactura
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
Public Function GeneraPDFNomina(CvePersonal As Integer, CvePeriodo As Integer, CveEmpresa As Integer, RutaEmpresa As String, Optional indemnizacion As Boolean = False) As Byte()
|
||||||
|
|
||||||
|
|
||||||
|
Dim ObjNomina As New ClsNominas
|
||||||
|
Dim ObjPersonal As New ClsRH
|
||||||
|
Dim TieneError = False
|
||||||
|
Dim Retorno As Byte() = Nothing
|
||||||
|
|
||||||
|
If Not ObjNomina.GetNom_Nominas(-1, CvePersonal, CvePeriodo, -1, CveEmpresa) Then
|
||||||
|
Alert("Ocurrio un erro al obtener datos de la nomina", TipoMensaje.MsgError)
|
||||||
|
ObjPersonal.Dispose()
|
||||||
|
ObjNomina.Dispose()
|
||||||
|
Return Nothing
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim CveNomina = ObjNomina.CveNomina
|
||||||
|
Dim DTPercepciones As Data.DataTable
|
||||||
|
Dim DTDeducciones As Data.DataTable
|
||||||
|
Dim DTDeducciones2 As New Data.DataTable
|
||||||
|
|
||||||
|
Dim Ruta As String = UsuarioActual.Empresa.Ruta
|
||||||
|
Dim PathXML As String = $"{Ruta}XML\Nomina\{ObjNomina.Serie }{If(indemnizacion, "F", "")}-{ObjNomina.Folio}.xml"
|
||||||
|
Dim FechaEmision, FechaCertificacion As DateTime
|
||||||
|
Dim FolioFiscal, NoSerieCertificado, NoSerieCertificadoContribuyente, SelloCFDi, SelloSAT As String
|
||||||
|
FolioFiscal = ""
|
||||||
|
NoSerieCertificado = ""
|
||||||
|
SelloCFDi = ""
|
||||||
|
SelloSAT = ""
|
||||||
|
NoSerieCertificadoContribuyente = ""
|
||||||
|
|
||||||
|
Dim RutaCBB As String = String.Format("{0}CBB\Nomina\{1}.jpg", RutaEmpresa, ObjNomina.SerieFolio)
|
||||||
|
Dim ImagenCBB As New System.IO.FileInfo(RutaCBB)
|
||||||
|
Dim ImgCBB As String
|
||||||
|
|
||||||
|
Dim RutaFormato As String = String.Format("{0}Formatos\Nomina.rdlc", RutaEmpresa)
|
||||||
|
Dim RutaFormatoDefault As String = String.Format("Empresas\Grales\Formatos\Nomina.rdlc")
|
||||||
|
|
||||||
|
'SI ESTA TIMBRADA - CON XML
|
||||||
|
|
||||||
|
If System.IO.File.Exists(PathXML) Then
|
||||||
|
|
||||||
|
Dim XmlDoc As New System.Xml.XmlDocument
|
||||||
|
'XmlDoc.Load(Ruta & "XML\\Nomina\NOM A-3845.xml")
|
||||||
|
XmlDoc.Load(PathXML)
|
||||||
|
|
||||||
|
If ValorNodoXML(XmlDoc.DocumentElement, "version").Contiene("3.3", "4.0") Then
|
||||||
|
FechaEmision = XmlDoc.DocumentElement.Attributes("Fecha").InnerText.ToDate
|
||||||
|
NoSerieCertificadoContribuyente = XmlDoc.DocumentElement.Attributes("NoCertificado").InnerText
|
||||||
|
|
||||||
|
For i As Integer = 0 To XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes.Count - 1
|
||||||
|
If XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Name = "tfd:TimbreFiscalDigital" Then
|
||||||
|
FolioFiscal = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("UUID").InnerText
|
||||||
|
NoSerieCertificado = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("NoCertificadoSAT").InnerText
|
||||||
|
FechaCertificacion = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("FechaTimbrado").InnerText.ToDate
|
||||||
|
SelloCFDi = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("SelloCFD").InnerText
|
||||||
|
SelloSAT = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("SelloSAT").InnerText
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Else
|
||||||
|
FechaEmision = XmlDoc.DocumentElement.Attributes("fecha").InnerText.ToDate
|
||||||
|
NoSerieCertificadoContribuyente = XmlDoc.DocumentElement.Attributes("noCertificado").InnerText
|
||||||
|
|
||||||
|
For i As Integer = 0 To XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes.Count - 1
|
||||||
|
If XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Name = "tfd:timbreFiscalDigital" Then
|
||||||
|
FolioFiscal = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("UUID").InnerText
|
||||||
|
NoSerieCertificado = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("noCertificadoSAT").InnerText
|
||||||
|
FechaCertificacion = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("fechaTimbrado").InnerText.ToDate
|
||||||
|
SelloCFDi = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("selloCFD").InnerText
|
||||||
|
SelloSAT = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("selloSAT").InnerText
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
'SIN TIMBRAR - SIN XML
|
||||||
|
Else
|
||||||
|
FolioFiscal = "Sin Timbrar"
|
||||||
|
NoSerieCertificado = "Sin Timbrar"
|
||||||
|
SelloCFDi = "Sin Timbrar"
|
||||||
|
SelloSAT = "Sin Timbrar"
|
||||||
|
End If
|
||||||
|
|
||||||
|
'Si no tiene CBB, SE GENERA
|
||||||
|
If Not ImagenCBB.Exists Then
|
||||||
|
Dim CBB As New ClbNegBICFDv3_2.ClsNegCBBGenerar()
|
||||||
|
If ObjPersonal.GetPersonal(CvePersonal, CveEmpresa) Then
|
||||||
|
CBB.GenerarCBB(UsuarioActual.Empresa.RFC, ObjPersonal.RFC, ObjNomina.Total.ToString.ToDecimal, FolioFiscal, RutaCBB)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
ImgCBB = String.Format("{0}://{1}:{2}/Empresas/{3}/CBB/Nomina/{4}.jpg", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa, ObjNomina.SerieFolio)
|
||||||
|
|
||||||
|
Dim cQr As Byte() = Nothing
|
||||||
|
Try
|
||||||
|
Dim CadenaOriginalCFD As String = "||1.0|" + FolioFiscal + "|" + FechaCertificacion.ToString("yyyy-MM-dd") + "T" + FechaCertificacion.ToString("HH:mm:ss") + "|" + SelloCFDi + "|" + NoSerieCertificado + "||"
|
||||||
|
|
||||||
|
Dim RptParametro As New List(Of ReportParameter)
|
||||||
|
|
||||||
|
|
||||||
|
'Datos Empresa
|
||||||
|
RptParametro.Add(New ReportParameter("RegistroPatronal", ObjNomina.RegistroPatronal))
|
||||||
|
Dim ajusteindemnizacion As Double = 0
|
||||||
|
'PERCECIONES - DEDUCCIONES
|
||||||
|
If ObjNomina.GetNom_NominasDetalles(CveNomina, CvePersonal, CvePeriodo, "-1") Then
|
||||||
|
Dim filtrop As String = " AND CveSistema NOT IN(10,11,32)"
|
||||||
|
Dim friltrod As String = " AND CveSistema <>47"
|
||||||
|
If indemnizacion Then
|
||||||
|
filtrop = "AND CveSistema IN(10,11,32)"
|
||||||
|
friltrod = " AND CveSistema =47"
|
||||||
|
End If
|
||||||
|
DTPercepciones = ObjNomina.DtResultados.FiltraParametros($"((Tipo = 'P' OR (Tipo = 'D' AND Importe <0)) AND Importe <>0 AND EsPadre = 1 AND SoloVisible =0) {filtrop}")
|
||||||
|
DTDeducciones = ObjNomina.DtResultados.FiltraParametros($"(Tipo = 'D' AND Importe >0 AND EsPadre = 1 AND SoloVisible =0) {friltrod}")
|
||||||
|
DTDeducciones2 = ObjNomina.DtResultados.FiltraParametros($"((Tipo = 'D' AND Importe >0 AND EsPadre = 1 AND SoloVisible =0) OR CveSistema IN (20,21) OR CveConcepto =4714){friltrod}")
|
||||||
|
|
||||||
|
ajusteindemnizacion = ObjNomina.DtResultados.FiltraParametros($"((Tipo = 'P' OR (Tipo = 'D' AND Importe <0)) AND Importe <>0 AND EsPadre = 1 AND SoloVisible =0) AND CveSistema IN(10,11,32)").SUM("Importe") -
|
||||||
|
ObjNomina.DtResultados.FiltraParametros($"(Tipo = 'D' AND Importe >0 AND EsPadre = 1 AND SoloVisible =0) AND CveSistema =47").SUM("Importe")
|
||||||
|
For Each row As DataRow In DTPercepciones.Rows
|
||||||
|
If row("Tipo").ToString() = "D" Then
|
||||||
|
row("Codigo") = row("Codigo").ToString().Replace("D", "OP")
|
||||||
|
row("Importe") = row("Importe").ToString().ToDecimal() * -1
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
Else
|
||||||
|
DTPercepciones = Nothing
|
||||||
|
DTDeducciones = Nothing
|
||||||
|
End If
|
||||||
|
'DATOS DEL EMPLEADO
|
||||||
|
If ObjPersonal.GetPersonal(CvePersonal, CveEmpresa) Then
|
||||||
|
|
||||||
|
RptParametro.Add(New ReportParameter("NoEmpleado", ObjPersonal.Codigo))
|
||||||
|
RptParametro.Add(New ReportParameter("RFC", ObjPersonal.RFC))
|
||||||
|
RptParametro.Add(New ReportParameter("CURP", ObjPersonal.CURP))
|
||||||
|
|
||||||
|
RptParametro.Add(New ReportParameter("NombreCompleto", String.Format("{0} {1} {2}", ObjPersonal.Nombres, ObjPersonal.APaterno, ObjPersonal.AMaterno).Trim()))
|
||||||
|
RptParametro.Add(New ReportParameter("Regimen", ObjPersonal.RegimenContratacion))
|
||||||
|
RptParametro.Add(New ReportParameter("RiesgoPuesto", ObjPersonal.RiesgoPuesto))
|
||||||
|
|
||||||
|
RptParametro.Add(New ReportParameter("NSS", ObjPersonal.NumeroSS))
|
||||||
|
RptParametro.Add(New ReportParameter("Departamento", ObjPersonal.Departamento))
|
||||||
|
RptParametro.Add(New ReportParameter("Puesto", ObjPersonal.Puesto.ToString()))
|
||||||
|
RptParametro.Add(New ReportParameter("FechaIngreso", ObjPersonal.FechaIngreso.ToString("dd/MM/yyyy")))
|
||||||
|
|
||||||
|
RptParametro.Add(New ReportParameter("Contrato", ObjPersonal.TipoContrato.ToString))
|
||||||
|
|
||||||
|
RptParametro.Add(New ReportParameter("Jornada", ObjPersonal.Jornada))
|
||||||
|
RptParametro.Add(New ReportParameter("Periodo", ObjNomina.TipoPeriodo))
|
||||||
|
RptParametro.Add(New ReportParameter("SalarioBase", ObjPersonal.SalarioDiario.ToString))
|
||||||
|
RptParametro.Add(New ReportParameter("SalarioDiarioInt", ObjPersonal.SDI.ToString))
|
||||||
|
|
||||||
|
RptParametro.Add(New ReportParameter("Banco", ObjPersonal.Banco))
|
||||||
|
RptParametro.Add(New ReportParameter("CLABE", ObjPersonal.CLABE))
|
||||||
|
|
||||||
|
|
||||||
|
'DATOS NOMINA
|
||||||
|
If ObjNomina.GetNom_Nominas(CveNomina, CvePersonal, CvePeriodo, 1, CveEmpresa) Then
|
||||||
|
RptParametro.Add(New ReportParameter("ReciboNomina", ObjNomina.Folio.ToString))
|
||||||
|
RptParametro.Add(New ReportParameter("Serie", ObjNomina.Serie))
|
||||||
|
RptParametro.Add(New ReportParameter("Fecha", ObjNomina.Fecha.ToString))
|
||||||
|
RptParametro.Add(New ReportParameter("Periodo", ObjNomina.TipoPeriodo))
|
||||||
|
|
||||||
|
RptParametro.Add(New ReportParameter("DiasPagados", ObjNomina.DiasPagados.ToString))
|
||||||
|
RptParametro.Add(New ReportParameter("MetodoPago", ObjNomina.MetodoPago)) '"""PUE"" (Pago en una sola exhibición)"
|
||||||
|
RptParametro.Add(New ReportParameter("FormaPago", """99"" (Por definir)"))
|
||||||
|
|
||||||
|
RptParametro.Add(New ReportParameter("Cantidad", "1"))
|
||||||
|
RptParametro.Add(New ReportParameter("Unidad", "ACT"))
|
||||||
|
RptParametro.Add(New ReportParameter("Descripcion", "PAGO DE NÓMINA"))
|
||||||
|
RptParametro.Add(New ReportParameter("Total", If(indemnizacion, ajusteindemnizacion, ObjNomina.Total - ajusteindemnizacion).ToString()))
|
||||||
|
|
||||||
|
Dim CBB As New ClbNegBICFDv3_2.ClsNegCBBGenerar()
|
||||||
|
cQr = CBB.GenerarCBBBytes(UsuarioActual.Empresa.RFC, ObjPersonal.RFC, ObjNomina.Total.ToString().ToDecimal(), FolioFiscal)
|
||||||
|
RptParametro.Add(New ReportParameter("ImporteLetra", ObjNomina.Total.ToString.ToDouble.Texto2Letras))
|
||||||
|
RptParametro.Add(New ReportParameter("Clave", "84111505"))
|
||||||
|
Else
|
||||||
|
TieneError = True
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
TieneError = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Not TieneError Then
|
||||||
|
If ObjNomina.GetPeriodos(-1, CveEmpresa, -1, -1, CvePeriodo) Then
|
||||||
|
RptParametro.Add(New ReportParameter("FechaInicio", ObjNomina.FechaInicio.ToString("dd/MM/yyyy")))
|
||||||
|
RptParametro.Add(New ReportParameter("FechaFin", ObjNomina.FechaFin.ToString("dd/MM/yyyy")))
|
||||||
|
Else
|
||||||
|
TieneError = True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
RptParametro.Add(New ReportParameter("PU", DTPercepciones.SUM("Importe").ToString()))
|
||||||
|
RptParametro.Add(New ReportParameter("Importe", DTPercepciones.SUM("Importe").ToString()))
|
||||||
|
RptParametro.Add(New ReportParameter("ImporteDeducciones", DTDeducciones.SUM("Importe").ToString()))
|
||||||
|
|
||||||
|
RptParametro.Add(New ReportParameter("SubTotal", DTPercepciones.SUM("Importe").ToString()))
|
||||||
|
RptParametro.Add(New ReportParameter("Descuentos", DTDeducciones.SUM("Importe", "SATCveConcepto <> '002'").ToString()))
|
||||||
|
RptParametro.Add(New ReportParameter("ISR", DTDeducciones.SUM("Importe", "SATCveConcepto = '002'").ToString()))
|
||||||
|
'Timbrado
|
||||||
|
RptParametro.Add(New ReportParameter("FolioFiscal", FolioFiscal))
|
||||||
|
RptParametro.Add(New ReportParameter("CertificadoSAT", NoSerieCertificado))
|
||||||
|
RptParametro.Add(New ReportParameter("FechaCertificacion", FechaCertificacion.ToString))
|
||||||
|
RptParametro.Add(New ReportParameter("SelloDigitalEmisor", SelloCFDi))
|
||||||
|
RptParametro.Add(New ReportParameter("SelloDigitalSAT", SelloSAT))
|
||||||
|
RptParametro.Add(New ReportParameter("CadenaOriginal", CadenaOriginalCFD))
|
||||||
|
RptParametro.Add(New ReportParameter("QR", ImgCBB.ToString))
|
||||||
|
|
||||||
|
|
||||||
|
Dim LSRds As New List(Of ReportDataSource)
|
||||||
|
|
||||||
|
|
||||||
|
Dim rds2 = New ReportDataSource()
|
||||||
|
|
||||||
|
Dim dtqr As New DataTable
|
||||||
|
|
||||||
|
Dim column As DataColumn = New DataColumn("ImagenByte")
|
||||||
|
column.DataType = System.Type.[GetType]("System.Byte[]")
|
||||||
|
column.AllowDBNull = True
|
||||||
|
column.Caption = "ImagenByte"
|
||||||
|
dtqr.Columns.Add(column)
|
||||||
|
Dim rowqr As DataRow = dtqr.NewRow()
|
||||||
|
rowqr("ImagenByte") = cQr
|
||||||
|
|
||||||
|
dtqr.Rows.Add(rowqr)
|
||||||
|
rds2.Name = "dsImagenes"
|
||||||
|
rds2.Value = dtqr
|
||||||
|
LSRds.Add(rds2)
|
||||||
|
Dim numnewfiles As Integer = 0
|
||||||
|
If DTPercepciones.Rows.Count > DTDeducciones2.Rows.Count Then
|
||||||
|
|
||||||
|
numnewfiles = DTPercepciones.Rows.Count - DTDeducciones2.Rows.Count
|
||||||
|
For index = 1 To numnewfiles
|
||||||
|
|
||||||
|
DTDeducciones2.Rows.Add(DTDeducciones2.NewRow)
|
||||||
|
Next
|
||||||
|
Else
|
||||||
|
|
||||||
|
If DTDeducciones2.Rows.Count > DTPercepciones.Rows.Count Then
|
||||||
|
numnewfiles = DTDeducciones2.Rows.Count - DTPercepciones.Rows.Count
|
||||||
|
For index = 1 To numnewfiles
|
||||||
|
|
||||||
|
DTPercepciones.Rows.Add(DTPercepciones.NewRow)
|
||||||
|
Next
|
||||||
|
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim RptDS As New ReportDataSource
|
||||||
|
RptDS.Name = "DsOC"
|
||||||
|
RptDS.Value = DTPercepciones
|
||||||
|
LSRds.Add(RptDS)
|
||||||
|
|
||||||
|
Dim RDS As New ReportDataSource
|
||||||
|
RDS.Name = "DataSet1"
|
||||||
|
RDS.Value = DTDeducciones2
|
||||||
|
LSRds.Add(RDS)
|
||||||
|
Dim Archivo As New System.IO.FileInfo(RutaFormato)
|
||||||
|
|
||||||
|
If Not TieneError Then
|
||||||
|
If Archivo.Exists Then
|
||||||
|
Retorno = StreamPDF(RutaFormato, LSRds, RptParametro, ObjNomina.SerieFolio, "PDF", MR:=Nothing)
|
||||||
|
Dim ArchivoPDF As New System.IO.FileInfo(String.Format("{0}PDF\\{1}.pdf", RutaEmpresa, ObjNomina.SerieFolio))
|
||||||
|
If Not ArchivoPDF.Exists Then
|
||||||
|
Try
|
||||||
|
DirectoryExistsCreate(String.Format("{0}PDF", RutaEmpresa))
|
||||||
|
DirectoryExistsCreate(String.Format("{0}PDF\{1}", RutaEmpresa, "Nomina"))
|
||||||
|
File.WriteAllBytes(String.Format("{0}PDF\Nomina\{1}.pdf", RutaEmpresa, ObjNomina.SerieFolio), Retorno)
|
||||||
|
Catch ex As Exception
|
||||||
|
Alert("Ocurrió un error al generar el PDF", TipoMensaje.MsgAdvertencia)
|
||||||
|
GuardaLog(String.Format("Ocurrió un error al generar el PDF {0}", ex))
|
||||||
|
End Try
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
'ImprimirPDF(String.Format("{0}\Formatos\Nomina.rdlc", RutaEmpresa), LSRds, RptParametro, ObjNomina.SerieFolio)
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
Alert("Ocurrio un error al obtener los datos de la Nomina")
|
||||||
|
End If
|
||||||
|
Catch ex As Exception
|
||||||
|
|
||||||
|
GuardaLog(String.Format("Ocurrio un error al generar el reporte RLDC {0}", ex))
|
||||||
|
End Try
|
||||||
|
|
||||||
|
|
||||||
|
ObjNomina.Dispose()
|
||||||
|
ObjPersonal.Dispose()
|
||||||
|
|
||||||
|
Return Retorno
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
Private Sub DescargaArchivoDirecto(RutaArchivo As String)
|
Private Sub DescargaArchivoDirecto(RutaArchivo As String)
|
||||||
If RutaArchivo <> "" Then
|
If RutaArchivo <> "" Then
|
||||||
|
|
||||||
|
|||||||
@@ -5162,7 +5162,7 @@ HERMOSILLO, SONORA</Value>
|
|||||||
</TablixCells>
|
</TablixCells>
|
||||||
</TablixRow>
|
</TablixRow>
|
||||||
<TablixRow>
|
<TablixRow>
|
||||||
<Height>0.6cm</Height>
|
<Height>0.36187cm</Height>
|
||||||
<TablixCells>
|
<TablixCells>
|
||||||
<TablixCell>
|
<TablixCell>
|
||||||
<CellContents>
|
<CellContents>
|
||||||
@@ -6471,7 +6471,7 @@ Firma del Trabajador</Value>
|
|||||||
<DataSetName>DataSet1</DataSetName>
|
<DataSetName>DataSet1</DataSetName>
|
||||||
<Top>0.15557cm</Top>
|
<Top>0.15557cm</Top>
|
||||||
<Left>0.10265cm</Left>
|
<Left>0.10265cm</Left>
|
||||||
<Height>12.89958cm</Height>
|
<Height>12.66146cm</Height>
|
||||||
<Width>19.12116cm</Width>
|
<Width>19.12116cm</Width>
|
||||||
<Style>
|
<Style>
|
||||||
<Border>
|
<Border>
|
||||||
@@ -6480,7 +6480,7 @@ Firma del Trabajador</Value>
|
|||||||
</Style>
|
</Style>
|
||||||
</Tablix>
|
</Tablix>
|
||||||
</ReportItems>
|
</ReportItems>
|
||||||
<Height>5.31354in</Height>
|
<Height>5.14687in</Height>
|
||||||
<Style />
|
<Style />
|
||||||
</Body>
|
</Body>
|
||||||
<Width>7.58085in</Width>
|
<Width>7.58085in</Width>
|
||||||
@@ -6489,8 +6489,8 @@ Firma del Trabajador</Value>
|
|||||||
<PageWidth>21.59cm</PageWidth>
|
<PageWidth>21.59cm</PageWidth>
|
||||||
<LeftMargin>1cm</LeftMargin>
|
<LeftMargin>1cm</LeftMargin>
|
||||||
<RightMargin>1cm</RightMargin>
|
<RightMargin>1cm</RightMargin>
|
||||||
<TopMargin>2cm</TopMargin>
|
<TopMargin>0.5cm</TopMargin>
|
||||||
<BottomMargin>2cm</BottomMargin>
|
<BottomMargin>0.5cm</BottomMargin>
|
||||||
<ColumnSpacing>0.13cm</ColumnSpacing>
|
<ColumnSpacing>0.13cm</ColumnSpacing>
|
||||||
<Style />
|
<Style />
|
||||||
</Page>
|
</Page>
|
||||||
|
|||||||
@@ -1185,6 +1185,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
|||||||
}
|
}
|
||||||
Alert("se reenviaron los recibos timbrados");
|
Alert("se reenviaron los recibos timbrados");
|
||||||
}
|
}
|
||||||
|
|
||||||
public string msgCorregidoSat(string msg, int CvePersonal, string RFC, string CURP)
|
public string msgCorregidoSat(string msg, int CvePersonal, string RFC, string CURP)
|
||||||
{
|
{
|
||||||
string retorno = msg;
|
string retorno = msg;
|
||||||
@@ -4550,7 +4551,11 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
|||||||
|
|
||||||
private void ImprimirReporte()
|
private void ImprimirReporte()
|
||||||
{
|
{
|
||||||
string RutaDocumento = System.IO.Path.Combine(ModExtensiones.DirectorioBaseEmpresas, "Empresas/Grales/Lista de Raya.docx");
|
string RutaDocumento = System.IO.Path.Combine(UsuarioActual.Empresa.RutaArchivos, "/Lista de Raya.docx");
|
||||||
|
if (!System.IO.File.Exists(RutaDocumento))
|
||||||
|
{
|
||||||
|
RutaDocumento = System.IO.Path.Combine(ModExtensiones.DirectorioBaseEmpresas, "Empresas/Grales/Lista de Raya.docx");
|
||||||
|
}
|
||||||
DataTable dtpersonas = null;
|
DataTable dtpersonas = null;
|
||||||
using (ClsRH ObjRH = new ClsRH())
|
using (ClsRH ObjRH = new ClsRH())
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ public partial class RH_CalculoSBC : ClsPaginas
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
string rutarchivos = string.Format("{0}\\modificacionsalarios\\", UsuarioActual.Empresa.RutaArchivos);
|
string rutarchivos = string.Format("{0}modificacionsalarios\\", UsuarioActual.Empresa.RutaArchivos);
|
||||||
if (!System.IO.Directory.Exists(rutarchivos))
|
if (!System.IO.Directory.Exists(rutarchivos))
|
||||||
{
|
{
|
||||||
System.IO.Directory.CreateDirectory(rutarchivos);
|
System.IO.Directory.CreateDirectory(rutarchivos);
|
||||||
|
|||||||
@@ -245,9 +245,17 @@
|
|||||||
<div class="portlet-title portlet-filterT smalltitle">
|
<div class="portlet-title portlet-filterT smalltitle">
|
||||||
<div class="titlefiltros caption">
|
<div class="titlefiltros caption">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<label class="col-md-1">Agrupador: </label>
|
<label class="col-md-1">Tipo Nomina: </label>
|
||||||
<div class="col-md-2">
|
<div class="col-md-2">
|
||||||
<asp:DropDownList ID="DdlReporte" runat="server" Style="width: 100% !important;" CssClass="select2me" >
|
<asp:DropDownList ID="DdlTipoNomina" runat="server" Style="width: 100% !important;" CssClass="select2me">
|
||||||
|
<asp:ListItem Value="-1" Text="Todos"></asp:ListItem>
|
||||||
|
<asp:ListItem Value="1" Text="Ordinaria" Selected="True"></asp:ListItem>
|
||||||
|
<asp:ListItem Value="2" Text="Extraordinaria"></asp:ListItem>
|
||||||
|
</asp:DropDownList>
|
||||||
|
</div>
|
||||||
|
<label class="col-md-1">Grupo: </label>
|
||||||
|
<div class="col-md-2">
|
||||||
|
<asp:DropDownList ID="DdlReporte" runat="server" Style="width: 100% !important;" CssClass="select2me">
|
||||||
<asp:ListItem Value="1" Text="Conciliacion ISR mensual"></asp:ListItem>
|
<asp:ListItem Value="1" Text="Conciliacion ISR mensual"></asp:ListItem>
|
||||||
<asp:ListItem Value="2" Text="Conciliacion ISR por concepto"></asp:ListItem>
|
<asp:ListItem Value="2" Text="Conciliacion ISR por concepto"></asp:ListItem>
|
||||||
<asp:ListItem Value="3" Text="Conciliacion ISR por recibo"></asp:ListItem>
|
<asp:ListItem Value="3" Text="Conciliacion ISR por recibo"></asp:ListItem>
|
||||||
@@ -260,11 +268,11 @@
|
|||||||
<asp:ListItem Value="9" Text="Anual sueldos y salarios por recibo"></asp:ListItem>
|
<asp:ListItem Value="9" Text="Anual sueldos y salarios por recibo"></asp:ListItem>
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</div>
|
</div>
|
||||||
<label class="col-md-1 mediocol">Fecha inicio:</label>
|
|
||||||
<div class="col-md-2">
|
<div class="col-md-2">
|
||||||
|
<label class="">F.I.:</label>
|
||||||
<%--<asp:TextBox ID="TxtPeriodoInicio" Text="0" CssClass="form-control" runat="server"></asp:TextBox>--%>
|
<%--<asp:TextBox ID="TxtPeriodoInicio" Text="0" CssClass="form-control" runat="server"></asp:TextBox>--%>
|
||||||
|
|
||||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 138px !important; padding: 0px; margin-bottom: -10px;">
|
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="display: inline-block;width: 138px !important; padding: 0px; margin-bottom: -10px;">
|
||||||
<asp:TextBox ID="TxtRpdFechaInicio" CssClass="form-control input-sm ADSMaskDate" Style="width: 80px" runat="server"></asp:TextBox>
|
<asp:TextBox ID="TxtRpdFechaInicio" CssClass="form-control input-sm ADSMaskDate" Style="width: 80px" runat="server"></asp:TextBox>
|
||||||
<span class="input-group-btn ">
|
<span class="input-group-btn ">
|
||||||
<asp:LinkButton ID="LnkRpdFechaInicio" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
<asp:LinkButton ID="LnkRpdFechaInicio" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||||
@@ -275,10 +283,10 @@
|
|||||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco" TargetControlID="rfvRpdFechaInicio"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco" TargetControlID="rfvRpdFechaInicio"></ajax:ValidatorCalloutExtender>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<label class="col-md-1 mediocol">Fecha fin:</label>
|
|
||||||
<div class="col-md-2">
|
<div class="col-md-2">
|
||||||
|
<label class="">F.F:</label>
|
||||||
<%--<asp:TextBox ID="TxtPeriodoFin" Text="99" CssClass="form-control" runat="server"></asp:TextBox>--%>
|
<%--<asp:TextBox ID="TxtPeriodoFin" Text="99" CssClass="form-control" runat="server"></asp:TextBox>--%>
|
||||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 138px !important; padding: 0px; margin-bottom: -10px;">
|
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="display: inline-block;width: 138px !important; padding: 0px; margin-bottom: -10px;">
|
||||||
<asp:TextBox ID="TxtRpdFechaFin" CssClass="form-control input-sm ADSMaskDate" Style="width: 80px" runat="server"></asp:TextBox>
|
<asp:TextBox ID="TxtRpdFechaFin" CssClass="form-control input-sm ADSMaskDate" Style="width: 80px" runat="server"></asp:TextBox>
|
||||||
<span class="input-group-btn ">
|
<span class="input-group-btn ">
|
||||||
<asp:LinkButton ID="LnkFechaFin" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
<asp:LinkButton ID="LnkFechaFin" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||||
@@ -289,14 +297,6 @@
|
|||||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server" HighlightCssClass="vco" TargetControlID="rfvRpdFechaFin"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server" HighlightCssClass="vco" TargetControlID="rfvRpdFechaFin"></ajax:ValidatorCalloutExtender>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<label class="col-md-1">Tipo Nomina: </label>
|
|
||||||
<div class="col-md-2">
|
|
||||||
<asp:DropDownList ID="DdlTipoNomina" runat="server" Style="width: 100% !important;" CssClass="select2me" >
|
|
||||||
<asp:ListItem Value="-1" Text="Todos"></asp:ListItem>
|
|
||||||
<asp:ListItem Value="1" Text="Ordinaria" Selected="True"></asp:ListItem>
|
|
||||||
<asp:ListItem Value="2" Text="Extraordinaria"></asp:ListItem>
|
|
||||||
</asp:DropDownList>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-2">
|
<div class="col-md-2">
|
||||||
<asp:LinkButton ID="LnkConsultar" OnClick="LnkConsultar_Click" runat="server" Text="Consultar" Visible="true" class="btn btn-primary" />
|
<asp:LinkButton ID="LnkConsultar" OnClick="LnkConsultar_Click" runat="server" Text="Consultar" Visible="true" class="btn btn-primary" />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -542,6 +542,8 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user