From 6e6bfc51d9fee661574d776d1831977ee4b4b272 Mon Sep 17 00:00:00 2001 From: Rakcsle Supertramp Date: Wed, 19 Feb 2020 18:26:04 -0700 Subject: [PATCH 1/6] Proveedores grid representates --- App_Code/ClsCompProveedores.vb | 3 ++- Compras/Proveedores.aspx | 45 ++++++++++++++++++++++++++++++++++ Compras/Proveedores.aspx.vb | 27 ++++++++++++++++++++ 3 files changed, 74 insertions(+), 1 deletion(-) diff --git a/App_Code/ClsCompProveedores.vb b/App_Code/ClsCompProveedores.vb index 2f2e2794e..bbbc1b8f1 100644 --- a/App_Code/ClsCompProveedores.vb +++ b/App_Code/ClsCompProveedores.vb @@ -1858,7 +1858,7 @@ Public Class ClsCompProveedores Return Retorno End Function - Public Function GetRePresentanteLegal(CveRepresentanteLegal As Integer, CveEmpresa As Integer) As Boolean + Public Function GetRePresentanteLegal(CveRepresentanteLegal As Integer, CveEmpresa As Integer, Optional CveProveedor As Integer = -1) As Boolean Dim Retorno As Boolean = False @@ -1868,6 +1868,7 @@ Public Class ClsCompProveedores .Add("@CveRepresentanteLegal", SqlDbType.Int).Value = CveRepresentanteLegal .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor End With diff --git a/Compras/Proveedores.aspx b/Compras/Proveedores.aspx index bcbcf062c..ae72b0047 100644 --- a/Compras/Proveedores.aspx +++ b/Compras/Proveedores.aspx @@ -603,6 +603,51 @@ --%> + +
+
+
+ + Representastes Legales + +
+
+
+
+
+ +
+ + + + +
+
+
+ + + + + + + + + + <%-- + + + + + --%> + + + + + +
+
+ diff --git a/Compras/Proveedores.aspx.vb b/Compras/Proveedores.aspx.vb index 3036fa58f..b32464910 100644 --- a/Compras/Proveedores.aspx.vb +++ b/Compras/Proveedores.aspx.vb @@ -380,6 +380,9 @@ Partial Class Compras_Proveedores End If HlEvento.Visible = True HlEvento.NavigateUrl = "/OI/PopUpAgenda.aspx?CveTipoEvento=2&CveProveedor=" & CveProveedor & "&TB_iframe=true&height=370&width=600;" + + CargaRepresentantes() + Else 'Configuración de Modalidad Insert @@ -500,6 +503,30 @@ Partial Class Compras_Proveedores 'ViewState("OUsuario") = "Usuario DESC" End Sub + + Private Sub CargaRepresentantes() + + If CveProveedor > 0 Then + + Dim ObjProveedores As New ClsCompProveedores + + If ObjProveedores.GetRePresentanteLegal(-1, UsuarioActual.CveEmpresa, CveProveedor) Then + + GvRepresentante.DataSource = ObjProveedores.DtResultados + Else + GvRepresentante.DataSource = Nothing + End If + + ObjProveedores.Dispose() + + GvRepresentante.DataBind() + End If + + + End Sub + + + Private Sub CargaCuentasContables(Optional IdCuentaPadre As Integer = -1) If UsuarioActual.Empresa.UsaContabilidad Then Dim ObjContabilidad As New ClsContPAQi(UsuarioActual.Empresa) From bdad939716a0e1593b33dc9307019d33a10f81da Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Wed, 19 Feb 2020 20:04:01 -0700 Subject: [PATCH 2/6] Edicion de remision en el punto de venta --- App_Code/Modelos.vb | 66 ++- Ventas/PV.aspx | 40 +- Ventas/PV.aspx.vb | 968 ++++++++++++++++++++++++++++++++++++++------ 3 files changed, 920 insertions(+), 154 deletions(-) diff --git a/App_Code/Modelos.vb b/App_Code/Modelos.vb index e0d5d3f62..08036f1b9 100644 --- a/App_Code/Modelos.vb +++ b/App_Code/Modelos.vb @@ -14,6 +14,7 @@ Imports System.Net Imports System.IO.Compression Imports System.Text Imports System.Net.Http +Imports System.Collections.Generic Namespace Modelos @@ -539,7 +540,64 @@ Namespace Modelos Public Property CveEstatus As Integer End Class - + Public Function RegenerarPrePolizas(Optional TransaccionCompartida As SqlClient.SqlTransaction = Nothing, Optional ObjACTransac As ClsContPAQi = Nothing) As Boolean + Dim ErrorPrePolizas As Boolean = False + + Dim ObjVentas As ClsVentas = Nothing + If TransaccionCompartida IsNot Nothing Then + ObjVentas = New ClsVentas(TransaccionCompartida) + Else + ObjVentas = New ClsVentas() + ObjVentas.IniciaTransacSQL() + End If + + Dim ObjConta As New ClsContabilidad(ObjVentas.IniciaTransacSQL()) + Dim ObjBancos As New ClsBancos(ObjVentas.IniciaTransacSQL()) + Dim ObjEventos As New ClsOIEventos(ObjVentas.IniciaTransacSQL()) + Dim ObjAC As ClsContPAQi = Nothing + + If ObjACTransac Is Nothing Then + If UsuarioActual.Empresa.UsaAC Then + ObjAC = New ClsContPAQi(UsuarioActual.Empresa) : ObjAC.IniciaTransacSQL() + End If + Else + ObjAC = ObjACTransac + End If + + ErrorPrePolizas = Not RegeneracionPolizas(Me, ObjVentas, ObjAC, ObjConta, ObjBancos, ObjEventos) + + If TransaccionCompartida Is Nothing Then + ObjVentas.Commit() + ObjVentas.Dispose() + ObjBancos.Dispose() + ObjEventos.Dispose() + End If + + If ObjACTransac Is Nothing Then + If ObjAC IsNot Nothing Then + ObjAC.Commit() + ObjAC.Dispose() + End If + End If + + Return Not ErrorPrePolizas + End Function + Private Function RegeneracionPolizas(ObjFactura As Modelos.Factura, ByRef ObjVentas As ClsVentas, ByRef ObjAC As ClsContPAQi, ByRef ObjConta As ClsContabilidad, ObjBancos As ClsBancos, ObjEventos As ClsOIEventos) As Boolean + Dim ErrorPrePolizas As Boolean = False + + 'REMOVEMOS LOS CONCEPTOS DE LA PREPOLIZA + ErrorPrePolizas = Not ObjConta.RemovePrePolizasDetalle(ObjFactura.CvePrePoliza, -1, ObjFactura.CveVenta, 2) + + 'VUELVE A GENERAR LAS PREPOLIZAS + If Not ErrorPrePolizas Then + ErrorPrePolizas = ProcesoPrepolizas(ObjFactura, ObjConta, -1, ObjFactura.DtDetalle, ObjAC, ValorMultiplicador:=1, ObjBancos:=ObjBancos, ObjVentas:=ObjVentas, ObjEventos:=ObjEventos, DtRemisionesRelacionadas:=New DataTable, SeCancelaRemisionProceso:=False, + CancelarRemisiones:=False, ListaRemisionesCancelar:=New List(Of Integer)) + End If + + If Not ErrorPrePolizas Then ErrorPrePolizas = GuardarVentaImpuestosLocales(ObjFactura, ObjVentas, ObjConta, 1) + + Return Not ErrorPrePolizas + End Function Public Function EmitirFactura(Optional Timbrar As Boolean = True, Optional Transac As SqlClient.SqlTransaction = Nothing, Optional ObjContPaqTransac As ClsContPAQi = Nothing) As MMensajeFactura Dim Retorno As New MMensajeFactura() @@ -1059,7 +1117,7 @@ Namespace Modelos Return Retorno End Function - Private Function DescargarFactura(CveVenta As Integer, CveEmpresa As Integer, Optional GetBytes As Boolean = true) As Byte() + Private Function DescargarFactura(CveVenta As Integer, CveEmpresa As Integer, Optional GetBytes As Boolean = True) As Byte() Dim Url = New Uri(String.Format("http://{0}:{1}/Compras/PopUpVerFactura.aspx?P={2}", HttpContext.Current.Request.Url.Host, HttpContext.Current.Request.Url.Port, Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=1&GUARDAR=1", CveVenta)))) Dim File As Byte() = Nothing Try @@ -6067,7 +6125,7 @@ Namespace Modelos End Set End Property - Public ReadOnly Property GlobalDTProductosServiciosEquivalencias(CvePS As Integer, CveUM As Integer, CveEmpresa As Integer) As DataTable + Public ReadOnly Property GlobalDTProductosServiciosEquivalencias(CvePS As Integer, CveUM As Integer, CveEmpresa As Integer) As DataTable Get Dim AppNombre As String = String.Format("GlobalDTProductosServiciosEquivalencias{0}", CveEmpresa) @@ -6085,7 +6143,7 @@ Namespace Modelos GlobalDTProductosServiciosEquivalencias = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) End If End Get - + End Property Property GlobalDTProveedorClasificacion(CveEmpresa As Integer) As DataTable Get diff --git a/Ventas/PV.aspx b/Ventas/PV.aspx index d60fe016f..07ff5a1dc 100644 --- a/Ventas/PV.aspx +++ b/Ventas/PV.aspx @@ -621,7 +621,8 @@ - + <%--0--%> @@ -1331,12 +1332,18 @@
- + + + +
+ + +
@@ -2556,7 +2563,7 @@ - + + -
+

@@ -2807,7 +2814,7 @@
-