From 482cf60bffad0596994e18e452dbb98765d61267 Mon Sep 17 00:00:00 2001 From: AbrahamCastilloV Date: Wed, 31 Jan 2024 13:46:05 -0700 Subject: [PATCH 01/13] =?UTF-8?q?--=20Se=20removieron=20partes=20de=20Css?= =?UTF-8?q?=20sin=20usar=20y=20se=20ampli=C3=B3=20el=20rango=20del=20updat?= =?UTF-8?q?ePanel=20para=20que=20reiniciara=20los=20valores=20del=20asient?= =?UTF-8?q?o=20anterior=20y=20pusiera=20el=20nuevo=20en=20no=20disponible.?= =?UTF-8?q?=20=20Se=20simplific=C3=B3=20la=20respuesta=20al=20m=C3=A9todo?= =?UTF-8?q?=20de=20AddViajesPasajeros=20y=20se=20agreg=C3=B3=20un=20Update?= =?UTF-8?q?=20al=20finalizar=20el=20try,=20para=20recargar=20los=20boletos?= =?UTF-8?q?=20y=20los=20inputs.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Transportes/Boletos.aspx | 26 ++++++++------------------ Transportes/Boletos.aspx.vb | 12 ++++-------- 2 files changed, 12 insertions(+), 26 deletions(-) diff --git a/Transportes/Boletos.aspx b/Transportes/Boletos.aspx index 254e8184c..011e520a4 100644 --- a/Transportes/Boletos.aspx +++ b/Transportes/Boletos.aspx @@ -33,11 +33,6 @@ color: #fff; } - { - background-color: #45b6af; - color: #fff; - } - .nodisponible { display: inline-block; width: 45px; @@ -74,8 +69,9 @@ - + + <%-- Datos de cliente y su viaje --%>
@@ -158,6 +154,7 @@
+
@@ -174,6 +171,7 @@
+
@@ -181,8 +179,8 @@
-
+
Destino:
-
-

@@ -209,14 +205,10 @@ ValidationGroup="GrpGuardar">
-
-
- - + - - + <%-- Asientos --%>
@@ -468,10 +460,8 @@
-
-
- +
diff --git a/Transportes/Boletos.aspx.vb b/Transportes/Boletos.aspx.vb index 330e2cc09..379392af6 100644 --- a/Transportes/Boletos.aspx.vb +++ b/Transportes/Boletos.aspx.vb @@ -1,7 +1,4 @@ -Imports System.Data -Imports Extensiones - -Partial Class Boletos +Partial Class Boletos Inherits ClsPaginas #Region "Propiedades" Private Property AsientoSeleccionado As String @@ -156,9 +153,7 @@ Partial Class Boletos Try AsientoSeleccionado = AsientoSeleccionado.Replace("A", "") - Dim retorno As Integer = ObjTransporte.AddViajesPasajeros(CveViaje, DdlPartida.SelectedValue.ToEntero, DdlDestino.SelectedValue.ToEntero, Importe, AsientoSeleccionado.ToEntero, TxtNombre.Text, TxtVisa.Text, TxtCelular.Text, CBool(RblSexo.SelectedValue), TxtObservaciones.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) - - If retorno > 1 Then + If ObjTransporte.AddViajesPasajeros(CveViaje, DdlPartida.SelectedValue.ToEntero, DdlDestino.SelectedValue.ToEntero, Importe, AsientoSeleccionado.ToEntero, TxtNombre.Text, TxtVisa.Text, TxtCelular.Text, CBool(RblSexo.SelectedValue), TxtObservaciones.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) > 1 Then Alert("Boleto generado correctamente") ObjTransporte.Commit() DdlPartida.SelectedValue = "" @@ -168,13 +163,14 @@ Partial Class Boletos TxtCelular.Text = "" TxtObservaciones.Text = "" AsientoSeleccionado = "" - upPanel.Update() End If Catch ex As Exception ObjTransporte.RollBack() Alert($"No se pudo generar el boleto {ex}", TipoMensaje.MsgError) Finally ObjTransporte.Dispose() + CargaDatos() + UpPanel.Update() End Try End Sub From d9e92b903989c0661d99334f000f8a1349e521c1 Mon Sep 17 00:00:00 2001 From: AbrahamCastilloV Date: Wed, 31 Jan 2024 17:15:11 -0700 Subject: [PATCH 02/13] =?UTF-8?q?--Se=20agrega=20la=20url=20de=20CatRutas?= =?UTF-8?q?=20a=20ClsP=C3=A1ginas,=20se=20agrega=20a=20m=C3=B3dulos=20y=20?= =?UTF-8?q?se=20da=20permiso.=20=20Se=20crea=20la=20p=C3=A1gina=20de=20Cat?= =?UTF-8?q?Rutas=20y=20hace=20un=20panel=20con=203=20pesta=C3=B1as=20para?= =?UTF-8?q?=20rutas,=20destinos=20e=20importes,=20se=20crea=20el=20listado?= =?UTF-8?q?=20en=20cada=20uno=20y=20se=20prepara=20para=20los=20m=C3=A9tod?= =?UTF-8?q?os=20del=20CRUD.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App_Code/ClsPaginas.vb | 1 + Transportes/Boletos.aspx.vb | 9 +- Transportes/CatRutas.aspx | 211 +++++++++++++++++++++++++++++++++++ Transportes/CatRutas.aspx.vb | 82 ++++++++++++++ 4 files changed, 300 insertions(+), 3 deletions(-) create mode 100644 Transportes/CatRutas.aspx create mode 100644 Transportes/CatRutas.aspx.vb diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 81a751e4c..6efd23fa9 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -10718,6 +10718,7 @@ Public Class ClsPaginas PaginaDict.Add("/Transportes/RepBoletos.aspx".ToUpper(), 600) PaginaDict.Add("/Transportes/Boletos.aspx".ToUpper(), 601) PaginaDict.Add("/Transportes/RepContratosCalendario.aspx".ToUpper(), 603) + PaginaDict.Add("/Transportes/CatRutas.aspx".ToUpper(), 604) #End Region 'Antes de aquí. diff --git a/Transportes/Boletos.aspx.vb b/Transportes/Boletos.aspx.vb index 379392af6..10152c534 100644 --- a/Transportes/Boletos.aspx.vb +++ b/Transportes/Boletos.aspx.vb @@ -1,4 +1,7 @@ -Partial Class Boletos +Imports System.Data +Imports Extensiones + +Partial Class Boletos Inherits ClsPaginas #Region "Propiedades" Private Property AsientoSeleccionado As String @@ -116,11 +119,11 @@ ViewState("Importe") = ImporteR TxtCosto.Text = $"El precio de su boleto es ${ImporteR.FormatoNumero}" BtnGuardar.Visible = True - upPanel.Visible = True + UpPanel.Visible = True Else TxtCosto.Text = "" BtnGuardar.Visible = False - upPanel.Visible = False + UpPanel.Visible = False ViewState("Importe") = 0 End If End If diff --git a/Transportes/CatRutas.aspx b/Transportes/CatRutas.aspx new file mode 100644 index 000000000..8b90e470c --- /dev/null +++ b/Transportes/CatRutas.aspx @@ -0,0 +1,211 @@ +<%@ Page Language="VB" Title="Transportes V&A - Rutas" AutoEventWireup="false" + MasterPageFile="~/Site.master" CodeFile="CatRutas.aspx.vb" + Inherits="CatRutas" EnableEventValidation="true" %> + + + Rutas y Destinos + + + + + + + + + + <%--Calendario Tab--%> + + <%--Rutas Tab--%> + + +
+
+ +
+
+ " + style="display: inline-block; margin-right: -10px; width: 150px;" /> + " + style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ <%--Rutas Tab--%> + + +
+
+ +
+
+
+ " + style="display: inline-block; margin-right: -10px; width: 150px;" /> + " + style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ <%--Importes Tab--%> + + +
+
+ +
+
+
+ " + style="display: inline-block; margin-right: -10px; width: 150px;" /> + " + style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ +
+ + diff --git a/Transportes/CatRutas.aspx.vb b/Transportes/CatRutas.aspx.vb new file mode 100644 index 000000000..a58e3da56 --- /dev/null +++ b/Transportes/CatRutas.aspx.vb @@ -0,0 +1,82 @@ +Option Explicit On +Option Strict On +Partial Class CatRutas + Inherits ClsPaginas + Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load + If Not IsPostBack Then + InicializaCalendar() + CargaDatos() + End If + + End Sub + Private Sub CargaDatos() + 'Lista Rutas' + Dim ObjRutas As New ClsTransportes() + If ObjRutas.GetRutas(-1, -1, -1, "", True, DateTime.Now) Then + + If ObjRutas.DtResultados.Rows.Count > 0 Then + GvRutas.DataSource = ObjRutas.DtResultados + GvRutas.DataBind() + End If + End If + 'Lista Destinos' + If ObjRutas.GetDestinos() Then + + If ObjRutas.DtResultados.Rows.Count > 0 Then + GvDestinos.DataSource = ObjRutas.DtResultados + GvDestinos.DataBind() + End If + End If + 'Lista Importes' + If ObjRutas.GetDestinosTarifas(-1, -1) Then + If ObjRutas.DtResultados.Rows.Count > 0 Then + GvImportes.DataSource = ObjRutas.DtResultados + GvImportes.DataBind() + End If + End If + End Sub + + Private Sub InicializaCalendar() + + End Sub + +#Region "Rutas" + Protected Sub AddRuta(sender As Object, e As EventArgs) + + End Sub + Protected Sub UpdateRuta(sender As Object, e As EventArgs) + + End Sub + + Protected Sub RemoveRuta(sender As Object, e As EventArgs) + + End Sub +#End Region + +#Region "Destinos" + Protected Sub AddDestino(sender As Object, e As EventArgs) + + End Sub + Protected Sub UpdateDestino(sender As Object, e As EventArgs) + + End Sub + + Protected Sub RemoveDestino(sender As Object, e As EventArgs) + + End Sub +#End Region + +#Region "Importes" + Protected Sub AddImporte(sender As Object, e As EventArgs) + + End Sub + Protected Sub UpdateImporte(sender As Object, e As EventArgs) + + End Sub + + Protected Sub RemoveImporte(sender As Object, e As EventArgs) + + End Sub +#End Region + +End Class From 8dd30bf95d4f0808b3260eeacde0d3f1fee9f42b Mon Sep 17 00:00:00 2001 From: AbrahamCastilloV Date: Fri, 2 Feb 2024 09:16:22 -0700 Subject: [PATCH 03/13] -- Se modifica el campo de observaciones al agregar y actualizar contrato. --- Transportes/RepContratos.aspx | 2 +- Transportes/RepContratos.aspx.vb | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Transportes/RepContratos.aspx b/Transportes/RepContratos.aspx index 80f5a700b..a42597f74 100644 --- a/Transportes/RepContratos.aspx +++ b/Transportes/RepContratos.aspx @@ -63,7 +63,7 @@ + data-sort="true" DataKeyNames="CveContrato, DescripcionContrato, Ubicacion, FechaInicial, FechaFinal, CveCliente, CveTipoAF, Importe, ImporteMin, ImporteMax,CveChofer, Observaciones"> diff --git a/Transportes/RepContratos.aspx.vb b/Transportes/RepContratos.aspx.vb index 81382b502..a0120e85b 100644 --- a/Transportes/RepContratos.aspx.vb +++ b/Transportes/RepContratos.aspx.vb @@ -93,7 +93,7 @@ Partial Class ListadoContratos End If 'Agregar contrato If BtnGuardar.Text = "Guardar" Then - CveContratoHijo = ObjContratos.AddContratos("", TxtDescripcion.Text, "", UsuarioActual.CveProveedor, DdlClientes.SelectedValue.ToEntero, -1, TxtFechaSalida.Text.ToDate, TxtFechaRegreso.Text.ToDate, TxtUbicacion.Text, "", 10, -1, -1, -1, -1, "", "", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, TxtAnticipo.Text.ToDecimal, TxtPesos.Text.ToDecimal, TxtDolares.Text.ToDecimal, -1, 0, CveContratoTipo:=2, CveContratosEstatus:=1, CveTipoAF:=DdlTransporte.SelectedValue.ToEntero, CveChofer:=DdlChofer.SelectedValue.ToEntero) + CveContratoHijo = ObjContratos.AddContratos("", TxtDescripcion.Text, "", UsuarioActual.CveProveedor, DdlClientes.SelectedValue.ToEntero, -1, TxtFechaSalida.Text.ToDate, TxtFechaRegreso.Text.ToDate, TxtUbicacion.Text, "", 10, -1, -1, -1, -1, "", "", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, TxtAnticipo.Text.ToDecimal, TxtPesos.Text.ToDecimal, TxtDolares.Text.ToDecimal, -1, 0, CveContratoTipo:=2, CveContratosEstatus:=1, CveTipoAF:=DdlTransporte.SelectedValue.ToEntero, CveChofer:=DdlChofer.SelectedValue.ToEntero, Observaciones:=TxtObservaciones.Text) If CveContratoHijo > 0 Then ObjContratos.Commit() Alert("Agregado Correctamente.") @@ -102,7 +102,7 @@ Partial Class ListadoContratos 'Actualizar contrato If BtnGuardar.Text = "Editar" Then - retorno = ObjContratos.UpdateContratos(CveContrato, "", TxtDescripcion.Text, "", -1, DdlClientes.SelectedValue.ToEntero, -1, TxtFechaSalida.Text.ToDate, TxtFechaRegreso.Text.ToDate, TxtUbicacion.Text, "", 10, -1, -1, -1, -1, "", "", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, TxtAnticipo.Text.ToDecimal, TxtPesos.Text.ToDecimal, TxtDolares.Text.ToDecimal, -1, 0, CveContratoTipo:=2, CveContratosEstatus:=1, CveChofer:=DdlChofer.SelectedValue.ToEntero, CveTipoAF:=DdlTransporte.SelectedValue.ToEntero) + retorno = ObjContratos.UpdateContratos(CveContrato, "", TxtDescripcion.Text, "", -1, DdlClientes.SelectedValue.ToEntero, -1, TxtFechaSalida.Text.ToDate, TxtFechaRegreso.Text.ToDate, TxtUbicacion.Text, "", 10, -1, -1, -1, -1, "", "", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, TxtAnticipo.Text.ToDecimal, TxtPesos.Text.ToDecimal, TxtDolares.Text.ToDecimal, -1, 0, CveContratoTipo:=2, CveContratosEstatus:=1, CveChofer:=DdlChofer.SelectedValue.ToEntero, CveTipoAF:=DdlTransporte.SelectedValue.ToEntero, Observaciones:=TxtObservaciones.Text) If retorno Then ObjContratos.Commit() @@ -136,7 +136,7 @@ Partial Class ListadoContratos Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) ViewState("CveContrato") = GvRow.DataKey("CveContrato") MostrarModal( - Descripcion:=GvRow.DataKey("DescripcionContrato"), FechaSalida:=GvRow.DataKey("FechaInicial").ToDateTime.ToString("yyyy-MM-dd HH:mm:ss").Replace(" ", "T"), FechaRegreso:=GvRow.DataKey("FechaFinal").ToDateTime.ToString("yyyy-MM-dd HH:mm:ss").Replace(" ", "T"), Observaciones:=GvRow.DataKey("DescripcionContrato"), Ubicacion:=GvRow.DataKey("Ubicacion"), Transporte:=GvRow.DataKey("CveTipoAF"), Cliente:=GvRow.DataKey("CveCliente"), Dolares:=GvRow.DataKey("Importe"), Pesos:=GvRow.DataKey("ImporteMax"), Anticipo:=GvRow.DataKey("ImporteMin"), Boton:="Editar", Chofer:=GvRow.DataKey("CveChofer")) + Descripcion:=GvRow.DataKey("DescripcionContrato"), FechaSalida:=GvRow.DataKey("FechaInicial").ToDateTime.ToString("yyyy-MM-dd HH:mm:ss").Replace(" ", "T"), FechaRegreso:=GvRow.DataKey("FechaFinal").ToDateTime.ToString("yyyy-MM-dd HH:mm:ss").Replace(" ", "T"), Observaciones:=GvRow.DataKey("Observaciones"), Ubicacion:=GvRow.DataKey("Ubicacion"), Transporte:=GvRow.DataKey("CveTipoAF"), Cliente:=GvRow.DataKey("CveCliente"), Dolares:=GvRow.DataKey("Importe"), Pesos:=GvRow.DataKey("ImporteMax"), Anticipo:=GvRow.DataKey("ImporteMin"), Boton:="Editar", Chofer:=GvRow.DataKey("CveChofer")) End Sub Protected Sub RemoveContrato(sender As Object, e As EventArgs) Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) From 725a72e7fa41eb609366a18707d722f214e65ab1 Mon Sep 17 00:00:00 2001 From: rakcsle Date: Sat, 3 Feb 2024 09:55:04 -0700 Subject: [PATCH 04/13] SMS - 2024.02.02 --- Empresas/186/Formatos/Traslado.rdlc | 4 + Empresas/186/Formatos/TrasladoAngeles.rdlc | 7 +- Inventarios/EntradasSalidas.aspx | 5 +- Inventarios/EntradasSalidas.aspx.vb | 44 +++++ Inventarios/EntregaAlmacen.aspx.vb | 42 +++++ Inventarios/RepNotasSinAlmacen.aspx.vb | 12 +- OS/Asignaciones.aspx | 5 + OS/Asignaciones.aspx.vb | 32 +++- OS/OrdenesServicios.aspx | 4 +- asmx/WS_PuntoVenta.asmx | 189 +++++++++++++++------ 10 files changed, 275 insertions(+), 69 deletions(-) diff --git a/Empresas/186/Formatos/Traslado.rdlc b/Empresas/186/Formatos/Traslado.rdlc index 8f958a741..e28016a7d 100644 --- a/Empresas/186/Formatos/Traslado.rdlc +++ b/Empresas/186/Formatos/Traslado.rdlc @@ -21,6 +21,10 @@ Codigo System.String + + NumeroParte + System.String + PS System.String diff --git a/Empresas/186/Formatos/TrasladoAngeles.rdlc b/Empresas/186/Formatos/TrasladoAngeles.rdlc index c794d6897..5879f7fec 100644 --- a/Empresas/186/Formatos/TrasladoAngeles.rdlc +++ b/Empresas/186/Formatos/TrasladoAngeles.rdlc @@ -21,6 +21,10 @@ Codigo System.String + + NumeroParte + System.String + PS System.String @@ -754,7 +758,7 @@ - =Fields!Codigo.Value + =Fields!NumeroParte.Value @@ -776,6 +780,7 @@ =IIf(rownumber(nothing) = 1, "2pt", "0pt") + true diff --git a/Inventarios/EntradasSalidas.aspx b/Inventarios/EntradasSalidas.aspx index 7cd33263d..f7ff4f447 100644 --- a/Inventarios/EntradasSalidas.aspx +++ b/Inventarios/EntradasSalidas.aspx @@ -62,6 +62,9 @@
  • PDF Resumen
  • +
  • + PDF Consola +
  • Descargar XML SAT
  • @@ -673,7 +676,7 @@ + DataKeyNames="No,CveMovimientoDetalle,Cantidad,CvePS,CveUM,PU,Observaciones,CodigoPS,UnidadMedida,CveAF,Serie,Lote,FechaCaducidad,CveSeccionAlmacen,Codigo" AutoGenerateColumns="False" AllowPaging="False" ShowFooter="True" > diff --git a/Inventarios/EntradasSalidas.aspx.vb b/Inventarios/EntradasSalidas.aspx.vb index 2db31e03e..2d72d8ab5 100644 --- a/Inventarios/EntradasSalidas.aspx.vb +++ b/Inventarios/EntradasSalidas.aspx.vb @@ -507,10 +507,51 @@ Partial Class Inventarios_EntradasSalidas 'ImgFecha.Visible = True End If + + If CveMovimiento > 0 And CveConcepto.Contiene(8) And UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then + ValidaUsaConsola() + End If + End If End Sub + Property Consola As String + Get + If ViewState("Consola") Is Nothing Then + ViewState("Consola") = "" + End If + Return ViewState("Consola").ToString + End Get + Set(value As String) + ViewState("Consola") = value + End Set + End Property + + Private Function ValidaUsaConsola() As Boolean + + Dim Respuesta As Boolean = False + + For Each gvRow As GridViewRow In GvM.Rows + If gvRow.DataKey("Codigo").Contiene("404Q2", "404Q3", "405Q2", "405Q3", "306Q1", "306Q2") Then + Consola = "ARS600" + Respuesta = True + HplImprimirConsola.Visible = True + Exit For + End If + If gvRow.DataKey("Codigo").Contiene("106Q1A", "106Q2A", "106Q3", "106Q3WT", "106Q4", "106Q4A", "106Q5A", "106Q6A", "106Q7A") Then + Consola = "ARS800" + Respuesta = True + HplImprimirConsola.Visible = True + Exit For + End If + Next + + Return Respuesta + + + End Function + #Region " PERMISOS PAGINAS " Private Function PermiteGuardar() As Boolean Return If(UsuarioActual.TienePermisoProceso(181) Or EsConsumoInterno, True, False) @@ -909,9 +950,12 @@ Partial Class Inventarios_EntradasSalidas HplImprimirResumen.Visible = True HplImprimirResumen.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=Almr&CveMovimiento={0}", CveMovimiento))) + CveCompra = Mov.CveCompra CveConcepto = Mov.CveConcepto + + If drM("CveEstatusTimbrado").ToString.ToEntero > 0 Then HplDescargaXml.Visible = True HplDescargaXml.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=DesXmlTra&CVEMOVIMIENTO={0}&EXT={1}&FOLIO={2}&TIPODOCTO={3}", CveMovimiento, "XML", drM("TimbreSerieFolio"), drM("TimbreTipoDocto")))) diff --git a/Inventarios/EntregaAlmacen.aspx.vb b/Inventarios/EntregaAlmacen.aspx.vb index f0d83d50d..abb8ed213 100644 --- a/Inventarios/EntregaAlmacen.aspx.vb +++ b/Inventarios/EntregaAlmacen.aspx.vb @@ -4,6 +4,7 @@ Option Explicit On Imports System.Data Imports System.Data.SqlClient Imports System.IO +Imports System.Web.Management Imports Extensiones Imports Microsoft.Reporting.WebForms @@ -4408,6 +4409,47 @@ Partial Class Inventarios_EntregaAlmacen Return Cancelar + End Function + + Property Consola As String + Get + If ViewState("Consola") Is Nothing Then + ViewState("Consola") = "" + End If + Return ViewState("Consola").ToString + End Get + Set(value As String) + ViewState("Consola") = value + End Set + End Property + + Private Function UsaConsola() As Boolean + + Dim Respuesta As Boolean = False + + For Each gvRow As GridViewRow In GvDatos.Rows + + If gvRow.FCCheckBox("cbInv").Checked AndAlso gvRow.FCTextBox("TbCantidadF").Text.ToDecimal > 0 Then + + If gvRow.DataKey("Codigo").Contiene("404Q2", "404Q3", "405Q2", "405Q3", "306Q1", "306Q2") Then + Consola = "ARS600" + Respuesta = True + Exit For + End If + + If gvRow.DataKey("Codigo").Contiene("106Q1A", "106Q2A", "106Q3", "106Q3WT", "106Q4", "106Q4A", "106Q5A", "106Q6A", "106Q7A") Then + Consola = "ARS800" + Respuesta = True + Exit For + End If + + End If + + Next + + Return Respuesta + + End Function End Class diff --git a/Inventarios/RepNotasSinAlmacen.aspx.vb b/Inventarios/RepNotasSinAlmacen.aspx.vb index 65770e8de..55a9eb262 100644 --- a/Inventarios/RepNotasSinAlmacen.aspx.vb +++ b/Inventarios/RepNotasSinAlmacen.aspx.vb @@ -65,13 +65,16 @@ Partial Class RepNotasSinAlmacen #End Region Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load - If Not IsPostBack Then - + If Not IsPostBack Then + CargaCombos() 'CargaDatos() CargaPermisos() End If - End Sub + End Sub + + + Private Sub CargaPermisos() Dim TienePermisoImportes As Boolean = UsuarioActual.TienePermisoProceso(201) Dim TienePermisoDesmarcar As Boolean = UsuarioActual.TienePermisoProceso(278) @@ -88,6 +91,9 @@ Partial Class RepNotasSinAlmacen GvVentas.Columns(8).Visible = True TxtFechaF.Text = NowADS.AddDays(3).ToShortDateString + GvVentas.Columns(4).Visible = False + GvCompras.Columns(4).Visible = False + GvVentas.Columns(0).ItemStyle.Width = Unit.Pixel(120) 'CType(GvVentas.Columns(2), Literal).DataFormatString = "{0:dd/MM/yyyy HH:mm}" 'CType(GvVentas.Columns(2), Literal).ItemStyle.Width = Unit.Pixel(120) diff --git a/OS/Asignaciones.aspx b/OS/Asignaciones.aspx index add8f193f..de229e14f 100644 --- a/OS/Asignaciones.aspx +++ b/OS/Asignaciones.aspx @@ -200,10 +200,15 @@ + + + + + > diff --git a/OS/Asignaciones.aspx.vb b/OS/Asignaciones.aspx.vb index bbee6bbff..19d9044ad 100644 --- a/OS/Asignaciones.aspx.vb +++ b/OS/Asignaciones.aspx.vb @@ -40,16 +40,13 @@ Partial Class OS_Asignaciones #End Region Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load If Not IsPostBack Then + GvNA_ConfiguraColumnas() CargaEstatusOS() 'CargaUsuarios() CargaClientes() CargaSubProyecto() - If UsuarioActual.Empresa.Funcionalidad(578) = "1" Then - GvNA.Columns(2).HeaderText = "Hospital" - GvNA.Columns(7).HeaderText = "Fecha Cirugía" - GvNA.Columns(8).HeaderText = "Hora Cirugía" - End If + If UsuarioActual.TienePermisoProceso(171) Then CargaOrdenesServiciosAsignadasXPersona() @@ -75,6 +72,9 @@ Partial Class OS_Asignaciones End If ObjEstatusPermisos.Dispose() + + + End If RegistraScript(" @@ -90,6 +90,26 @@ Partial Class OS_Asignaciones ") End Sub + Private Sub GvNA_ConfiguraColumnas() + + If UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then + GvNA.Columns(3).Visible = False + GvNA.Columns(4).Visible = False + GvNA.Columns(5).Visible = False + GvNA.Columns(6).Visible = False + + GvNA.Columns(7).Visible = True + GvNA.Columns(8).Visible = True + + + GvNA.Columns(2).HeaderText = "Hospital" + GvNA.Columns(9).HeaderText = "Fecha Cirugía" + GvNA.Columns(10).HeaderText = "Hora Cirugía" + End If + + + End Sub + #Region "C A R G A S " Private Sub CargaSubProyecto() DdlSubProyecto.Items.Clear() @@ -184,7 +204,7 @@ Partial Class OS_Asignaciones Dim TecnicosResultado As New DataTable If ObjOS.GetSubProyectosEstatusInicial(-1, 3, UsuarioActual.CveEmpresa) Then - TecnicosSubProyectos = ObjOS.DtResultados + TecnicosSubProyectos = ObjOS.DtResultados.FiltraParametros(" Estatus = 'True' ") End If If DtOSSubProyectos IsNot Nothing Then diff --git a/OS/OrdenesServicios.aspx b/OS/OrdenesServicios.aspx index 3a694320d..98bab92bd 100644 --- a/OS/OrdenesServicios.aspx +++ b/OS/OrdenesServicios.aspx @@ -1308,9 +1308,7 @@
    - - +
    diff --git a/asmx/WS_PuntoVenta.asmx b/asmx/WS_PuntoVenta.asmx index dc43bc5de..4ca18c926 100644 --- a/asmx/WS_PuntoVenta.asmx +++ b/asmx/WS_PuntoVenta.asmx @@ -439,8 +439,30 @@ Public Class WS_PuntoVenta objProyecto.Dispose() Return Respuesta - End Function - + End Function + + + + Public Function GetSucursales(CveEmpresa As Integer) As RespuestaWS + Dim objProyecto As New ClsSubProyectos + Dim Respuesta As New RespuestaWS + + If objProyecto.GetSubProyectos(CveEmpresa) Then + Respuesta.Datos = objProyecto.DtResultados + + Respuesta.Datos.Columns(2).ColumnName = "CveSucursal" + Respuesta.Datos.Columns(3).ColumnName = "Sucursal" + Respuesta.Datos.TableName = "Resultados" + Respuesta.HuboError = False + Else + Respuesta.Descripcion = "HUBO UN ERROR" + End If + + objProyecto.Dispose() + Return Respuesta + End Function + + Public Function GetClientes(CveEmpresa As Integer) As RespuestaWS Dim objClientes As New ClsClientes @@ -546,14 +568,15 @@ Public Class WS_PuntoVenta #Region "ProductosServicios" - Public Function GetProductosServicios(CvePS As Integer, CveClasificacion As Integer, Codigo As String, PS As String, CveEmpresa As Integer, CveSubProyecto As Integer) As RespuestaWS + Public Function GetProductosServicios(CvePS As Integer, CveClasificacion As Integer, Codigo As String, PS As String, CveEmpresa As Integer, CveSucursal As Integer) As RespuestaWS Dim objPS As New ClsProductosServicios Dim Respuesta As New RespuestaWS - If objPS.GetPS(CvePS, CveClasificacion, CveEmpresa, Codigo, PS, CveSubProyecto:=CveSubProyecto, pAplicaParaVenta:=1, pEstado:=1) Then + If objPS.GetPS(CvePS, CveClasificacion, CveEmpresa, Codigo, PS:=PS, CveSubProyecto:=CveSucursal, pAplicaParaVenta:=1, pEstado:=1) Then Respuesta.Datos = objPS.DtResultados Respuesta.Datos.TableName = "Resultados" - Respuesta.HuboError = False + Respuesta.HuboError = False + GuardaLog($"CvePS: {CvePS}, CveClasificacion: {CveClasificacion}, CveEmpresa: {CveEmpresa}, Codigo: {Codigo}, PS: {PS}, CveSubProyecto: {CveSucursal}, pAplicaParaVenta: {1}, pEstado: {1}") Else Respuesta.Descripcion = "HUBO UN ERROR" End If @@ -847,17 +870,35 @@ Public Class WS_PuntoVenta CvePrePoliza = ObjConta.AddPrePolizas("Vta", 4, objVenta.Total, objVenta.Total, objVenta.CveMoneda, objVenta.Fecha, "Punto de Venta addVenta", objVenta.CveUsuario, objVenta.CveEmpresa) - If objVentas.DtResultados.Rows.Count = 0 Then + If objVentas.DtResultados.Rows.Count = 0 Then + + If objVenta.CveEmpresa = 1 Then + If objVenta.CveSubProyecto <= 0 Then + objVenta.CveSubProyecto = 10430 + End If + + If objVenta.FolioFact.ToString.Contiene("", "-1", "0") Then + objVenta.FolioFact = getFolio("Rem", objVenta.CveEmpresa, objVenta.CveSubProyecto).ToEntero + End If + End If + + + If objVentas.AddVenta(objVenta.TipoDocto, objVenta.FolioFact, objVenta.CveCliente, objVenta.CveClienteSucursal, objVenta.SubTotal, objVenta.Descuento, objVenta.Amortizacion, objVenta.IVA, objVenta.RetIVA, objVenta.RetISR, objVenta.Total, objVenta.CveMoneda, objVenta.TipoCambio, objVenta.CveMetodoPago, objVenta.CondicionesPago, - objVenta.FormaPago, ClsPaginas.NowADS(), objVenta.Fecha, objVenta.MotivoDescuento, objVenta.Observaciones, objVenta.FechaEjecucion, + objVenta.FormaPago, ClsPaginas.NowADS(), objVenta.Fecha, objVenta.MotivoDescuento, objVenta.Observaciones, If(objVenta.FechaEjecucion < MinFecha, Now, objVenta.FechaEjecucion), objVenta.CveVendedor, If(objVenta.Alfa1 IsNot Nothing, objVenta.Alfa1, ""), If(objVenta.Alfa2 IsNot Nothing, objVenta.Alfa2, ""), If(objVenta.Alfa3 IsNot Nothing, objVenta.Alfa3, ""), objVenta.Num1, - objVenta.Num2, objVenta.Num3, Fech1, Fech2, Fech3, objVenta.CveCorte, If(objVenta.NumeroPersonas > 255, 255, objVenta.NumeroPersonas), CvePrePoliza, objVenta.CveUsuario, objVenta.CveEmpresa, objVenta.Propina, objVenta.CveVentaTerminal, CveSubProyecto:=objVenta.CveSubProyecto, CveSubProyectoEjecucion:=objVenta.CveSubProyecto) Then - objVenta.CveVenta = objVentas.CveVenta - 'Ingresar los detalles + objVenta.Num2, objVenta.Num3, Fech1, Fech2, Fech3, objVenta.CveCorte, If(objVenta.NumeroPersonas > 255, 255, objVenta.NumeroPersonas), CvePrePoliza, + objVenta.CveUsuario, objVenta.CveEmpresa, objVenta.Propina, objVenta.CveVentaTerminal, CveSubProyecto:=objVenta.CveSubProyecto, CveSubProyectoEjecucion:=objVenta.CveSubProyecto, Vigencia:=Now) Then + objVenta.CveVenta = objVentas.CveVenta + 'Ingresar los detalles + + If objVenta.CveEmpresa = 1 Then + GuardaLog($"objVenta.Detalle {objVenta.Detalle.Count}") + End If For Each Detalle As ClsVentaWS.ClsVentaDetalleWS In objVenta.Detalle - If objVentas.AddVentaDetalle(objVentas.CveVenta, Detalle.CvePS, Detalle.Cantidad, Detalle.CveUnidadMedida, Detalle.PU, Detalle.IVA, Detalle.Total, Detalle.Observaciones, Detalle.Descuento, Detalle.TipoDescuento, Detalle.CveSubProyecto, -1) Then + If objVentas.AddVentaDetalle(objVentas.CveVenta, Detalle.CvePS, Detalle.Cantidad, Detalle.CveUnidadMedida, Detalle.PU, Detalle.IVA, Detalle.Total, Detalle.Observaciones, Detalle.Descuento, Detalle.TipoDescuento, Detalle.CveSubProyecto, -1, IEPS:=0) Then 'Ingresar las caracteristicas del detalle de la venta For Each Caracteristica As ClsVentaWS.ClsVentaDetalleCaracteristicaWS In Detalle.Caracteristicas If objVentas.AddVentaDetalleCaracteristica(objVentas.CveVentaDetalle, Caracteristica.CvePS, Caracteristica.CveOpcion) = False Then @@ -954,50 +995,57 @@ Public Class WS_PuntoVenta 'Se agrega movimiento separado por la cuenta de ventas (ER) ' For Each Row As DataRow In DT.Rows ImporteMov = objVenta.SubTotal - Dim CveClasificacion_04 As Integer = -1 - If ImporteMov <> 0 Then - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimientoVenta, ImporteMov, ImporteMov, CveConceptoVenta, " ", " ", CveVenta:=objVenta.CveVenta, CveCliente:=objVenta.CveCliente, CveIE:=CveIE, CveSubProyecto:=objVenta.CveSubProyecto, CveClasificacion:=CveClasificacion_04) Then - ErrorMovtosVentas = True - End If - End If - ' Next - - 'Se agregan los DSV DESCUENTOS - ImporteMov = objVenta.Descuento - If ImporteMov <> 0 Then - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimientoVenta, ImporteMov, ImporteMov, CveConceptoDSV, " ", " ", CveVenta:=objVenta.CveVenta, CveCliente:=objVenta.CveCliente, CveIE:=CveIE) Then - ErrorMovtosDSV = True - End If - End If - 'End If - - 'Se agregan las CxC - ImporteMov = objVenta.Total - TotalPagado - If ImporteMov <> 0 Then - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimientoVenta, ImporteMov, ImporteMov, CveConceptoAfectacion, " ", " ", CveVenta:=objVenta.CveVenta, CveCliente:=objVenta.CveCliente, CveIE:=CveIE) Then - ErrorMovtosCxC = True - End If - End If - - 'Si hubo un pago agregarlo - ImporteMov = TotalPagado - If ImporteMov <> 0 Then - - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimientoVenta, ImporteMov, ImporteMov, 2, " ", " ", CveVenta:=objVenta.CveVenta, CveCliente:=objVenta.CveCliente, CveIE:=CveIE) Then - ErrorMovtosCxC = True - End If - End If - 'Se agregan el Traslado de IVA - ImporteMov = objVenta.IVA - If ImporteMov <> 0 Then - Dim PorcentajeImpuesto As Decimal = 0 - If objVenta.SubTotal > 0 Then - PorcentajeImpuesto = (objVenta.IVA / objVenta.SubTotal) - End If - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimientoVenta, ImporteMov, ImporteMov, CveConceptoIVA, " ", " ", CveVenta:=objVenta.CveVenta, CveCliente:=objVenta.CveCliente, CveIE:=CveIE, PorcentajeImpuesto:=PorcentajeImpuesto) Then - ErrorMovtosTrasladoIVA = True - End If - End If + + + + + + ' FIXME OIC + 'Dim CveClasificacion_04 As Integer = -1 + 'If ImporteMov <> 0 Then + ' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimientoVenta, ImporteMov, ImporteMov, CveConceptoVenta, " ", " ", CveVenta:=objVenta.CveVenta, CveCliente:=objVenta.CveCliente, CveIE:=CveIE, CveSubProyecto:=objVenta.CveSubProyecto, CveClasificacion:=CveClasificacion_04) Then + ' ErrorMovtosVentas = True + ' End If + 'End If + '' Next + + ''Se agregan los DSV DESCUENTOS + 'ImporteMov = objVenta.Descuento + 'If ImporteMov <> 0 Then + ' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimientoVenta, ImporteMov, ImporteMov, CveConceptoDSV, " ", " ", CveVenta:=objVenta.CveVenta, CveCliente:=objVenta.CveCliente, CveIE:=CveIE) Then + ' ErrorMovtosDSV = True + ' End If + 'End If + ''End If + + ''Se agregan las CxC + 'ImporteMov = objVenta.Total - TotalPagado + 'If ImporteMov <> 0 Then + ' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimientoVenta, ImporteMov, ImporteMov, CveConceptoAfectacion, " ", " ", CveVenta:=objVenta.CveVenta, CveCliente:=objVenta.CveCliente, CveIE:=CveIE) Then + ' ErrorMovtosCxC = True + ' End If + 'End If + + ''Si hubo un pago agregarlo + 'ImporteMov = TotalPagado + 'If ImporteMov <> 0 Then + + ' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimientoVenta, ImporteMov, ImporteMov, 2, " ", " ", CveVenta:=objVenta.CveVenta, CveCliente:=objVenta.CveCliente, CveIE:=CveIE) Then + ' ErrorMovtosCxC = True + ' End If + 'End If + ''Se agregan el Traslado de IVA + 'ImporteMov = objVenta.IVA + 'If ImporteMov <> 0 Then + ' Dim PorcentajeImpuesto As Decimal = 0 + ' If objVenta.SubTotal > 0 Then + ' PorcentajeImpuesto = (objVenta.IVA / objVenta.SubTotal) + ' End If + ' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimientoVenta, ImporteMov, ImporteMov, CveConceptoIVA, " ", " ", CveVenta:=objVenta.CveVenta, CveCliente:=objVenta.CveCliente, CveIE:=CveIE, PorcentajeImpuesto:=PorcentajeImpuesto) Then + ' ErrorMovtosTrasladoIVA = True + ' End If + 'End If + End If End If Else @@ -1051,6 +1099,37 @@ Public Class WS_PuntoVenta Return CveVentas End Function + + + Private Function getFolio(TipoDoctoConsulta As String, CveEmpresa As Integer, CvesubProyecto As Integer) As String + Dim Respuesta As String = "-1" + Dim ObjFolios As New ClsGralFolios() + + + + + + If ObjFolios.GetFolios(TipoDoctoConsulta, CveEmpresa) Then + GuardaLog($" GetFolios ok {ObjFolios.DtResultados.Rows.Count} . CvesubProyecto = {CvesubProyecto} .") + Dim DT As DataTable = ObjFolios.DtResultados.FiltraParametros(String.Format(" CveSubProyecto = {0} And Estado = 'Activo'", CvesubProyecto)) + If DT.Rows.Count > 0 Then + + Respuesta = DT.Rows(0)("FActual").ToString() + + + + End If + DT.Dispose() + + End If + + ObjFolios.Dispose() + + GuardaLog($" Folio Rem {Respuesta} .") + Return Respuesta + + End Function + #End Region From af7f9069b034e6ea6c95f3b95e0cf6fbb441c414 Mon Sep 17 00:00:00 2001 From: AbrahamCastilloV Date: Mon, 5 Feb 2024 15:46:41 -0700 Subject: [PATCH 05/13] =?UTF-8?q?--Se=20hicieron=20descoment=C3=B3=20propi?= =?UTF-8?q?edad=20de=20EstatusContratos=20por=20que=20se=20utilizar=C3=ADa?= =?UTF-8?q?=20en=20V&A=20y=20se=20modifican=20los=20m=C3=A9todos=20corresp?= =?UTF-8?q?ondientes.=20Se=20agrega=20c=C3=B3digo=20de=20color=20al=20m?= =?UTF-8?q?=C3=A9todo=20de=20GetContratos=20de=20CargaEvento.ashx=20depend?= =?UTF-8?q?iendo=20el=20estatus=20del=20contrato.=20=20Se=20agregan=20los?= =?UTF-8?q?=20datakey=20a=20GvContratos,=20la=20columna=20de=20estatus=20c?= =?UTF-8?q?on=20el=20mismo=20c=C3=B3digo=20de=20color=20que=20en=20CargaEv?= =?UTF-8?q?entos=20y=20se=20hace=20limpieza=20en=20VB=20.Se=20agrega=20al?= =?UTF-8?q?=20listado=20en=20calendario=20los=20textbox=20para=20elegir=20?= =?UTF-8?q?tipo=20de=20unidad=20y=20AF=20para=20el=20contrato=20y=20se=20o?= =?UTF-8?q?cultan=20los=20campos=20de=20costos=20en=20el=20modal.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App_Code/ClsContratos.vb | 8 +- Ashx/CargaEventos.ashx | 34 +- Transportes/RepContratos.aspx | 500 ++++++++++---------- Transportes/RepContratos.aspx.vb | 48 +- Transportes/RepContratosCalendario.aspx | 506 +++++++++++---------- Transportes/RepContratosCalendario.aspx.vb | 13 +- 6 files changed, 572 insertions(+), 537 deletions(-) diff --git a/App_Code/ClsContratos.vb b/App_Code/ClsContratos.vb index 4b8b847ba..361d518ea 100644 --- a/App_Code/ClsContratos.vb +++ b/App_Code/ClsContratos.vb @@ -158,7 +158,7 @@ Public Class ClsContratos Public Property PorGarantia As Double Public Property CveContratosEstatus As Integer Public Property Estatus As Integer - 'Public Property EstatusContrato As Integer + Public Property EstatusContrato As Integer Public Property Archivo As String Public Property Geom As String Public Property FechaIng As DateTime @@ -270,7 +270,7 @@ Public Class ClsContratos Me.PorAnticipo = Data.Rows(0)("PorAnticipo").ToString.ToDouble Me.PorAmortizacionAnticipo = Data.Rows(0)("PorAmortizacionAnticipo").ToString.ToDouble Me.PorGarantia = Data.Rows(0)("PorGarantia").ToString.ToDouble - 'Me.EstatusContrato = Data.Rows(0)("EstatusContrato").ToString.ToEntero + Me.EstatusContrato = Data.Rows(0)("EstatusContrato").ToString.ToEntero Me.Archivo = Data.Rows(0)("Archivo").ToString Me.Geom = Data.Rows(0)("Geom").ToString Me.FechaIng = Data.Rows(0)("FechaIng").ToString.ToDate @@ -406,7 +406,7 @@ Public Class ClsContratos Optional CveContratosEstatus As Integer = -1, Optional CveContratoTipo As Integer = -1, Optional TipoCambio As Double = 1.0, Optional CveSucursalCliente As Integer = -1, Optional CveAlmacenOrigen As Integer = -1, Optional CveAlmacenDestino As Integer = -1, Optional PorcentajeComision As Integer = -1, Optional TipoGarantia As Integer = -1, Optional Folio As Integer = -1, Optional FechaVenc As Date = Nothing, Optional EstatusFianza As Integer = -1, Optional CveContratoPlantilla As Integer = -1, Optional CveCuentaEquipo As Integer = -1, Optional CveVendedor As Integer = -1, Optional Observaciones As String = "", Optional CveDireccionEnvio As Integer = -1, Optional AplicaImpuestosLocales As Boolean = False, Optional CorreoNotificacionPedDev As String = "", Optional FacturacionCicilica As Boolean = False, Optional FacturacionCiclicaAutomatico As Boolean = False, - Optional DiaMesFacturacion As Integer = 1, Optional CvePeriodo As Integer = -1, Optional ObservacionesGenerales As String = "", Optional CveTipoAF As Integer = -1, Optional CveChofer As Integer = -1) As Boolean + Optional DiaMesFacturacion As Integer = 1, Optional CvePeriodo As Integer = -1, Optional ObservacionesGenerales As String = "", Optional CveTipoAF As Integer = -1, Optional CveChofer As Integer = -1, Optional EstatusContrato As Integer = -1, Optional CveAF As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Con_ContratosUpdate") @@ -463,6 +463,8 @@ Public Class ClsContratos .Add("@ObservacionesGenerales", SqlDbType.VarChar).Value = ObservacionesGenerales .Add("@CveTipoAF", SqlDbType.Int).Value = CveTipoAF .Add("@CveChofer", SqlDbType.Int).Value = CveChofer + .Add("@EstatusContrato", SqlDbType.Int).Value = EstatusContrato + .Add("@CveAF", SqlDbType.Int).Value = CveAF End With Try diff --git a/Ashx/CargaEventos.ashx b/Ashx/CargaEventos.ashx index 8d250faba..50a1a372d 100644 --- a/Ashx/CargaEventos.ashx +++ b/Ashx/CargaEventos.ashx @@ -442,7 +442,6 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState Dim DT_EstatusOS As New DataTable Dim usuarioActual_ As Usuario = UsuarioActual(context) Dim ErrorEventos As Boolean = False - Dim Colores() As String = {"#006699", "#0099cc", "#0066cc", "#0033cc", "#0000ff", "#3333ff", "#3333ff", "#6600ff", "#9933ff", "#cc00ff", "#cc00cc", "#cc0099", "#cc3399", "#cc6699", "#cc0066", "#009933", "#00cc00", "#00cc66", "#009999", "#669900", "#99cc00", "#cccc00", "#cc9900", "#ff9900", "#006666", "#669999"} Dim tipoVista As String = context.Request("tipoVista") DT_SubProyectos.Columns.Add("CveSubProyecto", GetType(Integer)) DT_SubProyectos.Columns.Add("backgroundColor") @@ -458,19 +457,31 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState For Each dr As DataRow In ObjContratos.DtResultados.Rows Dim cevent As CalendarEvent = New CalendarEvent() + Dim estatus As Integer = dr("EstatusContrato").ToString.ToEntero cevent.id = dr("CveContrato").ToString.ToEntero cevent.title = dr("DescripcionContrato").ToString cevent.start = String.Format("{0:s}", dr("FechaInicial").ToString.ToDateTime) - cevent.end = If(tipoVista = "fecha", String.Format("{0:s}", dr("FechaInicial").ToString.ToDateTime.AddHours(1)), String.Format("{0:s}", dr("FechaFinal").ToString.ToDateTime)) 'Agregar una hora, fecha final como default + cevent.end = If(tipoVista = "fecha", String.Format("{0:s}", dr("FechaInicial").ToString.ToDateTime.AddHours(1)), String.Format("{0:s}", dr("FechaFinal").ToString.ToDateTime)) cevent.allDay = False cevent.NombreAcercamiento = dr("Ubicacion").ToString cevent.CveCliente = dr("CveCliente").ToString.ToEntero - cevent.CveActivoFijo = dr("CveTipoAF").ToString.ToEntero cevent.CvePersonal = dr("CveChofer").ToString.ToEntero cevent.Dolares = dr("Importe").ToString.ToDecimal cevent.Pesos = dr("ImporteMax").ToString.ToDecimal cevent.Anticipo = dr("ImporteMin").ToString.ToDecimal + cevent.CveActivoFijo = dr("CveAF").ToString.ToEntero + + Select Case estatus + Case 1 + cevent.backgroundColor = "#45B6AF" + Case 2 + cevent.backgroundColor = "#89C4F4" + Case 3 + cevent.backgroundColor = "#F3565D" + End Select + + If Not cevent.recurrenciatipo > 0 Then @@ -554,24 +565,9 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState cevent.start = String.Format("{0:s}", dr("FechaInicial").ToString.ToDateTime) cevent.end = If(tipoVista = "fecha", String.Format("{0:s}", dr("FechaInicial").ToString.ToDateTime.AddHours(1)), String.Format("{0:s}", dr("FechaFinal").ToString.ToDateTime)) cevent.NombreAcercamiento = dr("Ubicacion").ToString - + cevent.CveActivoFijo = dr("CveAF").ToString.ToEntero cevent.allDay = False - 'cevent.CveEventoEstatus = dr("NumeroContrato").ToString.ToEntero - 'cevent.CveEventoEstatus = dr("CveEventoEstatus").ToString.ToEntero - 'cevent.cveagendatipo = dr("CveAgendaTipo").ToString - 'cevent.prioridad = dr("CvePrioridad").ToString.ToEntero - 'cevent.backgroundColor = dr("BackGroundColor").ToString - 'cevent.recurrenciatipo = dr("RecurrenciaTipo").ToString.ToEntero - 'cevent.frecuencia = dr("Frecuencia").ToString.ToEntero - 'cevent.diassemana = dr("DiasSemana").ToString - 'cevent.dia = dr("Dia").ToString.ToEntero - 'cevent.mes = dr("Mes").ToString.ToEntero - 'cevent.recurrenciafin = dr("RecurrenciaFin").ToString - 'cevent.CveProspecto = dr("CveProspecto").ToString.ToEntero - 'cevent.Prospecto = dr("Prospecto").ToString - - '11/05/2018 - Evento Gasto Recurrente 'SI LA FECHA DEL EVENTO ES MENOR DE 6 MESES DE LA FECHA ACTUAL NO LO AGREGA diff --git a/Transportes/RepContratos.aspx b/Transportes/RepContratos.aspx index 29f826dbf..64d99615b 100644 --- a/Transportes/RepContratos.aspx +++ b/Transportes/RepContratos.aspx @@ -34,18 +34,18 @@ - - + +
  • - Agregar Contrato + Agregar Contrato
  • Generar Excel
  • -
    - - - +
    + + +
    @@ -58,259 +58,263 @@ style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Fecha
    + Salida +
    + + + +
    + + + + Fecha
    + Regreso +
    + + + +
    + + + + + + + + + + + + + +
    +
    +
    +
    + + - diff --git a/Transportes/RepContratos.aspx.vb b/Transportes/RepContratos.aspx.vb index f3024068b..71c7f3def 100644 --- a/Transportes/RepContratos.aspx.vb +++ b/Transportes/RepContratos.aspx.vb @@ -22,25 +22,15 @@ Partial Class ListadoContratos End If End Sub Private Sub InicializaCombos() - 'Lista Activos Fijos' - 'Dim ObjAF As New ClsAF() - 'If ObjAF.GetActivosFijos(-1, UsuarioActual.CveEmpresa, "-1", "-1", -1, -1, "-1", -1, -1, -1, -1, 1, "-1", -1, -1, -1) Then - ' If ObjAF.DtResultados.Rows.Count > 0 Then - ' DdlAF.DataSource = ObjAF.DtResultados - ' DdlAF.Items.Insert(0, New ListItem("Seleccione", "")) - ' End If - 'End If - 'ObjAF.Dispose() DdlTipoAF.DataSource = GlobalDTTipoActivoFijo(UsuarioActual.CveEmpresa) DdlTipoAF.DataBind() - + DdlTipoAF.Items.Insert(0, New ListItem("Seleccione", "")) 'Lista Chofer' DdlChofer.DataSource = GlobalDTRHPersonal(185) DdlChofer.DataBind() DdlChofer.Items.Insert(0, New ListItem("Seleccione", "")) - UpModal.Update() End Sub Private Sub CargaDatos() @@ -48,25 +38,33 @@ Partial Class ListadoContratos If ObjContratos.GetContratos(-1, UsuarioActual.CveEmpresa, TipoContrato:=2) Then GvContratos.DataSource = ObjContratos.DtResultados End If - ObjContratos.Dispose() GvContratos.DataBind() UpTitulos.Update() + Console.WriteLine(DdlClientes) End Sub - Protected Sub MostrarModal(Optional Descripcion As String = "", Optional FechaSalida As String = "", Optional FechaRegreso As String = "", Optional Observaciones As String = "", Optional Ubicacion As String = "", Optional Transporte As String = "", Optional Cliente As String = "", Optional Dolares As String = "", Optional Pesos As String = "", Optional Anticipo As String = "", Optional Boton As String = "Guardar", Optional Chofer As String = "") + Protected Sub MostrarModal(Optional Descripcion As String = "", Optional FechaSalida As String = "", Optional FechaRegreso As String = "", Optional Observaciones As String = "", Optional Ubicacion As String = "", Optional Transporte As String = "", Optional Cliente As String = "", Optional Dolares As String = "", Optional Pesos As String = "", Optional Anticipo As String = "", Optional Boton As String = "Guardar", Optional AF As String = "", Optional Chofer As String = "", Optional EstatusContrato As String = "") + LbEstatus.Visible = False + DdlEstatusContrato.Visible = False + DdlClientes.SelectedText = Cliente TxtDescripcion.Text = Descripcion + TxtUbicacion.Text = Ubicacion TxtFechaSalida.Text = FechaSalida TxtFechaRegreso.Text = FechaRegreso - TxtObservaciones.Text = Observaciones - TxtUbicacion.Text = Ubicacion - DdlAF.SelectedValue = Transporte - DdlClientes.SelectedText = Cliente + DdlTipoAF.SelectedValue = AF DdlChofer.SelectedValue = Chofer + TxtObservaciones.Text = Observaciones TxtDolares.Text = Dolares TxtPesos.Text = Pesos TxtAnticipo.Text = Anticipo BtnGuardar.Text = Boton + If EstatusContrato <> "" Then + LbEstatus.Visible = True + DdlEstatusContrato.Visible = True + DdlEstatusContrato.SelectedValue = EstatusContrato + End If + 'DdlEstatusContrato.Text = EstatusContrato myModalLabel.InnerHtml = $"{Boton} Contrato" UpModal.Update() RegistraScript(String.Format("$('#{0}').modal('show');", "ModalAgregar")) @@ -86,27 +84,21 @@ Partial Class ListadoContratos Try Dim CveEstatusInicial As Integer = 10 - Dim CveContratoHijo As Integer = -1 - Dim CveContratoTipo As Integer = 2 - Dim retorno As Boolean = False If ObjContratos.GetContratosEstatus(UsuarioActual.CveEmpresa) Then CveEstatusInicial = ObjContratos.DtResultados.FiltroPrimeroValor("CveContratoEstatus", "TipoEstatus=1").ToEntero End If 'Agregar contrato If BtnGuardar.Text = "Guardar" Then - CveContratoHijo = ObjContratos.AddContratos("", TxtDescripcion.Text, "", UsuarioActual.CveProveedor, DdlClientes.SelectedValue.ToEntero, -1, TxtFechaSalida.Text.ToDate, TxtFechaRegreso.Text.ToDate, TxtUbicacion.Text, "", 10, -1, -1, -1, -1, "", "", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, TxtAnticipo.Text.ToDecimal, TxtPesos.Text.ToDecimal, TxtDolares.Text.ToDecimal, -1, 0, CveContratoTipo:=2, CveContratosEstatus:=1, CveTipoAF:=DdlTransporte.SelectedValue.ToEntero, CveChofer:=DdlChofer.SelectedValue.ToEntero, Observaciones:=TxtObservaciones.Text) - If CveContratoHijo > 0 Then + If ObjContratos.AddContratos("", TxtDescripcion.Text, "", UsuarioActual.CveProveedor, DdlClientes.SelectedValue.ToEntero, -1, TxtFechaSalida.Text.ToDate, TxtFechaRegreso.Text.ToDate, TxtUbicacion.Text, "", 10, -1, -1, -1, -1, "", "", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, TxtAnticipo.Text.ToDecimal, TxtPesos.Text.ToDecimal, TxtDolares.Text.ToDecimal, -1, 0, CveContratoTipo:=2, CveContratosEstatus:=1, CveTipoAF:=DdlTipoAF.SelectedValue.ToEntero, CveChofer:=DdlChofer.SelectedValue.ToEntero, Observaciones:=TxtObservaciones.Text) > 0 Then ObjContratos.Commit() Alert("Agregado Correctamente.") End If End If - 'Actualizar contrato If BtnGuardar.Text = "Editar" Then - retorno = ObjContratos.UpdateContratos(CveContrato, "", TxtDescripcion.Text, "", -1, DdlClientes.SelectedValue.ToEntero, -1, TxtFechaSalida.Text.ToDate, TxtFechaRegreso.Text.ToDate, TxtUbicacion.Text, "", 10, -1, -1, -1, -1, "", "", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, TxtAnticipo.Text.ToDecimal, TxtPesos.Text.ToDecimal, TxtDolares.Text.ToDecimal, -1, 0, CveContratoTipo:=2, CveContratosEstatus:=1, CveChofer:=DdlChofer.SelectedValue.ToEntero, CveTipoAF:=DdlTransporte.SelectedValue.ToEntero, Observaciones:=TxtObservaciones.Text) + If ObjContratos.UpdateContratos(CveContrato, "", TxtDescripcion.Text, "", -1, DdlClientes.SelectedValue.ToEntero, -1, TxtFechaSalida.Text.ToDate, TxtFechaRegreso.Text.ToDate, TxtUbicacion.Text, "", 10, -1, -1, -1, -1, "", "", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, TxtAnticipo.Text.ToDecimal, TxtPesos.Text.ToDecimal, TxtDolares.Text.ToDecimal, -1, 0, CveContratoTipo:=2, CveContratosEstatus:=1, CveChofer:=DdlChofer.SelectedValue.ToEntero, CveTipoAF:=DdlTipoAF.SelectedValue.ToEntero, Observaciones:=TxtObservaciones.Text, EstatusContrato:=DdlEstatusContrato.SelectedValue.ToEntero) Then - If retorno Then ObjContratos.Commit() Alert("Actualizado Correctamente.") End If @@ -118,7 +110,7 @@ Partial Class ListadoContratos TxtObservaciones.Text = "" TxtUbicacion.Text = "" DdlClientes.SelectedText = "" - DdlTransporte.SelectedValue = "" + DdlTipoAF.SelectedValue = "" DdlChofer.SelectedValue = "" TxtDolares.Text = "" TxtPesos.Text = "" @@ -128,8 +120,8 @@ Partial Class ListadoContratos Alert($"Ocurrió un error {ex}", TipoMensaje.MsgError) ObjContratos.RollBack() Finally - ObjContratos.Dispose() CargaDatos() + ObjContratos.Dispose() End Try @@ -138,7 +130,7 @@ Partial Class ListadoContratos Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) ViewState("CveContrato") = GvRow.DataKey("CveContrato") MostrarModal( - Descripcion:=GvRow.DataKey("DescripcionContrato"), FechaSalida:=GvRow.DataKey("FechaInicial").ToDateTime.ToString("yyyy-MM-dd HH:mm:ss").Replace(" ", "T"), FechaRegreso:=GvRow.DataKey("FechaFinal").ToDateTime.ToString("yyyy-MM-dd HH:mm:ss").Replace(" ", "T"), Observaciones:=GvRow.DataKey("Observaciones"), Ubicacion:=GvRow.DataKey("Ubicacion"), Transporte:=GvRow.DataKey("CveTipoAF"), Cliente:=GvRow.DataKey("CveCliente"), Dolares:=GvRow.DataKey("Importe"), Pesos:=GvRow.DataKey("ImporteMax"), Anticipo:=GvRow.DataKey("ImporteMin"), Boton:="Editar", Chofer:=GvRow.DataKey("CveChofer")) + Descripcion:=GvRow.DataKey("DescripcionContrato"), FechaSalida:=GvRow.DataKey("FechaInicial").ToDateTime.ToString("yyyy-MM-dd HH:mm:ss").Replace(" ", "T"), FechaRegreso:=GvRow.DataKey("FechaFinal").ToDateTime.ToString("yyyy-MM-dd HH:mm:ss").Replace(" ", "T"), Observaciones:=GvRow.DataKey("Observaciones"), Ubicacion:=GvRow.DataKey("Ubicacion"), Transporte:=GvRow.DataKey("CveTipoAF"), Cliente:=GvRow.DataKey("CveCliente"), Dolares:=GvRow.DataKey("Importe"), Pesos:=GvRow.DataKey("ImporteMax"), Anticipo:=GvRow.DataKey("ImporteMin"), Boton:="Editar", Chofer:=GvRow.DataKey("CveChofer"), EstatusContrato:=GvRow.DataKey("EstatusContrato"), AF:=GvRow.DataKey("CveTipoAF")) End Sub Protected Sub RemoveContrato(sender As Object, e As EventArgs) Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) diff --git a/Transportes/RepContratosCalendario.aspx b/Transportes/RepContratosCalendario.aspx index d441eabd3..a09dd79df 100644 --- a/Transportes/RepContratosCalendario.aspx +++ b/Transportes/RepContratosCalendario.aspx @@ -10,6 +10,10 @@ align-items: center; gap: 2rem; } + + .my-1 { + margin-block: 1rem; + } @@ -20,267 +24,303 @@ - <%--Calendario Tab--%> - + <%--Calendario Tab--%> + - - -
    -
    -
    -
    -
    -

    Tipo de Vista

    -
    - - - - + + +
    +
    +
    +
    +
    +

    Tipo de Vista

    + + + + +
    -
    -
    -
    +
    +
    +
    - - - <%--Contratos Tab--%> - - - - + + + <%--Contratos Tab--%> + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - Fecha
    - Salida -
    - - - -
    + + + Fecha
    + Salida +
    + + + +
    - - - Fecha
    - Regreso -
    - - - -
    + + + Fecha
    + Regreso +
    + + + +
    -
    -
    -
    -
    - + + + + + + + + + + +