From 9ce9702618ab9abe1ed29a843d081353ea551246 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Fri, 26 Jan 2024 16:24:36 -0700 Subject: [PATCH 01/12] =?UTF-8?q?--SMS=20-=202024.01.24=20--En=20la=20opci?= =?UTF-8?q?=C3=B3n=20de=20venta=20directa:=20no=20importa=20el=20cliente/h?= =?UTF-8?q?ospital=20que=20se=20seleccione,=20la=20lista=20de=20precios=20?= =?UTF-8?q?predeterminada=20debe=20de=20ser=20la=20de=20venta=20directa=20?= =?UTF-8?q?--Al=20cancelar=20una=20cirug=C3=ADa=20se=20debe=20de=20ver=20r?= =?UTF-8?q?eflejado=20en=20almac=C3=A9n=20y=20en=20ordenes=20de=20servicio?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App_Code/ClsInventarios.vb | 3 ++- App_Code/Modelos.vb | 10 ++++++++++ Inventarios/EntregaAlmacen.aspx.vb | 27 +++++++++++++++++++++------ Ventas/Ventas.aspx | 16 ++++++++++------ Ventas/Ventas.aspx.vb | 22 +++++++++++++++++++++- 5 files changed, 64 insertions(+), 14 deletions(-) diff --git a/App_Code/ClsInventarios.vb b/App_Code/ClsInventarios.vb index 6a592dbcc..c8ecbfe36 100644 --- a/App_Code/ClsInventarios.vb +++ b/App_Code/ClsInventarios.vb @@ -3404,13 +3404,14 @@ Public Class ClsInventarios ' Return Retorno 'End Function - Public Function ActualizarEsDevolucionVenta(CveVenta As Integer, Valor As Integer) As Boolean + Public Function ActualizarEsDevolucionVenta(CveVenta As Integer, Valor As Integer, Optional AplicaDevolucionCompleta As Boolean = False) As Boolean Dim Retorno As Boolean = False DataAdapter("Vta_UpdateDevolucionVenta") With SqlAdapter.SelectCommand.Parameters .Add("@CveVenta", SqlDbType.Int).Value = CveVenta .Add("@Valor", SqlDbType.Int).Value = Valor + .Add("@AplicaDevolucionCompleta", SqlDbType.Bit).Value = AplicaDevolucionCompleta End With Try diff --git a/App_Code/Modelos.vb b/App_Code/Modelos.vb index 32bb6cb46..263b49b72 100644 --- a/App_Code/Modelos.vb +++ b/App_Code/Modelos.vb @@ -6117,6 +6117,16 @@ Namespace Modelos End If End If + + 'EMPRESA HOSPITALARIA - SI ES PEDIDO LA DEVOLUCION SE DEBE HACER DESPUES DE CANCELAR EL PEDIDO + If Not ErrorCancelar AndAlso UsuarioActual.Empresa.Funcionalidad(578) = "1" AndAlso ObjFactura.TipoDocto = "Ped" Then + If Not RealizarDevolucionAlmacen AndAlso TieneAlmacen Then + If Not ObjInventario.ActualizarEsDevolucionVenta(ObjFactura.CveVenta, 1, AplicaDevolucionCompleta:=True) Then + ErrorCancelar = True + MensajeError = "No se pudo actualizar el estatus de almacen del pedido" + End If + End If + End If End If 'CANCELA CONTRATOS diff --git a/Inventarios/EntregaAlmacen.aspx.vb b/Inventarios/EntregaAlmacen.aspx.vb index 237f1b558..056721404 100644 --- a/Inventarios/EntregaAlmacen.aspx.vb +++ b/Inventarios/EntregaAlmacen.aspx.vb @@ -1839,8 +1839,21 @@ Partial Class Inventarios_EntregaAlmacen End If ObjVentaInv.Dispose() - If TipoEstatus = 5 Or EsDevolucionVenta.Contiene(2, 3) Then - Alert("No se puede surtir esta venta, verifique que no esté cancelada o ya registrado su movimiento en almacen", TipoMensaje.MsgAdvertencia) + Dim VerificaCancelada As Boolean = True + + If UsuarioActual.Empresa.Funcionalidad(578) = "1" AndAlso TipoDocto = "Ped" Then + VerificaCancelada = False + End If + + If VerificaCancelada Then + If TipoEstatus = 5 Then + Alert("No se puede surtir esta venta, verifique que no esté cancelada", TipoMensaje.MsgAdvertencia) + Exit Sub + End If + End If + + If EsDevolucionVenta.Contiene(2, 3) Then + Alert("No se puede surtir esta venta, verifique que no esté registrado su movimiento en almacen", TipoMensaje.MsgAdvertencia) Exit Sub End If @@ -2739,10 +2752,12 @@ Partial Class Inventarios_EntregaAlmacen End If 'se registra - If ContabilizaMovimientoAlmacen(ObjConta, TxtFecha.Text.ToDate, HLFolio.Text, "EntregaAlmacen", CveMovimiento, CveMovimientoEntrada, ImporteAlmacen, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False) <= 0 Then - ErrorMovInv = True - End If - + If Not ErrorMovInv Then + If ContabilizaMovimientoAlmacen(ObjConta, TxtFecha.Text.ToDate, HLFolio.Text, "EntregaAlmacen", CveMovimiento, CveMovimientoEntrada, ImporteAlmacen, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False) <= 0 Then + ErrorMovInv = True + End If + End If + Else 'REGISTRO LA PREPOLIZA DE COSTO VS ALMACEN - SALIDA ALMACEN ErrorMovInv = Not GenerarPrePoliza(ObjInventario, ObjVentas, ObjConta, CveMovimiento, TextoError) End If diff --git a/Ventas/Ventas.aspx b/Ventas/Ventas.aspx index 94b5a8d54..f6466a32e 100644 --- a/Ventas/Ventas.aspx +++ b/Ventas/Ventas.aspx @@ -8637,16 +8637,20 @@ } //FUNCIONES PARA COMERCIO EXTERIOR - function CalculaTotalUSD(TotalUSD, ValorUnitario, TxtCantidad) { - TotalUSD.innerText = FormatoNumero(ToDouble(ValorUnitario.value) * ToDouble(TxtCantidad.value), 2); - } - function CalculaPU_USD(TxtValorUnitario, TotalUSD, TxtCantidad) { - TxtValorUnitario.value = FormatoNumero(ToDouble(TotalUSD) / ToDouble(TxtCantidad.value), 6); + if(ToDouble(TxtCantidad.value) > 0){ + TxtValorUnitario.value = ((ToDouble(TotalUSD) / ToDouble(TxtCantidad.value)).toFixed(6)).toString(); + }else{ + TxtValorUnitario.value = "0"; + } } function CalculaCantidad_USD(TxtValorUnitario, TotalUSD, TxtCantidad) { - TxtCantidad.value = FormatoNumero(ToDouble(TotalUSD) / ToDouble(TxtValorUnitario.value), 6); + if (ToDouble(TxtValorUnitario.value) > 0) { + TxtCantidad.value = ((ToDouble(TotalUSD) / ToDouble(TxtValorUnitario.value)).toFixed(6)).toString(); + }else{ + TxtCantidad.value = "0"; + } } function LimitaCantidadAplicaDev(Cantidad, TxtCantidadAplicaDevolucion) { diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 5d31eacd1..428a327d3 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -16931,6 +16931,21 @@ Partial Class Ventas CvePrecioListaPS = CvePrecioListaSugerido End If + Dim CvePrecioListaPredeterminada = -1 + Dim AplicaPredeterminado As Boolean = False + + If UsuarioActual.Empresa.Funcionalidad(578) = "1" AndAlso RBLTipoVenta.SelectedValue = "2" Then + AplicaPredeterminado = True + CvePrecioListaPredeterminada = GlobalDTPrecioListas(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CvePrecioLista", "Predeterminada = True").ToEntero() + If CvePrecioListaPredeterminada > 0 Then + CvePrecioListaPS = CvePrecioListaPredeterminada + End If + End If + + If AplicaPredeterminado AndAlso CvePrecioListaPredeterminada <= 0 Then + Alert("No hay una lista de precios predeterminada", TipoMensaje.MsgAdvertencia) + End If + If CvePrecioListaPS > 0 Then Dim ObjPS As New ClsProductosServicios If ObjPS.GetPSPreciosLista(UsuarioActual.CveEmpresa, CvePrecioListaPS, CvePS:=CvePSParametro) Then @@ -16940,6 +16955,10 @@ Partial Class Ventas ObjPS.Dispose() End If + If AplicaPredeterminado AndAlso PrecioSugerido <= 0 Then + Alert("El producto y/o servicio no tiene asignado un valor en la lista de precios predeterminada", TipoMensaje.MsgAdvertencia) + End If + If PrecioSugerido = 0 Then Dim ObjInventarios As New ClsInventarios Dim CostoPS As Decimal = ObjInventarios.GetCostoPS(CvePSParametro, TxtCantidad.Text.Trim.ToDecimal, -1, "-1", TxtFecha.Text.ToDate, DdlSubProyectoDatos.SelectedValue.ToEntero(), CveTipoAlmacen:=1) @@ -24453,8 +24472,9 @@ Partial Class Ventas ChkDevAlm.Checked = True End If + 'LOS PEDIDOS SE DEBE CANCELAR EN UN PROCESO DISTINTO If UsuarioActual.Empresa.Funcionalidad(578) = "1" AndAlso ObjFacturaCancelacion.TipoDocto = "Ped" Then - ChkDevAlm.Checked = True + ChkDevAlm.Checked = False End If resp = ObjFacturaCancelacion.CancelarFactura(ChkDevAlm.Checked, ListaRemisionesCancelar, CveMotivoCancelacion:=DdlMotivoCancelacion.SelectedValue.ToEntero(), Motivo:=TxtMotivoCancelacion.Text.Trim(), CveEstadoCancelacion:=Me.CveEstadoCancelacion) From 692b14845246958a7b62a05ac828a90107d142b5 Mon Sep 17 00:00:00 2001 From: rakcsle Date: Fri, 26 Jan 2024 18:05:09 -0700 Subject: [PATCH 02/12] SMS - 2024.01.25 --- OS/Asignaciones.aspx | 3 +- UserControl/AddMedico.ascx.vb | 2 +- UserControl/AddProcedimiento.ascx | 2 +- Ventas/CatMedicos.aspx | 34 ++++- Ventas/CatMedicos.aspx.vb | 235 ++++++++++++++---------------- Ventas/Ventas.aspx.vb | 2 + 6 files changed, 139 insertions(+), 139 deletions(-) diff --git a/OS/Asignaciones.aspx b/OS/Asignaciones.aspx index 8fd3c724f..add8f193f 100644 --- a/OS/Asignaciones.aspx +++ b/OS/Asignaciones.aspx @@ -190,7 +190,8 @@
+ data-sort="true" + CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" GridLines="None"> diff --git a/UserControl/AddMedico.ascx.vb b/UserControl/AddMedico.ascx.vb index 9cc57b4d1..02ba68186 100644 --- a/UserControl/AddMedico.ascx.vb +++ b/UserControl/AddMedico.ascx.vb @@ -175,7 +175,7 @@ Partial Class UserControl_AddMedico ClsPaginas.Alert($"Medico {If(CveMedico > 0, "Actualizado", "Guardado")} Correctamente.") Dim AppNombre As String = $"GlobalDTAgentes-{UsuarioActual.CveEmpresa}" Application(AppNombre) = Nothing - RegistraScript($"fncRegargaMedicos({CveMedicoNuevo});") + RegistraScript($"fncRegargaMedicos({If(CveMedicoNuevo > 0, CveMedicoNuevo, CveMedico) });") RegistraScript("$('#BtnCancelarMedico').click();") End If diff --git a/UserControl/AddProcedimiento.ascx b/UserControl/AddProcedimiento.ascx index c828b5139..6efca9df6 100644 --- a/UserControl/AddProcedimiento.ascx +++ b/UserControl/AddProcedimiento.ascx @@ -17,7 +17,7 @@ ErrorMessage="ERROR:
El campo 'Nombre del Procedimiento'' es necesario, por favor ingréselo." ValidationGroup="GrpGuardarProcedimiento">
-
+
diff --git a/Ventas/CatMedicos.aspx b/Ventas/CatMedicos.aspx index 61bf3be6f..6c8892736 100644 --- a/Ventas/CatMedicos.aspx +++ b/Ventas/CatMedicos.aspx @@ -1,5 +1,7 @@ <%@ Page Title="Catálogo de Médicos" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatMedicos.aspx.vb" Inherits="Ventas_CatMedicos" %> <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %> +<%@ Register Src="~/UserControl/AddMedico.ascx" TagPrefix="UserControl" TagName="AddMedico" %> + @@ -380,9 +382,25 @@ + + -
@@ -576,7 +590,7 @@ - + --%> diff --git a/Ventas/CatPS.aspx.vb b/Ventas/CatPS.aspx.vb index 918a08987..aa09a535e 100644 --- a/Ventas/CatPS.aspx.vb +++ b/Ventas/CatPS.aspx.vb @@ -123,8 +123,9 @@ Partial Class CatPS GvDatos.Columns(12).Visible = ChkMarca.Checked GvDatos.Columns(13).Visible = ChkVentaMinima.Checked GvDatos.Columns(14).Visible = ChkCodigoBarras.Checked - GvDatos.Columns(15).Visible = ChkCompuesto.Checked - GvDatos.Columns(16).Visible = ChkRSCO.Checked + GvDatos.Columns(15).Visible = ChkNumParte.Checked + GvDatos.Columns(16).Visible = ChkCompuesto.Checked + GvDatos.Columns(17).Visible = ChkRSCO.Checked If ChkAplicaVenta.Checked OrElse ChkProductosServiciosSAT.Checked OrElse diff --git a/Ventas/ProductosServicios.aspx b/Ventas/ProductosServicios.aspx index 10753bb04..9739df374 100644 --- a/Ventas/ProductosServicios.aspx +++ b/Ventas/ProductosServicios.aspx @@ -102,7 +102,7 @@
- +
diff --git a/Ventas/ProductosServicios.aspx.vb b/Ventas/ProductosServicios.aspx.vb index 7c4ea366a..6737c583f 100644 --- a/Ventas/ProductosServicios.aspx.vb +++ b/Ventas/ProductosServicios.aspx.vb @@ -383,11 +383,9 @@ Partial Class ProductosyServicios LtlNumberParte.Text = "Código CPK" Else - LtlNumberParte.Text = "Número de parte" + LtlNumberParte.Text = "Número de Parte" End If - - divPrecio.Visible = UsuarioActual.Empresa.Funcionalidad(404) = "" ' si tiene lista de precio, se oculta el precio por ps If UsuarioActual.CveEmpresa = 1 Then From 7422ef69404cecfffc3aba9eca00cf7dfdf5317d Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 27 Jan 2024 11:43:38 -0700 Subject: [PATCH 05/12] -- cambio en texto no desglosa iva --- Ventas/Clientes.aspx | 2 +- Ventas/Clientes.aspx.vb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Ventas/Clientes.aspx b/Ventas/Clientes.aspx index 9722a777f..347109d9d 100644 --- a/Ventas/Clientes.aspx +++ b/Ventas/Clientes.aspx @@ -1179,7 +1179,7 @@
- El cliente No desglosa IVA: + El cliente desglosa IVA:
diff --git a/Ventas/Clientes.aspx.vb b/Ventas/Clientes.aspx.vb index 048f523f9..cd300827b 100644 --- a/Ventas/Clientes.aspx.vb +++ b/Ventas/Clientes.aspx.vb @@ -1566,7 +1566,7 @@ Partial Class Clientes If ObjClientes.CveRegimenFiscal > 0 Then DdlRegimenFiscal.SelectedValueExist(ObjClientes.CveRegimenFiscal) ChkDesglosarIEPS.Checked = ObjClientes.DesglosaIEPS - ChkNoDesglosaIVA.Checked = ObjClientes.NoDesglosaIVA + ChkNoDesglosaIVA.Checked = Not ObjClientes.NoDesglosaIVA DdlCorporativo.SelectedValueExist(ObjClientes.CveClienteCorporativo.ToString()) ChkCargoUsado.Checked = ObjClientes.CargoUsados ChkBonificacionUsado.Checked = ObjClientes.BonificacionUsado @@ -2642,7 +2642,7 @@ Partial Class Clientes ApellidoPaternoPF:=IIf(TxtApellidoPaterno.Text = "", "-1", TxtApellidoPaterno.Text).ToString(), ApellidoMaternoPF:=IIf(TxtApellidoMaterno.Text = "", "-1", TxtApellidoMaterno.Text).ToString(), NombresPF:=IIf(TxtNombres.Text = "", "-1", TxtNombres.Text).ToString(), RequiereOC:=ChkRequiereOC.Checked, LT:=LT, LG:=LG, EsDistribuidor:=ChkEsDistribuidor.Checked, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero(), CargoUsado:=ChkCargoUsado.Checked, BonificacionUsado:=ChkBonificacionUsado.Checked, CveTipoRetencion:=DdlTipoRetencion.SelectedValue.ToEntero(), CorreoEntregaCompras:=TxtCorreoEntregaCompras.Text, CorreoEntregaAlmacen:=TxtCorreoEntregaAlmacen.Text, CveSATEstado:=DdlEstadoSAT.SelectedValue.ToEntero(), CveAdminTrayecto:=If(DdlAdminTrayecto.SelectedValue.ToEntero() <= 0, 0, DdlAdminTrayecto.SelectedValue.ToEntero()), - NoDesglosaIVA:=ChkNoDesglosaIVA.Checked, CveRegimenFiscal:=DdlRegimenFiscal.SelectedValue.ToEntero, RegimenSociedad:=TxtRegimenSociedad.Text, TipoPersona:=TipoPersona, RepresentanteLegal:=TxtRepresentanteLegal.Text, ComExtCalle:=TxtComExtCalle.Text.Trim(), ComExtNumExt:=TxtComExtNumero.Text.Trim(), ComExtCP:=TxtComExtCP.Text.Trim(), FechaLimiteCredito:=FechaLimiteCredito, + NoDesglosaIVA:=Not ChkNoDesglosaIVA.Checked, CveRegimenFiscal:=DdlRegimenFiscal.SelectedValue.ToEntero, RegimenSociedad:=TxtRegimenSociedad.Text, TipoPersona:=TipoPersona, RepresentanteLegal:=TxtRepresentanteLegal.Text, ComExtCalle:=TxtComExtCalle.Text.Trim(), ComExtNumExt:=TxtComExtNumero.Text.Trim(), ComExtCP:=TxtComExtCP.Text.Trim(), FechaLimiteCredito:=FechaLimiteCredito, Genero:=GeneroCliente, CveAlmacenAsignado:=DdlAlmacenAsignado.SelectedValue.ToEntero, UsaProductoAlterno:=ChkProductoAlterno.Checked) Then If Not ObjClientes.LimpiaImpuestosLocales(Me.CveCliente) Then From c30862663ef2ca6cfd01fd8f6f1f5a8e4fb4c51a Mon Sep 17 00:00:00 2001 From: rakcsle Date: Sat, 27 Jan 2024 13:33:11 -0700 Subject: [PATCH 06/12] SMS - 2024.01.27 --- Compras/PopUpVerFactura.aspx.vb | 33 +++ Empresas/186/Formatos/Entradas.rdlc | 4 +- Empresas/186/Formatos/Salidas.rdlc | 4 +- Empresas/186/Formatos/Traslado.rdlc | 312 ++++++++++++++++++++++++---- Inventarios/EntregaAlmacen.aspx.vb | 49 +++-- OS/Asignaciones.aspx.vb | 3 + OS/OrdenesServicios.aspx.vb | 40 +++- OS/RepOSMedicas.aspx | 7 + 8 files changed, 392 insertions(+), 60 deletions(-) diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb index 01ef2962d..c29799b52 100644 --- a/Compras/PopUpVerFactura.aspx.vb +++ b/Compras/PopUpVerFactura.aspx.vb @@ -9,6 +9,7 @@ Imports Extensiones Imports iText.Barcodes.Dmcode Imports Microsoft.Reporting.WebForms Imports Modelos +Imports Stimulsoft.Base.Context Partial Class PopUpVerFactura @@ -3372,10 +3373,42 @@ Partial Class PopUpVerFactura If UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then + CveCliente = DtMovimientos.FiltroPrimeroValor("CveCliente").ToEntero DTCliente = GlobalDTCliente(UsuarioActual.CveEmpresa).FiltraParametros($"CveCliente = {CveCliente}") + + Dim CveVentaConsulta As Integer = DtMovimientos.FiltroPrimeroValor("CveVenta").ToEntero + params.Add(New ReportParameter("Documentacion", DTCliente.FiltroPrimeroValor("Documentacion"))) + Dim ObjVentas As New ClsVentas() + If ObjVentas.GetVenta(CveVentaConsulta, UsuarioActual.CveEmpresa, False) AndAlso ObjVentas.DtResultados.Rows.Count > 0 Then + Dim dtVentas As DataTable = ObjVentas.DtResultados + + params.Add(New ReportParameter("ClienteCodigo", dtVentas.Rows(0)("ClienteCodigo").ToString)) + params.Add(New ReportParameter("ClienteNombre", dtVentas.Rows(0)("ClienteNombre").ToString)) + params.Add(New ReportParameter("ClienteSucursal", dtVentas.Rows(0)("SucursalCliente").ToString)) + params.Add(New ReportParameter("ClienteRFC", dtVentas.Rows(0)("ClienteRFC").ToString)) + + params.Add(New ReportParameter("ClienteCalle", dtVentas.Rows(0)("ClienteDireccion").ToString)) + params.Add(New ReportParameter("ClienteNoExt", dtVentas.Rows(0)("ClienteNoExt").ToString)) + params.Add(New ReportParameter("ClienteColonia", dtVentas.Rows(0)("ColoniaCliente").ToString)) + params.Add(New ReportParameter("ClienteCiudad", dtVentas.Rows(0)("ClienteCiudad").ToString)) + params.Add(New ReportParameter("ClienteEstado", dtVentas.Rows(0)("ClienteEstado").ToString)) + + params.Add(New ReportParameter("ClienteMunicipio", dtVentas.Rows(0)("SucClienteCiudad").ToString)) + params.Add(New ReportParameter("ClienteCP", dtVentas.Rows(0)("CPCliente").ToString)) + + + + + End If + ObjVentas.Dispose() + + + + + If CveCliente = 819998 Then RutaFormato = "{0}Formatos\TrasladoAngeles.rdlc" End If diff --git a/Empresas/186/Formatos/Entradas.rdlc b/Empresas/186/Formatos/Entradas.rdlc index 1f0b6b6be..77b95e765 100644 --- a/Empresas/186/Formatos/Entradas.rdlc +++ b/Empresas/186/Formatos/Entradas.rdlc @@ -793,7 +793,7 @@ CIUDAD DE MEXICO - Telefono +52 551 563 3271 support@smsmedicalsolutions.com + Teléfono: +52 551 563 3271 Correo: support@smsmedicalsolutions.com + + true + true + + + + + =Parameters!Observaciones.Value + + + + + + + + + + =Parameters!Documentacion.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + - 0.88788in + 1.35487in - + true true - =Parameters!Observaciones.Value + Cliente: - - - - - - - =Parameters!Documentacion.Value + =Parameters!ClienteCodigo.Value + + + - + + + + =Parameters!ClienteNombre.Value + + + + . +Sucursal: . + + + + =Parameters!ClienteSucursal.Value + + + + RFC: + + + + =Parameters!ClienteRFC.Value + + + + +Calle: + + + + =Parameters!ClienteCalle.Value + + + + + + + + =Parameters!ClienteNoExt.Value + + + + . Colonia: + + + + =Parameters!ClienteColonia.Value + + + + Ciudad: + + + + =Parameters!ClienteCiudad.Value + + + + . +Estado: + + + + =Parameters!ClienteEstado.Value + + + + . +Municipio y/o Delegación: + + + + =Parameters!ClienteMunicipio.Value + + + + . CP: + + + + =Parameters!ClienteCP.Value + + + + . + - 0cm 0.13678cm 0cm 20.28859cm @@ -2312,7 +2479,6 @@ CIUDAD DE MEXICO - 0cm 0.13678cm 0cm 25.72414cm @@ -2532,6 +2698,72 @@ CIUDAD DE MEXICO true ReportParameter1 + + String + true + true + ReportParameter1 + + + String + true + true + ReportParameter1 + + + String + true + true + ReportParameter1 + + + String + true + true + ReportParameter1 + + + String + true + true + ReportParameter1 + + + String + true + true + ReportParameter1 + + + String + true + true + ReportParameter1 + + + String + true + true + ReportParameter1 + + + String + true + true + ReportParameter1 + + + String + true + true + ReportParameter1 + + + String + true + true + ReportParameter1 + diff --git a/Inventarios/EntregaAlmacen.aspx.vb b/Inventarios/EntregaAlmacen.aspx.vb index 056721404..f0d83d50d 100644 --- a/Inventarios/EntregaAlmacen.aspx.vb +++ b/Inventarios/EntregaAlmacen.aspx.vb @@ -117,6 +117,19 @@ Partial Class Inventarios_EntregaAlmacen End Set End Property + Private Property CveTipoVenta As Integer + Get + If ViewState("CveTipoVenta") Is Nothing Then + ViewState("CveTipoVenta") = -1 + End If + Return CType(ViewState("CveTipoVenta"), Integer) + End Get + Set(value As Integer) + ViewState("CveTipoVenta") = value + End Set + End Property + + Private Property TipoEstatus As Integer Get @@ -320,15 +333,15 @@ Partial Class Inventarios_EntregaAlmacen End Property - Private Property PedidoBloqueCantidad As Boolean + Private Property BloqueCantidad As Boolean Get - If ViewState("PedidoBloqueCantidad") Is Nothing Then - ViewState("PedidoBloqueCantidad") = False + If ViewState("BloqueCantidad") Is Nothing Then + ViewState("BloqueCantidad") = False End If - Return Boolean.Parse(ViewState("PedidoBloqueCantidad").ToString) + Return Boolean.Parse(ViewState("BloqueCantidad").ToString) End Get Set(value As Boolean) - ViewState("PedidoBloqueCantidad") = value + ViewState("BloqueCantidad") = value End Set End Property @@ -675,6 +688,7 @@ Partial Class Inventarios_EntregaAlmacen LbObservacionesAlmacen.Text = drE("ObservacionesAlmacen").ToString() CveVentaSurtir = CveVenta CveOSSurtir = CveOS + CveTipoVenta = drE("CveTipoVenta").ToString().ToEntero CveAlmacenTraspasoDestino = drE(If(EsDevolucionVenta = 1 And TipoDocto <> "Rem" And TipoDocto <> "Ped", "CveAlmacenTraspasoOrigen", "CveAlmacenTraspasoDestino")).ToString().ToEntero() CveAlmacenTraspasoOrigen = drE(If(EsDevolucionVenta = 1 And TipoDocto <> "Rem" And TipoDocto <> "Ped", "CveAlmacenTraspasoDestino", "CveAlmacenTraspasoOrigen")).ToString().ToEntero() CveContrato = drE("CveContrato").ToString().ToEntero() @@ -842,14 +856,19 @@ Partial Class Inventarios_EntregaAlmacen End If ObjInventario.Dispose() - UpGenerales.Update() - If CveAlmacen <= 0 Then CargaGvDatos() + UpGenerales.Update() + + If (EsDevolucionVenta = 1 AndAlso CveOSSurtir > 0 AndAlso TipoMovimiento = 2 AndAlso TipoDocto = "Ped") Or (UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 AndAlso CveTipoVenta <> 3) Then + BloqueCantidad = True + Else + BloqueCantidad = False + End If - - - If EsDevolucionVenta = 1 AndAlso CveOSSurtir > 0 AndAlso TipoMovimiento = 2 AndAlso TipoDocto = "Ped" Then - PedidoBloqueCantidad = True - End If + If CveAlmacen <= 0 Then CargaGvDatos() + + + + @@ -1106,7 +1125,7 @@ Partial Class Inventarios_EntregaAlmacen CType(e.Row.FindControl("RFVCaducidad"), RequiredFieldValidator).Enabled = False 'si aplica caducidad y viene vacía (posible por venta anterior), que se active su registro - If (e.Row.FCTextBox("TxtCaducidad").Text = "" OrElse e.Row.FCTextBox("TxtCaducidad").Text.ToDate <= MinFecha) OrElse UsuarioActual.TienePermisoProceso(364) Then + If (e.Row.FCTextBox("TxtCaducidad").Text = "" OrElse e.Row.FCTextBox("TxtCaducidad").Text.ToDate <= MinFecha) OrElse UsuarioActual.TienePermisoProceso(364) OrElse UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then e.Row.FCTextBox("TxtCaducidad").ReadOnly = False CType(e.Row.FindControl("RFVCaducidad"), RequiredFieldValidator).Enabled = True e.Row.FCTextBox("TxtCaducidad").Enabled = True @@ -1120,7 +1139,7 @@ Partial Class Inventarios_EntregaAlmacen If CBool(e.Row.DBCampo("AplicaLote")) Then e.Row.FCTextBox("TxtLote").Visible = True 'si aplica caducidad y viene vacía (posible por venta anterior), que se active su registro - If e.Row.FCTextBox("TxtLote").Text = "" OrElse UsuarioActual.TienePermisoProceso(364) Then + If e.Row.FCTextBox("TxtLote").Text = "" OrElse UsuarioActual.TienePermisoProceso(364) OrElse UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then e.Row.FCTextBox("TxtLote").ReadOnly = False e.Row.FCTextBox("TxtLote").Enabled = True Else @@ -1165,7 +1184,7 @@ Partial Class Inventarios_EntregaAlmacen e.Row.FCCheckBox("cbInv").Enabled = False End If - If PedidoBloqueCantidad Then + If BloqueCantidad Then e.Row.FCTextBox("TbCantidadF").Enabled = False End If diff --git a/OS/Asignaciones.aspx.vb b/OS/Asignaciones.aspx.vb index 7ee3d5ced..bbee6bbff 100644 --- a/OS/Asignaciones.aspx.vb +++ b/OS/Asignaciones.aspx.vb @@ -498,10 +498,13 @@ Partial Class OS_Asignaciones Dim TMSelector = DirectCast(e.Row.FindControl("TimeSelector"), TimeSelector) TMSelector.Date = FechaCita + e.Row.Cells(7).Attributes.Add("data-order", e.Row.DBCampo("FechaCitaOS").ToDate.Ticks.ToString) + e.Row.Cells(8).Attributes.Add("data-order", e.Row.DBCampo("FechaCitaOS").ToDate.ToString("HHmm")) End If + End If UpOS.Update() diff --git a/OS/OrdenesServicios.aspx.vb b/OS/OrdenesServicios.aspx.vb index ffb9530fe..ad9919f31 100644 --- a/OS/OrdenesServicios.aspx.vb +++ b/OS/OrdenesServicios.aspx.vb @@ -2913,8 +2913,46 @@ Partial Class OS_OrdenesServicios DdlUsuarioAtendio.DataBind() DdlUsuarioAtendio.Items.Insert(0, New ListItem("Sin Asignar", "-1")) - + CargaTecnicoDdlUsuarioAtendio() End Sub + + + + Private Sub CargaTecnicoDdlUsuarioAtendio() + Dim ObjOS As New ClsOS + Dim DtOSSubProyectos As New DataTable + Dim TecnicosSubProyectos As New DataTable + Dim TecnicosResultado As New DataTable + + If ObjOS.GetOrdenesServiciosNoAsignadas(-1, DdlSubProyecto.SelectedValue.ToEntero, -1, UsuarioActual.CveEmpresa, "-1", "-1") Then + DtOSSubProyectos = ObjOS.DtResultados.FiltraParametros("", "", {"CveSubProyecto", "SubProyecto"}) + End If + + If DtOSSubProyectos IsNot Nothing Then + + If ObjOS.GetSubProyectosEstatusInicial(-1, 3, UsuarioActual.CveEmpresa) Then + TecnicosSubProyectos = ObjOS.DtResultados + End If + + For Each SubProyecto As DataRow In DtOSSubProyectos.Rows + Dim TecnicosSubProyectoAux As DataTable = TecnicosSubProyectos.FiltraParametros(String.Format("SubProyecto = '{0}'", SubProyecto.Item("SubProyecto"))) + If TecnicosSubProyectoAux.Rows.Count > 0 Then + Dim EstatusDeTipoProcesoMenor As Integer = TecnicosSubProyectoAux.Rows(0).Item("CveEstatusOrdenServicio").ToString.ToEntero + Dim dtAuxiliar As New DataTable + dtAuxiliar = TecnicosSubProyectos.FiltraParametros(String.Format("SubProyecto = '{0}' AND CveEstatusOrdenServicio = {1}", SubProyecto.Item("SubProyecto"), EstatusDeTipoProcesoMenor), "", {"CveUsuario", "Nombre"}) + TecnicosResultado.Merge(dtAuxiliar) + End If + Next + End If + + + ObjOS.Dispose() + + DdlUsuarioAtendio.DataSource = TecnicosResultado + DdlUsuarioAtendio.DataBind() + DdlUsuarioAtendio.Items.Insert(0, New ListItem("Sin Asignar", "-1")) + End Sub + Private Sub LnkTecnico_Click(sender As Object, e As EventArgs) Handles LnkTecnico.Click RegistraScript(String.Format("$('#{0}').modal('show');", "DivCambiarTecnico")) End Sub diff --git a/OS/RepOSMedicas.aspx b/OS/RepOSMedicas.aspx index 0c60a2b8c..1efdc1a22 100644 --- a/OS/RepOSMedicas.aspx +++ b/OS/RepOSMedicas.aspx @@ -155,6 +155,13 @@ +
+
+ " style="display: inline-block; width: 150px;" /> + " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> +
+
+ Date: Sat, 27 Jan 2024 16:56:32 -0700 Subject: [PATCH 07/12] =?UTF-8?q?SMS.=20--Existencias=20cachadas=20--Vista?= =?UTF-8?q?=20previa=20de=20facturacion=20de=20remisi=C3=B3n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App_Code/ClsInventarios.vb | 4 ++-- Inventarios/PopUpExistenciasAlmacen.aspx.vb | 7 ++++++- Ventas/Ventas.aspx | 4 ++++ Ventas/Ventas.aspx.vb | 21 +++++++++++++++++---- 4 files changed, 29 insertions(+), 7 deletions(-) diff --git a/App_Code/ClsInventarios.vb b/App_Code/ClsInventarios.vb index c8ecbfe36..11302558c 100644 --- a/App_Code/ClsInventarios.vb +++ b/App_Code/ClsInventarios.vb @@ -2065,7 +2065,7 @@ Public Class ClsInventarios 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, Optional TopSelect As Integer = 10000, - Optional IncluyeProximaLlegada As Boolean = False) As Boolean + Optional IncluyeProximaLlegada As Boolean = False, Optional BuscarEnTabla As Boolean = False) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Inv_ExistenciasGet") @@ -2090,7 +2090,7 @@ Public Class ClsInventarios .Add("@RestringirAlmacenes", SqlDbType.Int).Value = RestringirAlmacenes .Add("@IncluyeProximaLlegada", SqlDbType.Int).Value = IncluyeProximaLlegada .Add("@TopSelect", SqlDbType.Int).Value = TopSelect - + .Add("@BuscarEnTabla", SqlDbType.Bit).Value = BuscarEnTabla .Add("@Existencia", SqlDbType.Money).Direction = ParameterDirection.Output End With Try diff --git a/Inventarios/PopUpExistenciasAlmacen.aspx.vb b/Inventarios/PopUpExistenciasAlmacen.aspx.vb index 6cf82a8a9..181f6b4de 100644 --- a/Inventarios/PopUpExistenciasAlmacen.aspx.vb +++ b/Inventarios/PopUpExistenciasAlmacen.aspx.vb @@ -131,10 +131,15 @@ Partial Class Inventarios_Default RestringirAlmacenes = 1 'restringue los almacenes:Consignación,Productos Financieros Asignados,,roductos Financieros,Consumo Interno,Activo Fijo,Merma,Consignación de Contrato,Devolucion proveedor, End If + Dim BuscarEnTabla As Boolean = False + If UsuarioActual.Empresa.Funcionalidad(715) = "1" Then + BuscarEnTabla = True + End If + Dim ObjInventarios As New ClsInventarios() If ObjInventarios.GetExistenciasProducto(CvePS, -1, UsuarioActual.CveEmpresa, -1, FechaMovto:=DateTime.Today.AddDays(1).ToString("yyyy/MM/dd HH:mm"), ExcluyeApartados:=-1, ExcluyeAdelantado:=1, CveSubProyecto:=DdlSubProyecto.SelectedValue.ToEntero, - ExcluyeTransitorios:=1, RestringirAlmacenes:=RestringirAlmacenes, TopSelect:=100) Then + ExcluyeTransitorios:=1, RestringirAlmacenes:=RestringirAlmacenes, TopSelect:=100, BuscarEnTabla:=BuscarEnTabla) Then CargaPS(CvePS) If ObjInventarios.DtResultados.Rows.Count > 0 Then diff --git a/Ventas/Ventas.aspx b/Ventas/Ventas.aspx index b0fd556d5..14b2d9e33 100644 --- a/Ventas/Ventas.aspx +++ b/Ventas/Ventas.aspx @@ -4144,6 +4144,7 @@ + @@ -4185,6 +4186,9 @@ Facturar