From 0ef907f6962e5e251621fcf4b9244354d6c94dc9 Mon Sep 17 00:00:00 2001 From: rrene Date: Mon, 25 Apr 2022 14:48:19 -0700 Subject: [PATCH] =?UTF-8?q?--=20generar=20p=C3=B3liza=20ac,=20de=20ingreso?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ventas/Ventas.aspx | 2 +- Ventas/Ventas.aspx.vb | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/Ventas/Ventas.aspx b/Ventas/Ventas.aspx index e17048cde..879b6f7fd 100644 --- a/Ventas/Ventas.aspx +++ b/Ventas/Ventas.aspx @@ -3853,7 +3853,7 @@ <%----%> - + diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index e97a4095f..eaea4a866 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -34374,5 +34374,38 @@ Partial Class Ventas UpEmitirTransitorio.Update() End Sub #End Region + + Protected Sub BtnGenerarPoliza_Click(sender As Object, e As EventArgs) + CreaObjetosVenta() + Dim ObjAC As New ClsContPAQi(UsuarioActual.Empresa) + Dim Msgok As New StringBuilder + If ObjFactura.TipoDocto.Contiene("Ing", "Egs", "OP", "Com") Then + + Dim IDPoliza As Modelos.RetornoPolizaConta = GenerarPolizaAC(ObjAC, ObjFactura) + + If IDPoliza.IdPoliza > 0 Then + + Dim ObjVentas As New ClsVentas + + If ObjVentas.UpdateVentaPrePoliza(IDPoliza.IdPoliza, IDPoliza.FolioPoliza, CvePrePoliza, CveVenta, UsuarioActual.CveEmpresa) Then + + 'Si se facturó la cotización hay que vincular la venta + Msgok.AppendFormat("Abono Registrado Correctamente.

Ver Poliza", IDPoliza) + End If + + ObjVentas.Dispose() + + 'Si se facturó la cotización hay que vincular la venta + Msgok.AppendFormat("Abono Registrado Correctamente.

Ver Poliza", IDPoliza) + + Else + ErrorList.Add("Ocurrió un error al generar A.C. en la Factura.
Revise su factura y cualquier detalle comuníquese a Soporte Técnico") + End If + + Else + Msgok.Append("Movimiento Registrado Correctamente.

") + End If + ObjAC.dispose + End Sub End Class