Personal vacaciones calculo dias feriados y fecha fin
This commit is contained in:
@@ -402,8 +402,10 @@ Partial Class Compras_ReembolsosComprobaciones
|
||||
Protected Sub BtnIEGuardar_Click(sender As Object, e As EventArgs) Handles BtnIEGuardar.Click
|
||||
|
||||
Dim ValFechaDocumento As Boolean = False
|
||||
Dim FoliosFechasValFechaDocumento As New StringBuilder
|
||||
FoliosFechasValFechaDocumento.AppendLine("Se seleccionaron facturas con fecha de mes superior al mes del pago: <br/>")
|
||||
|
||||
Dim FoliosFechasValFechaDocumentoAnio As New StringBuilder
|
||||
Dim FoliosFechasValFechaDocumentoPagoMesSuperior As New StringBuilder
|
||||
Dim FoliosFechasValFechaDocumentoMesInferior As New StringBuilder
|
||||
|
||||
For Each gvRowVal As GridViewRow In GvCxP.Rows
|
||||
|
||||
@@ -422,12 +424,16 @@ Partial Class Compras_ReembolsosComprobaciones
|
||||
Dim MesDocumento As Integer = FechaDocumento.Month
|
||||
|
||||
If AnioFactura > AnioDocumento Then
|
||||
FoliosFechasValFechaDocumento.AppendLine($"Folio: { gvRowVal.DataKey("SerieFolio") } fecha: {gvRowVal.DataKey("FechaCompra").ToDate.ToString("dd/MM/yyyy") } <br/>")
|
||||
FoliosFechasValFechaDocumentoAnio.AppendLine($"Folio: { gvRowVal.DataKey("SerieFolio") } fecha: {gvRowVal.DataKey("FechaCompra").ToDate.ToString("dd/MM/yyyy") } <br/>")
|
||||
ValFechaDocumento = True
|
||||
ElseIf AnioFactura = AnioDocumento And MesFactura > MesDocumento Then
|
||||
FoliosFechasValFechaDocumento.AppendLine($"Folio: { gvRowVal.DataKey("SerieFolio") } fecha: {gvRowVal.DataKey("FechaCompra").ToDate.ToString("dd/MM/yyyy") } <br/>")
|
||||
FoliosFechasValFechaDocumentoMesInferior.AppendLine($"Folio: { gvRowVal.DataKey("SerieFolio") } fecha: {gvRowVal.DataKey("FechaCompra").ToDate.ToString("dd/MM/yyyy") } <br/>")
|
||||
ValFechaDocumento = True
|
||||
ElseIf AnioFactura = AnioDocumento And MesDocumento > MesFactura Then
|
||||
FoliosFechasValFechaDocumentoPagoMesSuperior.AppendLine($"Folio: { gvRowVal.DataKey("SerieFolio") } fecha: {gvRowVal.DataKey("FechaCompra").ToDate.ToString("dd/MM/yyyy") } <br/>")
|
||||
ValFechaDocumento = True
|
||||
End If
|
||||
|
||||
End If
|
||||
Next
|
||||
|
||||
@@ -437,7 +443,13 @@ Partial Class Compras_ReembolsosComprobaciones
|
||||
End If
|
||||
|
||||
If ValFechaDocumento Then
|
||||
Alert(FoliosFechasValFechaDocumento.ToString, TipoMensaje.MsgAdvertencia)
|
||||
|
||||
Dim strMensajeValFechas As String = ""
|
||||
strMensajeValFechas = $"{strMensajeValFechas}{If(FoliosFechasValFechaDocumentoAnio.Length > 0, "Se seleccionarón facturas con fecha de año superior al año del pago: <br/>" & FoliosFechasValFechaDocumentoAnio.ToString, "")}"
|
||||
strMensajeValFechas = $"{strMensajeValFechas}{If(FoliosFechasValFechaDocumentoPagoMesSuperior.Length > 0, "Se seleccionarón facturas con fecha de mes inferior al mes del pago: <br/>" & FoliosFechasValFechaDocumentoPagoMesSuperior.ToString, "")}"
|
||||
strMensajeValFechas = $"{strMensajeValFechas}{If(FoliosFechasValFechaDocumentoMesInferior.Length > 0, "Se seleccionarón facturas con fecha de mes superior al mes del pago: <br/>" & FoliosFechasValFechaDocumentoMesInferior.ToString, "")}"
|
||||
|
||||
Alert(strMensajeValFechas, TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
|
||||
Reference in New Issue
Block a user