diff --git a/App_Code/ClsClientes.vb b/App_Code/ClsClientes.vb index 54fe23b28..bd5384c25 100644 --- a/App_Code/ClsClientes.vb +++ b/App_Code/ClsClientes.vb @@ -890,6 +890,32 @@ Public Class ClsClientes ' Return Retorno 'End Function + Public Function UpdateClienteFranquicia(CveCliente As Integer, CveEmpresaActual As Integer, CveEmpresaFranquicia As Integer) As Boolean + Dim Retorno As Boolean = False + + DataAdapter("PA_Vta_ClientesFranquiciaUpdate") + + With SqlAdapter.SelectCommand.Parameters + .Add("@CveCliente", SqlDbType.Int).Value = CveCliente + .Add("@CveEmpresaActual", SqlDbType.Int).Value = CveEmpresaActual + .Add("@CveEmpresaFranquicia", SqlDbType.Int).Value = CveEmpresaFranquicia + End With + + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch Ex1 As SqlException + If Ex1.Message.Contains("Número: 2627;") Then + Alert("El Cliente no se guardo debido a que actualmente se encuentra registrado", TipoMensaje.MsgAdvertencia) + Else + Me.OnError("Ocurrió un error al intentar Actualizar los datos del Cliente.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End If + Catch ex As Exception + OnError("Ocurrió un error al intentar Actualizar los datos del Cliente.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + Return Retorno + End Function + Public Function UpdateClientePersonaFisica(CveCliente As Integer, ApellidoPaterno As String, ApellidoMaterno As String, Nombres As String) As Boolean Dim Retorno As Boolean = False diff --git a/App_Code/ClsInventarios.vb b/App_Code/ClsInventarios.vb index 11302558c..5b45ff77e 100644 --- a/App_Code/ClsInventarios.vb +++ b/App_Code/ClsInventarios.vb @@ -2010,7 +2010,7 @@ Public Class ClsInventarios Optional Serie As String = "-1", Optional Lote As String = "-1", Optional FechaCaducidad As Date = MinFecha, Optional CveVendedor As Integer = -1, Optional CveCliente As Integer = -1, Optional ExcluyeAdelantado As Integer = -1, Optional PendientePorSurtir As Integer = -1, - Optional ExcluyeApartados As Integer = 1, Optional RestringirAlmacenes As Integer = -1, Optional ExcluyeTransitorios As Integer = -1) As Decimal + Optional ExcluyeApartados As Integer = 1, Optional RestringirAlmacenes As Integer = -1, Optional ExcluyeTransitorios As Integer = -1, Optional BuscarEnTabla As Boolean = False) As Decimal Dim Retorno As Decimal = -1 If FechaMovto = "-1" Then @@ -2037,6 +2037,7 @@ Public Class ClsInventarios .Add("@ExcluyeApartados", SqlDbType.Int).Value = ExcluyeApartados .Add("@ExcluyeTransitorios", SqlDbType.Int).Value = ExcluyeTransitorios .Add("@RestringirAlmacenes", SqlDbType.Int).Value = RestringirAlmacenes + .Add("@BuscarEnTabla", SqlDbType.Bit).Value = BuscarEnTabla .Add("@Existencia", SqlDbType.Money).Direction = ParameterDirection.Output .Add("@CvePSRetorno", SqlDbType.Int).Direction = ParameterDirection.Output diff --git a/App_Code/ClsNominas.vb b/App_Code/ClsNominas.vb index 7f5db8213..db7ea6e92 100644 --- a/App_Code/ClsNominas.vb +++ b/App_Code/ClsNominas.vb @@ -3459,7 +3459,7 @@ Public Class ClsNominas End Function - Public Function SATSolicitudTimbreIngresosRep(CveEmpresa As Integer, FechaInicio As Date, FechaFin As DateTime, Opcion As Integer, Vista As Integer) As Boolean + Public Function SATSolicitudTimbreIngresosRep(CveEmpresa As Integer, FechaInicio As Date, FechaFin As DateTime, Opcion As Integer, Vista As Integer, TipoComprobante As String, TipoDiferencia As Integer) As Boolean Dim retorno As Boolean = False Try @@ -3470,6 +3470,8 @@ Public Class ClsNominas .Add("@FechaFin", SqlDbType.DateTime).Value = FechaFin .Add("@Opcion", SqlDbType.Int).Value = Opcion .Add("@Vista", SqlDbType.Int).Value = Vista + .Add("@TipoComprobante", SqlDbType.VarChar).Value = TipoComprobante + .Add("@TipoDiferencia", SqlDbType.Int).Value = TipoDiferencia End With SqlAdapter.Fill(Data) diff --git a/App_Code/ClsOS.vb b/App_Code/ClsOS.vb index 3e736c02e..2e6ca0934 100644 --- a/App_Code/ClsOS.vb +++ b/App_Code/ClsOS.vb @@ -497,7 +497,7 @@ Public Class ClsOS Public Function GetRepOrdenesServicioMedicasRep(FechaI As Date, FechaF As Date, CveCliente As Integer, CveVendedor As Integer, CveEstatusOrdenServicio As Integer, CveUsuarioAtendio As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, - Optional CveMedico As Integer = -1, Optional CveProcedimiento As Integer = -1) As Boolean + Optional CveMedico As Integer = -1, Optional CveProcedimiento As Integer = -1, Optional CveEspecialidad As Integer = -1, Optional CveClienteSucursal As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_OS_OrdenesServiciosMedicasRepGet") @@ -514,6 +514,8 @@ Public Class ClsOS .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveMedico", SqlDbType.Int).Value = CveMedico .Add("@CveProcedimiento", SqlDbType.Int).Value = CveProcedimiento + .Add("@CveEspecialidad", SqlDbType.Int).Value = CveEspecialidad + .Add("@CveClienteSucursal", SqlDbType.Int).Value = CveClienteSucursal End With diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 81fa42283..365eecdb7 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -6987,7 +6987,7 @@ Public Class ClsPaginas NombreArchivoDescarga = "FacturaUSA" End If - If UsuarioActual.Empresa.Funcionalidad(718) = "1" Then + If UsuarioActual.CveEmpresa.Contiene(190, 192) Then If EsTicket Then NombreArchivo = "FacturaTicket" NombreArchivoDescarga = "FacturaTicket" diff --git a/App_Code/ClsProductosServicios.vb b/App_Code/ClsProductosServicios.vb index cadf04a74..de78bfc95 100644 --- a/App_Code/ClsProductosServicios.vb +++ b/App_Code/ClsProductosServicios.vb @@ -875,6 +875,33 @@ Public Class ClsProductosServicios Return Retorno End Function + Public Function GetUltimoPrecioCompra(CveEmpresa As Integer, CvePS As Integer) As Double + + Dim Retorno As Double = -1 + + DataAdapter("PA_Inv_UltimoPrecioCompraGet") + + With SqlAdapter.SelectCommand.Parameters + + + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@CvePS", SqlDbType.Int).Value = CvePS + .Add("@PU", SqlDbType.Money).Direction = ParameterDirection.Output + End With + + Try + SqlAdapter.Fill(Data) + Retorno = CDbl(SqlAdapter.SelectCommand.Parameters("@PU").Value) + + Catch Ex1 As SqlException + Me.OnError("Ocurrió un error al obtener el precio unitario.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + Catch ex As Exception + OnError("Ocurrió un error al obtener el precio unitario", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + + Return Retorno + End Function + #Region "P R O D U C T O S - E Q U I V A L E N C I A S " Public Function GetPSEquivalencias(CvePS As Integer, CveEmpresa As Integer) As Boolean diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb index 6f7c546d5..dec991bdb 100644 --- a/App_Code/ClsVentas.vb +++ b/App_Code/ClsVentas.vb @@ -2052,7 +2052,7 @@ Public Class ClsVentas Return Retorno End Function - Public Function AddPrecioLista(CveUsuario As Integer, CveEmpresa As Integer, PrecioLista As String, Predeterminada As Boolean, Porcentaje As Double, Optional CvePrecioListaClonar As Integer = -1) As Integer + Public Function AddPrecioLista(CveUsuario As Integer, CveEmpresa As Integer, PrecioLista As String, Predeterminada As Boolean, Porcentaje As Double, Optional CvePrecioListaClonar As Integer = -1, Optional UpdateFranquicia As Boolean = False) As Integer Dim Retorno As Integer = -1 DataAdapter("PA_Vta_PrecioListaAdd") @@ -2064,6 +2064,7 @@ Public Class ClsVentas .Add("@Porcentaje", SqlDbType.SmallMoney).Value = Porcentaje .Add("@Predeterminada", SqlDbType.Bit).Value = Predeterminada .Add("@CvePrecioListaClonar", SqlDbType.Int).Value = CvePrecioListaClonar + .Add("@UpdateFranquicia", SqlDbType.Bit).Value = UpdateFranquicia .Add("@CvePrecioLista", SqlDbType.Int).Direction = ParameterDirection.Output End With @@ -2084,7 +2085,7 @@ Public Class ClsVentas End Function Public Function UpdatePrecioLista(PrecioLista As String, Estatus As Boolean, CveUsuario As Integer, Porcentaje As Double, - Predeterminada As Boolean, CvePrecioLista As Integer) As Boolean + Predeterminada As Boolean, CvePrecioLista As Integer, Optional UpdateFranquicia As Boolean = False) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Vta_PrecioListaUpdate") @@ -2096,6 +2097,7 @@ Public Class ClsVentas .Add("@Porcentaje", SqlDbType.SmallMoney).Value = Porcentaje .Add("@Predeterminada", SqlDbType.Bit).Value = Predeterminada .Add("@CvePrecioLista", SqlDbType.Int).Value = CvePrecioLista + .Add("@UpdateFranquicia", SqlDbType.Bit).Value = UpdateFranquicia End With Try diff --git a/App_Code/Timbrado.vb b/App_Code/Timbrado.vb index 899d3d43a..ff33b1f0b 100644 --- a/App_Code/Timbrado.vb +++ b/App_Code/Timbrado.vb @@ -9,6 +9,7 @@ Imports System.Reflection Imports System.Xml Imports System.Xml.Serialization Imports Extensiones +Imports External.Office Imports Newtonsoft.Json.Linq Imports Profact.TimbraCFDI33.Complementos Imports ProfactCartaPorte = Profact.TimbraCFDI33.Complementos.CartaPorte30 @@ -2458,48 +2459,48 @@ Public Class Timbrado #End Region -#Region "Comercio Exterior" +#Region "C O M P L E M E N T O D E C O M E R C I O E X T E R I O R" If Ventas.Cliente.AplicaComercioExterior And ObjCFDITimbre.Complementos.ComercioExterior.AplicaComercioExteriorSubProyecto Then - If ObjCFDITimbre.Complementos.ComercioExterior IsNot Nothing Then + If ObjCFDITimbre.Complementos.ComercioExterior IsNot Nothing Then - 'DATOS GENERALES - cfdi.ComercioExterior20(ObjCFDITimbre.Complementos.ComercioExterior.MotivoTraslado, - ObjCFDITimbre.Complementos.ComercioExterior.ClavedePedimento, - ObjCFDITimbre.Complementos.ComercioExterior.CertificadoOrigen, - ObjCFDITimbre.Complementos.ComercioExterior.NumCertificadoOrigen, - ObjCFDITimbre.Complementos.ComercioExterior.NumeroExportadorConfiable, - ObjCFDITimbre.Complementos.ComercioExterior.Incoterm, - ObjCFDITimbre.Complementos.ComercioExterior.Observaciones, - ObjCFDITimbre.Complementos.ComercioExterior.TipoCambioUSD, - ObjCFDITimbre.Complementos.ComercioExterior.TotalUSD) - 'EMISOR - cfdi.ComercioExterior20Emisor(If(EmisorRFC.Length >= 12, "", ObjCFDITimbre.Complementos.ComercioExterior.Emisor.CURP)) - cfdi.ComercioExterior20Domicilio(ObjCFDITimbre.Complementos.ComercioExterior.Emisor.Calle, - ObjCFDITimbre.Complementos.ComercioExterior.Emisor.NumeroExterior, - ObjCFDITimbre.Complementos.ComercioExterior.Emisor.NumeroInterior, - ObjCFDITimbre.Complementos.ComercioExterior.Emisor.Colonia, - ObjCFDITimbre.Complementos.ComercioExterior.Emisor.Localidad, - ObjCFDITimbre.Complementos.ComercioExterior.Emisor.Referencia, - ObjCFDITimbre.Complementos.ComercioExterior.Emisor.Municipio, - ObjCFDITimbre.Complementos.ComercioExterior.Emisor.Estado, - ObjCFDITimbre.Complementos.ComercioExterior.Emisor.Pais, - ObjCFDITimbre.Complementos.ComercioExterior.Emisor.CP) - 'RECEPTOR - cfdi.ComercioExterior20Receptor(ObjCFDITimbre.Complementos.ComercioExterior.Receptor.NumRegIdTrib) - cfdi.ComercioExterior20DomicilioReceptor(ObjCFDITimbre.Complementos.ComercioExterior.Receptor.Calle, - ObjCFDITimbre.Complementos.ComercioExterior.Receptor.NumeroExterior, - ObjCFDITimbre.Complementos.ComercioExterior.Receptor.NumeroInterior, - ObjCFDITimbre.Complementos.ComercioExterior.Receptor.Colonia, - ObjCFDITimbre.Complementos.ComercioExterior.Receptor.Localidad, - ObjCFDITimbre.Complementos.ComercioExterior.Receptor.Referencia, - ObjCFDITimbre.Complementos.ComercioExterior.Receptor.Municipio, - ObjCFDITimbre.Complementos.ComercioExterior.Receptor.Estado, + 'DATOS GENERALES + cfdi.ComercioExterior20(ObjCFDITimbre.Complementos.ComercioExterior.MotivoTraslado, +ObjCFDITimbre.Complementos.ComercioExterior.ClavedePedimento, +ObjCFDITimbre.Complementos.ComercioExterior.CertificadoOrigen, +ObjCFDITimbre.Complementos.ComercioExterior.NumCertificadoOrigen, +ObjCFDITimbre.Complementos.ComercioExterior.NumeroExportadorConfiable, +ObjCFDITimbre.Complementos.ComercioExterior.Incoterm, +ObjCFDITimbre.Complementos.ComercioExterior.Observaciones, +ObjCFDITimbre.Complementos.ComercioExterior.TipoCambioUSD, +ObjCFDITimbre.Complementos.ComercioExterior.TotalUSD) + 'EMISOR + cfdi.ComercioExterior20Emisor(If(EmisorRFC.Length >= 12, "", ObjCFDITimbre.Complementos.ComercioExterior.Emisor.CURP)) + cfdi.ComercioExterior20Domicilio(ObjCFDITimbre.Complementos.ComercioExterior.Emisor.Calle, +ObjCFDITimbre.Complementos.ComercioExterior.Emisor.NumeroExterior, +ObjCFDITimbre.Complementos.ComercioExterior.Emisor.NumeroInterior, +ObjCFDITimbre.Complementos.ComercioExterior.Emisor.Colonia, +ObjCFDITimbre.Complementos.ComercioExterior.Emisor.Localidad, +ObjCFDITimbre.Complementos.ComercioExterior.Emisor.Referencia, +ObjCFDITimbre.Complementos.ComercioExterior.Emisor.Municipio, +ObjCFDITimbre.Complementos.ComercioExterior.Emisor.Estado, +ObjCFDITimbre.Complementos.ComercioExterior.Emisor.Pais, +ObjCFDITimbre.Complementos.ComercioExterior.Emisor.CP) + 'RECEPTOR + cfdi.ComercioExterior20Receptor(ObjCFDITimbre.Complementos.ComercioExterior.Receptor.NumRegIdTrib) + cfdi.ComercioExterior20DomicilioReceptor(ObjCFDITimbre.Complementos.ComercioExterior.Receptor.Calle, +ObjCFDITimbre.Complementos.ComercioExterior.Receptor.NumeroExterior, +ObjCFDITimbre.Complementos.ComercioExterior.Receptor.NumeroInterior, +ObjCFDITimbre.Complementos.ComercioExterior.Receptor.Colonia, +ObjCFDITimbre.Complementos.ComercioExterior.Receptor.Localidad, +ObjCFDITimbre.Complementos.ComercioExterior.Receptor.Referencia, +ObjCFDITimbre.Complementos.ComercioExterior.Receptor.Municipio, +ObjCFDITimbre.Complementos.ComercioExterior.Receptor.Estado, ObjCFDITimbre.Complementos.ComercioExterior.Receptor.Pais, ObjCFDITimbre.Complementos.ComercioExterior.Receptor.CP) - If ObjCFDITimbre.Complementos.ComercioExterior.Destinatario IsNot Nothing Then - cfdi.ComercioExterior20Destinatario(ObjCFDITimbre.Complementos.ComercioExterior.Destinatario.NumRegIdTrib, + If ObjCFDITimbre.Complementos.ComercioExterior.Destinatario IsNot Nothing Then + cfdi.ComercioExterior20Destinatario(ObjCFDITimbre.Complementos.ComercioExterior.Destinatario.NumRegIdTrib, ObjCFDITimbre.Complementos.ComercioExterior.Destinatario.Nombre, ObjCFDITimbre.Complementos.ComercioExterior.Destinatario.Calle, ObjCFDITimbre.Complementos.ComercioExterior.Destinatario.NumeroExterior, @@ -2511,39 +2512,32 @@ Public Class Timbrado ObjCFDITimbre.Complementos.ComercioExterior.Destinatario.Estado, ObjCFDITimbre.Complementos.ComercioExterior.Destinatario.Pais, ObjCFDITimbre.Complementos.ComercioExterior.Destinatario.CP) - End If - - - 'MERCANCIAS - If ObjCFDITimbre.Complementos.ComercioExterior.Mercancias IsNot Nothing AndAlso ObjCFDITimbre.Complementos.ComercioExterior.Mercancias.Count > 0 Then - For Each concep As CFDIComercioExterior11Mercancias In ObjCFDITimbre.Complementos.ComercioExterior.Mercancias - cfdi.ComercioExterior20Mercancia(concep.NoIdentificacion, concep.FraccionArancelaria, concep.CantidadAduana, concep.UnidadAduana, concep.ValorUnitarioAduana, concep.ValorDolares) - If concep.DescripcionesEspecificas.Marca <> "" Then - cfdi.ComercioExterior20MercanciaDescripcionesEspeciales(concep.DescripcionesEspecificas.Marca, - concep.DescripcionesEspecificas.Modelo, - concep.DescripcionesEspecificas.SubModelo, - concep.DescripcionesEspecificas.NumeroSerie) - End If - Next - - End If + End If + 'MERCANCIAS + If ObjCFDITimbre.Complementos.ComercioExterior.Mercancias IsNot Nothing AndAlso ObjCFDITimbre.Complementos.ComercioExterior.Mercancias.Count > 0 Then + For Each concep As CFDIComercioExterior11Mercancias In ObjCFDITimbre.Complementos.ComercioExterior.Mercancias + cfdi.ComercioExterior20Mercancia(concep.NoIdentificacion, concep.FraccionArancelaria, concep.CantidadAduana, concep.UnidadAduana, concep.ValorUnitarioAduana, concep.ValorDolares) + If concep.DescripcionesEspecificas.Marca <> "" Then + cfdi.ComercioExterior20MercanciaDescripcionesEspeciales(concep.DescripcionesEspecificas.Marca, +concep.DescripcionesEspecificas.Modelo, +concep.DescripcionesEspecificas.SubModelo, +concep.DescripcionesEspecificas.NumeroSerie) + End If + Next End If End If - -#End Region + End If + +#End Region End If - #Region "C O M P L E M E N T O C A R T A P O R T E" - If UsuarioActual.CveEmpresa = 13 Then - If ObjCFDITimbre.Complementos.CartaPorte IsNot Nothing Then - Dim Carta As CFDICartaPorte = ObjCFDITimbre.Complementos.CartaPorte ''DATOS GENERALES @@ -2557,7 +2551,6 @@ Public Class Timbrado 'cfdi.CartaPorteOrigen(ubica.Origen.IDOrigen, ubica.Origen.RFCRemitente, ubica.Origen.NombreRemitente, ubica.NumRegIdTrib, ubica.Origen.ResidenciaFiscal, ubica.Origen.NumEstacion, ubica.Origen.NombreEstacion, ubica.Origen.NavegacionTrafico, ubica.Origen.FechaHoraSalida) cfdi.CartaPorteDomicilio(ubica.Domicilio.Calle, ubica.Domicilio.NumeroExterior, ubica.Domicilio.NumeroInterior, ubica.Domicilio.Colonia, ubica.Domicilio.Localidad, ubica.Domicilio.Referencia, ubica.Domicilio.Municipio, ubica.Domicilio.Estado, ubica.Domicilio.Pais, ubica.Domicilio.CP) Next - End If 'MERCANCIAS @@ -2681,8 +2674,7 @@ Public Class Timbrado #End Region - -#Region "Complemento Pago" +#Region "C O M P L E M E N T O D E P A G O" If ObjCFDITimbre.Comprobante.TipoComprobante = "P" Then @@ -2700,6 +2692,11 @@ Public Class Timbrado For Each docp As CFDIComplementoPago In ObjCFDITimbre.ComplementoPagos20.ComplementoPagos + Dim MonDiferente As Integer = (From c In docp.DocumentosRelacionados + Where c.MonedaDR <> docp.MonedaP + Select c.MonedaDR).Count() + If MonDiferente > 0 Then cfdi.ContieneVariasMonedas = True 'consideración adicional Rev. B + cfdi.Pago20(docp.FechaPago.ToString("yyyy-MM-ddTHH:mm:ss"), docp.FormaDePagoP, docp.MonedaP, @@ -2730,6 +2727,8 @@ Public Class Timbrado doc.ImpSaldoInsoluto, doc.ObjetoImpuesto) + 'If doc.MonedaDR <> docp.MonedaP Then cfdi.ContieneVariasMonedas = True 'consideración adicional Rev. B + If doc.Impuestos IsNot Nothing Then ''retenciones If (doc.Impuestos).Where(Function(x) x.TrasladooRetencion = "R").Count > 0 Then @@ -2771,9 +2770,7 @@ Public Class Timbrado End If #End Region - - -#Region "Nomina12" +#Region "C O M P L E M E N T O D E N O M I N A" If ObjCFDITimbre.Comprobante.TipoComprobante = "N" Then 'cfdi.Esquema.AgregarEsquema("http://www.sat.gob.mx/nomina12 http://www.sat.gob.mx/sitio_internet/cfd/nomina/nomina12.xsd") diff --git a/Ashx/E119.ashx b/Ashx/E119.ashx index 938ca01b6..f0370597d 100644 --- a/Ashx/E119.ashx +++ b/Ashx/E119.ashx @@ -355,9 +355,9 @@ Public Class E119 : Implements IHttpHandler TieneError = True End If Else - MsgLog.AppendLine("json:" & json) TieneError = True End If + MsgLog.AppendLine("json:" & json) End Using End If @@ -405,7 +405,7 @@ Public Class E119 : Implements IHttpHandler New JProperty("SerieFolio", dr("SerieFolio")) ) data.Add(objSucursal) - Respuesta.status = "success" + Respuesta.status = "error" Respuesta.data = data Respuesta.message = "Folio registrado previamente." MsgLog.AppendLine("Folio registrado previamente.") @@ -420,11 +420,16 @@ Public Class E119 : Implements IHttpHandler Return JsonConvert.SerializeObject(Respuesta) End If - If JsonRequest("billing") IsNot Nothing AndAlso JsonRequest("rfc_info") IsNot Nothing Then - RFC = JsonRequest("rfc_info")("rfc_client").ToString() - RegimenCliente = JsonRequest("rfc_info")("regimen_client").ToString() - UsoCFDI = JsonRequest("rfc_info")("cfdi").ToString() - NombreCliente = JsonRequest("billing")("first_name").ToString() & " " & JsonRequest("billing")("last_name").ToString() + If JsonRequest("billing") IsNot Nothing AndAlso JsonRequest("rfc_info") IsNot Nothing AndAlso JsonRequest("rfc_info").Count > 0 Then + RFC = JsonRequest("rfc_info")(0)("rfc_client").ToString() + RegimenCliente = JsonRequest("rfc_info")(0)("regimen_client").ToString() + UsoCFDI = JsonRequest("rfc_info")(0)("cfdi").ToString() + NombreCliente = JsonRequest("billing")(0)("first_name").ToString() & " " & JsonRequest("billing")(0)("last_name").ToString() + 'si vienen vacío toman datos predeterminados + If RFC = "" Then RFC = "XAXX010101000" + If RegimenCliente = "" Then RegimenCliente = "616" + If UsoCFDI = "" Then UsoCFDI = "S01" + If Not String.IsNullOrEmpty(UsoCFDI) Then CveUsoCFDI = ClsPaginas.GlobalDTSATUsosCFDI().FiltroPrimeroValor("CveUsoCFDI", $"UsoCFDI = '{UsoCFDI.Trim}'").ToEntero() End If @@ -489,16 +494,16 @@ Public Class E119 : Implements IHttpHandler End If If JsonRequest("shipping") IsNot Nothing AndAlso Not TieneError Then Dim CveEstado As Integer = -1 - Dim Direccion As String = If(JsonRequest("shipping")("address_1") Is Nothing, "", JsonRequest("shipping")("address_1").ToString()) + Dim Direccion As String = If(JsonRequest("shipping")(0)("address_1") Is Nothing, "", JsonRequest("shipping")(0)("address_1").ToString()) Dim NumExt As String = "" Dim NumInt As String = "" Dim Colonia As String = "" - Dim Ciudad As String = If(JsonRequest("shipping")("city") Is Nothing, "", JsonRequest("shipping")("city").ToString()) - Dim Localidad As String = If(JsonRequest("shipping")("city") Is Nothing, "", JsonRequest("shipping")("city").ToString()) - Dim CP As String = If(JsonRequest("shipping")("postcode") Is Nothing, "", JsonRequest("shipping")("postcode").ToString()) - Dim Telefono As String = If(JsonRequest("shipping")("phone") Is Nothing, "", JsonRequest("shipping")("phone").ToString()) - Dim Correo As String = If(JsonRequest("shipping")("email") Is Nothing, "", JsonRequest("shipping")("email").ToString()) - Dim Estado As String = If(JsonRequest("shipping")("state") Is Nothing, "", JsonRequest("shipping")("state").ToString()) + Dim Ciudad As String = If(JsonRequest("shipping")(0)("city") Is Nothing, "", JsonRequest("shipping")(0)("city").ToString()) + Dim Localidad As String = If(JsonRequest("shipping")(0)("city") Is Nothing, "", JsonRequest("shipping")(0)("city").ToString()) + Dim CP As String = If(JsonRequest("shipping")(0)("postcode") Is Nothing, "", JsonRequest("shipping")(0)("postcode").ToString()) + Dim Telefono As String = If(JsonRequest("shipping")(0)("phone") Is Nothing, "", JsonRequest("shipping")(0)("phone").ToString()) + Dim Correo As String = If(JsonRequest("shipping")(0)("email") Is Nothing, "", JsonRequest("shipping")(0)("email").ToString()) + Dim Estado As String = If(JsonRequest("shipping")(0)("state") Is Nothing, "", JsonRequest("shipping")(0)("state").ToString()) If Not String.IsNullOrEmpty(Estado) Then CveEstado = ClsPaginas.GlobalDTGralEstados("MEX").FiltroPrimeroValor("CveEstado", $"NombreEstado = '{Estado.Trim}'").ToEntero() If CveEstado <= 0 Then 'SI NO ENCUENTRA EL ESTADO INGRESA EL DE SONORA @@ -528,6 +533,7 @@ Public Class E119 : Implements IHttpHandler MsgLog.AppendLine("1.6 inicio generar venta") ObjFactura = Modelos.Factura.CrearVentaNueva(Usuario, CveSubProyecto, CveCliente, CveMoneda, "Rem") + ObjFactura.AtencionA = NombreCliente MsgLog.AppendFormat("1.6.0 objeto creado {0}", If(ObjFactura IsNot Nothing, "si", "no")) If JsonRequest("shiping_lines") IsNot Nothing Then @@ -616,6 +622,7 @@ Public Class E119 : Implements IHttpHandler MsgLog.Append("99.0 ocurrió un error en el proceso") Else MsgLog.Append("4.0 proceso terminado") + MsgLog.AppendFormat("Folio:{0} Estatus:", Resp.SerieFolio, Respuesta.status) ObjClientes.Commit() ObjClientes.Dispose() ObjInventario.Dispose() @@ -627,7 +634,7 @@ Public Class E119 : Implements IHttpHandler Catch ex As Exception TieneError = True Finally - MsgLog.ToString.GuardaLogAD("LogE119") + 'MsgLog.ToString.GuardaLogAD("LogE119") End Try If TieneError Then diff --git a/Bancos/IE.aspx.vb b/Bancos/IE.aspx.vb index 7d769f070..836808ff2 100644 --- a/Bancos/IE.aspx.vb +++ b/Bancos/IE.aspx.vb @@ -836,12 +836,8 @@ Partial Class Bancos_IE 'DdlBanco.SelectedValue = ObjIE.CveBanco.ToString 'Abono es Egreso Egs - - CargaTipoTransaccion(If(Tipo = "Abono", "Egs", "Ing")) DdlTipoTransaccion.SelectedValue = ObjIE.CveTipoTransaccion.ToString - - DdlCuenta.SelectedValueExist(ObjIE.CveCuenta.ToString) DdlCuenta.Visible = False @@ -1026,7 +1022,11 @@ Partial Class Bancos_IE LnkEliminar.Visible = True End If Else - If UsuarioActual.TienePermisoProceso(80) AndAlso ObjIE.CveTipoCuenta = 1 Then LnkDesconciliar.Visible = True + If UsuarioActual.CveEmpresa = 119 Then + If UsuarioActual.TienePermisoProceso(80) AndAlso ObjIE.CveTipoCuenta = 1 Then LnkDesconciliar.Visible = True + Else + If UsuarioActual.TienePermisoProceso(80) Then LnkDesconciliar.Visible = True + End If End If If UsuarioActual.TienePermisoProceso(85) AndAlso Not ObjIE.FueConciliado Then LnkCancelar.Visible = True @@ -1052,6 +1052,8 @@ Partial Class Bancos_IE LnkEliminar.Visible = True End If + If UsuarioActual.TienePermisoProceso(80) Then LnkDesconciliar.Visible = True + If UsuarioActual.CveUsuario = 100 Then ImprimirIEPDF(ObjIE.CveTipoTransaccion) End If diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb index a2f5a8316..a152c3fcc 100644 --- a/Compras/PopUpVerFactura.aspx.vb +++ b/Compras/PopUpVerFactura.aspx.vb @@ -1348,8 +1348,9 @@ Partial Class PopUpVerFactura Dim Guardar As Boolean = UrlParametros("GUARDAR") IsNot Nothing AndAlso UrlParametros("GUARDAR").ToString() = "1" Dim RegenerarPDF As Boolean = UrlParametros("REGENERAR") IsNot Nothing AndAlso UrlParametros("REGENERAR").ToString() = "1" Dim STIMUL As Boolean = UrlParametros("STIMULSOFT") IsNot Nothing AndAlso UrlParametros("STIMULSOFT").ToString() = "1" + Dim EsTicket As Boolean = UrlParametros("TICKET") IsNot Nothing AndAlso UrlParametros("TICKET").ToString() = "1" - GenerarPDFVenta(UrlParametros("CVEVENTA").ToString.ToEntero, AplicaPagare, GuardarPDF:=Guardar, RegenerarPDF:=RegenerarPDF, UsarStimul:=STIMUL) + GenerarPDFVenta(UrlParametros("CVEVENTA").ToString.ToEntero, AplicaPagare, GuardarPDF:=Guardar, RegenerarPDF:=RegenerarPDF, UsarStimul:=STIMUL, EsTicket:=EsTicket) End If End If diff --git a/Contratos/Contratos.aspx.vb b/Contratos/Contratos.aspx.vb index 47718ff8f..4c2b0e6d0 100644 --- a/Contratos/Contratos.aspx.vb +++ b/Contratos/Contratos.aspx.vb @@ -26,7 +26,7 @@ Partial Class Contratos_Contratos DdlTipo.Items.Insert(0, New ListItem("Todos", "-1")) DdlTipo.DataBind() - Dim CveEstatusVigente = -1 + Dim CveEstatusVigente As Integer = -1 Dim ObjContratos As New ClsContratos ObjContratos.GetContratosEstatus(UsuarioActual.CveEmpresa) DdlEstatus.DataSource = ObjContratos.DtResultados @@ -82,10 +82,10 @@ Partial Class Contratos_Contratos Dim ObjContratos As New ClsContratos If ObjContratos.GetContratos(-1, UsuarioActual.CveEmpresa, DdlClientes.SelectedValue.ToEntero, DdlEstatus.SelectedValue.ToEntero, TipoContrato:=DdlTipo.SelectedValue.ToEntero) Then Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png") - Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) + Dim logouri As String = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) Dim dt As DataTable = ObjContratos.DtResultados - Dim Cliente = If(DdlClientes.SelectedValue = "-1", "", $" Cliente: {DdlClientes.SelectedItem.Text}") - Dim Estatus = ($" Estatus: {DdlEstatus.SelectedItem.Text}") + Dim Cliente As String = If(DdlClientes.SelectedValue = "-1", "", $" Cliente: {DdlClientes.SelectedItem.Text}") + Dim Estatus As String = ($" Estatus: {DdlEstatus.SelectedItem.Text}") Dim params As New List(Of ReportParameter) params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("FechaInicio", "-1")) diff --git a/Empresas/13/Formatos/CartaPorteTimbrado.rdlc b/Empresas/13/Formatos/CartaPorteTimbrado.rdlc index cf3392514..c0af07228 100644 --- a/Empresas/13/Formatos/CartaPorteTimbrado.rdlc +++ b/Empresas/13/Formatos/CartaPorteTimbrado.rdlc @@ -4119,7 +4119,7 @@ - Carta Porte 3.0 + Carta Porte 2.0 - - true - true - - - - - Sucursal Tijuana - - - - - - - - - Beneficiario: ELECTRICA SERVEC S DE RL DE CV - - - - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - Embedded RFIRMAELECTRONICAEDITABLE @@ -2757,7 +2669,7 @@ 0.51012cm 1.73059cm 3.63914cm - 21 + 20 @@ -2771,7 +2683,7 @@ - Cuentas Bancarias + Cuenta Bancaria @@ -3236,7 +3148,7 @@ 0.15747cm 2.0799cm 20.85172cm - 23 + 22 =Microsoft.VisualBasic.Interaction.IIF(First(Fields!SerieFolio.Value, "DataSet4") <> "", False, True) @@ -3277,7 +3189,7 @@ 16.84664cm 0.49387cm 4.14557cm - 24 + 23 diff --git a/Inventarios/EntregaAlmacen.aspx b/Inventarios/EntregaAlmacen.aspx index 3130410a4..6155e8cd8 100644 --- a/Inventarios/EntregaAlmacen.aspx +++ b/Inventarios/EntregaAlmacen.aspx @@ -3,7 +3,7 @@ - --%> + + Entrega Almacén (Surtir Mercancia) @@ -472,145 +481,174 @@ - - -
-
-
- - Salida de Inventario -
-
-
-
-
-
- -
-
-
+
+
- <%--AGREGAR POR CODIGO DE BARRAS--%> - - -
+ + -
-
- -
-
-
- - - - - - -
- - - - - - - -
+
+
+
+ + Salida de Inventario +
+
+
- - +
+ +
+
+
+ <%--AGREGAR POR CODIGO DE BARRAS--%> + + +
- <%--GV DATOS--%> - - - - - - - - - - - - - - - - - - - -<%-- --%> - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - +
+
+ +
+
+
+ + + + + + +
+ + + + + + + +
+
-
-
- - - - - - -
-
- -
-
- - - + + - <%--BOTON GUARDAR--%> - - -
- -
-
- -
-
-
+ + + <%--GV DATOS--%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%--8--%> + + + + + + + + <%--9--%> + + + + + + + + +
+ + + + + + + + + + +
+ +
+
+ + + + + + +
+
+ + + + +
+
+ +
+
+ + +
+ +
+ <%--BOTON GUARDAR--%> + + +
+ +
+
+ +
+
+
+
+
+ <%--AGREGA POR SERIE--%> @@ -702,8 +740,6 @@
- -
+
-
Serie
-
- - - + +
+
+ + + +
+
+ +
+
+ + + +
-
+ +
+ +
+ + + +
+ + + + +
+ + + + + + + + +
+ + <%--
+ + +
+ + + + +
+ + + + + + + + +
--%> + + +
+ + +
+ +
+
- + - - + + + + diff --git a/Inventarios/PaquetesArmadoDesarmado.aspx.vb b/Inventarios/PaquetesArmadoDesarmado.aspx.vb index 3c43cfe9d..4e1ff1e29 100644 --- a/Inventarios/PaquetesArmadoDesarmado.aspx.vb +++ b/Inventarios/PaquetesArmadoDesarmado.aspx.vb @@ -2,6 +2,7 @@ Option Strict On Imports System.Data +Imports System.IO.Packaging Imports Extensiones Partial Class Inventarios_PaquetesArmadoDesarmado Inherits ClsPaginas @@ -89,12 +90,32 @@ Partial Class Inventarios_PaquetesArmadoDesarmado End Set End Property - Private Property AplicaSerie As Boolean + Private Property AplicaLotePaquete As Boolean Get - Return CType(ViewState("AplicaSerie"), Boolean) + Return CType(ViewState("AplicaLotePaquete"), Boolean) End Get Set(value As Boolean) - ViewState("AplicaSerie") = value + ViewState("AplicaLotePaquete") = value + End Set + End Property + + + Private Property AplicaCaducidadPaquete As Boolean + Get + Return CType(ViewState("AplicaCaducidadPaquete"), Boolean) + End Get + Set(value As Boolean) + ViewState("AplicaCaducidadPaquete") = value + End Set + End Property + + + Private Property AplicaSeriePaquete As Boolean + Get + Return CType(ViewState("AplicaSeriePaquete"), Boolean) + End Get + Set(value As Boolean) + ViewState("AplicaSeriePaquete") = value End Set End Property @@ -245,6 +266,12 @@ Partial Class Inventarios_PaquetesArmadoDesarmado #Region " PROCESAR - VERIFICAR EXISTENCIAS " Protected Sub BtnVerificarExistenciasArmado_Click(sender As Object, e As EventArgs) + + + AplicaSeriePaquete = False + AplicaLotePaquete = False + AplicaCaducidadPaquete = False + TipoMovimiento = 1 Limpia(TipoMovimiento) @@ -289,24 +316,43 @@ Partial Class Inventarios_PaquetesArmadoDesarmado If ErrorExistencias Then Alert(TextoExistencias, TipoMensaje.MsgAdvertencia) Else - AplicaSerie = CBool(drP("AplicaSerie")) + AplicaSeriePaquete = CBool(drP("AplicaSerie")) + AplicaLotePaquete = CBool(drP("AplicaLote")) + AplicaCaducidadPaquete = CBool(drP("AplicaCaducidad")) BtnGuadarArmado.Visible = True End If - If AplicaSerie Then + + + + If AplicaSeriePaquete Or AplicaLotePaquete Or AplicaCaducidadPaquete Then DivSeriesPaqueteArmado.Visible = True Dim Dt As New DataTable Dt.Columns.Add("Row", GetType(Integer)) Dt.Columns.Add("Serie", GetType(String)) + Dt.Columns.Add("Lote", GetType(String)) + Dt.Columns.Add("FechaCaducidad", GetType(Date)) + For index = 1 To TxtCantidadArmado.Text.ToEntero Dim Row = Dt.NewRow Row("Row") = index Row("Serie") = "" + Row("Lote") = "" + Row("FechaCaducidad") = MinFecha Dt.Rows.Add(Row) Next + + GvSeriesPaqueteArmado.Columns(1).Visible = AplicaSeriePaquete + GvSeriesPaqueteArmado.Columns(2).Visible = AplicaLotePaquete + GvSeriesPaqueteArmado.Columns(3).Visible = AplicaCaducidadPaquete + GvSeriesPaqueteArmado.DataSource = Dt GvSeriesPaqueteArmado.DataBind() + End If + + + UpSeriesPaqueteArmado.Update() CvePaqueteArmado = DdlPaqueteArmado.SelectedValue.ToEntero @@ -328,10 +374,16 @@ Partial Class Inventarios_PaquetesArmadoDesarmado UpGeneralesArmado.Update() End Sub Protected Sub BtnVerificarExistenciasDesarmado_Click(sender As Object, e As EventArgs) + + + DvDesArmadoCaducidad.Visible = False + DvDesArmadoLote.Visible = False + DvDesArmadoSerie.Visible = False + DtDatosDetalle.Clear() BtnGuadarDesarmado.Visible = False TotalDesarmado.Visible = False - AplicaSerie = False + AplicaSeriePaquete = False TxtSerieDesarmado.Text = "" CvePaqueteDesarmado = -1 TipoMovimiento = 2 @@ -362,7 +414,9 @@ Partial Class Inventarios_PaquetesArmadoDesarmado Alert($"No hay existencia suficiente del paquete ""{DdlPaqueteDesarmado.SelectedItem.Text}"" para desarmar. Por favor rectifique y vuelva a intentar", TipoMensaje.MsgAdvertencia) Exit Sub Else - AplicaSerie = CBool(drP("AplicaSerie")) + AplicaSeriePaquete = CBool(drP("AplicaSerie")) + AplicaLotePaquete = CBool(drP("AplicaLote")) + AplicaCaducidadPaquete = CBool(drP("AplicaCaducidad")) End If @@ -391,13 +445,23 @@ Partial Class Inventarios_PaquetesArmadoDesarmado Next End If - If AplicaSerie Then + If AplicaSeriePaquete Or AplicaLotePaquete Or AplicaCaducidadPaquete Then + + DvDesArmadoCaducidad.Visible = AplicaSeriePaquete + DvDesArmadoLote.Visible = AplicaLotePaquete + DvDesArmadoSerie.Visible = AplicaCaducidadPaquete + + GvSeriesPaqueteDesarmado.Columns(1).Visible = AplicaSeriePaquete + GvSeriesPaqueteDesarmado.Columns(2).Visible = AplicaLotePaquete + GvSeriesPaqueteDesarmado.Columns(3).Visible = AplicaCaducidadPaquete DivSeriesPaqueteDesarmado.Visible = True CreaDtSeriesDesarmado() DtSeriesDesarmado.Clear() + GvSeriesPaqueteDesarmado.DataSource = DtSeriesDesarmado GvSeriesPaqueteDesarmado.DataBind() + End If UpSeriesPaqueteDesarmado.Update() @@ -454,42 +518,118 @@ Partial Class Inventarios_PaquetesArmadoDesarmado Case 1 ' ARMADO For Each gvr As GridViewRow In GvDatosArmado.Rows If gvr.DataKey("AplicaSerie") = "True" Then - If gvr.DataKey("Cantidad").ToEntero <> DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", gvr.DataKey("Consec"))).Rows.Count Then - Alert("Es necesario ingresas todas las series de los componentes.", TipoMensaje.MsgAdvertencia) + + ''If gvr.DataKey("Cantidad").ToEntero <> DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", gvr.DataKey("Consec"))).Rows.Count Then + '' Alert("Es necesario ingresas todas las series de los componentes.", TipoMensaje.MsgAdvertencia) + '' Exit Sub + ''End If + 'If gvr.FCTextBox("TxtSerie") Then + + 'End If + + 'If gvr.FCTextBox("TxtSerie").Text.Trim = "" Then + ' Alert("Es necesario ingresas todas las series de los componentes.", TipoMensaje.MsgAdvertencia) + ' Exit Sub + 'End If + + End If + + If gvr.DataKey("AplicaLote") = "True" Then + If gvr.FCTextBox("TxtLote").Text.Trim = "" Then + Alert("Es necesario ingresas todos los lotes de los componentes.", TipoMensaje.MsgAdvertencia) Exit Sub End If End If + + If gvr.DataKey("AplicaCaducidad") = "True" Then + + If gvr.FCTextBox("TxtCaducidad").Text.ToDate <= MinFecha Then + Alert("Es necesario ingresas todos las fechas de caducidad de los componentes.", TipoMensaje.MsgAdvertencia) + Exit Sub + End If + + End If + Next Case 2 ' DESARMADO For Each gvr As GridViewRow In GvDatosDesarmado.Rows + If gvr.DataKey("AplicaSerie") = "True" Then - If gvr.DataKey("Cantidad").ToEntero <> DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", gvr.DataKey("Consec"))).Rows.Count Then + + 'If gvr.DataKey("AplicaSerie") = "True" Then + ' 'If gvr.DataKey("Cantidad").ToEntero <> DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", gvr.DataKey("Consec"))).Rows.Count Then + ' ' Alert("Es necesario ingresas todas las series de los componentes.", TipoMensaje.MsgAdvertencia) + ' ' Exit Sub + ' 'End If + 'End If + + If gvr.FCTextBox("Serie").Text.Trim = "" Then Alert("Es necesario ingresas todas las series de los componentes.", TipoMensaje.MsgAdvertencia) Exit Sub End If + End If + + If gvr.DataKey("AplicaLote") = "True" Then + If gvr.FCTextBox("TxtLote").Text.Trim = "" Then + Alert("Es necesario ingresas todos los lotes de los componentes.", TipoMensaje.MsgAdvertencia) + Exit Sub + End If + End If + + If gvr.DataKey("AplicaCaducidad") = "True" Then + + If gvr.FCTextBox("TxtCaducidad").Text.ToDate <= MinFecha Then + Alert("Es necesario ingresas todos las fechas de caducidad de los componentes.", TipoMensaje.MsgAdvertencia) + Exit Sub + End If + + End If + + Next End Select 'VALIDA SI EL PAQUETE ES DE SERIE QUE SE INGRESEN TODAS LAS SERIES (CANTIDAD) - If AplicaSerie Then + If AplicaSeriePaquete Or AplicaLotePaquete Or AplicaCaducidadPaquete Then Select Case (Tipo) Case 1 ' ARMADO For Each gvr As GridViewRow In GvSeriesPaqueteArmado.Rows - If gvr.FCTextBox("TxtSerie").Text.Trim = "" Then - Alert("Es necesario indicar las series del paquete a armar.", TipoMensaje.MsgAdvertencia) - Exit Sub + + If AplicaSeriePaquete Then + If gvr.FCTextBox("TxtSerie").Text.Trim = "" Then + Alert("Es necesario indicar las series del paquete a armar.", TipoMensaje.MsgAdvertencia) + Exit Sub + End If End If + + If AplicaLotePaquete Then + If gvr.FCTextBox("TxtLote").Text.Trim = "" Then + Alert("Es necesario indicar los lotes del paquete a armar.", TipoMensaje.MsgAdvertencia) + Exit Sub + End If + End If + + If AplicaCaducidadPaquete Then + If gvr.FCTextBox("TxtCaducidad").Text.ToDate <= MinFecha Then + Alert("Es necesario indicar fechas de caducidad validas del paquete a armar.", TipoMensaje.MsgAdvertencia) + Exit Sub + End If + End If + Next Case 2 ' DESARMADO + If TxtCantidadDesarmado.Text.ToEntero <> DtSeriesDesarmado.Rows.Count Then - Alert("Es necesario indicar las series del paquete a desarmar.", TipoMensaje.MsgAdvertencia) + Alert("Es necesario indicar las series, lotes o Fecha de caducidad del paquete a desarmar.", TipoMensaje.MsgAdvertencia) Exit Sub End If + End Select End If + Dim TextoError As New StringBuilder If Tipo = 1 Then Dim ObjInventarioVal As New ClsInventarios @@ -572,7 +712,7 @@ Partial Class Inventarios_PaquetesArmadoDesarmado End If - Exit Sub + Dim ObjInventario As New ClsInventarios @@ -669,12 +809,17 @@ Partial Class Inventarios_PaquetesArmadoDesarmado End If - If AplicaSerie Then + If AplicaSeriePaquete Then Dim ContadorPaquete = 1 Dim DtSeriesComponentes As New DataTable For Each Gvr As GridViewRow In GvSeriesPaqueteArmado.Rows 'AGREGA MOVTO DETALLE DE LA ENTRADA DEL PAQUETE - If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, 1, CveUMTemp, CvePSTemp, PUTemp, CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Gvr.FCTextBox("TxtSerie").Text.Trim) Then + + Dim Serie As String = Gvr.FCTextBox("TxtSerie").Text.Trim + Dim Lote As String = Gvr.FCTextBox("TxtLote").Text.Trim + Dim FechaCaducidad As Date = If(Gvr.FCTextBox("TxtCaducidad").Text.ToDate <= MinFecha, MinFecha, Gvr.FCTextBox("TxtCaducidad").Text.ToDate) + + If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, 1, CveUMTemp, CvePSTemp, PUTemp, CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Serie, Lote:=Lote, FechaCaducidad:=FechaCaducidad) Then TieneError = True MensajeError = "Ocurrió un error al guardar los detalles con serie del movimiento de entrada" Exit For @@ -736,10 +881,17 @@ Partial Class Inventarios_PaquetesArmadoDesarmado 'If AplicaSeccion Then ' CveSeccionAlmacen = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, CveAlmacenDesarmado, CvePaqueteDesarmado).FiltroPrimeroValor("CveSeccionAlmacen").ToEntero 'End If - If AplicaSerie Then + If AplicaSeriePaquete Or AplicaLotePaquete Or AplicaCaducidadPaquete Then + + For Each Gvr As GridViewRow In GvSeriesPaqueteDesarmado.Rows + + Dim Serie As String = If(AplicaSeriePaquete, Gvr.DataKey("Serie").Trim, "-1") + Dim Lote As String = If(AplicaLotePaquete, Gvr.DataKey("Lote").Trim, "-1") + Dim FechaCaducidad As Date = If(AplicaCaducidadPaquete, Gvr.DataKey("FechaCaducidad").Trim.ToDate, MinFecha) + 'AGREGA MOVTO DETALLE DE LA SALIDA DEL PAQUETE - If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, 1, CveUMTemp, CvePSTemp, 0, CveSeccionAlmacen:=-3, Serie:=Gvr.DataKey("Serie").ToString) Then + If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, 1, CveUMTemp, CvePSTemp, 0, CveSeccionAlmacen:=-3, Serie:=Serie, Lote:=Lote, FechaCaducidad:=FechaCaducidad) Then TieneError = True MensajeError = "Ocurrió un error al guardar los detalles con serie del movimiento de salida" Exit For @@ -751,6 +903,7 @@ Partial Class Inventarios_PaquetesArmadoDesarmado MensajeError = "Ocurrió un error al guardar los detalles con serie del movimiento de salida" Exit For End If + Next Else If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, TxtCantidadDesarmado.Text.ToDecimal, CveUMTemp, CvePSTemp, 0, CveSeccionAlmacen:=CveSeccionAlmacen) Then @@ -878,7 +1031,7 @@ Partial Class Inventarios_PaquetesArmadoDesarmado Private Sub Limpia(Tipo As Integer) DtDatosDetalle.Clear() - AplicaSerie = False + AplicaSeriePaquete = False 'If Tipo = 1 Then @@ -1441,6 +1594,11 @@ Partial Class Inventarios_PaquetesArmadoDesarmado Dt.Columns.Add("Row", GetType(Integer)) Dt.Columns.Add("Serie", GetType(String)) + 'Dim DrPS As DataRow = Nothing + 'DrPS = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=_DdlPaqueteArmado.SelectedValue.ToEntero).FiltroPrimero("") + 'Dim AplicaSerie + + For Each Row As DataRow In DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", CType(sender, LinkButton).CommandArgument.ToEntero)).Rows If i > TxtCantidadArmado.Text.ToEntero Then Exit For @@ -1456,6 +1614,9 @@ Partial Class Inventarios_PaquetesArmadoDesarmado GvSeriesPaqueteArmado.DataSource = Dt GvSeriesPaqueteArmado.DataBind() + + + UpSeriesPaqueteArmado.Update() End Sub @@ -1465,15 +1626,23 @@ Partial Class Inventarios_PaquetesArmadoDesarmado DtSeriesDesarmado = New DataTable DtSeriesDesarmado.Columns.Add("Row", GetType(Integer)) DtSeriesDesarmado.Columns.Add("Serie", GetType(String)) + DtSeriesDesarmado.Columns.Add("Lote", GetType(String)) + DtSeriesDesarmado.Columns.Add("FechaCaducidad", GetType(Date)) + + + End If End Sub Protected Sub BtnAgregarSerieDesarmado_Click(sender As Object, e As EventArgs) - Dim Serie = TxtSerieDesarmado.Text.Trim + Dim Serie As String = If(AplicaSeriePaquete, TxtSerieDesarmado.Text.Trim, "-1") + Dim Lote As String = If(AplicaLotePaquete, TxtLoteDesarmado.Text.Trim, "-1") + Dim FechaCaducidad As Date = If(AplicaCaducidadPaquete, TxtDesarmadoCaducidad.Text.ToDate, MinFecha) 'VERIFICA EXISTENCIAS Dim ObjInventarios As New ClsInventarios Dim CveUMTemp = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePaqueteDesarmado).FiltroPrimeroValor("CveUM").ToEntero - Dim Existencia = ObjInventarios.GetExistenciasPS(CvePaqueteDesarmado, CveUMTemp, UsuarioActual.CveEmpresa, CveAlmacenDesarmado, FechaMovto:=TxtFechaDesarmado.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), Serie:=Serie, CveVendedor:=CveVendedor, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente)) + Dim Existencia = ObjInventarios.GetExistenciasPS(CvePaqueteDesarmado, CveUMTemp, UsuarioActual.CveEmpresa, CveAlmacenDesarmado, FechaMovto:=TxtFechaDesarmado.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), Serie:=Serie, + CveVendedor:=CveVendedor, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), Lote:=Lote, FechaCaducidad:=FechaCaducidad) If Existencia < 1 Then Alert($"No hay existencia suficiente con la Serie definida ""{Serie}"". Por favor rectifique y vuelva a intentar", TipoMensaje.MsgAdvertencia) @@ -1495,9 +1664,15 @@ Partial Class Inventarios_PaquetesArmadoDesarmado Dim Row = DtSeriesDesarmado.NewRow Row("Row") = DtSeriesDesarmado.MAX("Row").ToEntero + 1 Row("Serie") = TxtSerieDesarmado.Text.Trim + Row("Lote") = TxtLoteDesarmado.Text.Trim + Row("FechaCaducidad") = TxtDesarmadoCaducidad.Text.ToDate + DtSeriesDesarmado.Rows.Add(Row) TxtSerieDesarmado.Text = "" + TxtLoteDesarmado.Text = "" + TxtDesarmadoCaducidad.Text = "" + If DtSeriesDesarmado.Rows.Count >= TxtCantidadDesarmado.Text.ToEntero Then BtnAgregarSerieDesarmado.Enabled = False diff --git a/OS/OrdenesServicios.aspx.vb b/OS/OrdenesServicios.aspx.vb index cfb0e1c7d..13e26033c 100644 --- a/OS/OrdenesServicios.aspx.vb +++ b/OS/OrdenesServicios.aspx.vb @@ -3090,9 +3090,7 @@ Partial Class OS_OrdenesServicios Protected Sub LnkModalMaterialUtilizado_Click(sender As Object, e As EventArgs) - If UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then - If TxtPacienteModal.Text.Trim.Length = 0 Then Alert("Debe de proporcionar el paciente.", TipoMensaje.MsgAdvertencia) Exit Sub @@ -3102,7 +3100,6 @@ Partial Class OS_OrdenesServicios Alert("Debe de proporcionar el episodio.", TipoMensaje.MsgAdvertencia) Exit Sub End If - End If Dim CveAlmacenActual As Integer = DTSolicitudDev.FiltroPrimeroValor("CveAlmacenActual").ToEntero @@ -3117,7 +3114,6 @@ Partial Class OS_OrdenesServicios For Each GVRow As GridViewRow In GvMU.Rows TotalSeleccionado = TotalSeleccionado + GVRow.FCTextBox("TxtUtilizado").Text.ToDecimal Next - If TotalSeleccionado = 0 Then Alert("No se selecciono ningun material", TipoMensaje.MsgAdvertencia) Exit Sub @@ -3128,7 +3124,6 @@ Partial Class OS_OrdenesServicios Alert("No se encontró almacen de entrega por adelantado", TipoMensaje.MsgAdvertencia) Exit Sub End If - End If Dim ProcesoOK As Boolean = True @@ -3145,7 +3140,6 @@ Partial Class OS_OrdenesServicios Dim CvePS As Integer = GVRow.DataKey("CvePS").ToEntero If CantidadRegistro > 0 Then - Dim Serie As String = If(GVRow.DataKey("Serie") = "", "-1", GVRow.DataKey("Serie")) Dim Lote As String = If(GVRow.DataKey("Lote") = "", "-1", GVRow.DataKey("Lote")) Dim FechaCaducidad As DateTime = If(GVRow.DataKey("FechaCaducidad") = "", MinFecha, GVRow.DataKey("FechaCaducidad").ToDate) @@ -3316,22 +3310,17 @@ Partial Class OS_OrdenesServicios Else ProcesoOK = False End If - If ProcesoOK Then If Not ObjOS.UpdateVentaOS(Respuesta.CveVenta, CveOS, TxtPacienteModal.Text.Trim, TxtEpisodioModal.Text.Trim) Then ProcesoOK = False End If End If End If - - If ProcesoOK Then If Not ObjOS.UpdateOrdenesServiciosFinaliza(CveOS, -1, -1, UsuarioActual.CveEmpresa, Observaciones:=TxtObservacionModal.Text.Trim) Then ProcesoOK = False End If End If - - End If @@ -3428,7 +3417,6 @@ Partial Class OS_OrdenesServicios Else ProcesoOK = False End If - Return Respuesta End Function @@ -3440,15 +3428,11 @@ Partial Class OS_OrdenesServicios End Sub End Class - - Protected Sub LnkActualizarUsaurioAtendio_Click(sender As Object, e As EventArgs) Dim ObjOs As New ClsOS Dim ProcesoOk As Boolean = True - - If DdlUsuarioAtendio.SelectedValue.ToEntero > 0 Then For Each GvRow As GridViewRow In GvPS.Rows If Not ObjOs.UpdateOrdenesServiciosAsignadas(GvRow.DataKey("CveOSDetalle").ToEntero, DdlUsuarioAtendio.SelectedValue.ToEntero, MinFecha, DateTime.Parse(MinFecha.ToShortDateString), UsuarioActual.CveEmpresa) Then @@ -3463,8 +3447,6 @@ Partial Class OS_OrdenesServicios Else Alert("Debe de seleccionar un ténico para actualziar", TipoMensaje.MsgAdvertencia) End If - - ObjOs.Dispose() End Sub diff --git a/OS/RepOSMedicas.aspx b/OS/RepOSMedicas.aspx index 621e7e27c..c06149212 100644 --- a/OS/RepOSMedicas.aspx +++ b/OS/RepOSMedicas.aspx @@ -85,10 +85,19 @@
- + <%--
-
+
--%> + + +
+ + + + +
+ @@ -98,7 +107,7 @@
-
@@ -109,11 +118,11 @@
diff --git a/OS/RepOSMedicas.aspx.vb b/OS/RepOSMedicas.aspx.vb index a231dbf39..65452d1d6 100644 --- a/OS/RepOSMedicas.aspx.vb +++ b/OS/RepOSMedicas.aspx.vb @@ -51,14 +51,14 @@ Partial Class OS_RepOSMedicas 'CargaClientes Dim EsWS As Boolean = If(UsuarioActual.Empresa.Funcionalidad(105) = "1" Or UsuarioActual.Empresa.Funcionalidad(141) = "1", True, False) - If EsWS Then - DdlClientes.setEsWebService(True) - Else - DdlClientes.setEsWebService(False) - DdlClientes.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1) - DdlClientes.DataBind() - DdlClientes.ddl.Items.Insert(0, New ListItem("Todos", "-1")) - End If + 'If EsWS Then + ' DdlClientes.setEsWebService(True) + 'Else + ' DdlClientes.setEsWebService(False) + ' DdlClientes.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1) + ' DdlClientes.DataBind() + ' DdlClientes.ddl.Items.Insert(0, New ListItem("Todos", "-1")) + 'End If 'Vendedor DdlVendedor.DataSource = GlobalDTVendedores(UsuarioActual.CveEmpresa, VendedorTipo:=-1).FiltraParametros("VendedorTipo in (1,4)") 'vendedores y vendedores de piso @@ -80,6 +80,48 @@ Partial Class OS_RepOSMedicas DdlProcedimiento.DataSource = GlobalDTProcedimientos(UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True' ") DdlProcedimiento.DataBind() + + + Dim ObjVentas As New ClsVentas + + If ObjVentas.GetMedicosEspecialidades(-1, UsuarioActual.CveEmpresa, -1) Then + DdlEspecialidad.DataSource = ObjVentas.DtResultados + Else + DdlEspecialidad.DataSource = Nothing + End If + + ObjVentas.Dispose() + + DdlEspecialidad.DataBind() + DdlEspecialidad.Items.Insert(0, New ListItem("Todas", "-1")) + + + Dim objcliente As New ClsClientes + + If objcliente.GetClienteSucursales(-1, UsuarioActual.CveEmpresa) Then + DdlClienteSucursal.DataSource = objcliente.DtResultados + Else + DdlClienteSucursal.DataSource = Nothing + End If + + objcliente.Dispose() + + DdlClienteSucursal.DataBind() + DdlClienteSucursal.Items.Insert(0, New ListItem("Todos", "-1")) + + + + 'Dim EsWS As Boolean = If(UsuarioActual.Empresa.Funcionalidad(105) = "1" Or UsuarioActual.Empresa.Funcionalidad(141) = "1", True, False) + 'If EsWS Then + ' DdlCliente.setEsWebService(True) + + 'Else + ' DdlCliente.setEsWebService(False) + ' DdlCliente.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1) + ' DdlCliente.DataBind() + ' DdlCliente.ddl.Items.Insert(0, New ListItem("Seleccione Uno", "-1")) + 'End If + End Sub @@ -97,11 +139,13 @@ Partial Class OS_RepOSMedicas Dim ObjOS As New ClsOS Dim FechaI As Date = If(txtFechaI.Text.Trim = "", MinFecha, txtFechaI.Text.ToDate) Dim FechaF As Date = If(txtFechaF.Text.Trim = "", MaxFecha, txtFechaF.Text.ToDate) - Dim Cvecliente As Integer = If(DdlClientes.SelectedValue.ToEntero > 0, DdlClientes.SelectedValue.ToEntero, -1) + Dim Cvecliente As Integer = DdlClienteSucursalCliente() + Dim CveClienteSucursal As Integer = DdlClienteSucursalSucursal() LnkPersonalizar.Visible = False If ObjOS.GetRepOrdenesServicioMedicasRep(FechaI, FechaF, Cvecliente, DdlVendedor.SelectedValue.ToEntero, DdlEstatusOS.SelectedValue.ToEntero, DdlTecnico.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, - CveMedico:=DdlMedico.SelectedValue.ToEntero, CveProcedimiento:=DdlProcedimiento.SelectedValue.ToEntero) Then + CveMedico:=DdlMedico.SelectedValue.ToEntero, CveProcedimiento:=DdlProcedimiento.SelectedValue.ToEntero, CveEspecialidad:=DdlEspecialidad.SelectedValue.ToEntero, + CveClienteSucursal:=CveClienteSucursal) Then GvDatos.DataSource = ObjOS.DtResultados If ObjOS.DtResultados IsNot Nothing AndAlso ObjOS.DtResultados.Rows.Count > 0 Then LnkPersonalizar.Visible = True @@ -127,12 +171,12 @@ Partial Class OS_RepOSMedicas #End Region - Private Sub CargaClientes() - DdlClientes.ddl.Items.Clear() - DdlClientes.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1) '.FiltraParametros($"CveClienteClasificacion = {DdlClienteClasificacion.SelectedValue.ToEntero} OR {DdlClienteClasificacion.SelectedValue.ToEntero} = -1") - DdlClientes.DataBind() - DdlClientes.ddl.Items.Insert(0, New ListItem("Todos", "-1")) - End Sub + 'Private Sub CargaClientes() + ' DdlClientes.ddl.Items.Clear() + ' DdlClientes.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1) '.FiltraParametros($"CveClienteClasificacion = {DdlClienteClasificacion.SelectedValue.ToEntero} OR {DdlClienteClasificacion.SelectedValue.ToEntero} = -1") + ' DdlClientes.DataBind() + ' DdlClientes.ddl.Items.Insert(0, New ListItem("Todos", "-1")) + 'End Sub Protected Sub DdlProyecto_SelectedIndexChanged(sender As Object, e As System.EventArgs) Handles DdlProyecto.SelectedIndexChanged CargarSubProyecto(DdlSubProyecto, DdlProyecto.SelectedValue) @@ -175,19 +219,31 @@ Partial Class OS_RepOSMedicas End Sub Protected Sub BtnPersonalizar_Click(sender As Object, e As System.EventArgs) Handles BtnPersonalizar.Click - - Personaliza() - - End Sub Private Sub Personaliza() - GvDatos.Columns(13).Visible = ChkObservaciones.Checked - CargaDatos() - End Sub + Private Function DdlClienteSucursalCliente() As Integer + If DdlClienteSucursal.SelectedValue = "-1" Then + Return -1 + Else + Dim array As String() = DdlClienteSucursal.SelectedValue.Split("|"c) + Return If(array(0).ToEntero > 0, array(0).ToEntero, -1) + End If + End Function + + Private Function DdlClienteSucursalSucursal() As Integer + If DdlClienteSucursal.SelectedValue = "-1" Then + Return -1 + Else + Dim array As String() = DdlClienteSucursal.SelectedValue.Split("|"c) + Return If(array(1).ToEntero > 0, array(1).ToEntero, -1) + End If + End Function + + End Class diff --git a/Ventas/CatPreciosLista.aspx.vb b/Ventas/CatPreciosLista.aspx.vb index 2d3069d5b..70a637066 100644 --- a/Ventas/CatPreciosLista.aspx.vb +++ b/Ventas/CatPreciosLista.aspx.vb @@ -65,25 +65,44 @@ Partial Class Ventas_CatPreciosLista End Sub Protected Sub BtnAgregarCatalogo_Click(sender As Object, e As EventArgs) Handles BtnAgregarCatalogo.Click - Dim ObjVta As New ClsVentas + Dim ActualizarFranquicias As Boolean = False - If EsEditar = 0 Then - If ObjVta.AddPrecioLista(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, TxtPrecioLista.Text, ChkPredeterminada.Checked, 0) > 0 Then - Alert("El Precio de Lista se agregó correctamente", TipoMensaje.MsgInformacion) - Else - Alert("Ocurrió un error al agregar el Precio de Lista", TipoMensaje.MsgError) - End If - ElseIf EsEditar = 1 Then - If ObjVta.UpdatePrecioLista(TxtPrecioLista.Text, chkEstatus.Checked, UsuarioActual.CveUsuario, 0, ChkPredeterminada.Checked, CvePrecioLista) Then - Alert("El Precio de Lista se editó correctamente", TipoMensaje.MsgInformacion) - Else - Alert("Ocurrió un error al editar al Precio de Lista", TipoMensaje.MsgError) - End If - EsEditar = 0 - dvEstatus.Visible = False - BtnAgregarCatalogo.Text = "Agregar" + If UsuarioActual.Empresa.Funcionalidad(563) <> "" AndAlso UsuarioActual.Empresa.Funcionalidad(109) = "1" Then + ActualizarFranquicias = True + End If + + Dim ObjVta As New ClsVentas + ObjVta.IniciaTransacSQL() + Dim TieneError As Boolean = False + Try + If EsEditar = 0 Then + If ObjVta.AddPrecioLista(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, TxtPrecioLista.Text, ChkPredeterminada.Checked, 0, UpdateFranquicia:=ActualizarFranquicias) > 0 Then + Alert("El Precio de Lista se agregó correctamente", TipoMensaje.MsgInformacion) + Else + Alert("Ocurrió un error al agregar el Precio de Lista", TipoMensaje.MsgError) + TieneError = True + End If + ElseIf EsEditar = 1 Then + If ObjVta.UpdatePrecioLista(TxtPrecioLista.Text, chkEstatus.Checked, UsuarioActual.CveUsuario, 0, ChkPredeterminada.Checked, CvePrecioLista, UpdateFranquicia:=ActualizarFranquicias) Then + Alert("El Precio de Lista se editó correctamente", TipoMensaje.MsgInformacion) + Else + Alert("Ocurrió un error al editar al Precio de Lista", TipoMensaje.MsgError) + TieneError = True + End If + EsEditar = 0 + dvEstatus.Visible = False + BtnAgregarCatalogo.Text = "Agregar" + End If + Catch ex As Exception + TieneError = True + GuardaLog(ex.ToString()) + End Try + + If TieneError Then + ObjVta.RollBack() + Else + ObjVta.Commit() End If - GlobalDTPrecioListas(UsuarioActual.CveEmpresa) = Nothing RegistraScript("$('#divAgregar').modal('hide')") ObjVta.Dispose() @@ -94,6 +113,7 @@ Partial Class Ventas_CatPreciosLista UpDatos.Update() UpBodyCo.Update() + RecargaGlobal() End Sub Protected Sub GvDatos_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvDatos.RowDeleting @@ -105,6 +125,8 @@ Partial Class Ventas_CatPreciosLista ObjPrecioLista.Dispose() CargaDatos() UpDatos.Update() + + RecargaGlobal() End Sub Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound @@ -131,155 +153,158 @@ Partial Class Ventas_CatPreciosLista dvEstatus.Visible = False UpBodyCo.Update() UpFooter.Update() - End Sub - + End Sub + Private Sub RecargaGlobal() + GlobalDTPrecioListas(UsuarioActual.CveEmpresa) = Nothing + End Sub + #Region "VIEJO" - ' Public Property PuedeEliminar As Boolean - ' Get - ' Return CBool(ViewState("PuedeEditar")) - ' End Get - ' Set(value As Boolean) - ' ViewState("PuedeEditar") = value - ' End Set - ' End Property - - ' Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load - ' If Not Page.IsPostBack Then - - ' CargaDatos() - - ' 'Permiso Registro - ' If UsuarioActual.TienePermisoProceso(132) Then LbAgregar.Enabled = True Else LbAgregar.Enabled = False - - ' 'Permiso Eliminar - ' If UsuarioActual.TienePermisoProceso(134) Then GvDatos.Columns(5).Visible = True Else GvDatos.Columns(6).Visible = False - ' End If - ' End Sub - - ' Private Sub CargaDatos() - ' Dim ObjListas As New ClsVentas - ' If ObjListas.GetPrecioListas(CveEmpresa:=UsuarioActual.CveEmpresa) Then - ' GvDatos.DataSource = ObjListas.DtResultados - ' GvDatos.DataBind() - ' Else - ' Me.GvDatos.DataSource = Nothing - ' End If - - ' If ObjListas.GetPrecioListas(-1) Then - ' GlobalDTPrecioListas(-1) = ObjListas.DtResultados - ' End If - - ' ObjListas.Dispose() - ' OrdenaDatos() - ' End Sub - - ' Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles LbAgregar.Click - ' Dim ObjListas As New ClsVentas - - ' If HdnModalidad.Value = "I" Then - ' If ObjListas.AddPrecioLista(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, TxtPrecioLista.Text.Trim, TxtPorcentaje.Text.Trim.ToDouble) Then - ' TxtPrecioLista.Text = "" - ' TxtPorcentaje.Text = "" - ' Alert("La nueva Lista se guardó correctamente.", TipoMensaje.MsgInformacion) - ' UpTitulos.Update() - ' CargaDatos() - ' UpDatos.Update() - ' OcultaDiv() - ' End If - ' ObjListas.Dispose() - ' Else - ' If HdnID.Value.ToEntero <> -1 Then - ' If ObjListas.UpdatePrecioLista(TxtPrecioLista.Text.Trim, True, UsuarioActual.CveUsuario, TxtPorcentaje.Text.Trim.ToDouble, HdnID.Value.ToEntero) Then - ' TxtPrecioLista.Text = "" - ' TxtPorcentaje.Text = "" - ' Alert("La lista se actualizó correctamente.", TipoMensaje.MsgInformacion) - ' UpTitulos.Update() - ' CargaDatos() - ' UpDatos.Update() - ' OcultaDiv() - ' End If - ' End If - ' End If - - ' End Sub - - '#Region "G V D A T O S" - ' Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound - ' If e.Row.RowType = DataControlRowType.DataRow Then - - - ' Dim URL As String = String.Format("javascript:CleanObjects();SetValue('HdnModalidad', 'U');SetValue('HdnID', '{0}'); SetObjects('{1}','{2}');ShowDivRegistro();return false;", e.Row.DBCampo("CvePrecioLista").ToEntero, e.Row.DBCampo("PrecioLista"), e.Row.DBCampo("Porcentaje")) - - ' 'GeneroLigas - ' Dim Liga As String = String.Format("", URL) - ' e.Row.VerticalAlign = VerticalAlign.Middle - ' e.Row.FCLinkButton("ImgE").OnClientClick = URL - ' End If - - - - ' End Sub - - ' Protected Sub GvDatos_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvDatos.RowDeleting - ' Dim ObjListas As New ClsVentas - ' If ObjListas.RemovePrecioLista(GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero) Then - ' GvDatos.EditIndex = -1 - ' ViewState("DTPrecioListas") = ObjListas.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa) - ' Alert("La Lista se eliminó correctamente.", TipoMensaje.MsgInformacion) - ' End If - - ' If ObjListas.GetPrecioListas(-1) Then - ' GlobalDTPrecioListas(-1) = ObjListas.DtResultados - ' End If - - ' ObjListas.Dispose() - - ' CargaDatos() - ' UpDatos.Update() - ' End Sub - - - - ' Protected Sub GvDatos_RowUpdating(sender As Object, e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles GvDatos.RowUpdating - ' Dim ObjListas As New ClsVentas - ' Dim PrecioLista As String = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("TxtPrecioLista"), TextBox).Text.Trim - ' Dim Porcentaje As Double = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("TxtPorcentaje"), TextBox).Text.Trim.ToDouble - ' Dim Estatus As Boolean = GvDatos.Rows(e.RowIndex).FCCheckBox("ChkEstatus").Checked - ' Dim CvePrecioLista As Integer = GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero - - ' If ObjListas.UpdatePrecioLista(PrecioLista, Estatus, UsuarioActual.CveUsuario, Porcentaje, CvePrecioLista) Then - ' GvDatos.EditIndex = -1 - ' ViewState("DTPrecioListas") = ObjListas.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa) - ' Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion) - ' End If - - ' If ObjListas.GetPrecioListas(-1) Then - ' GlobalDTPrecioListas(-1) = ObjListas.DtResultados - ' End If - - ' ObjListas.Dispose() - - ' OrdenaDatos() - ' End Sub - - '#End Region - - - '#Region " O R D E N A M I E N T O JAVASCRIPT" - ' Private Sub OrdenaDatos() - ' If (GvDatos.Rows.Count > 0) Then - ' GvDatos.UseAccessibleHeader = True - ' GvDatos.HeaderRow.TableSection = TableRowSection.TableHeader - ' RegistraScript("OrdenarGV();") - ' End If - ' End Sub - '#End Region - - - - ' Private Sub OcultaDiv() - ' ScriptManager.RegisterStartupScript(Me, Me.GetType, "Llave", "HideDivRegistro();", True) - ' End Sub + ' Public Property PuedeEliminar As Boolean + ' Get + ' Return CBool(ViewState("PuedeEditar")) + ' End Get + ' Set(value As Boolean) + ' ViewState("PuedeEditar") = value + ' End Set + ' End Property + + ' Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load + ' If Not Page.IsPostBack Then + + ' CargaDatos() + + ' 'Permiso Registro + ' If UsuarioActual.TienePermisoProceso(132) Then LbAgregar.Enabled = True Else LbAgregar.Enabled = False + + ' 'Permiso Eliminar + ' If UsuarioActual.TienePermisoProceso(134) Then GvDatos.Columns(5).Visible = True Else GvDatos.Columns(6).Visible = False + ' End If + ' End Sub + + ' Private Sub CargaDatos() + ' Dim ObjListas As New ClsVentas + ' If ObjListas.GetPrecioListas(CveEmpresa:=UsuarioActual.CveEmpresa) Then + ' GvDatos.DataSource = ObjListas.DtResultados + ' GvDatos.DataBind() + ' Else + ' Me.GvDatos.DataSource = Nothing + ' End If + + ' If ObjListas.GetPrecioListas(-1) Then + ' GlobalDTPrecioListas(-1) = ObjListas.DtResultados + ' End If + + ' ObjListas.Dispose() + ' OrdenaDatos() + ' End Sub + + ' Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles LbAgregar.Click + ' Dim ObjListas As New ClsVentas + + ' If HdnModalidad.Value = "I" Then + ' If ObjListas.AddPrecioLista(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, TxtPrecioLista.Text.Trim, TxtPorcentaje.Text.Trim.ToDouble) Then + ' TxtPrecioLista.Text = "" + ' TxtPorcentaje.Text = "" + ' Alert("La nueva Lista se guardó correctamente.", TipoMensaje.MsgInformacion) + ' UpTitulos.Update() + ' CargaDatos() + ' UpDatos.Update() + ' OcultaDiv() + ' End If + ' ObjListas.Dispose() + ' Else + ' If HdnID.Value.ToEntero <> -1 Then + ' If ObjListas.UpdatePrecioLista(TxtPrecioLista.Text.Trim, True, UsuarioActual.CveUsuario, TxtPorcentaje.Text.Trim.ToDouble, HdnID.Value.ToEntero) Then + ' TxtPrecioLista.Text = "" + ' TxtPorcentaje.Text = "" + ' Alert("La lista se actualizó correctamente.", TipoMensaje.MsgInformacion) + ' UpTitulos.Update() + ' CargaDatos() + ' UpDatos.Update() + ' OcultaDiv() + ' End If + ' End If + ' End If + + ' End Sub + + '#Region "G V D A T O S" + ' Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound + ' If e.Row.RowType = DataControlRowType.DataRow Then + + + ' Dim URL As String = String.Format("javascript:CleanObjects();SetValue('HdnModalidad', 'U');SetValue('HdnID', '{0}'); SetObjects('{1}','{2}');ShowDivRegistro();return false;", e.Row.DBCampo("CvePrecioLista").ToEntero, e.Row.DBCampo("PrecioLista"), e.Row.DBCampo("Porcentaje")) + + ' 'GeneroLigas + ' Dim Liga As String = String.Format("", URL) + ' e.Row.VerticalAlign = VerticalAlign.Middle + ' e.Row.FCLinkButton("ImgE").OnClientClick = URL + ' End If + + + + ' End Sub + + ' Protected Sub GvDatos_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvDatos.RowDeleting + ' Dim ObjListas As New ClsVentas + ' If ObjListas.RemovePrecioLista(GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero) Then + ' GvDatos.EditIndex = -1 + ' ViewState("DTPrecioListas") = ObjListas.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa) + ' Alert("La Lista se eliminó correctamente.", TipoMensaje.MsgInformacion) + ' End If + + ' If ObjListas.GetPrecioListas(-1) Then + ' GlobalDTPrecioListas(-1) = ObjListas.DtResultados + ' End If + + ' ObjListas.Dispose() + + ' CargaDatos() + ' UpDatos.Update() + ' End Sub + + + + ' Protected Sub GvDatos_RowUpdating(sender As Object, e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles GvDatos.RowUpdating + ' Dim ObjListas As New ClsVentas + ' Dim PrecioLista As String = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("TxtPrecioLista"), TextBox).Text.Trim + ' Dim Porcentaje As Double = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("TxtPorcentaje"), TextBox).Text.Trim.ToDouble + ' Dim Estatus As Boolean = GvDatos.Rows(e.RowIndex).FCCheckBox("ChkEstatus").Checked + ' Dim CvePrecioLista As Integer = GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero + + ' If ObjListas.UpdatePrecioLista(PrecioLista, Estatus, UsuarioActual.CveUsuario, Porcentaje, CvePrecioLista) Then + ' GvDatos.EditIndex = -1 + ' ViewState("DTPrecioListas") = ObjListas.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa) + ' Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion) + ' End If + + ' If ObjListas.GetPrecioListas(-1) Then + ' GlobalDTPrecioListas(-1) = ObjListas.DtResultados + ' End If + + ' ObjListas.Dispose() + + ' OrdenaDatos() + ' End Sub + + '#End Region + + + '#Region " O R D E N A M I E N T O JAVASCRIPT" + ' Private Sub OrdenaDatos() + ' If (GvDatos.Rows.Count > 0) Then + ' GvDatos.UseAccessibleHeader = True + ' GvDatos.HeaderRow.TableSection = TableRowSection.TableHeader + ' RegistraScript("OrdenarGV();") + ' End If + ' End Sub + '#End Region + + + + ' Private Sub OcultaDiv() + ' ScriptManager.RegisterStartupScript(Me, Me.GetType, "Llave", "HideDivRegistro();", True) + ' End Sub #End Region - + End Class diff --git a/Ventas/Clientes.aspx.vb b/Ventas/Clientes.aspx.vb index 6542dd47e..34288b8e0 100644 --- a/Ventas/Clientes.aspx.vb +++ b/Ventas/Clientes.aspx.vb @@ -777,14 +777,15 @@ Partial Class Clientes 'CARGA LOS FILTROS DEL TAB COMPORTAMIENTO VENTA TabComportamientoVentas.Visible = True - CargaFiltros() - - 'JM 05-02-19: CRM - If UsuarioActual.Empresa.UsaCRM Then - VerificaVinculacion() - UpAccionesCRM.Update() - End If - + CargaFiltros() + + 'JM 05-02-19: CRM + 'If UsuarioActual.Empresa.UsaCRM Then + If GlobalDTCRMTipoProceso(UsuarioActual.CveEmpresa) IsNot Nothing AndAlso GlobalDTCRMTipoProceso(UsuarioActual.CveEmpresa).Rows.Count > 0 Then + VerificaVinculacion() + UpAccionesCRM.Update() + End If + If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then 'si es acumuladora 'AndAlso UsuarioActual.CveRol.Contiene(1280, 1511) If Not PermiteEditar() Then 'sino puede editar todos los datos del cliente, se bloquean los de distribuidor @@ -2617,6 +2618,10 @@ Partial Class Clientes Next End If + If Not ErrorProceso AndAlso UsuarioActual.Empresa.Funcionalidad(563) <> "" AndAlso UsuarioActual.Empresa.Funcionalidad(109) = "1" Then + ErrorProceso = Not ActualizarClienteFranquicia(ObjClientes, CveClienteNuevo) + End If + Else ErrorProceso = True End If @@ -2670,6 +2675,10 @@ Partial Class Clientes If Not ErrorProceso AndAlso Not GuardarDocumentosClientes(objDoc, Me.CveCliente) Then ErrorProceso = True End If + + If Not ErrorProceso AndAlso UsuarioActual.Empresa.Funcionalidad(563) <> "" AndAlso UsuarioActual.Empresa.Funcionalidad(109) = "1" Then + ErrorProceso = Not ActualizarClienteFranquicia(ObjClientes, Me.CveCliente) + End If Else ErrorProceso = True End If @@ -2772,6 +2781,23 @@ Partial Class Clientes End Sub + + Private Function ActualizarClienteFranquicia(ByRef ObjClientes As ClsClientes, CveClienteRef As Integer) As Boolean + Dim TieneError As Boolean = False + Dim FranquiciasStr As String = UsuarioActual.Empresa.Funcionalidad(563) + + Dim Franquicias As String() = FranquiciasStr.Split(","c) + + For Each Franquicia As String In Franquicias + Dim CveEmpresaFranquicia As Integer = Franquicia.ToEntero + If Not ObjClientes.UpdateClienteFranquicia(CveClienteRef, UsuarioActual.CveEmpresa, CveEmpresaFranquicia) Then + TieneError = True + Exit For + End If + Next + + Return Not TieneError + End Function #End Region diff --git a/Ventas/FacturacionGlobal.aspx b/Ventas/FacturacionGlobal.aspx index 03f285bb6..ff74a30ee 100644 --- a/Ventas/FacturacionGlobal.aspx +++ b/Ventas/FacturacionGlobal.aspx @@ -111,6 +111,8 @@
+ +
@@ -185,7 +187,7 @@ - + @@ -210,7 +212,7 @@
- +
@@ -233,7 +235,7 @@
- +

@@ -242,7 +244,7 @@
- +

@@ -252,7 +254,7 @@ - +
diff --git a/Ventas/FacturacionGlobal.aspx.vb b/Ventas/FacturacionGlobal.aspx.vb index 370b40595..18ff563b0 100644 --- a/Ventas/FacturacionGlobal.aspx.vb +++ b/Ventas/FacturacionGlobal.aspx.vb @@ -49,6 +49,10 @@ Partial Class Ventas_FacturacionGlobal DdlAnio.Items.Add(New ListItem(Anio.ToString(), Anio.ToString())) DdlAnio.Items.Add(New ListItem(AnioAnterior.ToString(), AnioAnterior.ToString())) + + txtFechaI.Text = Now.AddDays(-1).ToString("dd/MM/yyyy") + txtFechaF.Text = Now.ToString("dd/MM/yyyy") + End Sub Protected Sub DdlPeriodo_SelectedIndexChanged(sender As Object, e As EventArgs) @@ -58,6 +62,7 @@ Partial Class Ventas_FacturacionGlobal DdlMes.DataSource = GlobalDTGralSATMeses().FiltraParametros("ISNULL(CveSATPeriodicidad,0) <> 5") End If DdlMes.DataBind() + DdlMes.Items.Insert(0, New ListItem("Seleccione", "-1")) UPFiltros.Update() End Sub @@ -128,8 +133,15 @@ Partial Class Ventas_FacturacionGlobal Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound If e.Row.RowType = DataControlRowType.DataRow Then If e.Row.DBCampo("CveVenta").ToEntero() > 0 Then - e.Row.FCCheckBox("chkDis").Visible = True + If e.Row.DBCampo("Saldo").ToDecimal() > 0 Then + e.Row.FCCheckBox("chkDis").Enabled = False + e.Row.FCCheckBox("chkDis").ToolTip = "No se puede seleccionar esta remisión porque no ha sido pagada" + Else + e.Row.FCCheckBox("chkDis").Enabled = True + e.Row.FCCheckBox("chkDis").CssClass = "ChkAllEvt" + End If Else + e.Row.FCCheckBox("chkDis").Visible = False e.Row.CssClass = "Totales" End If End If @@ -137,7 +149,7 @@ Partial Class Ventas_FacturacionGlobal Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs) Dim CveCliente As Integer = UsuarioActual.Empresa.Funcionalidad(714).ToEntero() - Dim CveMoneda As Integer = -1 + Dim CveMoneda As Integer = 1 Dim SbRemisiones As New StringBuilder() Dim RemisionesLista As New List(Of Integer) @@ -171,6 +183,26 @@ Partial Class Ventas_FacturacionGlobal End If ObjClientes.Dispose() + If DtRemisionesPS Is Nothing OrElse DtRemisionesPS.Rows.Count = 0 Then + Alert("No se pudieron cargar las remsiones para facturar", TipoMensaje.MsgError) + Exit Sub + End If + + If DtPagos Is Nothing OrElse DtPagos.Rows.Count = 0 Then + Alert("No se pudieron cargar los pagos", TipoMensaje.MsgError) + Exit Sub + End If + + If Me.CveSubProyecto <= 0 Then + Alert("No se pudo cargar la sucursal", TipoMensaje.MsgError) + Exit Sub + End If + + If CveCliente <= 0 Then + Alert("No se pudo cargar el cliente", TipoMensaje.MsgError) + Exit Sub + End If + Dim ObjFactura = Modelos.Factura.CrearVentaNueva(UsuarioActual, Me.CveSubProyecto, CveCliente, CveMoneda, "Ing") ObjFactura.EsFacturaGlobal = True ObjFactura.CveSATPeriodicidad = DdlPeriodo.SelectedValue.ToEntero() @@ -188,6 +220,12 @@ Partial Class Ventas_FacturacionGlobal ObjFactura.CalculaTotales() ObjFactura.PreparaTimbre() + + If ObjFactura.Total <> DtPagos.SUMD("Importe") Then + Alert("Los pagos no coinciden con el total de la factura", TipoMensaje.MsgError) + Exit Sub + End If + 'ObjFactura.DtInventario = ObjFactura.DtDetalle.FiltraParametros("CveTipoPs = 2") Dim SbAlert As New StringBuilder() diff --git a/Ventas/PVCobranza.aspx.vb b/Ventas/PVCobranza.aspx.vb index 8161e583b..2d74c2710 100644 --- a/Ventas/PVCobranza.aspx.vb +++ b/Ventas/PVCobranza.aspx.vb @@ -337,7 +337,7 @@ Partial Class Ventas_PVCobranza PnlContado.Visible = False ObjConta.Commit() CargaDatos() - Alert("Pago Registrado correctamente.

Imprimir ticket", TipoMensaje.MsgInformacion) + Alert($"Pago Registrado correctamente.

Imprimir ticket", TipoMensaje.MsgInformacion) Else ObjConta.RollBack() End If diff --git a/Ventas/ProductosServicios.aspx.vb b/Ventas/ProductosServicios.aspx.vb index 4e568ad27..a0ee834f0 100644 --- a/Ventas/ProductosServicios.aspx.vb +++ b/Ventas/ProductosServicios.aspx.vb @@ -3194,7 +3194,7 @@ Partial Class ProductosyServicios Dim CvePS As Integer = ObjPS.DtResultados.FiltroPrimeroValor("CvePS", String.Format(" Codigo = '{0}'", TxtCodigo.Text.Trim.ToUpper)).ToEntero() If Not ObjPS.UpdatePS(CveClasificacion, -1, CveUnidadMedida, TxtCodigo.Text.Trim, TxtNumeroParte.Text.Trim, TxtCodigoBarras.Text.Trim, PSS, TxtPrecio.Text.Trim.ToDouble, DdlIVA.SelectedValue.ToDouble, (TxtRetIVA.Text.Trim.ToDouble / 100), ChkInventariable.Checked, -1, True, ChkAplicaParaVenta.Checked, ChkEstado.Checked, UsuarioActual.CveUsuario, CvePS, CveMetodoInv, - EsPaquete, DdlSATPS.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, CveTipoPS:=DdlTipoPS.SelectedValue.ToEntero, TipoServicio:=-1, CveClasificacion2:=CveClasificacion2, CveMarca:=CveMarcaFranquicia, + EsPaquete, DdlSATPS.SelectedValue.ToEntero, CveEmpresaFranquicia, CveTipoPS:=DdlTipoPS.SelectedValue.ToEntero, TipoServicio:=-1, CveClasificacion2:=CveClasificacion2, CveMarca:=CveMarcaFranquicia, AlmacenSeccion:=TxtAlmacenSeccion.Text.Trim, AplicaIEPS:=ChkAplicaIeps.Checked, IEPSPorcentaje:=DdlIEPSPorcentaje.SelectedValue.ToDecimal, CveCompuesto:=DdlCompuesto.SelectedValue.ToEntero, IEPSGrabaIVA:=ChkIepsIVA.Checked, VentaMinima:=TxtVentaMinima.Text.ToDecimal, CveMoneda:=DdlMoneda.SelectedValue.ToEntero, RetISR:=(TxtRetISR.Text.Trim.ToDouble / 100), PrecioMinimo:=TxtPrecioMinimo.Text.ToDecimal, diff --git a/Ventas/Ventas.aspx b/Ventas/Ventas.aspx index 592764f8e..b62a1393c 100644 --- a/Ventas/Ventas.aspx +++ b/Ventas/Ventas.aspx @@ -612,13 +612,13 @@ Paciente: - + Episodio: - + @@ -1183,7 +1183,7 @@ <%----%> <%--0--%> @@ -1404,6 +1404,8 @@ <%--19--%> + @@ -1851,7 +1853,7 @@
- + @@ -1890,7 +1892,7 @@ - +
@@ -2543,14 +2545,14 @@ - +   - - - + + + @@ -4319,6 +4321,83 @@
+ +