From e061c5ae957ddb2afe87bf00d2656bfedc7640de Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Wed, 27 Nov 2024 22:25:57 -0700 Subject: [PATCH] refacturacion con linea adicional --- App_Code/Modelos.vb | 2 ++ Ventas/Ventas.aspx.vb | 13 ++++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/App_Code/Modelos.vb b/App_Code/Modelos.vb index 8ab5a4c43..d35d6198d 100644 --- a/App_Code/Modelos.vb +++ b/App_Code/Modelos.vb @@ -8052,6 +8052,8 @@ Namespace Modelos Public Property CveSATPeriodicidad As Integer = -1 Public Property CveSATMes As Integer = -1 Public Property SATAnio As Integer = -1 + Public Property CveLineaAdicional As Integer = -1 + Public Sub SetSubProyecto() If CveSubProyecto > 0 AndAlso UsuarioActual IsNot Nothing Then diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index ff89e081b..424f451d5 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -8591,6 +8591,10 @@ Partial Class Ventas DdlNCFactura.SelectedValueExist(pCveVenta) DdlNCFactura.Enabled = False + If ObjFacturaNC IsNot Nothing AndAlso ObjFacturaNC.CveLineaAdicional > 0 Then + DdlLineaAdicional.SelectedValueExist(ObjFacturaNC.CveLineaAdicional) + End If + End If Else @@ -14442,6 +14446,13 @@ Partial Class Ventas CveAlmacenTraspasoDestino = -1 End If + Dim CveLAdicional = DdlLineaAdicional.SelectedValue.ToEntero() + + If ObjFacturaNC IsNot Nothing Then + If NuevaFactura = 1 AndAlso ObjFacturaNC.CveLineaAdicional > 0 Then + CveLAdicional = ObjFacturaNC.CveLineaAdicional + 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, @@ -14459,7 +14470,7 @@ Partial Class Ventas DiasCredito:=factura.DiasCredito, EsDiasCreditoFijo:=factura.EsDiasCreditoFijo, AnticipoEspecial:=If(TrAntEspecial.Visible, ChkAntEspecial.Checked, False), Kilometraje:=TxtKilometraje.Text.ToDouble, EsAmortizacion:=EsNCAmortizacion, CveTipoRetencion:=factura.CveTipoRetencion, CorreoNotificacion:=TxtCorreoNotificaciones.Text, FormaPaqueteria:=RblPaqueteria.SelectedValue.ToEntero, FacturarSucursal:=factura.FacturarSucursal, VentaDesglosaIEPS:=factura.VentaDesglosaIEPS, RFCReceptor:=RFCReceptor, Adjunto:=Adjunto, DevolucionImportePagado:=factura.DevolucionImportePagado, EsGarantia:=factura.EsGarantia, ServicioDomicilio:=TrServicioDomicilio.Visible, - CveLineaAdicional:=DdlLineaAdicional.SelectedValue.ToEntero(), DescripcionVenta:=DescripcionVenta, + CveLineaAdicional:=CveLAdicional, DescripcionVenta:=DescripcionVenta, CveMedico:=CveMedico, CveProcedimiento:=CveProcedimiento, CveTipoVenta:=CveTipoVentaGuardar, RequiereOS:=ChkRequiereTecnico.Checked, FechaParaSurtir:=factura.FechaParaSurtir, Paciente:=TxtPaciente.Text, Episodio:=TxtEpisodio.Text, CveMotivoDevolucion:=CveMotivoDevolucion, CveCobranzaEstatusTurno:=DdlGestionCobranza.SelectedValue.ToEntero, Addenda:=factura.Addenda) Then ErrorList.Add("Ocurrió un error al Generar la Venta.
Revise su factura y cualquier detalle comuníquese a Soporte Técnico")