Merge branch 'master' of http://jperez@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -163,6 +163,7 @@ Public Class ClsClientes
|
|||||||
Public Property UsaProductoAlterno As Boolean = False
|
Public Property UsaProductoAlterno As Boolean = False
|
||||||
Public Property EnDemanda As Boolean = False
|
Public Property EnDemanda As Boolean = False
|
||||||
Public Property EnQuebranto As Boolean = False
|
Public Property EnQuebranto As Boolean = False
|
||||||
|
Public Property GastosEnvio As Decimal = 0
|
||||||
|
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
@@ -417,6 +418,7 @@ Public Class ClsClientes
|
|||||||
_UsaProductoAlterno = CBool(Data(0)("UsaProductoAlterno"))
|
_UsaProductoAlterno = CBool(Data(0)("UsaProductoAlterno"))
|
||||||
_EnDemanda = CBool(Data(0)("UsaProductoAlterno"))
|
_EnDemanda = CBool(Data(0)("UsaProductoAlterno"))
|
||||||
_EnQuebranto = CBool(Data(0)("EnQuebranto"))
|
_EnQuebranto = CBool(Data(0)("EnQuebranto"))
|
||||||
|
_GastosEnvio = Data(0)("GastosEnvio").ToString.ToDecimal
|
||||||
|
|
||||||
End If
|
End If
|
||||||
Retorno = True
|
Retorno = True
|
||||||
@@ -535,7 +537,7 @@ Public Class ClsClientes
|
|||||||
Optional LT As String = "0", Optional LG As String = "0", Optional EsDistribuidor As Boolean = False, Optional TipoCliente As Integer = 1, Optional CargoUsado As Boolean = False, Optional BonificacionUsado As Boolean = False, Optional CveTipoRetencion As Integer = 0,
|
Optional LT As String = "0", Optional LG As String = "0", Optional EsDistribuidor As Boolean = False, Optional TipoCliente As Integer = 1, Optional CargoUsado As Boolean = False, Optional BonificacionUsado As Boolean = False, Optional CveTipoRetencion As Integer = 0,
|
||||||
Optional CorreoEntregaCompras As String = "-1", Optional CorreoEntregaAlmacen As String = "-1", Optional CveSATEstado As Integer = -1, Optional CveAdminTrayecto As Integer = -1, Optional CveRegimenFiscal As Integer = 0, Optional RegimenSociedad As String = "-1", Optional TipoPersona As Boolean = False,
|
Optional CorreoEntregaCompras As String = "-1", Optional CorreoEntregaAlmacen As String = "-1", Optional CveSATEstado As Integer = -1, Optional CveAdminTrayecto As Integer = -1, Optional CveRegimenFiscal As Integer = 0, Optional RegimenSociedad As String = "-1", Optional TipoPersona As Boolean = False,
|
||||||
Optional RepresentanteLegal As String = "", Optional FechaLimiteCredito As Date = MinFecha, Optional ComExtCalle As String = "-1", Optional ComExtNumExt As String = "-1", Optional ComExtCP As String = "-1", Optional Genero As Boolean = True, Optional CveAlmacenAsignado As Integer = -1, Optional CveAlmacenConsignacion As Integer = -1, Optional CveAlmacenAlterno As Integer = -1, Optional UsaProductoAlterno As Boolean = False,
|
Optional RepresentanteLegal As String = "", Optional FechaLimiteCredito As Date = MinFecha, Optional ComExtCalle As String = "-1", Optional ComExtNumExt As String = "-1", Optional ComExtCP As String = "-1", Optional Genero As Boolean = True, Optional CveAlmacenAsignado As Integer = -1, Optional CveAlmacenConsignacion As Integer = -1, Optional CveAlmacenAlterno As Integer = -1, Optional UsaProductoAlterno As Boolean = False,
|
||||||
Optional EnDemanda As Boolean = False, Optional EnQuebranto As Boolean = False) As Boolean
|
Optional EnDemanda As Boolean = False, Optional EnQuebranto As Boolean = False, Optional GastosEnvio As Decimal = 0) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
|
|
||||||
@@ -669,6 +671,7 @@ Public Class ClsClientes
|
|||||||
.Add("@UsaProductoAlterno", SqlDbType.Bit).Value = UsaProductoAlterno
|
.Add("@UsaProductoAlterno", SqlDbType.Bit).Value = UsaProductoAlterno
|
||||||
.Add("@EnDemanda", SqlDbType.Bit).Value = EnDemanda
|
.Add("@EnDemanda", SqlDbType.Bit).Value = EnDemanda
|
||||||
.Add("@EnQuebranto", SqlDbType.Bit).Value = EnQuebranto
|
.Add("@EnQuebranto", SqlDbType.Bit).Value = EnQuebranto
|
||||||
|
.Add("@GastosEnvio", SqlDbType.SmallMoney).Value = GastosEnvio
|
||||||
End With
|
End With
|
||||||
Try
|
Try
|
||||||
SqlAdapter.Fill(Data)
|
SqlAdapter.Fill(Data)
|
||||||
@@ -715,7 +718,7 @@ Public Class ClsClientes
|
|||||||
Optional LT As String = "0", Optional LG As String = "0", Optional EsDistribuidor As Boolean = False, Optional TipoCliente As Integer = 1, Optional CargoUsado As Boolean = False, Optional BonificacionUsado As Boolean = False, Optional CveTipoRetencion As Integer = 0, Optional CorreoEntregaCompras As String = "-1", Optional CorreoEntregaAlmacen As String = "-1",
|
Optional LT As String = "0", Optional LG As String = "0", Optional EsDistribuidor As Boolean = False, Optional TipoCliente As Integer = 1, Optional CargoUsado As Boolean = False, Optional BonificacionUsado As Boolean = False, Optional CveTipoRetencion As Integer = 0, Optional CorreoEntregaCompras As String = "-1", Optional CorreoEntregaAlmacen As String = "-1",
|
||||||
Optional CveSATEstado As Integer = -1, Optional CveAdminTrayecto As Integer = -1, Optional NoDesglosaIVA As Boolean = False, Optional CveRegimenFiscal As Integer = 0, Optional RegimenSociedad As String = "-1", Optional TipoPersona As Boolean = False,
|
Optional CveSATEstado As Integer = -1, Optional CveAdminTrayecto As Integer = -1, Optional NoDesglosaIVA As Boolean = False, Optional CveRegimenFiscal As Integer = 0, Optional RegimenSociedad As String = "-1", Optional TipoPersona As Boolean = False,
|
||||||
Optional RepresentanteLegal As String = "", Optional FechaLimiteCredito As Date = MinFecha, Optional ComExtCalle As String = "-1", Optional ComExtNumExt As String = "-1", Optional ComExtCP As String = "-1", Optional Genero As Boolean = True, Optional CveAlmacenAsignado As Integer = -1, Optional CveAlmacenAlterno As Integer = -1, Optional CveAlmacenConsignacion As Integer = -1, Optional UsaProductoAlterno As Boolean = False,
|
Optional RepresentanteLegal As String = "", Optional FechaLimiteCredito As Date = MinFecha, Optional ComExtCalle As String = "-1", Optional ComExtNumExt As String = "-1", Optional ComExtCP As String = "-1", Optional Genero As Boolean = True, Optional CveAlmacenAsignado As Integer = -1, Optional CveAlmacenAlterno As Integer = -1, Optional CveAlmacenConsignacion As Integer = -1, Optional UsaProductoAlterno As Boolean = False,
|
||||||
Optional EnDemanda As Boolean = False, Optional EnQuebranto As Boolean = False) As Boolean
|
Optional EnDemanda As Boolean = False, Optional EnQuebranto As Boolean = False, Optional GastosEnvio As Decimal = 0) As Boolean
|
||||||
|
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
@@ -859,6 +862,7 @@ Public Class ClsClientes
|
|||||||
.Add("@UsaProductoAlterno", SqlDbType.Bit).Value = UsaProductoAlterno
|
.Add("@UsaProductoAlterno", SqlDbType.Bit).Value = UsaProductoAlterno
|
||||||
.Add("@EnDemanda", SqlDbType.Bit).Value = EnDemanda
|
.Add("@EnDemanda", SqlDbType.Bit).Value = EnDemanda
|
||||||
.Add("@EnQuebranto", SqlDbType.Bit).Value = EnQuebranto
|
.Add("@EnQuebranto", SqlDbType.Bit).Value = EnQuebranto
|
||||||
|
.Add("@GastosEnvio", SqlDbType.SmallMoney).Value = GastosEnvio
|
||||||
End With
|
End With
|
||||||
Try
|
Try
|
||||||
SqlAdapter.Fill(Data)
|
SqlAdapter.Fill(Data)
|
||||||
|
|||||||
@@ -3812,6 +3812,27 @@ Public Class ClsNominas
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
Public Function MovimientosSaldosGet(cvePersonal As Int32, cvePeriodo As Int32, cveUsuario As Int32, cveEmpresa As Int32) As Boolean
|
||||||
|
Dim retorno As Boolean = False
|
||||||
|
DataAdapter("PA_Nom_MovimientosSaldosGet", CommandType.StoredProcedure)
|
||||||
|
addParameters("@CvePersonal", SqlDbType.Int, cvePersonal)
|
||||||
|
addParameters("@CvePeriodo", SqlDbType.Int, cvePeriodo)
|
||||||
|
addParameters("@CveUsuario", SqlDbType.Int, cveUsuario)
|
||||||
|
addParameters("@CveEmpresa", SqlDbType.Int, cveEmpresa)
|
||||||
|
retorno = RunQuery("Ocurrió un error al obtener el MovimientosSaldosGet.")
|
||||||
|
Return retorno
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Function NomMovimientosShow(cvePersonal As Int32, cvePeriodo As Int32, cveUsuario As Int32, cveEmpresa As Int32) As Boolean
|
||||||
|
Dim retorno As Boolean = False
|
||||||
|
DataAdapter("PA_Nom_MovimientosShow", CommandType.StoredProcedure)
|
||||||
|
addParameters("@CvePersonal", SqlDbType.Int, cvePersonal)
|
||||||
|
addParameters("@CvePeriodo", SqlDbType.Int, cvePeriodo)
|
||||||
|
addParameters("@CveUsuario", SqlDbType.Int, cveUsuario)
|
||||||
|
addParameters("@CveEmpresa", SqlDbType.Int, cveEmpresa)
|
||||||
|
retorno = RunQuery("Ocurrió un error al obtener el NomMovimientosShow.")
|
||||||
|
Return retorno
|
||||||
|
End Function
|
||||||
|
|
||||||
Public Sub addParameters(varsql As String, sqltipe As SqlDbType, valor As Object)
|
Public Sub addParameters(varsql As String, sqltipe As SqlDbType, valor As Object)
|
||||||
SqlAdapter.SelectCommand.Parameters.Add(varsql, sqltipe).Value = valor
|
SqlAdapter.SelectCommand.Parameters.Add(varsql, sqltipe).Value = valor
|
||||||
|
|||||||
@@ -1728,7 +1728,7 @@ Public Class ClsOS
|
|||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
Public Function UpdateOrdenesServiciosAsignadas(CveOSDetalle As Integer, CveUsuario As Integer, FechaCita As Date, HoraCita As DateTime, CveEmpresa As Integer) As Boolean
|
Public Function UpdateOrdenesServiciosAsignadas(CveOSDetalle As Integer, CveUsuarioAtendio As Integer, FechaCita As Date, HoraCita As DateTime, CveEmpresa As Integer, CveUsuario As Integer) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_OS_OrdenesServiciosAsignadasUpdate")
|
DataAdapter("PA_OS_OrdenesServiciosAsignadasUpdate")
|
||||||
|
|
||||||
@@ -1737,6 +1737,7 @@ Public Class ClsOS
|
|||||||
.Add("@FechaCita", SqlDbType.Date).Value = FechaCita
|
.Add("@FechaCita", SqlDbType.Date).Value = FechaCita
|
||||||
.Add("@HoraCita", SqlDbType.DateTime).Value = HoraCita
|
.Add("@HoraCita", SqlDbType.DateTime).Value = HoraCita
|
||||||
.Add("@CveOSDetalle", SqlDbType.Int).Value = CveOSDetalle
|
.Add("@CveOSDetalle", SqlDbType.Int).Value = CveOSDetalle
|
||||||
|
.Add("@CveUsuarioAtendio", SqlDbType.Int).Value = CveUsuarioAtendio
|
||||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||||
End With
|
End With
|
||||||
|
|
||||||
|
|||||||
@@ -7945,299 +7945,315 @@ Public Class ClsPaginas
|
|||||||
#End Region
|
#End Region
|
||||||
#Region "PDF NOMINA"
|
#Region "PDF NOMINA"
|
||||||
Public Function GeneraPDFNomina(CvePersonal As Integer, CvePeriodo As Integer, CveEmpresa As Integer, RutaEmpresa As String, Optional indemnizacion As Boolean = False) As Byte()
|
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 As Boolean = False
|
|
||||||
Dim Retorno As Byte() = Nothing
|
Dim Retorno As Byte() = Nothing
|
||||||
If Not ObjNomina.GetNom_Nominas(-1, CvePersonal, CvePeriodo, -1, CveEmpresa) Then
|
Using ObjNomina As New ClsNominas
|
||||||
Alert("Ocurrio un erro al obtener datos de la nomina", TipoMensaje.MsgError)
|
Using ObjPersonal As New ClsRH
|
||||||
ObjPersonal.Dispose()
|
|
||||||
ObjNomina.Dispose()
|
|
||||||
Return Nothing
|
|
||||||
End If
|
|
||||||
Dim CveNomina As Integer = 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")
|
|
||||||
Dim CFDIVersion As String = ""
|
|
||||||
Dim UsoCFDI As String = "ND"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
'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
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Try
|
|
||||||
CFDIVersion = ValorNodoXML(XmlDoc.DocumentElement, "version")
|
|
||||||
|
|
||||||
|
|
||||||
Dim nsManager As New XmlNamespaceManager(XmlDoc.NameTable)
|
|
||||||
nsManager.AddNamespace("cfdi", If(CFDIVersion = "4.0", "http://www.sat.gob.mx/cfd/4", "http://www.sat.gob.mx/cfd/3"))
|
|
||||||
|
|
||||||
Dim receptorNode As XmlNode = XmlDoc.SelectSingleNode("/cfdi:comprobante/cfdi:emisor/cfdi:receptor", nsManager)
|
|
||||||
|
|
||||||
If receptorNode IsNot Nothing Then
|
|
||||||
UsoCFDI = ValorNodoXML(receptorNode, "usocfdi")
|
|
||||||
Dim UsoCFDIImprimir As String = GlobalDTSATUsosCFDI(-1, "-1").FiltroPrimeroValor("UsoCFDIDescripcion", $" UsoCFDI = '{UsoCFDI}' ")
|
|
||||||
|
|
||||||
If UsoCFDIImprimir.Trim.Length > 0 Then
|
|
||||||
UsoCFDI = UsoCFDIImprimir
|
|
||||||
End If
|
|
||||||
|
|
||||||
|
Dim TieneError As Boolean = False
|
||||||
|
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
|
End If
|
||||||
|
Dim CveNomina As Integer = 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 RutaCBBDir As String = String.Format("{0}CBB\Nomina\", RutaEmpresa)
|
||||||
|
If Not (System.IO.Directory.Exists(RutaCBBDir)) Then
|
||||||
|
System.IO.Directory.CreateDirectory(RutaCBBDir)
|
||||||
|
End If
|
||||||
|
Dim RutaCBB As String = String.Format("{0}{1}.jpg", RutaCBBDir, 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")
|
||||||
|
Dim CFDIVersion As String = ""
|
||||||
|
Dim UsoCFDI As String = "ND"
|
||||||
|
|
||||||
If UsoCFDI = "ND" Or UsoCFDI = "" Then
|
|
||||||
|
|
||||||
If CFDIVersion = "4.0" Then
|
|
||||||
UsoCFDI = "CN01 - Nómina"
|
'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
|
Else
|
||||||
UsoCFDI = "P01 - Por definir"
|
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
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Try
|
||||||
|
CFDIVersion = ValorNodoXML(XmlDoc.DocumentElement, "version")
|
||||||
|
|
||||||
|
|
||||||
|
Dim nsManager As New XmlNamespaceManager(XmlDoc.NameTable)
|
||||||
|
nsManager.AddNamespace("cfdi", If(CFDIVersion = "4.0", "http://www.sat.gob.mx/cfd/4", "http://www.sat.gob.mx/cfd/3"))
|
||||||
|
|
||||||
|
Dim receptorNode As XmlNode = XmlDoc.SelectSingleNode("/cfdi:comprobante/cfdi:emisor/cfdi:receptor", nsManager)
|
||||||
|
|
||||||
|
If receptorNode IsNot Nothing Then
|
||||||
|
UsoCFDI = ValorNodoXML(receptorNode, "usocfdi")
|
||||||
|
Dim UsoCFDIImprimir As String = GlobalDTSATUsosCFDI(-1, "-1").FiltroPrimeroValor("UsoCFDIDescripcion", $" UsoCFDI = '{UsoCFDI}' ")
|
||||||
|
|
||||||
|
If UsoCFDIImprimir.Trim.Length > 0 Then
|
||||||
|
UsoCFDI = UsoCFDIImprimir
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
If UsoCFDI = "ND" Or UsoCFDI = "" Then
|
||||||
|
|
||||||
|
If CFDIVersion = "4.0" Then
|
||||||
|
UsoCFDI = "CN01 - Nómina"
|
||||||
|
Else
|
||||||
|
UsoCFDI = "P01 - Por definir"
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
Catch ex As Exception
|
||||||
|
|
||||||
|
End Try
|
||||||
|
|
||||||
|
'SIN TIMBRAR - SIN XML
|
||||||
|
Else
|
||||||
|
FolioFiscal = "Sin Timbrar"
|
||||||
|
NoSerieCertificado = "Sin Timbrar"
|
||||||
|
SelloCFDi = "Sin Timbrar"
|
||||||
|
SelloSAT = "Sin Timbrar"
|
||||||
End If
|
End If
|
||||||
|
'Si no tiene CBB, SE GENERA
|
||||||
|
If Not ImagenCBB.Exists Then
|
||||||
Catch ex As Exception
|
If ObjPersonal.GetPersonal(CvePersonal, CveEmpresa) Then
|
||||||
|
GeneraQRSAT(UsuarioActual.Empresa.RFC, ObjPersonal.RFC, ObjNomina.Total.ToString.ToDecimal, FolioFiscal, RutaGuardado:=RutaCBB)
|
||||||
End Try
|
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
|
|
||||||
If ObjPersonal.GetPersonal(CvePersonal, CveEmpresa) Then
|
|
||||||
GeneraQRSAT(UsuarioActual.Empresa.RFC, ObjPersonal.RFC, ObjNomina.Total.ToString.ToDecimal, FolioFiscal, RutaGuardado:=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
|
End If
|
||||||
DTPercepciones = ObjNomina.DtResultados.FiltraParametros($"((Tipo = 'P' OR (Tipo = 'D' AND Importe <0)) AND ((Importe <>0 AND EsPadre = 1 AND SoloVisible =0) OR Imprimir =1)) {filtrop}")
|
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)
|
||||||
DTDeducciones = ObjNomina.DtResultados.FiltraParametros($"(Tipo = 'D' AND ((Importe >0 AND EsPadre = 1 AND SoloVisible =0) OR Imprimir =1) ) {friltrod}")
|
Dim cQr As Byte() = Nothing
|
||||||
DTDeducciones2 = ObjNomina.DtResultados.FiltraParametros($"(Tipo = 'D' AND (( Importe >0 AND EsPadre = 1 AND SoloVisible =0) OR Imprimir =1) ){friltrod}")
|
Try
|
||||||
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") -
|
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) OR Imprimir =1)) {filtrop}")
|
||||||
|
DTDeducciones = ObjNomina.DtResultados.FiltraParametros($"(Tipo = 'D' AND ((Importe >0 AND EsPadre = 1 AND SoloVisible =0) OR Imprimir =1) ) {friltrod}")
|
||||||
|
DTDeducciones2 = ObjNomina.DtResultados.FiltraParametros($"(Tipo = 'D' AND (( Importe >0 AND EsPadre = 1 AND SoloVisible =0) OR Imprimir =1) ){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")
|
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
|
For Each row As DataRow In DTPercepciones.Rows
|
||||||
If row("Tipo").ToString() = "D" Then
|
If row("Tipo").ToString() = "D" Then
|
||||||
row("Codigo") = row("Codigo").ToString().Replace("D", "OP")
|
row("Codigo") = row("Codigo").ToString().Replace("D", "OP")
|
||||||
row("Importe") = row("Importe").ToString().ToDecimal() * -1
|
row("Importe") = row("Importe").ToString().ToDecimal() * -1
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Else
|
||||||
|
DTPercepciones = Nothing
|
||||||
|
DTDeducciones = Nothing
|
||||||
End If
|
End If
|
||||||
Next
|
Dim SalarioDiario As String
|
||||||
Else
|
Dim SDI As String
|
||||||
DTPercepciones = Nothing
|
Dim Departamento As String
|
||||||
DTDeducciones = Nothing
|
Dim Puesto As String
|
||||||
End If
|
'DATOS DEL EMPLEADO
|
||||||
Dim SalarioDiario As String
|
If ObjPersonal.GetPersonal(CvePersonal, CveEmpresa) Then
|
||||||
Dim SDI As String
|
RptParametro.Add(New ReportParameter("NoEmpleado", ObjPersonal.Codigo))
|
||||||
Dim Departamento As String
|
RptParametro.Add(New ReportParameter("RFC", ObjPersonal.RFC))
|
||||||
Dim Puesto As String
|
RptParametro.Add(New ReportParameter("CURP", ObjPersonal.CURP))
|
||||||
'DATOS DEL EMPLEADO
|
RptParametro.Add(New ReportParameter("NombreCompleto", String.Format("{0} {1} {2}", ObjPersonal.Nombres, ObjPersonal.APaterno, ObjPersonal.AMaterno).Trim()))
|
||||||
If ObjPersonal.GetPersonal(CvePersonal, CveEmpresa) Then
|
RptParametro.Add(New ReportParameter("Regimen", ObjPersonal.RegimenContratacion))
|
||||||
RptParametro.Add(New ReportParameter("NoEmpleado", ObjPersonal.Codigo))
|
RptParametro.Add(New ReportParameter("RiesgoPuesto", ObjPersonal.RiesgoPuesto))
|
||||||
RptParametro.Add(New ReportParameter("RFC", ObjPersonal.RFC))
|
RptParametro.Add(New ReportParameter("NSS", ObjPersonal.NumeroSS))
|
||||||
RptParametro.Add(New ReportParameter("CURP", ObjPersonal.CURP))
|
Departamento = ObjPersonal.Departamento
|
||||||
RptParametro.Add(New ReportParameter("NombreCompleto", String.Format("{0} {1} {2}", ObjPersonal.Nombres, ObjPersonal.APaterno, ObjPersonal.AMaterno).Trim()))
|
Puesto = ObjPersonal.Puesto.ToString()
|
||||||
RptParametro.Add(New ReportParameter("Regimen", ObjPersonal.RegimenContratacion))
|
RptParametro.Add(New ReportParameter("FechaIngreso", ObjPersonal.FechaIngreso.ToString("dd/MM/yyyy")))
|
||||||
RptParametro.Add(New ReportParameter("RiesgoPuesto", ObjPersonal.RiesgoPuesto))
|
RptParametro.Add(New ReportParameter("Contrato", ObjPersonal.TipoContrato.ToString))
|
||||||
RptParametro.Add(New ReportParameter("NSS", ObjPersonal.NumeroSS))
|
RptParametro.Add(New ReportParameter("Jornada", ObjPersonal.Jornada))
|
||||||
Departamento = ObjPersonal.Departamento
|
RptParametro.Add(New ReportParameter("Periodo", ObjNomina.TipoPeriodo))
|
||||||
Puesto = ObjPersonal.Puesto.ToString()
|
RptParametro.Add(New ReportParameter("Banco", ObjPersonal.Banco))
|
||||||
RptParametro.Add(New ReportParameter("FechaIngreso", ObjPersonal.FechaIngreso.ToString("dd/MM/yyyy")))
|
RptParametro.Add(New ReportParameter("CLABE", ObjPersonal.CLABE))
|
||||||
RptParametro.Add(New ReportParameter("Contrato", ObjPersonal.TipoContrato.ToString))
|
SalarioDiario = ObjPersonal.SalarioDiario.ToString
|
||||||
RptParametro.Add(New ReportParameter("Jornada", ObjPersonal.Jornada))
|
SDI = ObjPersonal.SDI.ToString
|
||||||
RptParametro.Add(New ReportParameter("Periodo", ObjNomina.TipoPeriodo))
|
If ObjNomina.GetNom_NominasDataXML(CveNomina, CvePersonal, CvePeriodo, 1, CveEmpresa) AndAlso ObjNomina.DtResultados.Rows.Count > 0 Then
|
||||||
RptParametro.Add(New ReportParameter("Banco", ObjPersonal.Banco))
|
Dim drow As DataRow = ObjNomina.DtResultados.Rows(0)
|
||||||
RptParametro.Add(New ReportParameter("CLABE", ObjPersonal.CLABE))
|
SalarioDiario = drow("SalarioDiario").ToString()
|
||||||
SalarioDiario = ObjPersonal.SalarioDiario.ToString
|
SDI = drow("NomRSalarioDiarioIntegrado").ToString()
|
||||||
SDI = ObjPersonal.SDI.ToString
|
Departamento = drow("NomRDepartamento").ToString()
|
||||||
If ObjNomina.GetNom_NominasDataXML(CveNomina, CvePersonal, CvePeriodo, 1, CveEmpresa) AndAlso ObjNomina.DtResultados.Rows.Count > 0 Then
|
Puesto = drow("NomRPuesto").ToString()
|
||||||
Dim drow As DataRow = ObjNomina.DtResultados.Rows(0)
|
End If
|
||||||
SalarioDiario = drow("SalarioDiario").ToString()
|
RptParametro.Add(New ReportParameter("SalarioBase", SalarioDiario))
|
||||||
SDI = drow("NomRSalarioDiarioIntegrado").ToString()
|
RptParametro.Add(New ReportParameter("SalarioDiarioInt", SDI))
|
||||||
Departamento = drow("NomRDepartamento").ToString()
|
RptParametro.Add(New ReportParameter("Departamento", Departamento))
|
||||||
Puesto = drow("NomRPuesto").ToString()
|
RptParametro.Add(New ReportParameter("Puesto", Puesto))
|
||||||
End If
|
'DATOS NOMINA
|
||||||
RptParametro.Add(New ReportParameter("SalarioBase", SalarioDiario))
|
If ObjNomina.GetNom_Nominas(CveNomina, CvePersonal, CvePeriodo, 1, CveEmpresa) Then
|
||||||
RptParametro.Add(New ReportParameter("SalarioDiarioInt", SDI))
|
RptParametro.Add(New ReportParameter("ReciboNomina", ObjNomina.Folio.ToString))
|
||||||
RptParametro.Add(New ReportParameter("Departamento", Departamento))
|
RptParametro.Add(New ReportParameter("Serie", ObjNomina.Serie))
|
||||||
RptParametro.Add(New ReportParameter("Puesto", Puesto))
|
RptParametro.Add(New ReportParameter("Fecha", ObjNomina.Fecha.ToString))
|
||||||
'DATOS NOMINA
|
RptParametro.Add(New ReportParameter("Periodo", ObjNomina.TipoPeriodo))
|
||||||
If ObjNomina.GetNom_Nominas(CveNomina, CvePersonal, CvePeriodo, 1, CveEmpresa) Then
|
RptParametro.Add(New ReportParameter("DiasPagados", ObjNomina.DiasPagados.ToString))
|
||||||
RptParametro.Add(New ReportParameter("ReciboNomina", ObjNomina.Folio.ToString))
|
RptParametro.Add(New ReportParameter("MetodoPago", ObjNomina.MetodoPago)) '"""PUE"" (Pago en una sola exhibición)"
|
||||||
RptParametro.Add(New ReportParameter("Serie", ObjNomina.Serie))
|
RptParametro.Add(New ReportParameter("FormaPago", """99"" (Por definir)"))
|
||||||
RptParametro.Add(New ReportParameter("Fecha", ObjNomina.Fecha.ToString))
|
RptParametro.Add(New ReportParameter("Cantidad", "1"))
|
||||||
RptParametro.Add(New ReportParameter("Periodo", ObjNomina.TipoPeriodo))
|
RptParametro.Add(New ReportParameter("Unidad", "ACT"))
|
||||||
RptParametro.Add(New ReportParameter("DiasPagados", ObjNomina.DiasPagados.ToString))
|
RptParametro.Add(New ReportParameter("Descripcion", "PAGO DE NÓMINA"))
|
||||||
RptParametro.Add(New ReportParameter("MetodoPago", ObjNomina.MetodoPago)) '"""PUE"" (Pago en una sola exhibición)"
|
RptParametro.Add(New ReportParameter("Total", If(indemnizacion, ajusteindemnizacion, ObjNomina.Total - ajusteindemnizacion).ToString()))
|
||||||
RptParametro.Add(New ReportParameter("FormaPago", """99"" (Por definir)"))
|
RptParametro.Add(New ReportParameter("ImporteLetra", ObjNomina.Total.ToString.ToDecimal.Texto2Letras))
|
||||||
RptParametro.Add(New ReportParameter("Cantidad", "1"))
|
RptParametro.Add(New ReportParameter("Clave", "84111505"))
|
||||||
RptParametro.Add(New ReportParameter("Unidad", "ACT"))
|
cQr = GeneraQRSAT(UsuarioActual.Empresa.RFC, ObjPersonal.RFC, ObjNomina.Total.ToString().ToDecimal(), FolioFiscal)
|
||||||
RptParametro.Add(New ReportParameter("Descripcion", "PAGO DE NÓMINA"))
|
Else
|
||||||
RptParametro.Add(New ReportParameter("Total", If(indemnizacion, ajusteindemnizacion, ObjNomina.Total - ajusteindemnizacion).ToString()))
|
TieneError = True
|
||||||
RptParametro.Add(New ReportParameter("ImporteLetra", ObjNomina.Total.ToString.ToDecimal.Texto2Letras))
|
End If
|
||||||
RptParametro.Add(New ReportParameter("Clave", "84111505"))
|
Else
|
||||||
cQr = GeneraQRSAT(UsuarioActual.Empresa.RFC, ObjPersonal.RFC, ObjNomina.Total.ToString().ToDecimal(), FolioFiscal)
|
TieneError = True
|
||||||
Else
|
End If
|
||||||
TieneError = True
|
If Not TieneError Then
|
||||||
End If
|
If ObjNomina.GetPeriodos(-1, CveEmpresa, -1, -1, CvePeriodo) Then
|
||||||
Else
|
RptParametro.Add(New ReportParameter("FechaInicio", ObjNomina.FechaInicio.ToString("dd/MM/yyyy")))
|
||||||
TieneError = True
|
RptParametro.Add(New ReportParameter("FechaFin", ObjNomina.FechaFin.ToString("dd/MM/yyyy")))
|
||||||
End If
|
Else
|
||||||
If Not TieneError Then
|
TieneError = True
|
||||||
If ObjNomina.GetPeriodos(-1, CveEmpresa, -1, -1, CvePeriodo) Then
|
End If
|
||||||
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))
|
|
||||||
|
|
||||||
RptParametro.Add(New ReportParameter("CFDIVersion", CFDIVersion))
|
|
||||||
RptParametro.Add(New ReportParameter("UsoCFDI", UsoCFDI))
|
|
||||||
|
|
||||||
Dim LSRds As New List(Of ReportDataSource)
|
|
||||||
|
|
||||||
Dim rds2 As ReportDataSource = 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 As Integer = 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 As Integer = 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
|
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()
|
RptParametro.Add(New ReportParameter("PU", DTPercepciones.SUM("Importe").ToString()))
|
||||||
ObjPersonal.Dispose()
|
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))
|
||||||
|
|
||||||
|
RptParametro.Add(New ReportParameter("CFDIVersion", CFDIVersion))
|
||||||
|
RptParametro.Add(New ReportParameter("UsoCFDI", UsoCFDI))
|
||||||
|
|
||||||
|
Dim LSRds As New List(Of ReportDataSource)
|
||||||
|
|
||||||
|
Dim rds2 As ReportDataSource = 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 As Integer = 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 As Integer = 1 To numnewfiles
|
||||||
|
DTPercepciones.Rows.Add(DTPercepciones.NewRow)
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
If ObjNomina.NomMovimientosShow(CvePersonal, CvePeriodo, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||||
|
If Not IsNothing(ObjNomina.DtResultados) And ObjNomina.DtResultados.Rows.Count > 0 And ObjNomina.DtResultados.Rows(0)("ShowMovtosPermanentes").ToString() = "1" Then
|
||||||
|
If ObjNomina.MovimientosSaldosGet(CvePersonal, CvePeriodo, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||||
|
Dim RptDSMP As New ReportDataSource
|
||||||
|
RptDSMP.Name = "DsMovtosPermanentes"
|
||||||
|
RptDSMP.Value = ObjNomina.DtResultados
|
||||||
|
LSRds.Add(RptDSMP)
|
||||||
|
End If
|
||||||
|
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
|
||||||
|
|
||||||
|
End Using
|
||||||
|
End Using
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
#End Region
|
#End Region
|
||||||
|
|||||||
@@ -321,6 +321,21 @@ Public Class ClsRH
|
|||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "ClsRHAsistenciasInasistencias"
|
#Region "ClsRHAsistenciasInasistencias"
|
||||||
|
|
||||||
|
Public Function CargaInicialAsistenciaInasistencia(cveEmpresa As Int32, cveUsuario As Int32) As Boolean
|
||||||
|
Dim retorno As Boolean = False
|
||||||
|
DataAdapter("PA_RH_CargaInicialAsistenciaInasistencia", CommandType.StoredProcedure)
|
||||||
|
addParameters("@CveEmpresa", SqlDbType.Int, cveEmpresa)
|
||||||
|
addParameters("@CveUsuario", SqlDbType.Int, cveUsuario)
|
||||||
|
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
retorno = True
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al realizar la carga inicial de asistencia inasistencia.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
End Try
|
||||||
|
Return retorno
|
||||||
|
End Function
|
||||||
Public Function GetAsistenciasInasistencias(CveEmpresa As Integer) As Boolean
|
Public Function GetAsistenciasInasistencias(CveEmpresa As Integer) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
|
|||||||
@@ -6899,7 +6899,7 @@ Public Class ClsVentas
|
|||||||
|
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function GetComisionesMedicasRep(FechaInicio As Date, FechaFin As Date, CveEmpresa As Integer, CveSubProyecto As Integer, CveProcedimiento As Integer, CveMedico As Integer, CveVendedor As Integer, CveUsuario As Integer, CveTipoVenta As Integer, Opcion As Integer) As Boolean
|
Public Function GetComisionesMedicasRep(FechaInicio As Date, FechaFin As Date, CveEmpresa As Integer, CveSubProyecto As Integer, CveProcedimiento As Integer, CveMedico As Integer, CveVendedor As Integer, CveUsuario As Integer, CveTipoVenta As Integer, FechaInicioPago As Date, FechaFinPago As Date) As Boolean
|
||||||
|
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_Vta_ComisionesMedicasRepGet")
|
DataAdapter("PA_Vta_ComisionesMedicasRepGet")
|
||||||
@@ -6914,7 +6914,8 @@ Public Class ClsVentas
|
|||||||
.Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor
|
.Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor
|
||||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||||
.Add("@CveTipoVenta", SqlDbType.Int).Value = CveTipoVenta
|
.Add("@CveTipoVenta", SqlDbType.Int).Value = CveTipoVenta
|
||||||
.Add("@Opcion", SqlDbType.Int).Value = Opcion
|
.Add("@FechaInicioPago", SqlDbType.Date).Value = FechaInicioPago
|
||||||
|
.Add("@FechaFinPago", SqlDbType.Date).Value = FechaFinPago
|
||||||
|
|
||||||
End With
|
End With
|
||||||
|
|
||||||
@@ -6934,7 +6935,7 @@ Public Class ClsVentas
|
|||||||
|
|
||||||
#Region "VENTAS MEDICAS COMISIONES ESPECIALES"
|
#Region "VENTAS MEDICAS COMISIONES ESPECIALES"
|
||||||
|
|
||||||
Public Function GetComisionesMedicasEsPeciales(CveMedico As Integer, CvePS As Integer, CveEmpresa As Integer) As Boolean
|
Public Function GetComisionesMedicasEspeciales(CveMedico As Integer, CvePS As Integer, CveEmpresa As Integer) As Boolean
|
||||||
|
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_Vta_ComisionesMedicasEspecialesGet")
|
DataAdapter("PA_Vta_ComisionesMedicasEspecialesGet")
|
||||||
|
|||||||
@@ -628,14 +628,14 @@
|
|||||||
function txtSumaCuentaRetorno(txt) {
|
function txtSumaCuentaRetorno(txt) {
|
||||||
debugger;
|
debugger;
|
||||||
var comision2 = ToDouble($('#C_TxtCuentaRetorno').val());
|
var comision2 = ToDouble($('#C_TxtCuentaRetorno').val());
|
||||||
if (comision2 > ValorTotalSeleccionado) {
|
//if (comision2 > ValorTotalSeleccionado) {
|
||||||
$('#C_TxtCuentaRetorno').val(descuento)
|
// $('#C_TxtCuentaRetorno').val(descuento)
|
||||||
alert("No es posible poner un IVA superior a lo seleccionado")
|
// alert("No es posible poner un IVA superior a lo seleccionado")
|
||||||
} else {
|
//} else {
|
||||||
saldo = ValorTotalSeleccionado - comision2 + comision - IVA - ComisionIntermediario;
|
saldo = ValorTotalSeleccionado - comision2 + comision - IVA - ComisionIntermediario;
|
||||||
$('#C_lblValorTotal').text(FormatoNumero(saldo, 2));
|
$('#C_lblValorTotal').text(FormatoNumero(saldo, 2));
|
||||||
descuento = ToDouble($('#C_TxtCuentaRetorno').val())
|
descuento = ToDouble($('#C_TxtCuentaRetorno').val())
|
||||||
}
|
//}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -157,6 +157,11 @@ Partial Class Bancos_DepositosCaja
|
|||||||
|
|
||||||
Private Sub BtnDepositar_Click(sender As Object, e As EventArgs) Handles BtnDepositar.Click
|
Private Sub BtnDepositar_Click(sender As Object, e As EventArgs) Handles BtnDepositar.Click
|
||||||
|
|
||||||
|
|
||||||
|
If Not Validaciones() Then
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
Dim TotalImporte As Decimal = 0
|
Dim TotalImporte As Decimal = 0
|
||||||
Dim TotalImportePrePoliza As Decimal
|
Dim TotalImportePrePoliza As Decimal
|
||||||
Dim Comision As Decimal = TxtComision.Text.ToDecimal
|
Dim Comision As Decimal = TxtComision.Text.ToDecimal
|
||||||
@@ -172,13 +177,13 @@ Partial Class Bancos_DepositosCaja
|
|||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
Dim tContador As Integer = 0
|
||||||
For Each Gvr As GridViewRow In GvFacturas.Rows
|
For Each Gvr As GridViewRow In GvFacturas.Rows
|
||||||
If Gvr.FCCheckBox("ChkFactura").Checked Then TotalImporte += Gvr.DataKey("Importe").ToDecimal
|
If Gvr.FCCheckBox("ChkFactura").Checked Then TotalImporte += Gvr.DataKey("Importe").ToDecimal
|
||||||
Next
|
Next
|
||||||
|
|
||||||
If TotalImporte = 0 Then
|
If TotalImporte = 0 AndAlso CuentaRetorno <> 0 Then
|
||||||
Alert("Seleccion una factura para realizar el depósito", TipoMensaje.MsgAdvertencia)
|
Alert("Seleccione una factura para realizar el depósito", TipoMensaje.MsgAdvertencia)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -465,8 +470,58 @@ Partial Class Bancos_DepositosCaja
|
|||||||
lblValorTotalSeleccionado.Text = "0.0"
|
lblValorTotalSeleccionado.Text = "0.0"
|
||||||
CargaDatos()
|
CargaDatos()
|
||||||
ObjConta.Dispose()
|
ObjConta.Dispose()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Function Validaciones() As Boolean
|
||||||
|
|
||||||
|
Dim Respuesta As Boolean = True
|
||||||
|
|
||||||
|
If Not ValidaCobranza() Then
|
||||||
|
Respuesta = False
|
||||||
|
End If
|
||||||
|
|
||||||
|
Return Respuesta
|
||||||
|
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
Private Function ValidaCobranza() As Boolean
|
||||||
|
Dim Respuesta As Boolean = False
|
||||||
|
|
||||||
|
If UsuarioActual.CveEmpresa.Contiene(195) Then
|
||||||
|
|
||||||
|
Dim ObjMovtos As New ClsMovimientos()
|
||||||
|
Dim FechaI, FechaF As Date
|
||||||
|
FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim().ToDate, MinFecha)
|
||||||
|
FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim().ToDate, MaxFecha).AddDays(1)
|
||||||
|
|
||||||
|
If ObjMovtos.GetRemisionesCobranza(UsuarioActual.CveEmpresa, DdlSubProyectos.SelectedValue.ToEntero, FechaI, FechaF) Then
|
||||||
|
Dim dtt As DataTable = ObjMovtos.DtResultados.FiltraParametros($"CveVenta > 0 AND (CveUsuarioCobranza IS NULL OR CveUsuarioCobranza = {UsuarioActual.CveUsuario}) AND TipoDocto IN ('Ing','Rem')")
|
||||||
|
'Dim Dtta As DataTable = dtt.FiltraParametros($"CveUsuarioCobranza = {UsuarioActual.CveUsuario} ")
|
||||||
|
'If Dtta IsNot Nothing AndAlso Dtta.Rows.Count > 0 Then dtt = Dtta
|
||||||
|
|
||||||
|
If dtt.Rows.Count = 0 Then
|
||||||
|
Respuesta = True
|
||||||
|
Else
|
||||||
|
Respuesta = False
|
||||||
|
Alert("Se detectaron cobros pendientes.", TipoMensaje.MsgAdvertencia)
|
||||||
|
End If
|
||||||
|
|
||||||
|
Else
|
||||||
|
Alert("Error al consultarcobros pendientes.", TipoMensaje.MsgAdvertencia)
|
||||||
|
Respuesta = False
|
||||||
|
End If
|
||||||
|
|
||||||
|
ObjMovtos.Dispose()
|
||||||
|
|
||||||
|
Else
|
||||||
|
Respuesta = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
Return Respuesta
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
Private Sub ObtenerTotalImporta()
|
Private Sub ObtenerTotalImporta()
|
||||||
|
|
||||||
Dim Total As Double = 0
|
Dim Total As Double = 0
|
||||||
|
|||||||
@@ -3594,13 +3594,10 @@ Partial Class Compras_Compras
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
CargaRetIVAConcepto(True, ObjProveedor.DIOTCveTipoOperacion)
|
|
||||||
CargaRetISRConcepto(True, ObjProveedor.DIOTCveTipoOperacion)
|
|
||||||
|
|
||||||
CargaRetIVAConcepto(True, ObjProveedor.DIOTCveTipoOperacion)
|
CargaRetIVAConcepto(True, ObjProveedor.DIOTCveTipoOperacion)
|
||||||
CargaRetISRConcepto(True, ObjProveedor.DIOTCveTipoOperacion)
|
CargaRetISRConcepto(True, ObjProveedor.DIOTCveTipoOperacion)
|
||||||
>>>>>>> GDiaz 2024.05.21
|
|
||||||
|
|
||||||
LbAgregar.Enabled = True
|
LbAgregar.Enabled = True
|
||||||
UpPSS.Update()
|
UpPSS.Update()
|
||||||
@@ -3647,11 +3644,7 @@ Partial Class Compras_Compras
|
|||||||
PorcentajeProntoPago = ObjProveedor.PorcentajeProntoPago
|
PorcentajeProntoPago = ObjProveedor.PorcentajeProntoPago
|
||||||
End If
|
End If
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
=======
|
|
||||||
|
|
||||||
|
|
||||||
>>>>>>> GDiaz 2024.05.21
|
|
||||||
Else
|
Else
|
||||||
Alert("El Proveedor solicitado no existe, por favor intente de nuevo.", TipoMensaje.MsgAdvertencia)
|
Alert("El Proveedor solicitado no existe, por favor intente de nuevo.", TipoMensaje.MsgAdvertencia)
|
||||||
End If
|
End If
|
||||||
@@ -3659,9 +3652,6 @@ Partial Class Compras_Compras
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
=======
|
|
||||||
>>>>>>> GDiaz 2024.05.21
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(560) = "1" Then
|
If UsuarioActual.Empresa.Funcionalidad(560) = "1" Then
|
||||||
If ObjProveedor.GetProveedoresEvaluacionPediente(Me.CveProveedor, UsuarioActual.CveEmpresa) Then
|
If ObjProveedor.GetProveedoresEvaluacionPediente(Me.CveProveedor, UsuarioActual.CveEmpresa) Then
|
||||||
If ObjProveedor.DtResultados.Rows.Count > 0 Then
|
If ObjProveedor.DtResultados.Rows.Count > 0 Then
|
||||||
@@ -9790,7 +9780,7 @@ Partial Class Compras_Compras
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Dim TCAnt As Decimal = If(DdlMoneda.SelectedValue = "1", 1, If(CveCompra > 0, LblTC.Text.ToDecimal, TxtTC.Text.ToDecimal))
|
||||||
|
|
||||||
|
|
||||||
If UsuarioActual.Empresa.CveEmpresa.Contiene(13, 83) Then
|
If UsuarioActual.Empresa.CveEmpresa.Contiene(13, 83) Then
|
||||||
@@ -9802,7 +9792,7 @@ Partial Class Compras_Compras
|
|||||||
e.Row.DBCampo("CveMoneda"),
|
e.Row.DBCampo("CveMoneda"),
|
||||||
e.Row.DBCampo("TCCompra").ToDouble,
|
e.Row.DBCampo("TCCompra").ToDouble,
|
||||||
DdlMoneda.SelectedValue,
|
DdlMoneda.SelectedValue,
|
||||||
IIf(DdlMoneda.SelectedValue = "1", 1, TxtTC.Text),
|
TCAnt,
|
||||||
e.Row.FCTextBox("TxtComision").ClientID
|
e.Row.FCTextBox("TxtComision").ClientID
|
||||||
)) 'SI ES UNA COMPRA NUEVA SE PONE EL TOTAL, SI NO EL SALDO
|
)) 'SI ES UNA COMPRA NUEVA SE PONE EL TOTAL, SI NO EL SALDO
|
||||||
|
|
||||||
@@ -9834,7 +9824,7 @@ Partial Class Compras_Compras
|
|||||||
e.Row.DBCampo("CveMoneda"),
|
e.Row.DBCampo("CveMoneda"),
|
||||||
e.Row.DBCampo("TCCompra").ToDouble,
|
e.Row.DBCampo("TCCompra").ToDouble,
|
||||||
DdlMoneda.SelectedValue,
|
DdlMoneda.SelectedValue,
|
||||||
IIf(DdlMoneda.SelectedValue = "1", 1, TxtTC.Text)
|
TCAnt
|
||||||
)) 'SI ES UNA COMPRA NUEVA SE PONE EL TOTAL, SI NO EL SALDO
|
)) 'SI ES UNA COMPRA NUEVA SE PONE EL TOTAL, SI NO EL SALDO
|
||||||
|
|
||||||
e.Row.FCTextBox("TxtAnticipo").Attributes.Add("onKeyUp", String.Format("FnCambiaAnt({0},this,{1},{2},{3},{4},{5});",
|
e.Row.FCTextBox("TxtAnticipo").Attributes.Add("onKeyUp", String.Format("FnCambiaAnt({0},this,{1},{2},{3},{4},{5});",
|
||||||
|
|||||||
@@ -1690,7 +1690,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
If DdlPlantilla.SelectedValue.ToEntero <> 53 Then
|
If DdlPlantilla.SelectedValue.ToEntero <> 53 And Not CvePrePoliza > 0 Then
|
||||||
|
|
||||||
Dim x As Integer = 0
|
Dim x As Integer = 0
|
||||||
For Each gvRow As GridViewRow In GvMov.Rows
|
For Each gvRow As GridViewRow In GvMov.Rows
|
||||||
@@ -1769,7 +1769,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
|
|
||||||
DtMovimientos.AcceptChanges()
|
DtMovimientos.AcceptChanges()
|
||||||
|
|
||||||
If DdlPlantilla.SelectedValue.ToEntero <> 53 Then
|
If DdlPlantilla.SelectedValue.ToEntero <> 53 And Not CvePrePoliza > 0 Then
|
||||||
GvMov.DataSource = DtMovimientos
|
GvMov.DataSource = DtMovimientos
|
||||||
GvMov.DataBind()
|
GvMov.DataBind()
|
||||||
GvPrePoliza.DataBind()
|
GvPrePoliza.DataBind()
|
||||||
|
|||||||
@@ -3967,7 +3967,7 @@ Partial Class General_SaldosIniciales
|
|||||||
TxtExcel.Text = ""
|
TxtExcel.Text = ""
|
||||||
UpDatos.Update()
|
UpDatos.Update()
|
||||||
Else
|
Else
|
||||||
Alert(String.Format("Se agregaron: <b>{0}</b> Empleados correctamente.", NumRows), TipoMensaje.MsgInformacion)
|
Alert(String.Format("Se agregaron: <b>{0}</b> Empleados correctamente.", ContadorAgregados), TipoMensaje.MsgInformacion)
|
||||||
ObjRH.Commit()
|
ObjRH.Commit()
|
||||||
TxtExcel.Text = ""
|
TxtExcel.Text = ""
|
||||||
UpDatos.Update()
|
UpDatos.Update()
|
||||||
|
|||||||
@@ -325,7 +325,8 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
|||||||
{
|
{
|
||||||
|
|
||||||
if (!IsPostBack)
|
if (!IsPostBack)
|
||||||
{
|
{
|
||||||
|
cargarutaempresa();
|
||||||
{
|
{
|
||||||
|
|
||||||
DtNomOrden = new DataTable();
|
DtNomOrden = new DataTable();
|
||||||
@@ -474,6 +475,15 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
private void cargarutaempresa()
|
||||||
|
{
|
||||||
|
string rutaCBBDir = String.Format("{0}CBB\\Nomina\\", UsuarioActual.Empresa.Ruta);
|
||||||
|
|
||||||
|
if (!Directory.Exists(rutaCBBDir))
|
||||||
|
{
|
||||||
|
Directory.CreateDirectory(rutaCBBDir);
|
||||||
|
}
|
||||||
|
}
|
||||||
#region Filtros
|
#region Filtros
|
||||||
private void cargaEjercicios()
|
private void cargaEjercicios()
|
||||||
{
|
{
|
||||||
@@ -2109,7 +2119,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
|||||||
{
|
{
|
||||||
column++;
|
column++;
|
||||||
libro.Cell(1, column).Value = row["CveConcepto"].ToString();
|
libro.Cell(1, column).Value = row["CveConcepto"].ToString();
|
||||||
libro.Cell(FilaConceptos, column).Value = "N";
|
libro.Cell(FilaConceptos, column).Value = "S";
|
||||||
libro.Cell(3, column).Value = row["Concepto"].ToString();
|
libro.Cell(3, column).Value = row["Concepto"].ToString();
|
||||||
libro.Cell(4, column).Value = row["Codigo"].ToString();
|
libro.Cell(4, column).Value = row["Codigo"].ToString();
|
||||||
libro.Column(column).Width = 15;
|
libro.Column(column).Width = 15;
|
||||||
@@ -2124,7 +2134,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
|||||||
{
|
{
|
||||||
column++;
|
column++;
|
||||||
libro.Cell(1, column).Value = row["CveConcepto"].ToString();
|
libro.Cell(1, column).Value = row["CveConcepto"].ToString();
|
||||||
libro.Cell(FilaConceptos, column).Value = "N";
|
libro.Cell(FilaConceptos, column).Value = "S";
|
||||||
libro.Cell(3, column).Value = row["Concepto"].ToString();
|
libro.Cell(3, column).Value = row["Concepto"].ToString();
|
||||||
libro.Cell(4, column).Value = row["Codigo"].ToString();
|
libro.Cell(4, column).Value = row["Codigo"].ToString();
|
||||||
libro.Column(column).Width = 15;
|
libro.Column(column).Width = 15;
|
||||||
@@ -2139,7 +2149,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
|||||||
{
|
{
|
||||||
column++;
|
column++;
|
||||||
libro.Cell(1, column).Value = row["CveConcepto"].ToString();
|
libro.Cell(1, column).Value = row["CveConcepto"].ToString();
|
||||||
libro.Cell(FilaConceptos, column).Value = "N";
|
libro.Cell(FilaConceptos, column).Value = "S";
|
||||||
libro.Cell(3, column).Value = row["Concepto"].ToString();
|
libro.Cell(3, column).Value = row["Concepto"].ToString();
|
||||||
libro.Cell(4, column).Value = row["Codigo"].ToString();
|
libro.Cell(4, column).Value = row["Codigo"].ToString();
|
||||||
libro.Column(column).Width = 15;
|
libro.Column(column).Width = 15;
|
||||||
|
|||||||
@@ -82,17 +82,26 @@
|
|||||||
</div>
|
</div>
|
||||||
</asp:Panel>
|
</asp:Panel>
|
||||||
<br />
|
<br />
|
||||||
|
<div style=" text-align: right" ">
|
||||||
|
<div >
|
||||||
|
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GVCalcularUtilidades.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||||
|
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GVCalcularUtilidades.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<asp:GridView ID="GVCalcularUtilidades" runat="server" GridLines="None" CssClass="table table-hover table-striped ScrollAD Widthall GVCalcularUtilidades" AutoGenerateColumns="False"
|
<asp:GridView ID="GVCalcularUtilidades" runat="server" GridLines="None" CssClass="table table-hover table-striped ScrollAD Widthall GVCalcularUtilidades" AutoGenerateColumns="False"
|
||||||
DataKeyNames="Nombre,CvePersonal,DiasLaborados,SueldoTotal,Importe">
|
DataKeyNames="Nombre,CvePersonal,DiasLaborados,SueldoTotal,Importe" >
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:TemplateField HeaderText="Código ">
|
<asp:TemplateField HeaderText="Código ">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Label ID="lblC" runat="server" Text='<%# Eval("Codigo")%>'> </asp:Label>
|
<%--<asp:Literal ID="lblC" runat="server" > </asp:Literal>--%>
|
||||||
|
<asp:HyperLink ID="lblC" runat="server" Text='<%# Eval("Codigo") %>' NavigateUrl='<%# Eval("CvePersonal", "~/RH/Personal.aspx?CvePersonal={0}") %>'></asp:HyperLink>
|
||||||
|
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Nombre ">
|
<asp:TemplateField HeaderText="Nombre ">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Label ID="lblnombreCompleto" runat="server" Text='<%# Eval("Nombre")%>'> </asp:Label>
|
<asp:HyperLink ID="lblnombreCompleto" runat="server" Text='<%# Eval("Nombre") %>' NavigateUrl='<%# Eval("CvePersonal", "~/RH/Personal.aspx?CvePersonal={0}") %>'></asp:HyperLink>
|
||||||
|
<%--<asp:Literal ID="lblnombreCompleto" runat="server" > </asp:Literal>--%>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
|
||||||
|
|||||||
@@ -241,4 +241,18 @@ Partial Class Nomina_ReportePTU
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
'Protected Sub GVCalcularUtilidades_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||||
|
' If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
|
' Dim dataItem As DataRowView = CType(e.Row.DataItem, DataRowView)
|
||||||
|
' Dim cvePersonal As String = e.Row.DataKey("CvePersonal").ToString()
|
||||||
|
' Dim codigo As String = e.Row.DataKey("Codigo").ToString()
|
||||||
|
' Dim nombre As String = e.Row.DataKey("Nombre").ToString()
|
||||||
|
|
||||||
|
' Dim lblC As Label = CType(e.Row.FindControl("lblC"), Label)
|
||||||
|
' lblC.Text = String.Format("<a class='Texto sline' href='/RH/Personal.aspx?CvePersonal={0}'>{1}</a>", cvePersonal, codigo)
|
||||||
|
' Dim lblnombreCompleto As Label = CType(e.Row.FindControl("lblnombreCompleto"), Label)
|
||||||
|
' lblnombreCompleto.Text = String.Format("<a class='Texto sline' href='/RH/Personal.aspx?CvePersonal={0}'>{1}</a>", cvePersonal, nombre)
|
||||||
|
' End If
|
||||||
|
'End Sub
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -2313,9 +2313,9 @@ Partial Class OC_OC
|
|||||||
If IEPSPSIVA > 0 Then TotalGravado = Total * (1 + IEPSPSIVA) 'grava para iva, el importe del IEPS
|
If IEPSPSIVA > 0 Then TotalGravado = Total * (1 + IEPSPSIVA) 'grava para iva, el importe del IEPS
|
||||||
dr("IVA") = Math.Round(dr("IVAPorcentaje").ToString.ToDecimal * TotalGravado, 2)
|
dr("IVA") = Math.Round(dr("IVAPorcentaje").ToString.ToDecimal * TotalGravado, 2)
|
||||||
dr("RetIVAPorcentaje") = RetIVA
|
dr("RetIVAPorcentaje") = RetIVA
|
||||||
dr("RetIVA") = (RetIVA * Total).RoundSQL(6)
|
dr("RetIVA") = (RetIVA * Total).RoundSQL(2)
|
||||||
dr("RetISRPorcentaje") = RetISR
|
dr("RetISRPorcentaje") = RetISR
|
||||||
dr("RetISR") = (RetISR * Total).RoundSQL(6)
|
dr("RetISR") = (RetISR * Total).RoundSQL(2)
|
||||||
dr("CveClasificacion") = CveClasificacion
|
dr("CveClasificacion") = CveClasificacion
|
||||||
dr("UM") = UM
|
dr("UM") = UM
|
||||||
dr("Clasificacion") = Clasificacion
|
dr("Clasificacion") = Clasificacion
|
||||||
@@ -3327,7 +3327,7 @@ Partial Class OC_OC
|
|||||||
Dim SubTotalRetIVA As Decimal = DtDetalle.SUMD("RetIVA")
|
Dim SubTotalRetIVA As Decimal = DtDetalle.SUMD("RetIVA")
|
||||||
Dim SubTotalRetISR As Decimal = DtDetalle.SUMD("RetISR")
|
Dim SubTotalRetISR As Decimal = DtDetalle.SUMD("RetISR")
|
||||||
|
|
||||||
Dim Total As Decimal = (Subtotal - Descuento + IVA + SubTotalIEPS - SubTotalRetIVA - SubTotalRetISR)
|
Dim Total As Decimal = (Subtotal - Descuento + IVA + SubTotalIEPS - SubTotalRetIVA - SubTotalRetISR).RoundSQL(2)
|
||||||
Dim Diferencia As Decimal = (Total - LblTotal.Text.ToDecimal).RoundSQL(2)
|
Dim Diferencia As Decimal = (Total - LblTotal.Text.ToDecimal).RoundSQL(2)
|
||||||
|
|
||||||
If Math.Abs(Diferencia) > 0 Then
|
If Math.Abs(Diferencia) > 0 Then
|
||||||
|
|||||||
@@ -1866,7 +1866,7 @@ Partial Class OS_OrdenesServicios
|
|||||||
GvHistorial.DataSource = Nothing
|
GvHistorial.DataSource = Nothing
|
||||||
End If
|
End If
|
||||||
GvHistorial.DataBind()
|
GvHistorial.DataBind()
|
||||||
ObjGral.Dispose()
|
UpHistorial.Update()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
@@ -3536,24 +3536,40 @@ Partial Class OS_OrdenesServicios
|
|||||||
End Class
|
End Class
|
||||||
Protected Sub LnkActualizarUsaurioAtendio_Click(sender As Object, e As EventArgs)
|
Protected Sub LnkActualizarUsaurioAtendio_Click(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
Dim ObjOs As New ClsOS
|
|
||||||
Dim ProcesoOk As Boolean = True
|
|
||||||
|
|
||||||
If DdlUsuarioAtendio.SelectedValue.ToEntero > 0 Then
|
If DdlUsuarioAtendio.SelectedValue.ToEntero > 0 Then
|
||||||
|
|
||||||
|
Dim ObjOS As New ClsOS
|
||||||
|
ObjOS.IniciaTransacSQL()
|
||||||
|
|
||||||
|
Dim ProcesoOk As Boolean = True
|
||||||
|
|
||||||
For Each GvRow As GridViewRow In GvPS.Rows
|
For Each GvRow As GridViewRow In GvPS.Rows
|
||||||
If Not ObjOs.UpdateOrdenesServiciosAsignadas(GvRow.DataKey("CveOSDetalle").ToEntero, DdlUsuarioAtendio.SelectedValue.ToEntero, MinFecha, DateTime.Parse(MinFecha.ToShortDateString), UsuarioActual.CveEmpresa) Then
|
If Not ObjOS.UpdateOrdenesServiciosAsignadas(GvRow.DataKey("CveOSDetalle").ToEntero, DdlUsuarioAtendio.SelectedValue.ToEntero, MinFecha, DateTime.Parse(MinFecha.ToShortDateString), UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario) Then
|
||||||
ProcesoOk = False
|
ProcesoOk = False
|
||||||
Alert($"Se presento un error al actualizar el técnico.")
|
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
|
||||||
If ProcesoOk Then
|
If ProcesoOk Then
|
||||||
Alert($"Técnico actualizado correctamenrte a {DdlUsuarioAtendio.SelectedItem.Text}.")
|
ObjOS.Commit()
|
||||||
|
Else
|
||||||
|
ObjOS.RollBack()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
ObjOS.Dispose()
|
||||||
|
|
||||||
|
If ProcesoOk Then
|
||||||
|
Alert($"Se presento un error al actualizar el técnico.")
|
||||||
|
CargaHistorial()
|
||||||
|
End If
|
||||||
|
|
||||||
Else
|
Else
|
||||||
Alert("Debe de seleccionar un ténico para actualziar", TipoMensaje.MsgAdvertencia)
|
Alert("Debe de seleccionar un ténico para actualziar", TipoMensaje.MsgAdvertencia)
|
||||||
End If
|
End If
|
||||||
ObjOs.Dispose()
|
|
||||||
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|||||||
@@ -16,6 +16,9 @@
|
|||||||
<li>
|
<li>
|
||||||
<asp:LinkButton runat="server" ID="BtnAgregarMotivoD" data-toggle="tooltip" data-placement="left" title="Agregar un Defecto" Text="<i class='fa fa-plus'></i>Agregar Asistencia/Inacistencia"></asp:LinkButton>
|
<asp:LinkButton runat="server" ID="BtnAgregarMotivoD" data-toggle="tooltip" data-placement="left" title="Agregar un Defecto" Text="<i class='fa fa-plus'></i>Agregar Asistencia/Inacistencia"></asp:LinkButton>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<asp:LinkButton runat="server" ID="LnkCargapredefinidos" OnClick="LnkCargapredefinidos_Click" Text="<i class='fa fa-plus'></i>Agregar Predefinidos" data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="si"></asp:LinkButton>
|
||||||
|
</li>
|
||||||
|
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
|
|||||||
@@ -48,6 +48,7 @@ Partial Class RH_CatAsistenciasInasistencias
|
|||||||
Dim ObjAsistenciasInasistencias As New ClsRH
|
Dim ObjAsistenciasInasistencias As New ClsRH
|
||||||
If ObjAsistenciasInasistencias.GetAsistenciasInasistencias(UsuarioActual.CveEmpresa) Then
|
If ObjAsistenciasInasistencias.GetAsistenciasInasistencias(UsuarioActual.CveEmpresa) Then
|
||||||
ViewState("DTAsistenciasInasistencias") = ObjAsistenciasInasistencias.DtResultados
|
ViewState("DTAsistenciasInasistencias") = ObjAsistenciasInasistencias.DtResultados
|
||||||
|
LnkCargapredefinidos.Visible = ObjAsistenciasInasistencias.DtResultados.Rows.Count = 0
|
||||||
Else
|
Else
|
||||||
Me.GvDatos.DataSource = Nothing
|
Me.GvDatos.DataSource = Nothing
|
||||||
End If
|
End If
|
||||||
@@ -258,4 +259,17 @@ Partial Class RH_CatAsistenciasInasistencias
|
|||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Protected Sub LnkCargapredefinidos_Click(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
|
Using objrh As New ClsRH()
|
||||||
|
'objrh.IniciaTransacSQL()
|
||||||
|
If objrh.CargaInicialAsistenciaInasistencia(UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario) Then
|
||||||
|
'objrh.Commit()
|
||||||
|
Else
|
||||||
|
'objrh.RollBack()
|
||||||
|
End If
|
||||||
|
End Using
|
||||||
|
CargaDatos()
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -201,13 +201,13 @@
|
|||||||
<i></i>
|
<i></i>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
<asp:TextBox CssClass="form-control" ID="TxtCiudadOrigen" runat="server" MaxLength="30"></asp:TextBox>
|
<asp:DropDownList ID="DdlEstados" runat="server" DataTextField="NombreEstado" DataValueField="CveEstado" Width="100%" Class="form-control input-sm select2me"></asp:DropDownList>
|
||||||
<label for="<%= TxtCiudadOrigen.ClientID.ToString()%>">Ciudad Nacimiento: </label>
|
<label for="<%= DdlEstados.ClientID.ToString()%>">Estado de nacimiento: </label>
|
||||||
<i></i>
|
<i></i>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
<asp:DropDownList ID="DdlEstados" runat="server" DataTextField="NombreEstado" DataValueField="CveEstado" Width="100%" Class="form-control input-sm select2me"></asp:DropDownList>
|
<asp:TextBox CssClass="form-control" ID="TxtCiudadOrigen" runat="server" MaxLength="30"></asp:TextBox>
|
||||||
<label for="<%= DdlEstados.ClientID.ToString()%>">Lugar de nacimiento: </label>
|
<label for="<%= TxtCiudadOrigen.ClientID.ToString()%>">Ciudad Nacimiento: </label>
|
||||||
<i></i>
|
<i></i>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
@@ -315,6 +315,13 @@
|
|||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
<asp:TextBox CssClass="form-control" ID="TxtCP" runat="server" MaxLength="5"></asp:TextBox>
|
<asp:TextBox CssClass="form-control" ID="TxtCP" runat="server" MaxLength="5"></asp:TextBox>
|
||||||
|
<asp:CustomValidator ID="cvCadena" runat="server" ControlToValidate="TxtCP" Enabled="true"
|
||||||
|
OnServerValidate="cvCadena_ServerValidate" ValidationGroup="GrpGuardar"
|
||||||
|
ErrorMessage="La cadena debe ser numérica y de 5 dígitos."></asp:CustomValidator>
|
||||||
|
<asp:RequiredFieldValidator ID="rfvTxtCP" runat="server" ControlToValidate="TxtCP"
|
||||||
|
CssClass="help-block errorimput"
|
||||||
|
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Código Postal''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||||
|
|
||||||
<label for="<%= TxtCP.ClientID.ToString()%>">Código Postal: </label>
|
<label for="<%= TxtCP.ClientID.ToString()%>">Código Postal: </label>
|
||||||
<i></i>
|
<i></i>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -8103,5 +8103,22 @@ Partial Class RH_Personal
|
|||||||
UpDatos.Update()
|
UpDatos.Update()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Protected Sub cvCadena_ServerValidate(source As Object, args As ServerValidateEventArgs)
|
||||||
|
Dim retorno As Boolean = True
|
||||||
|
' Verifica que la longitud de la cadena sea 5
|
||||||
|
If Len(args.Value) <> 5 Then
|
||||||
|
retorno = False
|
||||||
|
End If
|
||||||
|
|
||||||
|
' Verifica que la cadena sea numérica
|
||||||
|
If Not IsNumeric(args.Value) Then
|
||||||
|
retorno = False
|
||||||
|
End If
|
||||||
|
|
||||||
|
args.IsValid = retorno
|
||||||
|
End Sub
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
|
|||||||
@@ -147,13 +147,13 @@
|
|||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
<asp:DropDownList ID="DdlPeriodoPago" CssClass="form-control select2me" runat="server" Width="100%">
|
<asp:DropDownList ID="DdlPeriodoPago" CssClass="form-control select2me" runat="server" Width="100%">
|
||||||
<asp:ListItem Value="-1">-</asp:ListItem>
|
<asp:ListItem Value="-1">-</asp:ListItem>
|
||||||
<asp:ListItem Value="1">15d próximo mes</asp:ListItem>
|
<asp:ListItem Value="1">15d pago a 30d</asp:ListItem>
|
||||||
<asp:ListItem Value="2">15d próxima quincena</asp:ListItem>
|
<asp:ListItem Value="2">15d pago a 15d</asp:ListItem>
|
||||||
<asp:ListItem Value="3">7d pago inmediato 2d</asp:ListItem>
|
<asp:ListItem Value="3">7d pago inmediato 2d</asp:ListItem>
|
||||||
<asp:ListItem Value="4">15d pago inmediato</asp:ListItem>
|
<asp:ListItem Value="4">15d pago inmediato</asp:ListItem>
|
||||||
<asp:ListItem Value="5">30d próxima quincena</asp:ListItem>
|
<asp:ListItem Value="5">30d pago a 15d</asp:ListItem>
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
<label for="<%= DdlPeriodoPago.ClientID.ToString()%>">Perido de Pago:</label>
|
<label for="<%= DdlPeriodoPago.ClientID.ToString()%>">Periodo de Pago:</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
|
|||||||
@@ -173,13 +173,7 @@
|
|||||||
<asp:Literal ID="LtlnVentas" runat="server" Text='<%# Eval("nVentas") %>'></asp:Literal>
|
<asp:Literal ID="LtlnVentas" runat="server" Text='<%# Eval("nVentas") %>'></asp:Literal>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
|
||||||
<asp:TemplateField HeaderText="Utilidad" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="70px">
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:Literal ID="LtlUtilidad" runat="server" Text='<%# Eval("Utilidad", "{0:N2}") %>'></asp:Literal>
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
|
|
||||||
<asp:TemplateField HeaderText="Venta" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="70px">
|
<asp:TemplateField HeaderText="Venta" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="70px">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="LtlSerieFolio" runat="server" Text='<%# Eval("SerieFolio") %>'></asp:Literal>
|
<asp:Literal ID="LtlSerieFolio" runat="server" Text='<%# Eval("SerieFolio") %>'></asp:Literal>
|
||||||
|
|||||||
@@ -66,8 +66,7 @@
|
|||||||
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-1 truncate">
|
<div class="col-md-1 truncate">
|
||||||
Fecha Fin:
|
Fecha Fin:
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-1" style="min-width: 115px">
|
<div class="col-md-1" style="min-width: 115px">
|
||||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
||||||
@@ -84,32 +83,62 @@
|
|||||||
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<label class="col-md-1 ">Médico:</label>
|
<div class="col-md-1 truncate">
|
||||||
<div class="col-md-1">
|
Fecha I. Pago:
|
||||||
<asp:DropDownList ID="DdlMedico" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="Medico" DataValueField="CveMedico" Width="100%">
|
</div>
|
||||||
</asp:DropDownList>
|
<div class="col-md-1" style="min-width: 115px">
|
||||||
</div>
|
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
||||||
|
<asp:TextBox Width="80px" ID="TxtFechaIPago" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||||
<label class="col-md-1 ">Vendedor:</label>
|
<span class="input-group-btn ">
|
||||||
<div class="col-md-1">
|
<asp:LinkButton ID="ImgCalendarioIPago" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||||
<asp:DropDownList ID="DdlVendedor" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="Vendedor" DataValueField="CveVendedor" Width="100%">
|
</span>
|
||||||
</asp:DropDownList>
|
</div>
|
||||||
</div>
|
<ajax:MaskedEditExtender ID="MaskedEditExtender1" runat="server" TargetControlID="TxtFechaIPago" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||||
|
<ajax:CalendarExtender runat="server" ID="CalendarExtender1" TargetControlID="TxtFechaIPago" PopupButtonID="ImgCalendarioIPago" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||||
<label class="col-md-1 ">Técnico:</label>
|
<asp:RequiredFieldValidator ID="rfvFechaIPago" runat="server" ControlToValidate="TxtFechaIPago" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||||
<div class="col-md-1">
|
<asp:CompareValidator ID="cvFechaIPago" runat="server" ControlToValidate="TxtFechaIPago" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||||
<asp:DropDownList ID="DdlUsuarioAtendio" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="Nombre" DataValueField="CveUsuario" Width="100%">
|
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaIPago" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
</asp:DropDownList>
|
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaIPago" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-md-1 truncate">
|
||||||
|
Fecha F. Pago:
|
||||||
|
</div>
|
||||||
|
<div class="col-md-1" style="min-width: 115px">
|
||||||
|
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
||||||
|
<asp:TextBox Width="80px" ID="TxtFechaFPago" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||||
|
<span class="input-group-btn ">
|
||||||
|
<asp:LinkButton ID="ImgCalendarioFPago" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<ajax:MaskedEditExtender ID="MaskedEditExtender2" runat="server" TargetControlID="TxtFechaFPago" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||||
|
<ajax:CalendarExtender runat="server" ID="CalendarExtender2" TargetControlID="TxtFechaFPago" PopupButtonID="ImgCalendarioFPago" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||||
|
<asp:RequiredFieldValidator ID="rfvFechaFPago" runat="server" ControlToValidate="TxtFechaFPago" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||||
|
<asp:CompareValidator ID="cvFechaFPago" runat="server" ControlToValidate="TxtFechaFPago" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender3" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaFPago" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender4" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaFPago" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="portlet-body" style="display: none">
|
<div class="portlet-body" style="display: none">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
<label class="col-md-1 ">Médico:</label>
|
||||||
|
<div class="col-md-1">
|
||||||
|
<asp:DropDownList ID="DdlMedico" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="Medico" DataValueField="CveMedico" Width="100%">
|
||||||
|
</asp:DropDownList>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<label class="col-md-1 ">Vendedor:</label>
|
||||||
|
<div class="col-md-1">
|
||||||
|
<asp:DropDownList ID="DdlVendedor" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="Vendedor" DataValueField="CveVendedor" Width="100%">
|
||||||
|
</asp:DropDownList>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<label class="col-md-1 ">Técnico:</label>
|
||||||
|
<div class="col-md-1">
|
||||||
|
<asp:DropDownList ID="DdlUsuarioAtendio" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="Nombre" DataValueField="CveUsuario" Width="100%">
|
||||||
|
</asp:DropDownList>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -130,7 +159,7 @@
|
|||||||
EmptyDataText="No se encontraron Medicos Registrados" ToolTip="Listado de Medicos" CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" GridLines="None">
|
EmptyDataText="No se encontraron Medicos Registrados" ToolTip="Listado de Medicos" CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" GridLines="None">
|
||||||
<Columns>
|
<Columns>
|
||||||
|
|
||||||
<asp:BoundField HeaderText="Folio" DataField="SerieFolio" ItemStyle-HorizontalAlign="Left" />
|
<asp:HyperLinkField HeaderText="Folio" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" DataNavigateUrlFields="CveVenta" DatatextField="SerieFolio" ItemStyle-HorizontalAlign="Left" />
|
||||||
<asp:BoundField HeaderText="Nombre Hospital" DataField="Hospital" ItemStyle-HorizontalAlign="Left" />
|
<asp:BoundField HeaderText="Nombre Hospital" DataField="Hospital" ItemStyle-HorizontalAlign="Left" />
|
||||||
<asp:BoundField HeaderText="Especialidad" DataField="Especialidad" ItemStyle-HorizontalAlign="Left" />
|
<asp:BoundField HeaderText="Especialidad" DataField="Especialidad" ItemStyle-HorizontalAlign="Left" />
|
||||||
<asp:BoundField HeaderText="Médico" DataField="Medico" ItemStyle-HorizontalAlign="Left" />
|
<asp:BoundField HeaderText="Médico" DataField="Medico" ItemStyle-HorizontalAlign="Left" />
|
||||||
@@ -138,20 +167,18 @@
|
|||||||
<asp:BoundField HeaderText="Procedimiento" DataField="Procedimiento" ItemStyle-HorizontalAlign="Left" />
|
<asp:BoundField HeaderText="Procedimiento" DataField="Procedimiento" ItemStyle-HorizontalAlign="Left" />
|
||||||
<asp:BoundField HeaderText="Código" DataField="Codigo" ItemStyle-HorizontalAlign="Left" />
|
<asp:BoundField HeaderText="Código" DataField="Codigo" ItemStyle-HorizontalAlign="Left" />
|
||||||
<asp:BoundField HeaderText="Producto" DataField="PS" ItemStyle-HorizontalAlign="Left" />
|
<asp:BoundField HeaderText="Producto" DataField="PS" ItemStyle-HorizontalAlign="Left" />
|
||||||
<asp:BoundField HeaderText="P Unitario" DataField="PU" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
<asp:BoundField HeaderText="Cantidad" DataField="Cantidad" DataFormatString="{0:#,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||||
<asp:BoundField HeaderText="Cantidad" DataField="Cantidad" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
<asp:BoundField HeaderText="P Unitario" DataField="PU" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||||
<asp:BoundField HeaderText="Venta Total" DataField="Total" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
<asp:BoundField HeaderText="Venta Total" DataField="Total" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||||
<asp:BoundField HeaderText="Vendedor" DataField="Vendedor" ItemStyle-HorizontalAlign="Left" />
|
<asp:BoundField HeaderText="Vendedor" DataField="Vendedor" ItemStyle-HorizontalAlign="Left" />
|
||||||
<asp:BoundField HeaderText="$ Vendedor" DataField="ComisionVendedor" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
<asp:BoundField HeaderText="$ Vendedor" DataField="ComisionVendedor" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||||
|
|
||||||
<asp:BoundField HeaderText="Técnico" DataField="Nombre" ItemStyle-HorizontalAlign="Left" />
|
<asp:BoundField HeaderText="Técnico" DataField="Nombre" ItemStyle-HorizontalAlign="Left" />
|
||||||
<asp:BoundField HeaderText="$ Técnico" DataField="ComisionTecnico" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
<asp:BoundField HeaderText="$ Técnico" DataField="ComisionTecnico" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||||
|
<asp:BoundField HeaderText="$ Gerente" DataField="ComisionGerente" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" Visible="false" />
|
||||||
<asp:BoundField HeaderText="$ E. Médica" DataField="ComisionMedico" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
|
||||||
<asp:BoundField HeaderText="Fecha Pago" DataField="FechaPago" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:dd/MM/yyyy}" ControlStyle-Width="100px" />
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<asp:BoundField HeaderText="$ E. Médica" DataField="ComisionMedico" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||||
|
<asp:BoundField HeaderText="Fecha Pago" DataField="FechaPago" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:dd/MM/yyyy}" ControlStyle-Width="100px" />
|
||||||
</Columns>
|
</Columns>
|
||||||
</asp:GridView>
|
</asp:GridView>
|
||||||
|
|
||||||
@@ -185,7 +212,7 @@
|
|||||||
<asp:GridView ID="GvComisiones" runat="server" AutoGenerateColumns="False"
|
<asp:GridView ID="GvComisiones" runat="server" AutoGenerateColumns="False"
|
||||||
DataKeyNames="CvePS,ComisionMedico,ComisionGerente,ComisionVendedor,ComisionTecnico"
|
DataKeyNames="CvePS,ComisionMedico,ComisionGerente,ComisionVendedor,ComisionTecnico"
|
||||||
data-sort="true" OnRowDataBound="GvComisiones_RowDataBound"
|
data-sort="true" OnRowDataBound="GvComisiones_RowDataBound"
|
||||||
EmptyDataText="No se encontraron Comisiones" ToolTip="Listado de Medicos" CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" GridLines="None">
|
EmptyDataText="No se encontraron Comisiones" CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" GridLines="None">
|
||||||
<Columns>
|
<Columns>
|
||||||
|
|
||||||
<asp:TemplateField HeaderText="Código/Producto" ItemStyle-HorizontalAlign="Left">
|
<asp:TemplateField HeaderText="Código/Producto" ItemStyle-HorizontalAlign="Left">
|
||||||
|
|||||||
@@ -2,10 +2,7 @@
|
|||||||
Option Strict On
|
Option Strict On
|
||||||
|
|
||||||
Imports System.Data
|
Imports System.Data
|
||||||
Imports System.Data.Entity
|
|
||||||
Imports Extensiones
|
Imports Extensiones
|
||||||
Imports Microsoft.EntityFrameworkCore
|
|
||||||
|
|
||||||
|
|
||||||
Partial Class Ventas_RepComisionesSMS
|
Partial Class Ventas_RepComisionesSMS
|
||||||
Inherits ClsPaginas
|
Inherits ClsPaginas
|
||||||
@@ -62,10 +59,12 @@ Partial Class Ventas_RepComisionesSMS
|
|||||||
Public Sub CargaDatos()
|
Public Sub CargaDatos()
|
||||||
|
|
||||||
LnkExportar.Visible = False
|
LnkExportar.Visible = False
|
||||||
|
Dim FechaIPago As Date = If(TxtFechaIPago.Text.ToDate < MinFecha, MinFecha, TxtFechaIPago.Text.ToDate)
|
||||||
|
Dim FechaFPago As Date = If(TxtFechaFPago.Text.ToDate < MinFecha, MaxFecha, TxtFechaFPago.Text.ToDate)
|
||||||
|
|
||||||
Dim ObjVentas As New ClsVentas
|
Dim ObjVentas As New ClsVentas
|
||||||
|
|
||||||
If ObjVentas.GetComisionesMedicasRep(txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, UsuarioActual.CveEmpresa, -1, -1, DdlMedico.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, DdlUsuarioAtendio.SelectedValue.ToEntero, -1, 1) Then
|
If ObjVentas.GetComisionesMedicasRep(txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, UsuarioActual.CveEmpresa, -1, -1, DdlMedico.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, DdlUsuarioAtendio.SelectedValue.ToEntero, -1, FechaIPago, FechaFPago) Then
|
||||||
GvDatos.DataSource = ObjVentas.DtResultados
|
GvDatos.DataSource = ObjVentas.DtResultados
|
||||||
|
|
||||||
If ObjVentas.DtResultados IsNot Nothing AndAlso ObjVentas.DtResultados.Rows.Count > 0 Then
|
If ObjVentas.DtResultados IsNot Nothing AndAlso ObjVentas.DtResultados.Rows.Count > 0 Then
|
||||||
@@ -76,9 +75,10 @@ Partial Class Ventas_RepComisionesSMS
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
ObjVentas.Dispose()
|
ObjVentas.Dispose()
|
||||||
|
|
||||||
GvDatos.DataBind()
|
GvDatos.DataBind()
|
||||||
|
|
||||||
|
If UsuarioActual.CveVendedor = 0 Then GvDatos.Columns(15).Visible = True 'columna de comisiones de gerente
|
||||||
|
|
||||||
UpDatos.Update()
|
UpDatos.Update()
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
@@ -270,7 +270,7 @@ Partial Class Ventas_RepComisionesSMS
|
|||||||
|
|
||||||
Dim ObjVentas As New ClsVentas
|
Dim ObjVentas As New ClsVentas
|
||||||
GvComisionesEspeciales.DataSource = Nothing
|
GvComisionesEspeciales.DataSource = Nothing
|
||||||
If ObjVentas.GetComisionesMedicasEsPeciales(-1, -1, UsuarioActual.CveEmpresa) Then
|
If ObjVentas.GetComisionesMedicasEspeciales(-1, -1, UsuarioActual.CveEmpresa) Then
|
||||||
GvComisionesEspeciales.DataSource = ObjVentas.DtResultados
|
GvComisionesEspeciales.DataSource = ObjVentas.DtResultados
|
||||||
End If
|
End If
|
||||||
ObjVentas.Dispose()
|
ObjVentas.Dispose()
|
||||||
@@ -345,7 +345,12 @@ Partial Class Ventas_RepComisionesSMS
|
|||||||
Dim ObjVentas As New ClsVentas
|
Dim ObjVentas As New ClsVentas
|
||||||
|
|
||||||
If ObjVentas.AddComisionesMedicasEspeciales(DdlModalMedico.SelectedValue.ToEntero, DdlModalPS.SelectedValue.ToEntero, DdlModalTipoComision.SelectedValue.ToEntero, Comision, UsuarioActual.CveUsuario) Then
|
If ObjVentas.AddComisionesMedicasEspeciales(DdlModalMedico.SelectedValue.ToEntero, DdlModalPS.SelectedValue.ToEntero, DdlModalTipoComision.SelectedValue.ToEntero, Comision, UsuarioActual.CveUsuario) Then
|
||||||
Alert("Comisión agregada correctamente")
|
Alert("Comisión agregada correctamente", TipoMensaje.ToastInformacion)
|
||||||
|
DdlModalPS.SelectedValue = "-1"
|
||||||
|
DdlModalPS.SelectedValue = ""
|
||||||
|
DdlModalPS.SelectedText = ""
|
||||||
|
TxtModalComision.Text = ""
|
||||||
|
DdlModalPS.Focus()
|
||||||
Else
|
Else
|
||||||
errorProceso = True
|
errorProceso = True
|
||||||
End If
|
End If
|
||||||
@@ -354,7 +359,16 @@ Partial Class Ventas_RepComisionesSMS
|
|||||||
|
|
||||||
If Not errorProceso Then
|
If Not errorProceso Then
|
||||||
CargaComisionesEspeciales()
|
CargaComisionesEspeciales()
|
||||||
ReiniciaModalComisionesEspeciales()
|
'ReiniciaModalComisionesEspeciales()
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||||
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
|
If e.Row.DBCampo("SerieFolio") = "" Then
|
||||||
|
e.Row.CssClass = "SubTotales"
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -758,12 +758,12 @@
|
|||||||
<td><b>Fecha:</b></td>
|
<td><b>Fecha:</b></td>
|
||||||
<td>
|
<td>
|
||||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 117px !important; padding: 0px;">
|
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 117px !important; padding: 0px;">
|
||||||
<asp:TextBox ID="TxtFecha" runat="server" AutoPostBack="true" CssClass="form-control" CausesValidation="true" MaxLength="10" OnTextChanged="TxtFecha_TextChanged"></asp:TextBox>
|
<asp:TextBox ID="TxtFecha" runat="server" Enabled="false" AutoPostBack="true" CssClass="form-control" CausesValidation="true" MaxLength="10" OnTextChanged="TxtFecha_TextChanged"></asp:TextBox>
|
||||||
<span class="input-group-btn ">
|
<span class="input-group-btn ">
|
||||||
<asp:LinkButton ID="ImgFecha" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
<asp:LinkButton ID="ImgFecha" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server" ></asp:LinkButton>
|
||||||
</span>
|
</span>
|
||||||
<ajax:MaskedEditExtender ID="MEEFecha" runat="server" TargetControlID="TxtFecha" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
<ajax:MaskedEditExtender ID="MEEFecha" runat="server" TargetControlID="TxtFecha" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||||
<ajax:CalendarExtender runat="server" ID="CEFecha" TargetControlID="TxtFecha" PopupButtonID="ImgFecha" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
<ajax:CalendarExtender runat="server" ID="CEFecha" TargetControlID="TxtFecha" PopupButtonID="ImgFecha" PopupPosition="BottomRight" Enabled="false" ></ajax:CalendarExtender>
|
||||||
<asp:RequiredFieldValidator ID="RFVFecha" runat="server" ControlToValidate="TxtFecha" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</b> es necesario, por favor ingréselo." ValidationGroup="GrpEmitirImprimir"></asp:RequiredFieldValidator>
|
<asp:RequiredFieldValidator ID="RFVFecha" runat="server" ControlToValidate="TxtFecha" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</b> es necesario, por favor ingréselo." ValidationGroup="GrpEmitirImprimir"></asp:RequiredFieldValidator>
|
||||||
<asp:CompareValidator ID="CVFecha" runat="server" ControlToValidate="TxtFecha" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpEmitirImprimir"></asp:CompareValidator>
|
<asp:CompareValidator ID="CVFecha" runat="server" ControlToValidate="TxtFecha" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpEmitirImprimir"></asp:CompareValidator>
|
||||||
<ajax:ValidatorCalloutExtender ID="VCOFecha1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFecha" Width="350px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="VCOFecha1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFecha" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
|
|||||||
@@ -3228,12 +3228,11 @@ Partial Class Ventas
|
|||||||
' End If
|
' End If
|
||||||
'End If
|
'End If
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(301).ToEntero() > 0 Then
|
If UsuarioActual.Empresa.Funcionalidad(301) <> "" Then
|
||||||
TxtFecha.Enabled = False
|
TxtFecha.Enabled = True
|
||||||
ImgFecha.Visible = False
|
ImgFecha.Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
CargarCodigo()
|
CargarCodigo()
|
||||||
InicializaImprimirNew()
|
InicializaImprimirNew()
|
||||||
|
|
||||||
@@ -3497,13 +3496,6 @@ Partial Class Ventas
|
|||||||
ImgFecha.Visible = False
|
ImgFecha.Visible = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'condición temporal por implementación JAM. usuario FernandaRomo
|
|
||||||
If UsuarioActual.CveUsuario.Contiene(11703, 1719) Then
|
|
||||||
TxtFecha.Enabled = True
|
|
||||||
ImgFecha.Visible = True
|
|
||||||
End If
|
|
||||||
TxtFecha.Enabled = True
|
|
||||||
|
|
||||||
BloqueaCondicionesPago()
|
BloqueaCondicionesPago()
|
||||||
|
|
||||||
BloqueaClasificaciones()
|
BloqueaClasificaciones()
|
||||||
|
|||||||
Reference in New Issue
Block a user