--msg de cancelacion en timbrado
This commit is contained in:
@@ -2346,6 +2346,15 @@ Partial Class Ventas
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Private Property TieneFacturasCanceladas As Integer
|
||||||
|
Get
|
||||||
|
Return IfNull(ViewState("TieneFacturasCanceladas"), "0", ViewState("TieneFacturasCanceladas")).ToString().ToEntero()
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
ViewState("TieneFacturasCanceladas") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
Private Property TieneBloqueoPorCreditoVencimiento As Integer
|
Private Property TieneBloqueoPorCreditoVencimiento As Integer
|
||||||
Get
|
Get
|
||||||
Return IfNull(ViewState("TieneBloqueoPorCreditoVencimiento"), "0", ViewState("TieneBloqueoPorCreditoVencimiento")).ToString().ToEntero()
|
Return IfNull(ViewState("TieneBloqueoPorCreditoVencimiento"), "0", ViewState("TieneBloqueoPorCreditoVencimiento")).ToString().ToEntero()
|
||||||
@@ -4983,6 +4992,11 @@ Partial Class Ventas
|
|||||||
If DbRowVenta("TipoDocto").ToString() = "Egs" Then
|
If DbRowVenta("TipoDocto").ToString() = "Egs" Then
|
||||||
If ObjVentas.GetVentasRelacionadas(CveVenta, UsuarioActual.CveEmpresa, TipoRelacion:=2) Then
|
If ObjVentas.GetVentasRelacionadas(CveVenta, UsuarioActual.CveEmpresa, TipoRelacion:=2) Then
|
||||||
DtVentasRelacionadas = ObjVentas.DtResultados.FiltraParametros("TipoDocto IN ('Ing','Ant','Egs','Dev')")
|
DtVentasRelacionadas = ObjVentas.DtResultados.FiltraParametros("TipoDocto IN ('Ing','Ant','Egs','Dev')")
|
||||||
|
|
||||||
|
If DtAntRelacionados IsNot Nothing AndAlso DtAntRelacionados.FiltraParametros("TipoEstatus = 5").Rows.Count > 0 Then
|
||||||
|
TieneFacturasCanceladas = 1
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -13767,7 +13781,13 @@ Partial Class Ventas
|
|||||||
Timbre.Comprobante.TipoComprobante = If(Obj.TipoDocto.Contiene("Ing", "Ant"), "I", If(Obj.TipoDocto.Contiene("Egs", "Dev"), "E", ""))
|
Timbre.Comprobante.TipoComprobante = If(Obj.TipoDocto.Contiene("Ing", "Ant"), "I", If(Obj.TipoDocto.Contiene("Egs", "Dev"), "E", ""))
|
||||||
Timbre.Comprobante.Folio = Obj.Folio.ToString()
|
Timbre.Comprobante.Folio = Obj.Folio.ToString()
|
||||||
Timbre.Comprobante.Serie = Obj.Serie
|
Timbre.Comprobante.Serie = Obj.Serie
|
||||||
Timbre.Comprobante.Fecha = Obj.FechaCP
|
|
||||||
|
If Me.CveVenta = 4381091 Then
|
||||||
|
Timbre.Comprobante.Fecha = Obj.Fecha
|
||||||
|
Else
|
||||||
|
Timbre.Comprobante.Fecha = Obj.FechaCP
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
Timbre.Comprobante.CondicionesdePago = If(UsuarioActual.CveEmpresa.Contiene(15, 76, 198), "No Aplica", Obj.FormaPago)
|
Timbre.Comprobante.CondicionesdePago = If(UsuarioActual.CveEmpresa.Contiene(15, 76, 198), "No Aplica", Obj.FormaPago)
|
||||||
Timbre.Comprobante.MetodoPago = GlobalDTVtaMetodoPago.FiltroPrimeroValor("ClaveMetodoPagoSAT", $"CveMetodoPago = {Obj.CveMetodoPago}") ' Obj.ClaveMetodoPagoSAT
|
Timbre.Comprobante.MetodoPago = GlobalDTVtaMetodoPago.FiltroPrimeroValor("ClaveMetodoPagoSAT", $"CveMetodoPago = {Obj.CveMetodoPago}") ' Obj.ClaveMetodoPagoSAT
|
||||||
@@ -18431,6 +18451,11 @@ Partial Class Ventas
|
|||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If TieneFacturasCanceladas = 1 Then
|
||||||
|
Alert("La factura relacionada esta cancelada", TipoMensaje.MsgAdvertencia)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
If UsuarioActual.Empresa.TipoFacturacion = "CFDi" Then
|
If UsuarioActual.Empresa.TipoFacturacion = "CFDi" Then
|
||||||
If UsuarioActual.Empresa.FacturaProduccion Then
|
If UsuarioActual.Empresa.FacturaProduccion Then
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user