--Cancelacion de solo CFDI. unicamente para usuario 'Sistema'
This commit is contained in:
@@ -391,9 +391,9 @@
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkSolicitarCredito" Visible="false" runat="server"><i class="fa fa-plus"></i>Solicitar autorización de crédito</asp:LinkButton>
|
||||
</li>
|
||||
<%-- <li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkCancelarSoloCFDI" Visible="false" runat="server" data-toggle="confirmation" data-popout="true" data-original-title="¿Seguro que desea cancelar el CFDI?" data-btn-ok-label="si" OnClick="LnkCancelarSoloCFDI_Click"><i class="fa fa-plus"></i>Cancelar solo CFDI</asp:LinkButton>
|
||||
</li>--%>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<asp:HyperLink ID="HLFAgregarOS" Target="_blank" runat="server" Visible="false"> <i class="fa fa-plus"></i> Agregar Orden de Servicio</asp:HyperLink>
|
||||
|
||||
@@ -2386,11 +2386,6 @@ Partial Class Ventas
|
||||
|
||||
If Not IsPostBack Then
|
||||
|
||||
''SOLO SISTEMA DEBE VER ESTA OPCION
|
||||
'If UsuarioActual.CveUsuario = 100 Then
|
||||
' LnkCancelarSoloCFDI.Visible = True
|
||||
'End If
|
||||
|
||||
If IfNull(Request("Opcionx"), "").ToString = "Saldar" And UsuarioActual.CveUsuario = 100 Then
|
||||
TxtFechaSaldarVenta.Text = "2021/12/31"
|
||||
SaldarVenta()
|
||||
@@ -2897,6 +2892,11 @@ Partial Class Ventas
|
||||
HlEvento.Visible = True
|
||||
HlEvento.NavigateUrl = "/OI/PopUpAgenda.aspx?CveTipoEvento=2&CveVenta=" & CveVenta & "&TB_iframe=true&height=370&width=600;"
|
||||
|
||||
''SOLO SISTEMA DEBE VER ESTA OPCION
|
||||
If UsuarioActual.CveUsuario = 100 Then
|
||||
LnkCancelarSoloCFDI.Visible = True
|
||||
End If
|
||||
|
||||
End If
|
||||
Else
|
||||
TxtFechaOS.Text = NowADS().ToDateTime.ToString("yyyy-MM-dd HH:mm").Replace(" ", "T")
|
||||
@@ -37750,29 +37750,29 @@ Partial Class Ventas
|
||||
|
||||
#End Region
|
||||
|
||||
'Protected Sub LnkCancelarSoloCFDI_Click(sender As Object, e As EventArgs)
|
||||
' If CveVenta > 0 Then
|
||||
' Dim RowVenta As DataRow = Nothing
|
||||
Protected Sub LnkCancelarSoloCFDI_Click(sender As Object, e As EventArgs)
|
||||
If CveVenta > 0 Then
|
||||
Dim RowVenta As DataRow = Nothing
|
||||
|
||||
' Using ObjVentas As New ClsVentas
|
||||
' If (ObjVentas.GetVenta(CveVenta, UsuarioActual.CveEmpresa)) Then
|
||||
' RowVenta = ObjVentas.DtResultados.Copy().Rows(0)
|
||||
' End If
|
||||
' End Using
|
||||
Using ObjVentas As New ClsVentas
|
||||
If (ObjVentas.GetVenta(CveVenta, UsuarioActual.CveEmpresa)) Then
|
||||
RowVenta = ObjVentas.DtResultados.Copy().Rows(0)
|
||||
End If
|
||||
End Using
|
||||
|
||||
' If RowVenta IsNot Nothing Then
|
||||
' Dim FolioFiscal As String = RowVenta("FolioFiscal").ToString().Trim()
|
||||
' Dim Total As Decimal = RowVenta("Total").ToString().ToDecimal()
|
||||
' Dim RFCReceptor As String = RowVenta("RFCReceptor").ToString()
|
||||
' Dim ObjTimbrado As New Timbrado
|
||||
' Dim resp = ObjTimbrado.CFDICancelar(UsuarioActual.Empresa, FolioFiscal, Total, RFCReceptor, UsuarioActual.Empresa.RFC, CvePACCancelacion:=4, ValidaFactura:=False, CveSATMotivoCancelacion:=2)
|
||||
' If resp IsNot Nothing Then
|
||||
' Alert(resp.Estado)
|
||||
' End If
|
||||
If RowVenta IsNot Nothing Then
|
||||
Dim FolioFiscal As String = RowVenta("FolioFiscal").ToString().Trim()
|
||||
Dim Total As Decimal = RowVenta("Total").ToString().ToDecimal()
|
||||
Dim RFCReceptor As String = RowVenta("RFCReceptor").ToString()
|
||||
Dim ObjTimbrado As New Timbrado
|
||||
Dim resp = ObjTimbrado.CFDICancelar(UsuarioActual.Empresa, FolioFiscal, Total, RFCReceptor, UsuarioActual.Empresa.RFC, CvePACCancelacion:=4, ValidaFactura:=False, CveSATMotivoCancelacion:=2)
|
||||
If resp IsNot Nothing Then
|
||||
Alert(resp.Estado)
|
||||
End If
|
||||
|
||||
' End If
|
||||
' End If
|
||||
'End Sub
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub LBNotaCredito_Click(sender As Object, e As EventArgs)
|
||||
CargaDdlNCPS()
|
||||
|
||||
Reference in New Issue
Block a user