Eliminar registro de detalle al cancelar NC con RNC relacionada
This commit is contained in:
@@ -5038,6 +5038,24 @@ Public Class ClsVentas
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function RemoveRNCFacturada(CveVentaNC As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_RNCRelacionadasRemove")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveVentaNC", SqlDbType.Int).Value = CveVentaNC
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al eliminar las RNC Relacionadas.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "P O R C E N T A J E - C O M I S I O N E S"
|
||||
|
||||
@@ -2963,7 +2963,7 @@ Namespace Modelos
|
||||
Next
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(344) = "1" Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(344) = "1" AndAlso ObjFactura.TipoDocto = "Egs" Then
|
||||
Dim ListaNC As List(Of Modelos.Factura) = New List(Of Factura)
|
||||
Dim DtRNCRelacionas As DataTable = Nothing
|
||||
|
||||
@@ -3034,6 +3034,11 @@ Namespace Modelos
|
||||
importeMovimiento = 0
|
||||
End If
|
||||
Next
|
||||
|
||||
If Not ObjVentas.RemoveRNCFacturada(CveVenta) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
|
||||
Reference in New Issue
Block a user