logiv nominas antiguedad
This commit is contained in:
@@ -38,33 +38,33 @@ Public Class LogicNominas
|
||||
Else
|
||||
If hasfiniquito Then
|
||||
|
||||
cfdi = PreTimbrar(CveNomina, UsuarioActual, True, versionTimbre) 'CvePersonal, CvePeriodo,
|
||||
If cfdi IsNot Nothing AndAlso cfdi.Mensaje = "" Then
|
||||
'cfdi = PreTimbrar(CveNomina, UsuarioActual, True, versionTimbre) 'CvePersonal, CvePeriodo,
|
||||
'If cfdi IsNot Nothing AndAlso cfdi.Mensaje = "" Then
|
||||
|
||||
If Not cfdi.Timbrado Then
|
||||
Dim ObjTimbrado As New Timbrado
|
||||
Dim ObjFactura As New Modelos.Factura
|
||||
ObjFactura.TipoDocto = "Nomina"
|
||||
ObjFactura.Folio = cfdi.Comprobante.Folio.ToEntero()
|
||||
ObjFactura.Serie = cfdi.Comprobante.Serie
|
||||
ObjFactura.Timbre = cfdi
|
||||
If Not ObjTimbrado.TimbrarFactura(UsuarioActual, ObjFactura, CvePAC, versionTimbre) Then
|
||||
Retorno = ObjTimbrado.MensajeErrorCFDI
|
||||
End If
|
||||
If Retorno <> "" Then
|
||||
Retorno = $"{Retorno} - {cfdi.Receptor.Nombre}"
|
||||
Else
|
||||
' If Not cfdi.Timbrado Then
|
||||
' Dim ObjTimbrado As New Timbrado
|
||||
' Dim ObjFactura As New Modelos.Factura
|
||||
' ObjFactura.TipoDocto = "Nomina"
|
||||
' ObjFactura.Folio = cfdi.Comprobante.Folio.ToEntero()
|
||||
' ObjFactura.Serie = cfdi.Comprobante.Serie
|
||||
' ObjFactura.Timbre = cfdi
|
||||
' If Not ObjTimbrado.TimbrarFactura(UsuarioActual, ObjFactura, CvePAC, versionTimbre) Then
|
||||
' Retorno = ObjTimbrado.MensajeErrorCFDI
|
||||
' End If
|
||||
' If Retorno <> "" Then
|
||||
' Retorno = $"{Retorno} - {cfdi.Receptor.Nombre}"
|
||||
' Else
|
||||
|
||||
End If
|
||||
' End If
|
||||
|
||||
End If
|
||||
Else
|
||||
If cfdi Is Nothing Then
|
||||
Retorno = $"No se pudo generar el pretimbre(GetError): <br/> {GetError}"
|
||||
Else
|
||||
Retorno = $"No se pudo generar el pretimbre: <br/> {cfdi.Mensaje}"
|
||||
End If
|
||||
End If
|
||||
' End If
|
||||
'Else
|
||||
' If cfdi Is Nothing Then
|
||||
' Retorno = $"No se pudo generar el pretimbre(GetError): <br/> {GetError}"
|
||||
' Else
|
||||
' Retorno = $"No se pudo generar el pretimbre: <br/> {cfdi.Mensaje}"
|
||||
' End If
|
||||
'End If
|
||||
|
||||
End If
|
||||
End If
|
||||
@@ -106,7 +106,7 @@ Public Class LogicNominas
|
||||
Dim TotalExcento As Decimal = 0
|
||||
Dim TotalGravado As Decimal = 0
|
||||
|
||||
Dim AntiguedadSemanas As Integer = 0
|
||||
Dim AntiguedadSemanas As String = ""
|
||||
Dim FormatoReciboCFDi As String = ""
|
||||
|
||||
Dim FechaInicio, FechaFin, FechaPago As Date
|
||||
@@ -169,7 +169,8 @@ Public Class LogicNominas
|
||||
cfdi.Nomina.UltimoSueldoOrdinario = drow("UltimoSueldoOrdinario").ToString().ToDecimal()
|
||||
Serie = objNomina.Serie
|
||||
Folio = objNomina.Folio.ToString()
|
||||
|
||||
FechaInicioContrato = drow("FechaIngreso").ToString()
|
||||
AntiguedadSemanas = drow("AntiguedadSemanas").ToString()
|
||||
MetodoPagoFijo = drow("MetodoPagoFijo").ToString().ToUpper().Contiene("1", "TRUE")
|
||||
|
||||
ClaveBanco = drow("ClaveBanco").ToString()
|
||||
@@ -195,7 +196,7 @@ Public Class LogicNominas
|
||||
Sindicalizado = objPersonal.DtResultados.Rows(0)("Sindicalizado").ToString().ToUpper().Contiene("TRUE", "1")
|
||||
CURP = objPersonal.CURP
|
||||
NumeroSS = objPersonal.NumeroSS
|
||||
FechaInicioContrato = objPersonal.FechaInicioContrato.ToString()
|
||||
'FechaInicioContrato = objPersonal.FechaInicioContrato.ToString()
|
||||
CodigoTipoContrato = objPersonal.CodigoTipoContrato
|
||||
ClaveTipoJornada = objPersonal.ClaveTipoJornada
|
||||
CveRegimenContratacion = objPersonal.CveRegimenContratacion
|
||||
@@ -220,12 +221,12 @@ Public Class LogicNominas
|
||||
End If
|
||||
If continuar AndAlso objNomina.GetNom_NominasDetalles(CveNomina, CvePersonal, CvePeriodo, "-1") 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
|
||||
filtropercepciones = " Tipo = 'P' AND SATCveConcepto IN ('022', '023','025') AND (TipoConceptoSAT<>'O' OR TipoConceptoSAT IS NULL) "
|
||||
End If
|
||||
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
|
||||
filtrodeduc = " Tipo = 'D' AND CveSistema =47"
|
||||
End If
|
||||
@@ -240,7 +241,7 @@ Public Class LogicNominas
|
||||
|
||||
End If
|
||||
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()
|
||||
@@ -266,7 +267,7 @@ Public Class LogicNominas
|
||||
FechaFin = DrPeriodo("FechaFin").ToString().ToDate()
|
||||
FechaPago = DrPeriodo("FechaPago").ToString().ToDate()
|
||||
PeriodicidadPago = DrPeriodo("ClavePerioricidadPago").ToString()
|
||||
AntiguedadSemanas = DateDiff(DateInterval.Weekday, objPersonal.FechaIngreso, FechaFin).ToEntero()
|
||||
'AntiguedadSemanas = DateDiff(DateInterval.Weekday, objPersonal.FechaIngreso, FechaFin).ToEntero()
|
||||
|
||||
If Not TimbreIndemnizacion Then
|
||||
FechaInicio = DrPeriodo("FechaInicio").ToString().ToDate()
|
||||
@@ -484,7 +485,7 @@ Public Class LogicNominas
|
||||
cfdi.Nomina.Receptor.CURP = CURP
|
||||
cfdi.Nomina.Receptor.NSS = NumeroSS
|
||||
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.CodigoTipoJornada = ClaveTipoJornada
|
||||
cfdi.Nomina.Receptor.CodigoRegimenContratacion = If(TimbreIndemnizacion, "13", CveRegimenContratacion)
|
||||
|
||||
@@ -236,7 +236,7 @@ public partial class Nomina_Finiquito : ClsPaginas
|
||||
{
|
||||
DateTime fechafin = TxtFechaBaja.Text.ToDateTime();
|
||||
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);
|
||||
}
|
||||
else
|
||||
|
||||
@@ -2534,7 +2534,7 @@
|
||||
</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"
|
||||
AutoPostBack="true" OnSelectedIndexChanged="DdlTipoAsistencias_SelectedIndexChanged">
|
||||
AutoPostBack="true" OnSelectedIndexChanged="DdlTipoAsistencias_SelectedIndexChangedP">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</td>
|
||||
|
||||
@@ -6738,6 +6738,12 @@ Partial Class RH_Personal
|
||||
#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)
|
||||
Dim ddl As DropDownList = DirectCast(sender, DropDownList)
|
||||
Dim gvrow As GridViewRow = DirectCast(ddl.NamingContainer, GridViewRow)
|
||||
|
||||
Reference in New Issue
Block a user