-- opción para verificar uuid relacionados del SAT
This commit is contained in:
@@ -4973,6 +4973,9 @@ Partial Class Ventas
|
||||
If (UsuarioActual.TienePermisoProceso(166) Or UsuarioActual.CveRol = 1) AndAlso (LblFolioFiscal.Text = "" Or LblFolioFiscal.Text = "test") Then
|
||||
LkEliminarFactura.Visible = True
|
||||
End If
|
||||
If (UsuarioActual.CveRol = 1) AndAlso (LblFolioFiscal.Text <> "") Then
|
||||
LnkUUIDRelacionados.Visible = True
|
||||
End If
|
||||
|
||||
'Envio Direccion
|
||||
If DbRowVenta("CveDireccionEnvio").ToString().ToEntero() > 0 AndAlso DbRowVenta("CveDireccionEnvio").ToString() IsNot Nothing Then
|
||||
@@ -34741,5 +34744,58 @@ Partial Class Ventas
|
||||
UpAgregarMercancia.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkUUIDRelacionados_Click(sender As Object, e As EventArgs)
|
||||
|
||||
Dim Vigencia = Timbrado.VerificarVigenciaSAT(FolioFiscal, UsuarioActual.Empresa.RFC, LblRFC.Text, TxtTotal.Text, True)
|
||||
Dim sb As New StringBuilder
|
||||
|
||||
sb.AppendFormat("<b>{0}</b> <br/>", Vigencia.EsCancelable)
|
||||
|
||||
Dim Relacionados = Timbrado.ConsultarUUIDRelacionados(UsuarioActual.Empresa, FolioFiscal, UsuarioActual.Empresa.FacturaProduccion)
|
||||
If Relacionados IsNot Nothing Then
|
||||
Dim sbExtra As New StringBuilder()
|
||||
If Relacionados.Codigo = 500 Then
|
||||
sbExtra.Append("El servicio de verificación de documentos relacionados no esta disponible.")
|
||||
Else
|
||||
sbExtra.Append(Relacionados.Mensaje)
|
||||
|
||||
Dim SbHijos = New StringBuilder()
|
||||
Dim SbPadres = New StringBuilder()
|
||||
|
||||
If Relacionados.RelacionadosPadre IsNot Nothing Then
|
||||
For Each padre In Relacionados.RelacionadosPadre
|
||||
SbPadres.AppendFormat("{0};", padre.Uuid)
|
||||
Next
|
||||
If SbPadres.Length > 0 Then
|
||||
SbPadres.Remove(SbPadres.Length - 1, 1)
|
||||
End If
|
||||
End If
|
||||
|
||||
Using ObjVentas As New ClsVentas
|
||||
|
||||
If SbPadres.Length > 0 Then
|
||||
If ObjVentas.GetFacturasRelacionadasPorFolioFiscal(SbPadres.ToString(), UsuarioActual.CveEmpresa) Then
|
||||
Dim dtt As DataTable = ObjVentas.DtResultados.FiltraParametros($"CveVenta <> {CveVenta}")
|
||||
|
||||
For Each dr As DataRow In dtt.Rows
|
||||
sb.AppendFormat("{0}-{1}-{2}<br/>", dr("TipoDocto"), dr("SerieFolio"), dr("FolioFiscal"))
|
||||
Next
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
End Using
|
||||
|
||||
End If
|
||||
|
||||
If sbExtra.Length > 0 Then
|
||||
LbExtraRefacturacion.Text = $"<br><b>*{sbExtra.ToString()}</b>"
|
||||
End If
|
||||
|
||||
End If
|
||||
Alert(sb.ToString(), TipoMensaje.MsgInformacion)
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
|
||||
Reference in New Issue
Block a user