--FIX cobranza
This commit is contained in:
@@ -716,7 +716,7 @@ Partial Class Ventas_PVCobranza
|
||||
End If
|
||||
|
||||
'GENERAR NC PARA AMORTIZACION
|
||||
If ListaAnticiposAplicados.Where(Function(x) x.Tipo = "Ant").Any() Then
|
||||
If ListaAnticiposAplicados IsNot Nothing AndAlso ListaAnticiposAplicados.Where(Function(x) x.Tipo = "Ant").Any() Then
|
||||
|
||||
For Each gvr As GridViewRow In GVAnticipos.Rows
|
||||
If gvr.DataKey("Tipo") = "Ant" AndAlso gvr.FCCheckBox("Chk" & gvr.RowIndex) IsNot Nothing AndAlso gvr.FCCheckBox("Chk" & gvr.RowIndex).Checked Then
|
||||
@@ -1091,6 +1091,7 @@ Partial Class Ventas_PVCobranza
|
||||
Private Sub AjustarTimbreFactura(ByRef ObjFactura As Modelos.Factura)
|
||||
ObjFactura.Timbre.CFDIRelacionados.UUID.Clear()
|
||||
|
||||
If ListaAnticiposAplicados IsNot Nothing Then
|
||||
'SI TIENE RELACIONADOS ANTICIPOS PONER TIPO RELACION 7
|
||||
If ListaAnticiposAplicados.Where(Function(x) x.Tipo = "Ant").Any() Then
|
||||
Dim Anticipos = ListaAnticiposAplicados.Where(Function(Obj) Obj.Tipo = "Ant")
|
||||
@@ -1119,6 +1120,8 @@ Partial Class Ventas_PVCobranza
|
||||
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
@@ -1347,6 +1350,7 @@ Partial Class Ventas_PVCobranza
|
||||
ObjFactura.PedidoContrato = PedidoContrato
|
||||
ObjFactura.OrdenCompra = OrdenCompra
|
||||
|
||||
If ListaAnticiposAplicados IsNot Nothing Then
|
||||
'SI TIENE RELACIONADOS ANTICIPOS PONER TIPO RELACION 7
|
||||
If ListaAnticiposAplicados.Where(Function(x) x.Tipo = "Ant").Any() Then
|
||||
ObjFactura.CveTipoRelacion = 7
|
||||
@@ -1356,6 +1360,7 @@ Partial Class Ventas_PVCobranza
|
||||
If Not ListaAnticiposAplicados.Where(Function(x) x.Tipo = "Ant").Any() AndAlso ListaAnticiposAplicados.Where(Function(x) x.Tipo = "NC").Any() Then
|
||||
ObjFactura.CveTipoRelacion = 1
|
||||
End If
|
||||
End If
|
||||
|
||||
Retorno = ObjFactura.EmitirFactura(False, Transac:=ObjVentas.IniciaTransacSQL(), Modulo:="Cobranza/GuardarVenta", MostrarURL:=True)
|
||||
Retorno.Factura = ObjFactura
|
||||
|
||||
Reference in New Issue
Block a user