SIG, Cambios en Proceso de cancelacion, consulta de rep remisiones con inventario
This commit is contained in:
@@ -20310,7 +20310,6 @@ Partial Class Ventas
|
||||
SWatch.Start()
|
||||
|
||||
Dim Vigencia = Timbrado.VerificarVigenciaSAT(FolioFiscal, UsuarioActual.Empresa.RFC, RFCReceptor, TotalT.ToString(), True)
|
||||
|
||||
SWatch.Stop()
|
||||
|
||||
Dim SegundosRespuesta As Double = SWatch.ElapsedMilliseconds / 1000
|
||||
@@ -22804,7 +22803,7 @@ Partial Class Ventas
|
||||
ObjVentas.Dispose()
|
||||
End Sub
|
||||
|
||||
Private Sub MostrarCondicionesCancelacion()
|
||||
Private Sub MostrarCondicionesCancelacion(Optional Extra As String = "")
|
||||
Dim SbCondiciones As New StringBuilder()
|
||||
|
||||
If VentaSaldoAlmacen < 0 AndAlso ChkDevAlm.Checked Then
|
||||
@@ -22817,6 +22816,10 @@ Partial Class Ventas
|
||||
SbCondiciones.Append("<br><b> -La remisión está relacionada con otra factura.</b>")
|
||||
End If
|
||||
|
||||
If Extra.Length > 0 Then
|
||||
SbCondiciones.AppendFormat("<br><b>*{0}</b>", Extra)
|
||||
End If
|
||||
|
||||
LbCancelarDescripcion.Text = SbCondiciones.ToString()
|
||||
SbCondiciones.Clear()
|
||||
UpCancelarDocumento.Update()
|
||||
@@ -22832,8 +22835,10 @@ Partial Class Ventas
|
||||
If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Dev", "Egs", "RNC") Then
|
||||
|
||||
Dim sb As New StringBuilder()
|
||||
Dim sbExtra As New StringBuilder()
|
||||
sb.Append("La factura se encuentra en el siguiente estatus del SAT:<br/>")
|
||||
|
||||
|
||||
Dim TotalT As Decimal = TxtTotal.Text.ToDecimal
|
||||
|
||||
Dim RFCReceptor As String = ""
|
||||
@@ -22865,8 +22870,59 @@ Partial Class Ventas
|
||||
|
||||
If Vigencia IsNot Nothing Then
|
||||
If Vigencia.EsCancelable.ToUpper() = "NO CANCELABLE" Then
|
||||
Alert("Esta factura no es cancelable.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
|
||||
DivRelacionadasCancelacion.Visible = True
|
||||
BtnCancelarDocumento.Visible = False
|
||||
DivMotivoCancelacion.Visible = False
|
||||
DivMotivoCancelacionTxt.Visible = False
|
||||
DivCanRem.Visible = False
|
||||
DivDevAlm.Visible = False
|
||||
|
||||
Dim Relacionados = Timbrado.ConsultarUUIDRelacionados(UsuarioActual.Empresa, FolioFiscal, UsuarioActual.Empresa.FacturaProduccion)
|
||||
If Relacionados IsNot Nothing Then
|
||||
sbExtra.Append(Relacionados.Mensaje)
|
||||
|
||||
Dim SbHijos = New StringBuilder()
|
||||
Dim SbPadres = New StringBuilder()
|
||||
|
||||
If Relacionados.RelacionadosHijo IsNot Nothing Then
|
||||
For Each hijo In Relacionados.RelacionadosHijo
|
||||
SbHijos.AppendFormat("{0};", hijo.Uuid)
|
||||
Next
|
||||
If SbHijos.Length > 0 Then
|
||||
SbHijos.Remove(SbHijos.Length - 1, 1)
|
||||
End If
|
||||
End If
|
||||
|
||||
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 SbHijos.Length > 0 Then
|
||||
If ObjVentas.GetFacturasRelacionadasPorFolioFiscal(SbHijos.ToString(), UsuarioActual.CveEmpresa) Then
|
||||
GvFacturasHijosCancelar.DataSource = ObjVentas.DtResultados.Copy()
|
||||
End If
|
||||
End If
|
||||
|
||||
If SbPadres.Length > 0 Then
|
||||
If ObjVentas.GetFacturasRelacionadasPorFolioFiscal(SbPadres.ToString(), UsuarioActual.CveEmpresa) Then
|
||||
GvFacturasPadreCancelar.DataSource = ObjVentas.DtResultados.Copy()
|
||||
End If
|
||||
End If
|
||||
|
||||
End Using
|
||||
|
||||
GvFacturasHijosCancelar.DataBind()
|
||||
GvFacturasPadreCancelar.DataBind()
|
||||
End If
|
||||
|
||||
End If
|
||||
If String.IsNullOrEmpty(Vigencia.EsCancelable) Then
|
||||
If UsuarioActual.Empresa.FacturaProduccion AndAlso Not String.IsNullOrEmpty(FolioFiscal) Then
|
||||
@@ -22875,17 +22931,20 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
sb.Append("<b>No encontrado</b> <br/>")
|
||||
sb.Append("Está seguro de cancelar el documento?.")
|
||||
Else
|
||||
sb.AppendFormat("<b>{0}</b> <br/>", Vigencia.EsCancelable)
|
||||
If Vigencia.EsCancelable.ToUpper() <> "NO CANCELABLE" Then
|
||||
sb.Append("Está seguro de cancelar el documento?.")
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
sb.Append("<b>No encontrado</b> <br/>")
|
||||
sb.Append("Está seguro de cancelar el documento?.")
|
||||
End If
|
||||
|
||||
sb.Append("Está seguro de cancelar el documento?.")
|
||||
|
||||
LblCancelarDocumento.Text = sb.ToString()
|
||||
MostrarCondicionesCancelacion()
|
||||
MostrarCondicionesCancelacion(sbExtra.ToString())
|
||||
|
||||
RegistraScript("$('#ModalCancelarDocumento').modal();")
|
||||
UpCancelarDocumento.Update()
|
||||
|
||||
Reference in New Issue
Block a user