From de9ba7acd145ad8b5a3ce14f429455a9a0a5902e Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Fri, 11 Nov 2022 02:07:22 -0700 Subject: [PATCH] Correciones de comercio exterior --- App_Code/ClsClientes.vb | 10 +- App_Code/ClsPaginas.vb | 5 +- App_Code/Timbrado.vb | 29 ++-- Ventas/Clientes.aspx | 341 ++++++++++++++++++++++------------------ Ventas/Clientes.aspx.vb | 8 +- Ventas/Ventas.aspx | 189 +++++++++------------- Ventas/Ventas.aspx.vb | 65 ++++---- 7 files changed, 327 insertions(+), 320 deletions(-) diff --git a/App_Code/ClsClientes.vb b/App_Code/ClsClientes.vb index 04db900ee..14f390bd5 100644 --- a/App_Code/ClsClientes.vb +++ b/App_Code/ClsClientes.vb @@ -589,7 +589,7 @@ Public Class ClsClientes Optional CveMotivoTraslado As Integer = 0, Optional NumRegIdTrib As String = "", Optional ComExtEstado As String = "-1", Optional ComExtMunicipio As String = "-1", Optional ComExtColonia As String = "-1", Optional RequiereOC As Boolean = False, Optional LT As String = "0", Optional LG As String = "0", Optional EsDistribuidor As Boolean = False, Optional TipoCliente As Integer = 1, Optional CargoUsado As Boolean = False, Optional BonificacionUsado As Boolean = False, Optional CveTipoRetencion As Integer = 0, Optional CorreoEntregaCompras As String = "-1", Optional CorreoEntregaAlmacen As String = "-1", Optional CveSATEstado As Integer = -1, Optional CveAdminTrayecto As Integer = -1, Optional CveRegimenFiscal As Integer = 0, Optional RegimenSociedad As String = "-1", Optional TipoPersona As Boolean = False, - Optional RepresentanteLegal As String = "", Optional FechaLimiteCredito As Date = MinFecha) As Boolean + Optional RepresentanteLegal As String = "", Optional FechaLimiteCredito As Date = MinFecha, Optional ComExtCalle As String = "-1", Optional ComExtNumExt As String = "-1", Optional ComExtCP As String = "-1") As Boolean Dim Retorno As Boolean = False @@ -737,6 +737,9 @@ Public Class ClsClientes .Add("@RepresentanteLegal", SqlDbType.VarChar).Value = RepresentanteLegal .Add("@FechaLimiteCredito", SqlDbType.Date).Value = FechaLimiteCredito + .Add("@ComExtCalle", SqlDbType.VarChar).Value = ComExtCalle + .Add("@ComExtNumExt", SqlDbType.VarChar).Value = ComExtNumExt + .Add("@ComExtCP", SqlDbType.VarChar).Value = ComExtCP End With Try SqlAdapter.Fill(Data) @@ -785,7 +788,7 @@ Public Class ClsClientes Optional ApellidoPaternoPF As String = "-1", Optional ApellidoMaternoPF As String = "-1", Optional NombresPF As String = "-1", Optional RequiereOC As Boolean = False, Optional LT As String = "0", Optional LG As String = "0", Optional EsDistribuidor As Boolean = False, Optional TipoCliente As Integer = 1, Optional CargoUsado As Boolean = False, Optional BonificacionUsado As Boolean = False, Optional CveTipoRetencion As Integer = 0, Optional CorreoEntregaCompras As String = "-1", Optional CorreoEntregaAlmacen As String = "-1", Optional CveSATEstado As Integer = -1, Optional CveAdminTrayecto As Integer = -1, Optional NoDesglosaIVA As Boolean = False, Optional CveRegimenFiscal As Integer = 0, Optional RegimenSociedad As String = "-1", Optional TipoPersona As Boolean = False, - Optional RepresentanteLegal As String = "", Optional FechaLimiteCredito As Date = MinFecha) As Boolean + Optional RepresentanteLegal As String = "", Optional FechaLimiteCredito As Date = MinFecha, Optional ComExtCalle As String = "-1", Optional ComExtNumExt As String = "-1", Optional ComExtCP As String = "-1") As Boolean Dim Retorno As Boolean = False @@ -949,6 +952,9 @@ Public Class ClsClientes .Add("@RepresentanteLegal", SqlDbType.VarChar).Value = RepresentanteLegal .Add("@FechaLimiteCredito", SqlDbType.Date).Value = FechaLimiteCredito + .Add("@ComExtCalle", SqlDbType.VarChar).Value = ComExtCalle + .Add("@ComExtNumExt", SqlDbType.VarChar).Value = ComExtNumExt + .Add("@ComExtCP", SqlDbType.VarChar).Value = ComExtCP diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 4441ae54c..7bb89b66e 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -8015,7 +8015,7 @@ Public Class ClsPaginas End If 'TEMPORAL, DEBE CAMBIARSE A FUNCIONALIDAD - If Vta.CveEmpresa.Contiene(172, 173) Then + If UsuarioActual.Empresa.Funcionalidad(707) = "1" Then Dim ArchivoStimulsfot As New System.IO.FileInfo(RutaFormato.Replace(".rdlc", ".mrt")) If ArchivoStimulsfot.Exists Then UsarStimulsoft = True @@ -8069,8 +8069,7 @@ Public Class ClsPaginas RutaFormato = RutaFormato.Replace(".rdlc", ".mrt") retorno = StreamBytesStimulsoft("Facturas", RutaFormato, lrds, params, NombreArchivo:=NombreArchivo, Formato:="PDF") - 'TEMPORAL, EMPRESAS EN LAS QUE SE UTILIZARA PRIMERO STIMULSOFT - If Vta.CveEmpresa.Contiene(172, 173) Then + If UsuarioActual.Empresa.Funcionalidad(707) = "1" Then Dim ArchivoPDF As New System.IO.FileInfo(String.Format("{0}PDF\{1}\{2}.pdf", UsuarioActual.Empresa.Ruta, Vta.TipoDocto, Vta.SerieFolio)) If Guardar Then If Not ArchivoPDF.Exists Then diff --git a/App_Code/Timbrado.vb b/App_Code/Timbrado.vb index abe6d4e94..0ca7bf273 100644 --- a/App_Code/Timbrado.vb +++ b/App_Code/Timbrado.vb @@ -4960,18 +4960,23 @@ Public Class Timbrado ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.Estado, ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.Pais, ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.CP) - cfdi.ComercioExterior11Destinatario(ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.NumRegIdTrib, - ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.Nombre, - ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.Calle, - ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.NumeroExterior, - ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.NumeroInterior, - ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.Colonia, - ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.Localidad, - ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.Referencia, - ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.Municipio, - ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.Estado, - ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.Pais, - ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.CP) + + If ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario IsNot Nothing Then + cfdi.ComercioExterior11Destinatario(ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.NumRegIdTrib, + ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.Nombre, + ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.Calle, + ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.NumeroExterior, + ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.NumeroInterior, + ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.Colonia, + ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.Localidad, + ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.Referencia, + ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.Municipio, + ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.Estado, + ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.Pais, + ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.CP) + End If + + 'MERCANCIAS If ObjCFDITimbre.Complementos.ComercioExterior11.Mercancias IsNot Nothing AndAlso ObjCFDITimbre.Complementos.ComercioExterior11.Mercancias.Count > 0 Then For Each concep As CFDIComercioExterior11Mercancias In ObjCFDITimbre.Complementos.ComercioExterior11.Mercancias diff --git a/Ventas/Clientes.aspx b/Ventas/Clientes.aspx index 7c74ab75d..ae60cc84c 100644 --- a/Ventas/Clientes.aspx +++ b/Ventas/Clientes.aspx @@ -308,16 +308,16 @@ - + -
  • +
  • - +
    - - + + @@ -358,43 +358,43 @@
    -
    -
    - -
    - - - Física - Moral +
    +
    + +
    + + + Física + Moral - - - -
    - -
    -
    + + + +
    + +
    +
    -
    - - - - +
    + + + +
    -
    -
    - - <%----%> - - +
    +
    + + <%----%> + +
    - +
    @@ -424,7 +424,7 @@
    -
    +
    @@ -480,8 +480,8 @@
    - -
    + +
    @@ -504,9 +504,9 @@
    -
    +
    + -
    @@ -514,7 +514,7 @@
    - +
    @@ -527,11 +527,11 @@
    -
    +
    - + @@ -618,50 +618,50 @@
    - - + +
    -
    +
    -
    +
    - +
    -
    - - +
    + + +
    -
    -
    -
    -
    - - - - +
    +
    +
    + + + + +
    -
    -
    -
    - - - +
    +
    + + + +
    -
    -
    -
    +
    +
    @@ -681,8 +681,8 @@
    - -
    + +
    @@ -691,7 +691,7 @@
    - +
    Frecuente @@ -699,33 +699,33 @@
    - -
    + +
    - - + +
    -
    +
    -
    -
    +
    +
    -
    -
    -
    +
    +
    +
    @@ -1107,8 +1107,8 @@ - - + +
    @@ -2557,7 +2557,7 @@ - + Archivos @@ -3058,6 +3058,35 @@
    +
    +
    +
    +
    + +
    +
    + +
    +
    +
    +
    +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    +
    +
    +
    @@ -4164,7 +4193,7 @@
    - +
    @@ -4193,7 +4222,7 @@ - +
    @@ -4222,13 +4251,13 @@
    - - + +
    +
    -
    @@ -4488,16 +4517,16 @@ - - + + -
    <%# Eval("CodigoPS") %>
    +
    <%# Eval("CodigoPS") %>
    - - + + @@ -4505,18 +4534,18 @@ <%-- --%> - + - + -
    <%# Eval("Usuario") %>
    +
    <%# Eval("Usuario") %>
    - + @@ -4551,11 +4580,11 @@ - + - +
    @@ -4569,7 +4598,7 @@
    -
    +
    @@ -4579,25 +4608,25 @@ CssClass="table table-striped table-advance table-hover ScrollAD " ShowHeader="True" EmptyDataText="No se encontraron resultados." ShowHeaderWhenEmpty="true" AutoGenerateColumns="False" AllowPaging="False" ShowFooter="False"> - - - + + + - - - - + + + + - + - - + + - + @@ -4711,7 +4740,7 @@
    -
    +
    @@ -4719,10 +4748,10 @@
    -
    +
    - +
    @@ -4857,8 +4886,8 @@ Agregar
    --%> -
    -
    +
    +
    @@ -5110,7 +5139,7 @@ - +
    @@ -5363,14 +5392,15 @@
    -
    +
    - +
    - +
    @@ -6364,7 +6394,7 @@ <%--table table-striped table-advance table-hover Widthall ScrollAD tabla_correcto grides Widthall mysmallbtn--%> - + @@ -6700,7 +6730,7 @@
    -