Reembolsos yu comprobaciones, PopIEVentas, OI Documentos
This commit is contained in:
@@ -382,6 +382,62 @@ Partial Class Compras_ReembolsosComprobaciones
|
||||
#Region " BTN GUARDAR "
|
||||
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/>")
|
||||
|
||||
For Each gvRowVal As GridViewRow In GvCxP.Rows
|
||||
|
||||
If gvRowVal.FCCheckBox("Chk").Checked Then
|
||||
|
||||
|
||||
Dim FechaFactura As Date = gvRowVal.DataKey("FechaCompra").ToDate
|
||||
|
||||
|
||||
Dim FechaDocumento As Date
|
||||
|
||||
If DDlCheques.SelectedValue.ToEntero = -1 Then
|
||||
FechaDocumento = TxtFechaDocumento.Text.ToDate
|
||||
Else
|
||||
FechaDocumento = TxtFechaPrePoliza.Text.ToDate
|
||||
End If
|
||||
|
||||
|
||||
|
||||
Dim AnioFactura As Integer = FechaFactura.Year
|
||||
Dim MesFactura As Integer = FechaFactura.Month
|
||||
|
||||
|
||||
Dim AnioDocumento As Integer = FechaDocumento.Year
|
||||
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/>")
|
||||
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/>")
|
||||
ValFechaDocumento = True
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
|
||||
If ValFechaDocumento Then
|
||||
Alert(FoliosFechasValFechaDocumento.ToString, TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
|
||||
|
||||
If HdnCheque.Value.ToEntero > 0 And ChkChequeExcedente.Checked And TxtImporte.Text.ToDecimal = 0 Then
|
||||
Alert("El importe del cheque excedente debe ser mayor a cero", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
|
||||
Reference in New Issue
Block a user