Cancelar ingresos amortizados
This commit is contained in:
@@ -449,7 +449,6 @@ Namespace Modelos
|
|||||||
Private Sub IniciaValoresVentas(Optional EsCancelacion As Boolean = False)
|
Private Sub IniciaValoresVentas(Optional EsCancelacion As Boolean = False)
|
||||||
If CveVenta > 0 AndAlso CveEmpresa > 0 Then
|
If CveVenta > 0 AndAlso CveEmpresa > 0 Then
|
||||||
Me.DtAnticipos = New DataTable()
|
Me.DtAnticipos = New DataTable()
|
||||||
Me.DtAntNCVinculadas = New DataTable()
|
|
||||||
Me.DtPagos = New DataTable()
|
Me.DtPagos = New DataTable()
|
||||||
Me.DtRemisiones = New DataTable()
|
Me.DtRemisiones = New DataTable()
|
||||||
Me.DtInventario = New DataTable()
|
Me.DtInventario = New DataTable()
|
||||||
@@ -483,7 +482,7 @@ Namespace Modelos
|
|||||||
If TipoDocto.Contiene("Ing", "Ant", "Rem") Then
|
If TipoDocto.Contiene("Ing", "Ant", "Rem") Then
|
||||||
'carga as notas de credito vinculadas
|
'carga as notas de credito vinculadas
|
||||||
If ObjVentas.GetVentasAntNC(CveVenta, -1) Then
|
If ObjVentas.GetVentasAntNC(CveVenta, -1) Then
|
||||||
Me.DtAntNCVinculadas = ObjVentas.DtResultados.Copy()
|
Me.DtAnticipos = ObjVentas.DtResultados.Copy()
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -493,7 +492,7 @@ Namespace Modelos
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
If TipoDocto.Contiene("Ant") AndAlso EsCancelacion Then
|
If TipoDocto.Contiene("Ant") AndAlso EsCancelacion Then
|
||||||
EsNCAmortizacion = True
|
Me.EsNCAmortizacion = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If ObjVentas.GetVentasAntNC(-1, CveVenta, AplicaAmortizacion:=EsNCAmortizacion) Then
|
If ObjVentas.GetVentasAntNC(-1, CveVenta, AplicaAmortizacion:=EsNCAmortizacion) Then
|
||||||
@@ -2418,9 +2417,18 @@ Namespace Modelos
|
|||||||
CveCuenta = ObjFactura.Cliente.CveCuentaAnticipos
|
CveCuenta = ObjFactura.Cliente.CveCuentaAnticipos
|
||||||
CveSubProyectoContabilizar = CveSubProyectoVenta
|
CveSubProyectoContabilizar = CveSubProyectoVenta
|
||||||
|
|
||||||
|
Dim CveVenta As Integer = ObjFactura.CveVenta
|
||||||
|
Dim CveVentaAmortizacion As Integer = row2("CveVenta").ToString().ToEntero
|
||||||
|
|
||||||
|
'SI ES FACTURA EN 0 Y TIENE ANTICIPOS
|
||||||
|
If (ObjFactura.Total = 0 AndAlso UsuarioActual.CveEmpresa.Contiene(72) AndAlso ObjFactura.TipoDocto.Contiene("Ing")) AndAlso row2("TipoDocto").ToString() = "Ant" Then
|
||||||
|
CveVenta = row2("CveVenta").ToString().ToEntero
|
||||||
|
CveVentaAmortizacion = ObjFactura.CveVenta
|
||||||
|
End If
|
||||||
|
|
||||||
If importeMovimiento <> 0 Then
|
If importeMovimiento <> 0 Then
|
||||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1,
|
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1,
|
||||||
CveVenta:=ObjFactura.CveVenta, CveVentaAmortizacion:=row2("CveVenta").ToString().ToEntero, CveCliente:=ObjFactura.CveCliente,
|
CveVenta:=CveVenta, CveVentaAmortizacion:=CveVentaAmortizacion, CveCliente:=ObjFactura.CveCliente,
|
||||||
CveIE:=CveIEAnticipo, ImporteMX:=importeMovimiento * tipoCambio, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuenta,
|
CveIE:=CveIEAnticipo, ImporteMX:=importeMovimiento * tipoCambio, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuenta,
|
||||||
CveSubProyecto:=CveSubProyectoContabilizar, Contabilizable:=SeContabiliza) Then
|
CveSubProyecto:=CveSubProyectoContabilizar, Contabilizable:=SeContabiliza) Then
|
||||||
ErrorPrepoliza = True
|
ErrorPrepoliza = True
|
||||||
@@ -5214,7 +5222,6 @@ Namespace Modelos
|
|||||||
Public Property DtFirmas As Data.DataTable
|
Public Property DtFirmas As Data.DataTable
|
||||||
Public Property DtDesgloseImpuestos As Data.DataTable
|
Public Property DtDesgloseImpuestos As Data.DataTable
|
||||||
Public Property DtDocumentosRelacionados As Data.DataTable
|
Public Property DtDocumentosRelacionados As Data.DataTable
|
||||||
Public Property DtAntNCVinculadas As Data.DataTable
|
|
||||||
Public Property DtNCVinculadas As Data.DataTable
|
Public Property DtNCVinculadas As Data.DataTable
|
||||||
|
|
||||||
Public Property DtAnticipos As Data.DataTable
|
Public Property DtAnticipos As Data.DataTable
|
||||||
|
|||||||
Reference in New Issue
Block a user