logiv nominas antiguedad
This commit is contained in:
@@ -38,33 +38,33 @@ Public Class LogicNominas
|
|||||||
Else
|
Else
|
||||||
If hasfiniquito Then
|
If hasfiniquito Then
|
||||||
|
|
||||||
cfdi = PreTimbrar(CveNomina, UsuarioActual, True, versionTimbre) 'CvePersonal, CvePeriodo,
|
'cfdi = PreTimbrar(CveNomina, UsuarioActual, True, versionTimbre) 'CvePersonal, CvePeriodo,
|
||||||
If cfdi IsNot Nothing AndAlso cfdi.Mensaje = "" Then
|
'If cfdi IsNot Nothing AndAlso cfdi.Mensaje = "" Then
|
||||||
|
|
||||||
If Not cfdi.Timbrado Then
|
' If Not cfdi.Timbrado Then
|
||||||
Dim ObjTimbrado As New Timbrado
|
' Dim ObjTimbrado As New Timbrado
|
||||||
Dim ObjFactura As New Modelos.Factura
|
' Dim ObjFactura As New Modelos.Factura
|
||||||
ObjFactura.TipoDocto = "Nomina"
|
' ObjFactura.TipoDocto = "Nomina"
|
||||||
ObjFactura.Folio = cfdi.Comprobante.Folio.ToEntero()
|
' ObjFactura.Folio = cfdi.Comprobante.Folio.ToEntero()
|
||||||
ObjFactura.Serie = cfdi.Comprobante.Serie
|
' ObjFactura.Serie = cfdi.Comprobante.Serie
|
||||||
ObjFactura.Timbre = cfdi
|
' ObjFactura.Timbre = cfdi
|
||||||
If Not ObjTimbrado.TimbrarFactura(UsuarioActual, ObjFactura, CvePAC, versionTimbre) Then
|
' If Not ObjTimbrado.TimbrarFactura(UsuarioActual, ObjFactura, CvePAC, versionTimbre) Then
|
||||||
Retorno = ObjTimbrado.MensajeErrorCFDI
|
' Retorno = ObjTimbrado.MensajeErrorCFDI
|
||||||
End If
|
' End If
|
||||||
If Retorno <> "" Then
|
' If Retorno <> "" Then
|
||||||
Retorno = $"{Retorno} - {cfdi.Receptor.Nombre}"
|
' Retorno = $"{Retorno} - {cfdi.Receptor.Nombre}"
|
||||||
Else
|
' Else
|
||||||
|
|
||||||
End If
|
' End If
|
||||||
|
|
||||||
End If
|
' End If
|
||||||
Else
|
'Else
|
||||||
If cfdi Is Nothing Then
|
' If cfdi Is Nothing Then
|
||||||
Retorno = $"No se pudo generar el pretimbre(GetError): <br/> {GetError}"
|
' Retorno = $"No se pudo generar el pretimbre(GetError): <br/> {GetError}"
|
||||||
Else
|
' Else
|
||||||
Retorno = $"No se pudo generar el pretimbre: <br/> {cfdi.Mensaje}"
|
' Retorno = $"No se pudo generar el pretimbre: <br/> {cfdi.Mensaje}"
|
||||||
End If
|
' End If
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -106,7 +106,7 @@ Public Class LogicNominas
|
|||||||
Dim TotalExcento As Decimal = 0
|
Dim TotalExcento As Decimal = 0
|
||||||
Dim TotalGravado As Decimal = 0
|
Dim TotalGravado As Decimal = 0
|
||||||
|
|
||||||
Dim AntiguedadSemanas As Integer = 0
|
Dim AntiguedadSemanas As String = ""
|
||||||
Dim FormatoReciboCFDi As String = ""
|
Dim FormatoReciboCFDi As String = ""
|
||||||
|
|
||||||
Dim FechaInicio, FechaFin, FechaPago As Date
|
Dim FechaInicio, FechaFin, FechaPago As Date
|
||||||
@@ -169,7 +169,8 @@ Public Class LogicNominas
|
|||||||
cfdi.Nomina.UltimoSueldoOrdinario = drow("UltimoSueldoOrdinario").ToString().ToDecimal()
|
cfdi.Nomina.UltimoSueldoOrdinario = drow("UltimoSueldoOrdinario").ToString().ToDecimal()
|
||||||
Serie = objNomina.Serie
|
Serie = objNomina.Serie
|
||||||
Folio = objNomina.Folio.ToString()
|
Folio = objNomina.Folio.ToString()
|
||||||
|
FechaInicioContrato = drow("FechaIngreso").ToString()
|
||||||
|
AntiguedadSemanas = drow("AntiguedadSemanas").ToString()
|
||||||
MetodoPagoFijo = drow("MetodoPagoFijo").ToString().ToUpper().Contiene("1", "TRUE")
|
MetodoPagoFijo = drow("MetodoPagoFijo").ToString().ToUpper().Contiene("1", "TRUE")
|
||||||
|
|
||||||
ClaveBanco = drow("ClaveBanco").ToString()
|
ClaveBanco = drow("ClaveBanco").ToString()
|
||||||
@@ -195,7 +196,7 @@ Public Class LogicNominas
|
|||||||
Sindicalizado = objPersonal.DtResultados.Rows(0)("Sindicalizado").ToString().ToUpper().Contiene("TRUE", "1")
|
Sindicalizado = objPersonal.DtResultados.Rows(0)("Sindicalizado").ToString().ToUpper().Contiene("TRUE", "1")
|
||||||
CURP = objPersonal.CURP
|
CURP = objPersonal.CURP
|
||||||
NumeroSS = objPersonal.NumeroSS
|
NumeroSS = objPersonal.NumeroSS
|
||||||
FechaInicioContrato = objPersonal.FechaInicioContrato.ToString()
|
'FechaInicioContrato = objPersonal.FechaInicioContrato.ToString()
|
||||||
CodigoTipoContrato = objPersonal.CodigoTipoContrato
|
CodigoTipoContrato = objPersonal.CodigoTipoContrato
|
||||||
ClaveTipoJornada = objPersonal.ClaveTipoJornada
|
ClaveTipoJornada = objPersonal.ClaveTipoJornada
|
||||||
CveRegimenContratacion = objPersonal.CveRegimenContratacion
|
CveRegimenContratacion = objPersonal.CveRegimenContratacion
|
||||||
@@ -220,12 +221,12 @@ Public Class LogicNominas
|
|||||||
End If
|
End If
|
||||||
If continuar AndAlso objNomina.GetNom_NominasDetalles(CveNomina, CvePersonal, CvePeriodo, "-1") Then
|
If continuar AndAlso objNomina.GetNom_NominasDetalles(CveNomina, CvePersonal, CvePeriodo, "-1") Then
|
||||||
If objNomina.DtResultados.Rows.Count > 0 Then
|
If objNomina.DtResultados.Rows.Count > 0 Then
|
||||||
Dim filtropercepciones As String = "Tipo = 'P' AND EsPadre = 1 AND SoloVisible =0 AND (TipoConceptoSAT<>'O' OR TipoConceptoSAT IS NULL) AND SATCveConcepto NOT IN ('022', '023','025')"
|
Dim filtropercepciones As String = "Tipo = 'P' AND EsPadre = 1 AND SoloVisible =0 AND (TipoConceptoSAT<>'O' OR TipoConceptoSAT IS NULL) " ' AND SATCveConcepto NOT IN ('022', '023','025')
|
||||||
If TimbreIndemnizacion Then
|
If TimbreIndemnizacion Then
|
||||||
filtropercepciones = " Tipo = 'P' AND SATCveConcepto IN ('022', '023','025') AND (TipoConceptoSAT<>'O' OR TipoConceptoSAT IS NULL) "
|
filtropercepciones = " Tipo = 'P' AND SATCveConcepto IN ('022', '023','025') AND (TipoConceptoSAT<>'O' OR TipoConceptoSAT IS NULL) "
|
||||||
End If
|
End If
|
||||||
DtPercepciones = objNomina.DtResultados.FiltraParametros(filtropercepciones)
|
DtPercepciones = objNomina.DtResultados.FiltraParametros(filtropercepciones)
|
||||||
Dim filtrodeduc As String = "Tipo = 'D' AND EsPadre = 1 AND SoloVisible =0 AND (TipoConceptoSAT<>'O' OR TipoConceptoSAT IS NULL) AND CveSistema <> 47"
|
Dim filtrodeduc As String = "Tipo = 'D' AND EsPadre = 1 AND SoloVisible =0 AND (TipoConceptoSAT<>'O' OR TipoConceptoSAT IS NULL) " 'AND CveSistema <> 47
|
||||||
If TimbreIndemnizacion Then
|
If TimbreIndemnizacion Then
|
||||||
filtrodeduc = " Tipo = 'D' AND CveSistema =47"
|
filtrodeduc = " Tipo = 'D' AND CveSistema =47"
|
||||||
End If
|
End If
|
||||||
@@ -240,7 +241,7 @@ Public Class LogicNominas
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
hasfiniquito = objNomina.DtResultados.COUNT("SATCveConcepto", "(Tipo = 'P' AND SATCveConcepto IN ('022', '023','025')) ") > 0 'OR (Tipo = 'D' AND SATCveConcepto = '101')
|
hasfiniquito = False 'objNomina.DtResultados.COUNT("SATCveConcepto", "(Tipo = 'P' AND SATCveConcepto IN ('022', '023','025')) ") > 0 'OR (Tipo = 'D' AND SATCveConcepto = '101')
|
||||||
|
|
||||||
|
|
||||||
TotalPercepciones = DtPercepciones.SUM("Importe").ToString().ToDecimal()
|
TotalPercepciones = DtPercepciones.SUM("Importe").ToString().ToDecimal()
|
||||||
@@ -266,7 +267,7 @@ Public Class LogicNominas
|
|||||||
FechaFin = DrPeriodo("FechaFin").ToString().ToDate()
|
FechaFin = DrPeriodo("FechaFin").ToString().ToDate()
|
||||||
FechaPago = DrPeriodo("FechaPago").ToString().ToDate()
|
FechaPago = DrPeriodo("FechaPago").ToString().ToDate()
|
||||||
PeriodicidadPago = DrPeriodo("ClavePerioricidadPago").ToString()
|
PeriodicidadPago = DrPeriodo("ClavePerioricidadPago").ToString()
|
||||||
AntiguedadSemanas = DateDiff(DateInterval.Weekday, objPersonal.FechaIngreso, FechaFin).ToEntero()
|
'AntiguedadSemanas = DateDiff(DateInterval.Weekday, objPersonal.FechaIngreso, FechaFin).ToEntero()
|
||||||
|
|
||||||
If Not TimbreIndemnizacion Then
|
If Not TimbreIndemnizacion Then
|
||||||
FechaInicio = DrPeriodo("FechaInicio").ToString().ToDate()
|
FechaInicio = DrPeriodo("FechaInicio").ToString().ToDate()
|
||||||
@@ -484,7 +485,7 @@ Public Class LogicNominas
|
|||||||
cfdi.Nomina.Receptor.CURP = CURP
|
cfdi.Nomina.Receptor.CURP = CURP
|
||||||
cfdi.Nomina.Receptor.NSS = NumeroSS
|
cfdi.Nomina.Receptor.NSS = NumeroSS
|
||||||
cfdi.Nomina.Receptor.FechaInicioContrato = FechaInicioContrato
|
cfdi.Nomina.Receptor.FechaInicioContrato = FechaInicioContrato
|
||||||
cfdi.Nomina.Receptor.Antiguedad = $"P{AntiguedadSemanas}W"
|
cfdi.Nomina.Receptor.Antiguedad = AntiguedadSemanas '$"P{AntiguedadSemanas}W"
|
||||||
cfdi.Nomina.Receptor.TipoContrato = If(TimbreIndemnizacion, "99", CodigoTipoContrato)
|
cfdi.Nomina.Receptor.TipoContrato = If(TimbreIndemnizacion, "99", CodigoTipoContrato)
|
||||||
cfdi.Nomina.Receptor.CodigoTipoJornada = ClaveTipoJornada
|
cfdi.Nomina.Receptor.CodigoTipoJornada = ClaveTipoJornada
|
||||||
cfdi.Nomina.Receptor.CodigoRegimenContratacion = If(TimbreIndemnizacion, "13", CveRegimenContratacion)
|
cfdi.Nomina.Receptor.CodigoRegimenContratacion = If(TimbreIndemnizacion, "13", CveRegimenContratacion)
|
||||||
|
|||||||
@@ -236,7 +236,7 @@ public partial class Nomina_Finiquito : ClsPaginas
|
|||||||
{
|
{
|
||||||
DateTime fechafin = TxtFechaBaja.Text.ToDateTime();
|
DateTime fechafin = TxtFechaBaja.Text.ToDateTime();
|
||||||
decimal antiguedad = getyearsresult(fechafin, FechaInicio);
|
decimal antiguedad = getyearsresult(fechafin, FechaInicio);
|
||||||
TxtAntiguedad.Text = string.Format("{0}", antiguedad);
|
TxtAntiguedad.Text = string.Format("{0:##0.00###}", antiguedad);
|
||||||
TxtDiasTransAnio.Text = string.Format("{0}", fechafin.DayOfYear);
|
TxtDiasTransAnio.Text = string.Format("{0}", fechafin.DayOfYear);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -2534,7 +2534,7 @@
|
|||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<asp:DropDownList Width="100%" ID="DdlTipoAsistencias" runat="server" DataTextField="Tipo" DataValueField="CveAsistenciasInasistencias" CssClass="table-group-action-input form-control input-inline input-small input-sm" Style="min-width: 70px" ValidationGroup="GrpGuardarAsistencia"
|
<asp:DropDownList Width="100%" ID="DdlTipoAsistencias" runat="server" DataTextField="Tipo" DataValueField="CveAsistenciasInasistencias" CssClass="table-group-action-input form-control input-inline input-small input-sm" Style="min-width: 70px" ValidationGroup="GrpGuardarAsistencia"
|
||||||
AutoPostBack="true" OnSelectedIndexChanged="DdlTipoAsistencias_SelectedIndexChanged">
|
AutoPostBack="true" OnSelectedIndexChanged="DdlTipoAsistencias_SelectedIndexChangedP">
|
||||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@@ -6738,6 +6738,12 @@ Partial Class RH_Personal
|
|||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
|
Protected Sub DdlTipoAsistencias_SelectedIndexChangedP(sender As Object, e As EventArgs)
|
||||||
|
Dim ddl As DropDownList = DirectCast(sender, DropDownList)
|
||||||
|
If ddl.SelectedItem.Text = "Retardo" Then
|
||||||
|
TxtPorPago.Text = "87.5"
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
Protected Sub DdlTipoAsistencias_SelectedIndexChanged(sender As Object, e As EventArgs)
|
Protected Sub DdlTipoAsistencias_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||||
Dim ddl As DropDownList = DirectCast(sender, DropDownList)
|
Dim ddl As DropDownList = DirectCast(sender, DropDownList)
|
||||||
Dim gvrow As GridViewRow = DirectCast(ddl.NamingContainer, GridViewRow)
|
Dim gvrow As GridViewRow = DirectCast(ddl.NamingContainer, GridViewRow)
|
||||||
|
|||||||
Reference in New Issue
Block a user