diff --git a/Bancos/PopIECompras.aspx.vb b/Bancos/PopIECompras.aspx.vb
index a2726b647..79a889d74 100644
--- a/Bancos/PopIECompras.aspx.vb
+++ b/Bancos/PopIECompras.aspx.vb
@@ -1386,11 +1386,25 @@ Partial Class Bancos_PopIECompras
#End Region
#Region "G U A R D A R"
- Private Sub BtnGuardar_Click(sender As Object, e As EventArgs) Handles BtnGuardar.Click
-
-
- If FechaCompra.ToString("dd/MM/yyyy").ToDate > TxtFechaDocumento.Text.ToDate Then
- Alert($"La fecha de compra no puede ser mayor que la fecha de pago
Fecha de compra: { FechaCompra.ToString("dd/MM/yyyy") } ", TipoMensaje.MsgAdvertencia)
+ Private Sub BtnGuardar_Click(sender As Object, e As EventArgs) Handles BtnGuardar.Click
+
+
+
+
+ Dim FechaFactura As Date = FechaCompra
+ Dim FechaDocumentoPago As Date = TxtFechaDocumento.Text.ToDate
+
+ Dim AnioFactura As Integer = FechaFactura.Year
+ Dim MesFactura As Integer = FechaFactura.Month
+
+ Dim AnioDocumento As Integer = FechaDocumentoPago.Year
+ Dim MesDocumento As Integer = FechaDocumentoPago.Month
+
+ If AnioFactura > AnioDocumento Then
+ Alert($"El mes de la fecha de compra no puede ser mayor al mes de la la fecha de pago
Fecha de compra: { FechaCompra.ToString("dd/MM/yyyy") }", TipoMensaje.MsgAdvertencia)
+ Exit Sub
+ ElseIf AnioFactura = AnioDocumento And MesFactura > MesDocumento Then
+ Alert($"El mes de la fecha de compra no puede ser mayor al mes de la la fecha de pago
Fecha de compra: { FechaCompra.ToString("dd/MM/yyyy") }", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
diff --git a/Bancos/PopIEVentas.aspx.vb b/Bancos/PopIEVentas.aspx.vb
index 07c87b1ed..f9d599287 100644
--- a/Bancos/PopIEVentas.aspx.vb
+++ b/Bancos/PopIEVentas.aspx.vb
@@ -1390,12 +1390,25 @@ Partial Class Bancos_PopIEVentas
- If FechaVenta.ToString("dd/MM/yyyy").ToDate > TxtFechaDocumento.Text.ToDate Then
- Alert($"La fecha de venta no puede ser mayor que la fecha de pago
Fecha de venta: { FechaVenta.ToString("dd/MM/yyyy") }", TipoMensaje.MsgAdvertencia)
+ Dim FechaFactura As Date = FechaVenta
+ Dim FechaDocumentoPago As Date = TxtFechaDocumento.Text.ToDate
+
+ Dim AnioFactura As Integer = FechaFactura.Year
+ Dim MesFactura As Integer = FechaFactura.Month
+
+ Dim AnioDocumento As Integer = FechaDocumentoPago.Year
+ Dim MesDocumento As Integer = FechaDocumentoPago.Month
+
+ If AnioFactura > AnioDocumento Then
+ Alert($"El mes de la fecha de venta no puede ser mayor al mes de la la fecha de pago
Fecha de venta: { FechaVenta.ToString("dd/MM/yyyy") }", TipoMensaje.MsgAdvertencia)
+ Exit Sub
+ ElseIf AnioFactura = AnioDocumento And MesFactura > MesDocumento Then
+ Alert($"El mes de la fecha de venta no puede ser mayor al mes de la la fecha de pago
Fecha de venta: { FechaVenta.ToString("dd/MM/yyyy") }", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
+
'VALIDACION PARA LOS IMPORTES CUANDO SE QUIERE PAGAR EN DIFERENTE MONEDA
If Not Page.IsValid Then
Exit Sub
diff --git a/Bancos/ProveedoresAbonar.aspx.vb b/Bancos/ProveedoresAbonar.aspx.vb
index 269273ba0..3195700e1 100644
--- a/Bancos/ProveedoresAbonar.aspx.vb
+++ b/Bancos/ProveedoresAbonar.aspx.vb
@@ -716,13 +716,27 @@ Partial Class Bancos_ProveedoresAbonar
Dim ValFechaDocumento As Boolean = False
Dim FoliosFechasValFechaDocumento As New StringBuilder
- FoliosFechasValFechaDocumento.AppendLine("Se seleccionaron facturas con fecha superior a la fecha de pago:
")
+ FoliosFechasValFechaDocumento.AppendLine("Se seleccionaron facturas con fecha de mes superior al mes del pago:
")
For Each gvRowVal As GridViewRow In GvCxP.Rows
If gvRowVal.FCCheckBox("Chk").Checked Then
- If gvRowVal.DataKey("Fecha").ToDate > TxtFechaDocumento.Text.ToDate Then
- FoliosFechasValFechaDocumento.AppendLine($"Folio: { gvRowVal.DataKey("SerieFolio") } fecha: {gvRowVal.DataKey("Fecha").ToDate.ToString("dd/MM/yyyy") }
")
+
+
+ Dim FechaFactura As Date = gvRowVal.DataKey("Fecha").ToDate
+ Dim FechaDocumento As Date = TxtFechaDocumento.Text.ToDate
+
+ 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("Fecha").ToDate.ToString("dd/MM/yyyy") }
")
+ ValFechaDocumento = True
+ ElseIf AnioFactura = AnioDocumento And MesFactura > MesDocumento Then
+ FoliosFechasValFechaDocumento.AppendLine($"Folio: { gvRowVal.DataKey("SerieFolio") } fecha: {gvRowVal.DataKey("Fecha").ToDate.ToString("dd/MM/yyyy") }
")
ValFechaDocumento = True
End If
@@ -735,6 +749,7 @@ Partial Class Bancos_ProveedoresAbonar
End If
+
If DdlTipoTransaccion.SelectedValue.ToEntero < 0 Then
Alert("Seleccione un tipo de transacción", TipoMensaje.MsgAdvertencia)
Exit Sub
diff --git a/PortalCliente/PortalCliente.aspx.vb b/PortalCliente/PortalCliente.aspx.vb
index c45f2926f..3f6f4a084 100644
--- a/PortalCliente/PortalCliente.aspx.vb
+++ b/PortalCliente/PortalCliente.aspx.vb
@@ -3189,9 +3189,9 @@ Partial Class Ventas_PortalCliente
ObjFactura.UsoCFDI = GlobalDTSATUsosCFDI.FiltroPrimeroValor("Descripcion", $"CveUsoCFDI = {ObjCliente.CveUsoCFDI}")
ObjFactura.ClaveUsoCFDI = GlobalDTSATUsosCFDI.FiltroPrimeroValor("UsoCFDI", $"CveUsoCFDI = {ObjCliente.CveUsoCFDI}")
- ObjFactura.CveMetodoPago = ObjCliente.CveMetodoPago
- If GlobalDTMetodosPago.FiltraParametros($"CveMetodoPago = {ObjCliente.CveMetodoPago}").Rows.Count > 0 Then
- ObjFactura.MetodoPago = GlobalDTMetodosPago.FiltraParametros($"CveMetodoPago = {ObjCliente.CveMetodoPago}").Rows(0)("MetodoPago").ToString
+ ObjFactura.CveMetodoPago33 = ObjCliente.CveMetodoPago33
+ If GlobalDTMetodosPago.FiltraParametros($"CveMetodoPago33 = {ObjCliente.CveMetodoPago33}").Rows.Count > 0 Then
+ ObjFactura.MetodoPago = GlobalDTMetodosPago.FiltraParametros($"CveMetodoPago33 = {ObjCliente.CveMetodoPago33}").Rows(0)("MetodoPago").ToString
Else
ObjFactura.CveMetodoPago = 1
ObjFactura.MetodoPago = "Efectivo"
diff --git a/Ventas/ClientesAbonar.aspx.vb b/Ventas/ClientesAbonar.aspx.vb
index 826785f1e..e6df12068 100644
--- a/Ventas/ClientesAbonar.aspx.vb
+++ b/Ventas/ClientesAbonar.aspx.vb
@@ -657,18 +657,32 @@ Partial Class Ventas_ClientesAbonar
Dim ValFechaDocumento As Boolean = False
Dim FoliosFechasValFechaDocumento As New StringBuilder
- FoliosFechasValFechaDocumento.AppendLine("Se seleccionaron facturas con fecha superior a la fecha de pago:
")
+ FoliosFechasValFechaDocumento.AppendLine("Se seleccionaron facturas con fecha de mes superior al mes del pago:
")
For Each gvRowVal As GridViewRow In GvCxC.Rows
If gvRowVal.FCCheckBox("Chk").Checked Then
- If gvRowVal.DataKey("Fecha").ToDate.ToString("dd/MM/yyyy").ToDate > TxtFechaDocumento.Text.ToDate Then
+
+ Dim FechaFactura As Date = gvRowVal.DataKey("Fecha").ToDate
+ Dim FechaDocumento As Date = TxtFechaDocumento.Text.ToDate
+
+ 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("Fecha").ToDate.ToString("dd/MM/yyyy") }
")
+ ValFechaDocumento = True
+ ElseIf AnioFactura = AnioDocumento And MesFactura > MesDocumento Then
FoliosFechasValFechaDocumento.AppendLine($"Folio: { gvRowVal.DataKey("SerieFolio") } fecha: {gvRowVal.DataKey("Fecha").ToDate.ToString("dd/MM/yyyy") }
")
ValFechaDocumento = True
End If
- End If
- Next
+ End If
+
+ Next
If ValFechaDocumento Then