--tipos de venta

This commit is contained in:
2025-03-19 21:34:24 -07:00
parent 16f6bef7c0
commit 356e97ad36
7 changed files with 85 additions and 23 deletions

View File

@@ -12424,6 +12424,9 @@ Partial Class Ventas
End If
End If
ObjFacturaBonificacion.CveTipoVenta = 7 'PRONTO PAGO
End Sub
@@ -14638,6 +14641,31 @@ Partial Class Ventas
End If
End If
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso factura.TipoDocto = "Egs" AndAlso Not factura.EsGarantia Then
CveTipoVentaGuardar = -1
If NCDescuento Then
If ListaNCDescuento IsNot Nothing AndAlso ListaNCDescuento.Count > 0 Then
'VERIFICA SI BONIFICACION
If ListaNCDescuento.Any(Function(RNC) (RNC.Num1 = 2)) Then
CveTipoVentaGuardar = 7 ' BONIFICACION
ElseIf ListaNCDescuento.Any(Function(RNC) (Not RNC.Num1 = 2)) Then
CveTipoVentaGuardar = 9 ' CANCELACION DE USADOS
End If
End If
Else
If ListaRemisionesNC IsNot Nothing AndAlso ListaRemisionesNC.Count > 0 Then
'VERIFICA SI BONIFICACION
If ListaRemisionesNC.Any(Function(RNC) (RNC.Num1 = 2)) Then
CveTipoVentaGuardar = 7 ' BONIFICACION
ElseIf ListaRemisionesNC.Any(Function(RNC) (Not RNC.Num1 = 2)) Then
CveTipoVentaGuardar = 9 ' CANCELACION DE USADOS
End If
End If
End If
End If
If Not ObjVentas.AddVenta(factura.TipoDocto, factura.Folio, factura.CveCliente, factura.CveClienteSucursal, factura.SubTotalTC, factura.DescuentoTC,
factura.AmortizacionTC, factura.IVATC, factura.RetIVATC, factura.RetISRTC,
factura.TotalTC, factura.CveMoneda, factura.TipoCambio, factura.CveMetodoPago, factura.CondicionesPago, 0, factura.FechaPago, factura.Fecha, factura.MotivoDescuento,