This commit is contained in:
2024-01-29 05:16:55 -07:00
24 changed files with 1111 additions and 307 deletions

View File

@@ -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
@@ -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

View File

@@ -10717,6 +10717,7 @@ Public Class ClsPaginas
PaginaDict.Add("/Transportes/RepViajes.aspx".ToUpper(), 599)
PaginaDict.Add("/Transportes/RepBoletos.aspx".ToUpper(), 600)
PaginaDict.Add("/Transportes/Boletos.aspx".ToUpper(), 601)
PaginaDict.Add("/Transportes/RepContratosCalendario.aspx".ToUpper(), 603)
#End Region
'Antes de aquí.

View File

@@ -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

View File

@@ -45,6 +45,32 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
End If
Exit Select
Case "contrato_transportes"
If context.Request("U").ToEntero > 0 Then
CveUsuario = context.Request("U").ToEntero
CveEmpresa = context.Request("E").ToEntero
Dim CveSubProyecto As Integer = If(context.Request("CveSubProyecto") IsNot Nothing, context.Request("CveSubProyecto").ToEntero, -1)
Dim CveUsuarioPara As Integer = If(context.Request("CveUsuarioPara") IsNot Nothing, context.Request("CveUsuarioPara").ToEntero, -1)
FI = context.Request("start").ToDate
FF = context.Request("end").ToDate
If Not GetContratos(context:=context) Then
'Convierte el objeto de Eventos en JSON
'Dim oSerializer As System.Web.Script.Serialization.JavaScriptSerializer = New System.Web.Script.Serialization.JavaScriptSerializer
Dim sJSON As String = Newtonsoft.Json.JsonConvert.SerializeObject(events)
context.Response.Write(sJSON)
End If
End If
Exit Select
Case Else
Exit Select
@@ -69,13 +95,6 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
End If
End If
End Sub
Public ReadOnly Property IsReusable() As Boolean Implements IHttpHandler.IsReusable
@@ -137,11 +156,7 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
End If
Dim EsCoordinador As Boolean = False
Dim usuarioActual_ As Usuario = UsuarioActual(context)
If context IsNot Nothing AndAlso CveOS = -2 Then
If usuarioActual_.TienePermisoProceso(348) Then
@@ -265,7 +280,7 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
'AGREGAMOS CUANDO NO ES RECURRENTE
Dim tFecha As DateTime = DateAdd(DateInterval.Month, -6, ClsPaginas.NowADS())
'SI LA FECHA DEL EVENTO ES MENOR DE 6 MESES DE LA FECHA ACTUAL NO LO AGREGA
If dr("FechaFin").ToString.ToDateTime > tFecha Or dr("FechaInicio").ToString.ToDateTime > tFecha Then
If dr("FechaFinal").ToString.ToDateTime > tFecha Or dr("FechaInicio").ToString.ToDateTime > tFecha Then
events.Add(cevent)
End If
Else
@@ -418,6 +433,172 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
Return ErrorEventos
End Function
Private Function GetContratos(Optional context As HttpContext = Nothing) As Boolean
Dim ObjContratos As New ClsContratos
events = New List(Of CalendarEvent)
Dim DT_SubProyectos As New DataTable
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"}
DT_SubProyectos.Columns.Add("CveSubProyecto", GetType(Integer))
DT_SubProyectos.Columns.Add("backgroundColor")
DT_EstatusOS.Columns.Add("", GetType(Integer))
If ObjContratos.GetContratos(-1, usuarioActual_.CveEmpresa, TipoContrato:=2) Then
If ObjContratos.DtResultados.Rows.Count > 0 Then
Try
For Each dr As DataRow In ObjContratos.DtResultados.Rows
Dim cevent As CalendarEvent = New CalendarEvent()
cevent.id = dr("CveContrato").ToString.ToEntero
cevent.title = dr("DescripcionContrato").ToString
cevent.start = String.Format("{0:s}", dr("FechaInicial").ToString.ToDateTime)
cevent.end = String.Format("{0:s}", dr("FechaFinal").ToString.ToDateTime)
cevent.allDay = False
cevent.CveEventoEstatus = dr("NumeroContrato").ToString.ToEntero
If Not cevent.recurrenciatipo > 0 Then
'AGREGAMOS CUANDO NO ES RECURRENTE
Dim tFecha As DateTime = DateAdd(DateInterval.Month, -6, ClsPaginas.NowADS())
'SI LA FECHA DEL EVENTO ES MENOR DE 6 MESES DE LA FECHA ACTUAL NO LO AGREGA
If dr("FechaFinal").ToString.ToDateTime > tFecha Or dr("FechaInicial").ToString.ToDateTime > tFecha Then
events.Add(cevent)
End If
Else
'EMPIEZA METODO PARA AGREGAR CUANDO SI ES RECURRENTE
Dim FinRecurrencia As Integer = cevent.recurrenciafin.ToEntero
Dim FI As DateTime, FF As DateTime, FT As DateTime
Dim DiasSemana As String() = cevent.diassemana.Split(","c)
FI = cevent.start.ToDateTime
FF = cevent.end.ToDateTime
'OBTENEMOS LA FECHA TERMINO (FT) DE LA RECURRENCIA
Select Case FinRecurrencia
Case -1
FT = DateAdd(DateInterval.Year, 2, dr("FechaInicial").ToString.ToDateTime)
Case Is > 0
FinRecurrencia -= 1
Select Case cevent.recurrenciatipo
Case 1
FT = DateAdd(DateInterval.Hour, FinRecurrencia * cevent.frecuencia, dr("FechaInicial").ToString.ToDateTime)
Case 2
FT = DateAdd(DateInterval.Day, FinRecurrencia * cevent.frecuencia, dr("FechaInicial").ToString.ToDateTime)
Case 3
FT = DateAdd(DateInterval.WeekOfYear, FinRecurrencia * cevent.frecuencia, dr("FechaInicial").ToString.ToDateTime)
FT = DateAdd(DateInterval.Day, (7 - Weekday(FT)).ToString.ToDouble, FT)
Case 4
FT = DateAdd(DateInterval.Month, FinRecurrencia * cevent.frecuencia, dr("FechaInicial").ToString.ToDateTime)
Case 5
FT = DateAdd(DateInterval.Year, FinRecurrencia * cevent.frecuencia, dr("FechaInicial").ToString.ToDateTime)
End Select
End Select
'SI ES TIPO SEMANAL Y DIASSEMANA TIENE VALORES CHECKEA ESTOS VALORES
Do
If DiasSemana.Length > 0 AndAlso DiasSemana(0) <> "" Then
For Each drDias As String In DiasSemana
Dim FIT As Date = FI, FFT As Date = FF
FIT = DateAdd(DateInterval.Day, (drDias.ToEntero - Weekday(FI)).ToString.ToDouble, FI)
FFT = DateAdd(DateInterval.Day, (drDias.ToEntero - Weekday(FF)).ToString.ToDouble, FF)
cevent = New CalendarEvent()
cevent.id = dr("CveContrato").ToString.ToEntero
cevent.description = dr("DescripcionContrato").ToString
cevent.start = String.Format("{0:s}", dr("FechaInicial").ToString.ToDateTime)
cevent.end = String.Format("{0:s}", dr("FechaFinal").ToString.ToDateTime)
cevent.allDay = False
cevent.CveEventoEstatus = dr("NumeroContrato").ToString.ToEntero
'11/05/2018 - Evento Gasto Recurrente
cevent.CveTipoEvento = dr("CveTipoEvento").ToString.ToEntero
If cevent.CveTipoEvento = 10 Then
cevent.Importe = dr("Importe").ToString.ToDouble
End If
If cevent.CveEventoEstatus.ToString.ToEntero = 3 Then
cevent.backgroundColor = "#1BBC9B"
End If
'SI LA FECHA DEL EVENTO ES MENOR DE 6 MESES DE LA FECHA ACTUAL Y/0 SI LA FECHA INICIAL DE LA RECURRENCIA ES MENOR A LA FECHA QUE SE CREO EL EVENTO NO LO AGREGA
If FIT > DateAdd(DateInterval.Month, -6, ClsPaginas.NowADS()) And FIT >= dr("FechaInicial").ToString.ToDateTime Then
events.Add(cevent)
End If
Next
Else
cevent = New CalendarEvent()
cevent.id = dr("CveContrato").ToString.ToEntero
cevent.description = dr("DescripcionContrato").ToString
cevent.start = String.Format("{0:s}", dr("FechaInicial").ToString.ToDateTime)
cevent.end = String.Format("{0:s}", dr("FechaFinal").ToString.ToDateTime)
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
If FI > DateAdd(DateInterval.Month, -6, ClsPaginas.NowADS()) Then
events.Add(cevent)
End If
End If
Select Case cevent.recurrenciatipo
Case 1
FI = DateAdd(DateInterval.Hour, cevent.frecuencia, FI)
FF = DateAdd(DateInterval.Hour, cevent.frecuencia, FF)
Case 2
FI = DateAdd(DateInterval.Day, cevent.frecuencia, FI)
FF = DateAdd(DateInterval.Day, cevent.frecuencia, FF)
Case 3
FI = DateAdd(DateInterval.WeekOfYear, cevent.frecuencia, FI)
FF = DateAdd(DateInterval.WeekOfYear, cevent.frecuencia, FF)
Case 4
FI = DateAdd(DateInterval.Month, cevent.frecuencia, FI)
FF = DateAdd(DateInterval.Month, cevent.frecuencia, FF)
Case 5
FI = DateAdd(DateInterval.Year, cevent.frecuencia, FI)
FF = DateAdd(DateInterval.Year, cevent.frecuencia, FF)
End Select
Loop Until FI > FT
End If
Next
Catch ex As Exception
GuardaLog(ex.ToString())
End Try
End If
End If
ObjContratos.Dispose()
Return ErrorEventos
End Function
ReadOnly Property UsuarioActual(ByVal context As HttpContext) As Usuario
Get
UsuarioActual = DirectCast(If(context IsNot Nothing, context.Session("UsuarioSIG"), Nothing), Usuario)

View File

@@ -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

View File

@@ -793,7 +793,7 @@ CIUDAD DE MEXICO</Value>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Telefono +52 551 563 3271 support@smsmedicalsolutions.com</Value>
<Value>Teléfono: +52 551 563 3271 Correo: support@smsmedicalsolutions.com</Value>
<Style>
<FontSize>8pt</FontSize>
<FontWeight>Bold</FontWeight>
@@ -807,7 +807,7 @@ CIUDAD DE MEXICO</Value>
<Top>0.80781cm</Top>
<Left>4.60107cm</Left>
<Height>1.56146cm</Height>
<Width>10.0923cm</Width>
<Width>11.13886cm</Width>
<ZIndex>2</ZIndex>
<Style>
<Border>

View File

@@ -648,7 +648,7 @@ CIUDAD DE MEXICO</Value>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Telefono +52 551 563 3271 support@smsmedicalsolutions.com</Value>
<Value>Teléfono: +52 551 563 3271 Correo: support@smsmedicalsolutions.com</Value>
<Style>
<FontSize>8pt</FontSize>
<FontWeight>Bold</FontWeight>
@@ -662,7 +662,7 @@ CIUDAD DE MEXICO</Value>
<Top>0.93835cm</Top>
<Left>4.49034cm</Left>
<Height>1.56146cm</Height>
<Width>9.99987cm</Width>
<Width>10.79062cm</Width>
<ZIndex>1</ZIndex>
<Style>
<Border>

View File

@@ -1446,14 +1446,76 @@
</Border>
</Style>
</Tablix>
<Textbox Name="Textbox36">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Parameters!Observaciones.Value</Value>
<Style>
<FontSize>8pt</FontSize>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
<Paragraph>
<TextRuns>
<TextRun>
<Value />
<Style>
<FontSize>8pt</FontSize>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Proveedor: </Value>
<Style>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
<TextRun>
<Value>=Parameters!Documentacion.Value</Value>
<Style>
<FontWeight>Normal</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox31</rd:DefaultName>
<Top>2.16703cm</Top>
<Left>0.13678cm</Left>
<Height>1.27434cm</Height>
<Width>13.15003cm</Width>
<ZIndex>1</ZIndex>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</ReportItems>
<Height>0.88788in</Height>
<Height>1.35487in</Height>
<Style />
</Body>
<Width>10.19535in</Width>
<Page>
<PageHeader>
<Height>5.15937cm</Height>
<Height>4.53319cm</Height>
<PrintOnFirstPage>true</PrintOnFirstPage>
<PrintOnLastPage>true</PrintOnLastPage>
<ReportItems>
@@ -1532,7 +1594,7 @@ CIUDAD DE MEXICO</Value>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Telefono +52 551 563 3271 support@smsmedicalsolutions.com</Value>
<Value>Teléfono: +52 551 563 3271 Correo:support@smsmedicalsolutions.com</Value>
<Style>
<FontSize>8pt</FontSize>
<FontWeight>Bold</FontWeight>
@@ -1546,7 +1608,7 @@ CIUDAD DE MEXICO</Value>
<Top>0.63635cm</Top>
<Left>7.67902cm</Left>
<Height>1.52889cm</Height>
<Width>10.41731cm</Width>
<Width>11.02585cm</Width>
<ZIndex>2</ZIndex>
<Style>
<Border>
@@ -1770,57 +1832,163 @@ CIUDAD DE MEXICO</Value>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<Textbox Name="Textbox36">
<Textbox Name="Textbox9">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Parameters!Observaciones.Value</Value>
<Value>Cliente: </Value>
<Style>
<FontSize>8pt</FontSize>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
<Paragraph>
<TextRuns>
<TextRun>
<Value />
<Style>
<FontSize>8pt</FontSize>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Proveedor: </Value>
<Style>
<FontWeight>Bold</FontWeight>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
<TextRun>
<Value>=Parameters!Documentacion.Value</Value>
<Value>=Parameters!ClienteCodigo.Value</Value>
<Style>
<FontWeight>Normal</FontWeight>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
<TextRun>
<Value> - </Value>
<Style>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
<TextRun>
<Value>=Parameters!ClienteNombre.Value</Value>
<Style>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
<TextRun>
<Value>.
Sucursal: .</Value>
<Style>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
<TextRun>
<Value>=Parameters!ClienteSucursal.Value</Value>
<Style>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
<TextRun>
<Value> RFC: </Value>
<Style>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
<TextRun>
<Value>=Parameters!ClienteRFC.Value</Value>
<Style>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
<TextRun>
<Value>
Calle: </Value>
<Style>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
<TextRun>
<Value>=Parameters!ClienteCalle.Value</Value>
<Style>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
<TextRun>
<Value xml:space="preserve"> </Value>
<Style>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
<TextRun>
<Value>=Parameters!ClienteNoExt.Value</Value>
<Style>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
<TextRun>
<Value>. Colonia: </Value>
<Style>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
<TextRun>
<Value>=Parameters!ClienteColonia.Value</Value>
<Style>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
<TextRun>
<Value> Ciudad: </Value>
<Style>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
<TextRun>
<Value>=Parameters!ClienteCiudad.Value</Value>
<Style>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
<TextRun>
<Value>.
Estado: </Value>
<Style>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
<TextRun>
<Value>=Parameters!ClienteEstado.Value</Value>
<Style>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
<TextRun>
<Value>.
Municipio y/o Delegación: </Value>
<Style>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
<TextRun>
<Value>=Parameters!ClienteMunicipio.Value</Value>
<Style>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
<TextRun>
<Value>. CP: </Value>
<Style>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
<TextRun>
<Value>=Parameters!ClienteCP.Value</Value>
<Style>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
<TextRun>
<Value>.</Value>
<Style>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox31</rd:DefaultName>
<Top>2.27107cm</Top>
<Left>0.13678cm</Left>
<Height>2.8883cm</Height>
<Width>13.15003cm</Width>
<rd:DefaultName>Textbox7</rd:DefaultName>
<Top>2.32101cm</Top>
<Left>0.10068cm</Left>
<Height>2.12398cm</Height>
<Width>20.93288cm</Width>
<ZIndex>9</ZIndex>
<Style>
<Border>
@@ -2300,7 +2468,6 @@ CIUDAD DE MEXICO</Value>
</Style>
</Textbox>
<Line Name="Line5">
<Top>0cm</Top>
<Left>0.13678cm</Left>
<Height>0cm</Height>
<Width>20.28859cm</Width>
@@ -2312,7 +2479,6 @@ CIUDAD DE MEXICO</Value>
</Style>
</Line>
<Line Name="Line4">
<Top>0cm</Top>
<Left>0.13678cm</Left>
<Height>0cm</Height>
<Width>25.72414cm</Width>
@@ -2532,6 +2698,72 @@ CIUDAD DE MEXICO</Value>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="ClienteCodigo">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="ClienteNombre">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="ClienteSucursal">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="ClienteRFC">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="ClienteCalle">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="ClienteNoExt">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="ClienteColonia">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="ClienteCiudad">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="ClienteEstado">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="ClienteMunicipio">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="ClienteCP">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
</ReportParameters>
<EmbeddedImages>
<EmbeddedImage Name="Logo">

View File

@@ -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
@@ -1839,8 +1858,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 +2771,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

View File

@@ -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

View File

@@ -190,7 +190,8 @@
<div class="portlet-body">
<asp:GridView ID="GvNA" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron Órdenes de Servicio No Asignadas" ClientIDMode="Static"
DataKeyNames="CveOSDetalle, CveOS,CveUsuarioAtendio,TipoEstatus,EstatusOrdenServicio,CveSubProyecto,Folio,FechaCita,FechaCitaOS"
CssClass="table table-striped table-hover Widthall table-advance" GridLines="None">
data-sort="true"
CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" GridLines="None">
<Columns>
<asp:TemplateField HeaderText="">
<ItemTemplate>

View File

@@ -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()

View File

@@ -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

View File

@@ -155,6 +155,13 @@
</ContentTemplate>
</asp:UpdatePanel>
<div class="row">
<div class="col-md-12" style="text-align:right">
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="display: inline-block; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</div>
</div>
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" Width="100%" EmptyDataText="No se encontraron ordenes de servicio con los filtros especificados"

View File

@@ -1,4 +1,4 @@
<%@ Page Language="VB" AutoEventWireup="false" Title="Transportes V&A - Contratos"
<%@ Page Language="VB" AutoEventWireup="true" Title="Transportes V&A - Contratos"
MasterPageFile="~/Site.master"
CodeFile="RepContratos.aspx.vb"
Inherits="ListadoContratos" %>
@@ -34,21 +34,12 @@
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="HB" runat="Server">
<asp:UpdatePanel runat="server">
<ContentTemplate>
<li>
<asp:LinkButton ID="LBAgregarContrato" runat="server"><i class='fa fa-plus'></i>Agregar Contrato</asp:LinkButton>
</li>
<%-- <li>
<asp:HyperLink ID="LBListadoContratos" runat="server" NavigateUrl="RepContratos.aspx"
Target="_blank"><i class='fa fa-file'></i>Contratos</asp:HyperLink>
</li>
<li>
<asp:HyperLink ID="LBListadoViajes" runat="server" NavigateUrl="RepViajes.aspx"
Target="_blank"><i class='fa fa-road'></i>Viajes</asp:HyperLink>
</li>--%>
</ContentTemplate>
</asp:UpdatePanel>
<li>
<asp:LinkButton ID="LBAgregarContrato" runat="server"><i class='fa fa-plus'></i>Agregar Contrato</asp:LinkButton>
</li>
<li>
<asp:LinkButton ID="LBExcel" runat="server"><i class="fa fa-file-excel-o"></i>Generar Excel</asp:LinkButton>
</li>
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
@@ -61,71 +52,73 @@
</i></a>
</div>
<contenttemplate>
<asp:UpdatePanel ID="UpTitulos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="GvContratos" runat="server" AutoGenerateColumns="false" EmptyDataText="No se Encontró Contrato Registrado"
CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" GridLines="None"
data-sort="true" DataKeyNames="CveContrato, DescripcionContrato, Ubicacion, FechaInicial, FechaFinal, CveCliente, CveTipoAF, Importe, ImporteMin, ImporteMax ">
<Columns>
<asp:GridView ID="GvContratos" runat="server" AutoGenerateColumns="false" EmptyDataText="No se Encontró Contrato Registrado"
CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" GridLines="None"
data-sort="true" DataKeyNames="CveContrato, DescripcionContrato, Ubicacion, FechaInicial, FechaFinal, CveCliente, CveTipoAF, Importe, ImporteMin, ImporteMax ">
<Columns>
<asp:TemplateField HeaderText="No. Contrato">
<ItemTemplate>
<asp:Literal ID="LtlCveContrato" runat="server" Text='<%# Eval("CveContrato") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="No. Contrato">
<ItemTemplate>
<asp:Literal ID="LtlCveContrato" runat="server" Text='<%# Eval("CveContrato") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Descripcion">
<ItemTemplate>
<asp:Literal ID="LtlDescripcionContrato" runat="server" Text='<%# Eval("DescripcionContrato") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Descripcion">
<ItemTemplate>
<asp:Literal ID="LtlDescripcionContrato" runat="server" Text='<%# Eval("DescripcionContrato") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Ubicación">
<ItemTemplate>
<asp:Literal ID="LtUbicacion" runat="server" Text='<%# Eval("Ubicacion") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Ubicación">
<ItemTemplate>
<asp:Literal ID="LtUbicacion" runat="server" Text='<%# Eval("Ubicacion") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Cliente">
<ItemTemplate>
<asp:Literal ID="LtNombreComercial" runat="server" Text='<%# Eval("NombreComercial") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Cliente">
<ItemTemplate>
<asp:Literal ID="LtNombreComercial" runat="server" Text='<%# Eval("NombreComercial") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="100px">
<HeaderTemplate>
Fecha<br />
Salida
</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlFechaIng" runat="server" Text='<%# Eval("FechaInicial", "{0:d}") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="100px">
<HeaderTemplate>
Fecha<br />
Salida
</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlFechaIng" runat="server" Text='<%# Eval("FechaInicial", "{0:d}") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Fecha Final" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="100px">
<HeaderTemplate>
Fecha<br />
Regreso
</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlFechaFinal" runat="server" Text='<%# Eval("FechaFinal", "{0:d}") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Fecha Final" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="100px">
<HeaderTemplate>
Fecha<br />
Regreso
</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlFechaFinal" runat="server" Text='<%# Eval("FechaFinal", "{0:d}") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Acciones">
<ItemTemplate>
<asp:LinkButton ID="BtnEditar" runat="server" AlternateText="Editar"
CssClass="btn btn-circle btn-sm green" OnClick="UpdateContrato" Text="<i class='fa fa-pencil'></i>" />
<asp:LinkButton ID="BtnEliminar" runat="server" AlternateText="Eliminar"
CssClass="btn btn-circle btn-sm red" OnClick="RemoveContrato" Text="<i class='fa fa-trash'></i>"
data-toggle="confirmation" data-popout="true" data-original-title="Confirmar"
data-btn-ok-label="si" />
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Acciones">
<ItemTemplate>
<asp:LinkButton ID="BtnEditar" runat="server" AlternateText="Editar"
CssClass="btn btn-circle btn-sm green" OnClick="UpdateContrato" Text="<i class='fa fa-pencil'></i>" />
<asp:LinkButton ID="BtnEliminar" runat="server" AlternateText="Eliminar"
CssClass="btn btn-circle btn-sm red" OnClick="RemoveContrato" Text="<i class='fa fa-trash'></i>"
data-toggle="confirmation" data-popout="true" data-original-title="Confirmar"
data-btn-ok-label="si" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
<asp:UpdatePanel runat="server" ID="UpModal">
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdatePanel runat="server" ID="UpModal" UpdateMode="Conditional">
<ContentTemplate>
<div id="ModalAgregar" class="modal ADS fade" role="dialog">
<div class="modal-dialog">
@@ -213,7 +206,7 @@
<div class="row margin-bottom-5" id="TrAF" runat="server">
<label class="col-md-4 bold">
<asp:Label runat="server" Text="Tipo de Unidad:"></asp:Label></label><div
<asp:Label runat="server" Text="Transporte:"></asp:Label></label><div
class="col-md-8">
<asp:DropDownList ID="DdlTransporte" AppendDataBoundItems="true" DataTextField="Descripcion"
@@ -230,6 +223,24 @@
</div>
</div>
<div class="row margin-bottom-5" id="TrChofer" runat="server">
<label class="col-md-4 bold">
<asp:Label runat="server" Text="Chofer:"></asp:Label></label><div
class="col-md-8">
<asp:DropDownList ID="DdlChofer" AppendDataBoundItems="true" DataValueField="CvePersonal"
DataTextField="NombreCompleto" Class="table-group-action-input form-control input-inline text-center"
Width="200px" runat="server">
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVChofer" runat="server" ControlToValidate="DdlChofer"
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Chofer''</b> es necesario, por favor ingréselo."
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEChofer" runat="server" HighlightCssClass="vco"
TargetControlID="RFVChofer" Width="400px" BehaviorID="_content_VCEChofer">
</ajax:ValidatorCalloutExtender>
</div>
</div>
<div class="row my-1">
<label class="col-md-4 bold">Observaciones:</label>
<div class="col-md-8">

View File

@@ -1,5 +1,6 @@
Option Explicit On
Option Strict On
Imports Extensiones
Imports Extensiones.ModExtensiones
Partial Class ListadoContratos
@@ -15,12 +16,12 @@ Partial Class ListadoContratos
End Property
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
DdlClientes.setEsWebService(True)
InicializaCombos()
CargaDatos()
End If
End Sub
Private Sub InicializaCombos()
DdlClientes.setEsWebService(True)
'Lista Activos Fijos'
Dim ObjAF As New ClsAF()
If ObjAF.GetActivosFijos(-1, 13, "-1", "-1", -1, -1, "-1", -1, -1, -1, -1, 1, "-1", -1, -1, -1) Then
@@ -31,6 +32,14 @@ Partial Class ListadoContratos
End If
DdlTransporte.DataBind()
ObjAF.Dispose()
'Lista Chofer'
DdlChofer.DataSource = GlobalDTRHPersonal(185)
DdlChofer.DataBind()
DdlChofer.Items.Insert(0, New ListItem("Seleccione", ""))
UpModal.Update()
End Sub
Private Sub CargaDatos()
Dim ObjContratos As New ClsContratos
@@ -39,6 +48,8 @@ Partial Class ListadoContratos
End If
ObjContratos.Dispose()
GvContratos.DataBind()
UpTitulos.Update()
End Sub
Protected Sub MostrarModal()
TxtDescripcion.Text = ""
@@ -160,4 +171,9 @@ Partial Class ListadoContratos
ObjContratos.Dispose()
End Sub
Protected Sub LBExcel_Click(sender As Object, e As EventArgs) Handles LBExcel.Click
GvContratos.ExportToExcel("ReporteCompras" & NowADS().ToShortDateString)
End Sub
End Class

View File

@@ -0,0 +1,170 @@
<%@ Page Title="Transportes V&A - Calendario" Language="VB" MasterPageFile="~/Site.master"
AutoEventWireup="false" CodeFile="RepContratosCalendario.aspx.vb" Inherits="RepContratosCalendario" %>
<%@ Register Assembly="TimePicker" Namespace="MKB.TimePicker" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="Css" runat="Server">
<style type="text/css">
</style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="E" runat="Server">
Calendario de contratos
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="H" runat="Server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="C" runat="Server">
<div class="row">
<div class="col-md-12 col-sm-12">
<div class="portlet light calendar ">
<div class="portlet-title ">
<div class="caption">
<i class="icon-calendar font-green-sharp"></i>
<span class="caption-subject font-green-sharp bold uppercase">Contratos</span>
</div>
</div>
<div class="portlet-body">
<div id="calendar">
</div>
</div>
</div>
</div>
</div>
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="JS" runat="Server">
<script>
var PrimeraCargaCalendario = true;
var currentUpdateEvent;
var addStartDate;
var addEndDate;
var globalAllDay;
var view = null;
var date = null;
function InitCalendar() {
$(document).ready(function () {
Calendario();
});
}
function selectDate(start, end, allDay) {
}
function updateEvent(event, element) {
}
function RadionButtonSelectedValueSet(name, SelectdValue) {
$('input[name="' + name + '"][value="' + SelectdValue + '"]').prop('checked', true);
}
function updateEventOnDropResize(event, allDay) {
//alert("allday: " + allDay);
var eventToUpdate = {
id: event.id,
start: event.start
};
if (event.end === null) {
eventToUpdate.end = eventToUpdate.start;
}
else {
eventToUpdate.end = event.end;
}
// FullCalendar 2.x
var endDate;
if (!event.allDay) {
endDate = new Date(eventToUpdate.end + 60 * 60000);
endDate = endDate.toJSON();
}
else {
endDate = eventToUpdate.end.toJSON();
}
eventToUpdate.start = eventToUpdate.start.toJSON();
eventToUpdate.end = eventToUpdate.end.toJSON(); //endDate;
eventToUpdate.allDay = event.allDay;
PageMethods.ActualizaEvento(eventToUpdate, UpdateTimeSuccess);
}
function eventDropped(event, dayDelta, minuteDelta, allDay, revertFunc) {
if ($(this).data("qtip")) $(this).qtip("destroy");
updateEventOnDropResize(event);
}
function eventResized(event, dayDelta, minuteDelta, revertFunc) {
if ($(this).data("qtip")) $(this).qtip("destroy");
updateEventOnDropResize(event);
}
function Calendario() {
var date = new Date();
var d = date.getDate();
var m = date.getMonth();
var y = date.getFullYear();
var h = {};
if ($('#calendar').width() <= 400) {
$('#calendar').addClass("mobile");
h = {
left: 'title, prev, next',
center: '',
right: 'today,month,agendaWeek,agendaDay'
};
} else {
$('#calendar').removeClass("mobile");
h = {
left: 'title',
center: '',
right: 'prev,next,today,month,agendaWeek,agendaDay'
};
}
$('#calendar').fullCalendar('destroy'); // destroy the calendar
$('#calendar').fullCalendar({ //re-initialize the calendar
header: h,
monthNames: ["Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre"],
monthNamesShort: ['Ene', 'Feb', 'Mar', 'Abr', 'May', 'Jun', 'Jul', 'Ago', 'Sep', 'Oct', 'Nov', 'Dic'],
dayNames: ['Domingo', 'Lunes', 'Martes', 'Miércoles', 'Jueves', 'Viernes', 'Sábado'],
dayNamesShort: ['Dom', 'Lun', 'Mar', 'Mié', 'Jue', 'Vie', 'Sáb'],
buttonText: {
today: 'Hoy',
week: 'Semana',
month: 'Mes',
day: 'Día'
},
eventClick: updateEvent,
selectable: true,
selectHelper: true,
select: selectDate,
editable: true,
minTime: "08:00:00",
maxTime: "19:00:00",
events: {
url: '/Ashx/CargaEventos.ashx',
type: 'GET',
data: {
U: ' <%= UsuarioActual.CveUsuario %>',
E: '<%= UsuarioActual.CveEmpresa %>',
METODO: 'contrato_transportes',
CveUsuarioPara: $('#DdlTecnico').val(),
CveSubProyecto: $('#DdlSubProyecto').val()
}
},
eventDrop: eventDropped,
eventResize: eventResized
});
clickSemana();
}
</script>
</asp:Content>

View File

@@ -0,0 +1,21 @@
Option Explicit On
Option Strict On
Partial Class RepContratosCalendario
Inherits ClsPaginas
#Region "PROPIEDADES"
#End Region
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
InicializaCalendar()
End If
End Sub
Private Sub InicializaCalendar()
RegistraScript("InitCalendar();")
DirectCast(Master.FindControl("TSM"), ScriptManager).EnablePageMethods = True
End Sub
End Class

View File

@@ -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

View File

@@ -17,7 +17,7 @@
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>'Nombre del Procedimiento''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarProcedimiento"></asp:RequiredFieldValidator>
<label for="<%= TxtProcedimiento.ClientID.ToString()%>">Nombre Procedimiento:</label>
</div>
<div class="form-group form-md-line-input input-iconright" id="Div1" runat="server">
<div class="form-group form-md-line-input input-iconright" id="Div1" runat="server" visible="false">
<label for="<%= ChkEstatus.ClientID.ToString()%>">Activo:</label>
<asp:CheckBox ID="ChkEstatus" runat="server" CssClass="form-control make-switchsd" data-size="small"></asp:CheckBox>
</div>

View File

@@ -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" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
<link href="/Metronic/assets/global/plugins/datatables/plugins/bootstrap/dataTables.bootstrap.css" rel="stylesheet" />
</asp:Content>
@@ -380,9 +382,25 @@
<div id="DvModalAddMedico" class="modal ADS fade" role="dialog">
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpModalAddMedico" UpdateMode="Conditional">
<ContentTemplate>
<div class="modal-content" style="max-width:600px!important;max-height:505px!important">
<%--<UserControl:AddMedico runat="server" ID="AddMedicoControl" />--%>
<UserControl:AddMedico runat="server" ID="AddMedicoControl" />
</div>
<asp:Button ID="BtnRecargaMedicos" Style="display: none;" ClientIDMode="Static" runat="server" OnClick="BtnRecargaMedicos_Click" />
<asp:HiddenField ID="HdnCveMedicoNuevo" runat="server" ClientIDMode="Static" Value="-1" />
</ContentTemplate>
</asp:UpdatePanel>
</div>
<div id="DVAgregarMedico" class="modal ADS fade" role="dialog">
<%--<div id="DVAgregarMedico" class="modal ADS fade" role="dialog">
<div class="modal-dialog" style="min-width: 450px;">
<asp:UpdatePanel runat="server" class="modal-content" ID="UpModal" UpdateMode="Conditional">
<ContentTemplate>
@@ -406,9 +424,7 @@
<div class="row">
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtCedulaProfecional" CssClass="form-control " runat="server" MaxLength="50" CausesValidation="true"></asp:TextBox>
<%--<asp:RequiredFieldValidator ID="RfvTxtCedulaProfecional" runat="server" ControlToValidate="TxtCedulaProfecional" CssClass="help-block errorimput"
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cédula Profecional''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarRegistro"></asp:RequiredFieldValidator>--%>
<asp:TextBox ID="TxtCedulaProfecional" CssClass="form-control " runat="server" MaxLength="50" CausesValidation="true"></asp:TextBox>
<label for="<%= TxtCedulaProfecional.ClientID.ToString()%>">Cédula Profesional:</label>
</div>
</div>
@@ -563,8 +579,6 @@
</div>
</div>
</div>
</div>
</div>
@@ -576,7 +590,7 @@
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
</div>--%>
<div id="DVAgregarEspecialidad" class="modal ADS fade" role="dialog">
@@ -698,6 +712,12 @@
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
<script>
function fncRegargaMedicos(CveNuevoMedico) {
$("#HdnCveMedicoNuevo").val(CveNuevoMedico)
$('#BtnRecargaMedicos').click();
}
</script>
</asp:Content>

View File

@@ -51,20 +51,16 @@ Partial Class Ventas_CatMedicos
If Not Page.IsPostBack Then
If Request("EsFrame") IsNot Nothing AndAlso Request("EsFrame").ToEntero = 1 Then
EsFrame = True
End If
CargaCombos()
CargaEspecialidad()
CargaSubEspecialidad(-1)
'CargaEspecialidad()
'CargaSubEspecialidad(-1)
CargaDatos()
BtnConsultar_Click(Nothing, Nothing)
If EsFrame Then
LnkAgregarMedico_Click(Nothing, Nothing)
Else
CargaDatos()
BtnConsultar_Click(Nothing, Nothing)
End If
End If
@@ -95,41 +91,41 @@ Partial Class Ventas_CatMedicos
End Sub
Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles LbAgregar.Click
'Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles LbAgregar.Click
Dim ProcesoOK = False
Dim ObjVentas As New ClsVentas
' Dim ProcesoOK = False
' Dim ObjVentas As New ClsVentas
Dim Telefono As String = If(TxtTelefono.Text = "(___) ___-____", "", TxtTelefono.Text)
Dim Celular As String = If(TxtCelular.Text = "(___) ___-____", "", TxtCelular.Text)
' Dim Telefono As String = If(TxtTelefono.Text = "(___) ___-____", "", TxtTelefono.Text)
' Dim Celular As String = If(TxtCelular.Text = "(___) ___-____", "", TxtCelular.Text)
If CveMedico > 0 Then
If ObjVentas.UpdateMedico(CveMedico, TxtMedico.Text.Trim, TxtCedulaProfecional.Text.Trim, TxtFechaNacimiento.Text.ToDate, TxtNotas.Text.Trim, TxtDiasAtencion.Text.Trim, TxtHorario.Text.Trim, TxtLugar.Text.Trim, ChkEstatus.Checked,
UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Telefono, TxtMail.Text, DdlEspecialidad.SelectedValue.ToEntero, Celular, TxtConsultorio.Text.Trim, DdlSubEspecialidad.SelectedValue.ToEntero, TxtTorre.Text.Trim) Then
ProcesoOK = True
End If
Else
If ObjVentas.AddMedico(TxtMedico.Text.Trim, TxtCedulaProfecional.Text.Trim, TxtFechaNacimiento.Text.ToDate, TxtNotas.Text.Trim, TxtDiasAtencion.Text.Trim, TxtHorario.Text.Trim, TxtLugar.Text.Trim, ChkEstatus.Checked, UsuarioActual.CveUsuario,
UsuarioActual.CveEmpresa, Telefono, TxtMail.Text, DdlEspecialidad.SelectedValue.ToEntero, Celular, TxtConsultorio.Text.Trim, DdlSubEspecialidad.SelectedValue.ToEntero, TxtTorre.Text.Trim) > 0 Then
ProcesoOK = True
End If
End If
' If CveMedico > 0 Then
' If ObjVentas.UpdateMedico(CveMedico, TxtMedico.Text.Trim, TxtCedulaProfecional.Text.Trim, TxtFechaNacimiento.Text.ToDate, TxtNotas.Text.Trim, TxtDiasAtencion.Text.Trim, TxtHorario.Text.Trim, TxtLugar.Text.Trim, ChkEstatus.Checked,
' UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Telefono, TxtMail.Text, DdlEspecialidad.SelectedValue.ToEntero, Celular, TxtConsultorio.Text.Trim, DdlSubEspecialidad.SelectedValue.ToEntero, TxtTorre.Text.Trim) Then
' ProcesoOK = True
' End If
' Else
' If ObjVentas.AddMedico(TxtMedico.Text.Trim, TxtCedulaProfecional.Text.Trim, TxtFechaNacimiento.Text.ToDate, TxtNotas.Text.Trim, TxtDiasAtencion.Text.Trim, TxtHorario.Text.Trim, TxtLugar.Text.Trim, ChkEstatus.Checked, UsuarioActual.CveUsuario,
' UsuarioActual.CveEmpresa, Telefono, TxtMail.Text, DdlEspecialidad.SelectedValue.ToEntero, Celular, TxtConsultorio.Text.Trim, DdlSubEspecialidad.SelectedValue.ToEntero, TxtTorre.Text.Trim) > 0 Then
' ProcesoOK = True
' End If
' End If
ObjVentas.Dispose()
' ObjVentas.Dispose()
If ProcesoOK Then
Alert($"Medico {If(CveMedico > 0, "Actualizado", "Guardado")} Correctamente.")
RegistraScript("$('#DVAgregarMedico').modal('hide');")
CargaDatos()
CargaGlobal()
UpDatos.Update()
End If
' If ProcesoOK Then
' Alert($"Medico {If(CveMedico > 0, "Actualizado", "Guardado")} Correctamente.")
' RegistraScript("$('#DVAgregarMedico').modal('hide');")
' CargaDatos()
' CargaGlobal()
' UpDatos.Update()
' End If
End Sub
'End Sub
#Region "G V D A T O S"
@@ -171,36 +167,10 @@ Partial Class Ventas_CatMedicos
Public Sub LnkAgregarMedico_Click(sender As Object, e As EventArgs)
LbAgregar.Text = "Agregar"
LtlTituloModal.Text = "Agregar Médico"
TxtMedico.Text = ""
TxtCedulaProfecional.Text = ""
TxtFechaNacimiento.Text = ""
TxtNotas.Text = ""
TxtDiasAtencion.Text = ""
TxtHorario.Text = ""
TxtLugar.Text = ""
TxtConsultorio.Text = ""
TxtMail.Text = ""
TxtTelefono.Text = ""
TxtCelular.Text = ""
DdlEspecialidad.SelectedValueExist(-1)
DdlSubEspecialidad.SelectedValueExist(-1)
TxtTorre.Text = ""
DVUsuarioFechaIng.Visible = False
TxtFechaIng.Text = ""
TxtUsuario.Text = ""
DVEstatus.Visible = False
ChkEstatus.Checked = True
UpModal.Update()
CveMedico = -1
RegistraScript("$('#DVAgregarMedico').modal();")
AddMedicoControl.CveMedico = -1
AddMedicoControl.LimpiarControles()
UpModalAddMedico.Update()
RegistraScript("$('#DvModalAddMedico').modal();")
End Sub
Public Sub Edit_Click(sender As Object, e As EventArgs)
@@ -209,34 +179,41 @@ Partial Class Ventas_CatMedicos
CveMedico = GvRow.DataKey("CveMedico").ToEntero
TxtMedico.Text = GvRow.DataKey("Medico")
TxtCedulaProfecional.Text = GvRow.DataKey("CedulaProfesional")
TxtFechaNacimiento.Text = GvRow.DataKey("FechaNacimiento").ToDate().ToString("dd/MM/yyyy")
TxtNotas.Text = GvRow.DataKey("Notas")
TxtDiasAtencion.Text = GvRow.DataKey("DiasAtencion")
TxtHorario.Text = GvRow.DataKey("Horario")
TxtLugar.Text = GvRow.DataKey("Lugar")
TxtConsultorio.Text = GvRow.DataKey("Consultorio")
ChkEstatus.Checked = Boolean.Parse(GvRow.DataKey("Estatus"))
TxtMail.Text = GvRow.DataKey("Mail")
TxtTelefono.Text = GvRow.DataKey("Telefono")
TxtCelular.Text = GvRow.DataKey("Celular")
DdlEspecialidad.SelectedValueExist(-1)
DdlEspecialidad.SelectedValueExist(GvRow.DataKey("CveMedicoEspecialidad").ToEntero)
CargaSubEspecialidad(GvRow.DataKey("CveMedicoEspecialidad").ToEntero)
DdlSubEspecialidad.SelectedValueExist(GvRow.DataKey("CveMedicoSubEspecialidad").ToEntero)
TxtTorre.Text = GvRow.DataKey("Torre")
AddMedicoControl.PreparaEdicion(CveMedico, GvRow.DataKey("Medico"), GvRow.DataKey("CedulaProfesional"), GvRow.DataKey("FechaNacimiento").ToDate(), GvRow.DataKey("Notas"), GvRow.DataKey("DiasAtencion"),
GvRow.DataKey("Horario"), GvRow.DataKey("Lugar"), GvRow.DataKey("Consultorio"), Boolean.Parse(GvRow.DataKey("Estatus")), GvRow.DataKey("Mail"), GvRow.DataKey("Telefono"),
GvRow.DataKey("Celular"), GvRow.DataKey("CveMedicoEspecialidad").ToEntero, GvRow.DataKey("CveMedicoSubEspecialidad").ToEntero, GvRow.DataKey("Torre"),
GvRow.DataKey("FechaIng").ToDateTime, GvRow.DataKey("Usuario"))
DVUsuarioFechaIng.Visible = True
TxtFechaIng.Text = GvRow.DataKey("FechaIng").ToDateTime.ToString("dd/MM/yyyy hh:mm:ss tt")
TxtUsuario.Text = GvRow.DataKey("Usuario")
DVEstatus.Visible = True
LbAgregar.Text = "Actualizar"
LtlTituloModal.Text = $"Actualizar Médico {TxtCedulaProfecional.Text}"
'TxtMedico.Text = GvRow.DataKey("Medico")
'TxtCedulaProfecional.Text = GvRow.DataKey("CedulaProfesional")
'TxtFechaNacimiento.Text = GvRow.DataKey("FechaNacimiento").ToDate().ToString("dd/MM/yyyy")
'TxtNotas.Text = GvRow.DataKey("Notas")
'TxtDiasAtencion.Text = GvRow.DataKey("DiasAtencion")
'TxtHorario.Text = GvRow.DataKey("Horario")
'TxtLugar.Text = GvRow.DataKey("Lugar")
'TxtConsultorio.Text = GvRow.DataKey("Consultorio")
'ChkEstatus.Checked = Boolean.Parse(GvRow.DataKey("Estatus"))
'TxtMail.Text = GvRow.DataKey("Mail")
'TxtTelefono.Text = GvRow.DataKey("Telefono")
'TxtCelular.Text = GvRow.DataKey("Celular")
'DdlEspecialidad.SelectedValueExist(-1)
'DdlEspecialidad.SelectedValueExist(GvRow.DataKey("CveMedicoEspecialidad").ToEntero)
'CargaSubEspecialidad(GvRow.DataKey("CveMedicoEspecialidad").ToEntero)
'DdlSubEspecialidad.SelectedValueExist(GvRow.DataKey("CveMedicoSubEspecialidad").ToEntero)
'TxtTorre.Text = GvRow.DataKey("Torre")
UpModal.Update()
RegistraScript("$('#DVAgregarMedico').modal();")
'DVUsuarioFechaIng.Visible = True
'TxtFechaIng.Text = GvRow.DataKey("FechaIng").ToDateTime.ToString("dd/MM/yyyy hh:mm:ss tt")
'TxtUsuario.Text = GvRow.DataKey("Usuario")
'DVEstatus.Visible = True
'LbAgregar.Text = "Actualizar"
'LtlTituloModal.Text = $"Actualizar Médico {TxtCedulaProfecional.Text}"
'UpModal.Update()
UpModalAddMedico.Update()
RegistraScript("$('#DvModalAddMedico').modal();")
End Sub
@@ -402,7 +379,7 @@ Partial Class Ventas_CatMedicos
ObjVentas.Dispose()
If ProcesoOK Then
CargaEspecialidad()
'CargaEspecialidad()
Alert($"Especialidad {If(CveMedicoEspecialidad > 0, "actualizada", "agregada")} correctamente.")
RegistraScript("$('#DVAgregarEspecialidad').modal('hide');")
End If
@@ -415,47 +392,47 @@ Partial Class Ventas_CatMedicos
UpModalEspecialidad.Update()
End Sub
Sub CargaEspecialidad()
Dim ObjVentas As New ClsVentas
'Sub CargaEspecialidad()
' Dim ObjVentas As New ClsVentas
If ObjVentas.GetMedicosEspecialidades(-1, UsuarioActual.CveEmpresa, -1) Then
'GvEspecialidad.DataSource = ObjVentas.DtResultados
DdlEspecialidad.DataSource = ObjVentas.DtResultados
Else
'GvEspecialidad.DataSource = Nothing
End If
' If ObjVentas.GetMedicosEspecialidades(-1, UsuarioActual.CveEmpresa, -1) Then
' 'GvEspecialidad.DataSource = ObjVentas.DtResultados
' DdlEspecialidad.DataSource = ObjVentas.DtResultados
' Else
' 'GvEspecialidad.DataSource = Nothing
' End If
ObjVentas.Dispose()
' ObjVentas.Dispose()
'GvEspecialidad.DataBind()
' 'GvEspecialidad.DataBind()
DdlEspecialidad.DataBind()
DdlEspecialidad.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
' DdlEspecialidad.DataBind()
' DdlEspecialidad.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
UpModal.Update()
'UpEspecialidad.Update()
' UpModal.Update()
' 'UpEspecialidad.Update()
End Sub
'End Sub
Sub CargaSubEspecialidad(CveMedicoEspecialidad As Integer)
Dim ObjVentas As New ClsVentas
'Sub CargaSubEspecialidad(CveMedicoEspecialidad As Integer)
' Dim ObjVentas As New ClsVentas
If ObjVentas.GetMedicosSubEspecialidades(-1, UsuarioActual.CveEmpresa, -1) Then
If CveMedicoEspecialidad > 0 Then
DdlSubEspecialidad.DataSource = ObjVentas.DtResultados.FiltraParametros($"CveMedicoEspecialidad = {CveMedicoEspecialidad}")
Else
DdlSubEspecialidad.DataSource = ObjVentas.DtResultados
End If
End If
' If ObjVentas.GetMedicosSubEspecialidades(-1, UsuarioActual.CveEmpresa, -1) Then
' If CveMedicoEspecialidad > 0 Then
' DdlSubEspecialidad.DataSource = ObjVentas.DtResultados.FiltraParametros($"CveMedicoEspecialidad = {CveMedicoEspecialidad}")
' Else
' DdlSubEspecialidad.DataSource = ObjVentas.DtResultados
' End If
' End If
ObjVentas.Dispose()
' ObjVentas.Dispose()
DdlSubEspecialidad.DataBind()
DdlSubEspecialidad.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
UpModal.Update()
' DdlSubEspecialidad.DataBind()
' DdlSubEspecialidad.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
' UpModal.Update()
End Sub
'End Sub
Protected Sub LnkEditarEspecialidad_Click(sender As Object, e As EventArgs)
@@ -491,7 +468,7 @@ Partial Class Ventas_CatMedicos
ObjVentas.Dispose()
If ProcesoOK Then
CargaEspecialidad()
'CargaEspecialidad()
Alert("Especialidad eliminada correctamente")
End If
@@ -502,14 +479,14 @@ Partial Class Ventas_CatMedicos
Protected Sub DdlEspecialidad_SelectedIndexChanged(sender As Object, e As EventArgs)
CargaSubEspecialidad(DdlEspecialidad.SelectedValue.ToEntero)
'Protected Sub DdlEspecialidad_SelectedIndexChanged(sender As Object, e As EventArgs)
' CargaSubEspecialidad(DdlEspecialidad.SelectedValue.ToEntero)
'End Sub
Protected Sub BtnRecargaMedicos_Click(sender As Object, e As EventArgs)
CargaDatos()
End Sub
End Class

View File

@@ -4144,6 +4144,7 @@
<asp:UpdatePanel ID="UpFacturar" runat="server" class="portlet light xspadding bordered " style="max-width: 300px;" align="right" UpdateMode="Conditional">
<Triggers>
<asp:PostBackTrigger ControlID="BtnVistaPrevia" />
<asp:PostBackTrigger ControlID="LBVistaPrevia" />
</Triggers>
<ContentTemplate>
@@ -4185,6 +4186,9 @@
Facturar <i class="fa fa-angle-down"></i>
</button>
<ul class="dropdown-menu">
<li>
<asp:LinkButton ID="LBVistaPrevia" Text="Vista Previa" OnClick="LBVistaPrevia_Click" runat="server" Visible="false" />
</li>
<li>
<asp:LinkButton ID="LBFacturarIngreso" Text="Ingreso" OnClick="LBFacturarIngreso_Click" runat="server" data-toggle="confirmation" data-popout="true" data-original-title="¿Seguro que desea facturar como tipo ingreso?" data-btn-ok-label="si" />
</li>
@@ -8675,16 +8679,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) {

View File

@@ -2599,11 +2599,10 @@ Partial Class Ventas
CargaMedicos()
CargaProcedimientos()
CargaDdlClientesSucursal()
LBVistaPrevia.Visible = True
End If
'SI USUARIO USA AMORTIZACIÓN CONTABLE, se carga las tablas para usarlas mas adelante
If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso UsuarioActual.Empresa.UsaAC Then
@@ -11497,7 +11496,7 @@ Partial Class Ventas
End Function
Private Sub CreaObjetosVenta(Optional VistaPrevia As Boolean = False, Optional EsCancelacion As Boolean = False, Optional TipoDoctoViejo As String = "")
Private Sub CreaObjetosVenta(Optional VistaPrevia As Boolean = False, Optional EsCancelacion As Boolean = False, Optional TipoDoctoViejo As String = "", Optional TipoDoctoVistaPrevia As String = "")
If Me.CveVenta > 0 AndAlso NuevaFactura <> 1 Then
ObjFactura = New Modelos.Factura(UsuarioActual, CveVenta, UsuarioActual.CveEmpresa, EsCancelacion:=EsCancelacion)
@@ -11521,6 +11520,11 @@ Partial Class Ventas
ObjFactura.Moneda = DdlMoneda.SelectedItem.Text
ObjFactura.MonedaSAT = GlobalDTMonedas.FiltroPrimeroValor("AbreviaturaSAT", $"CveMoneda = {DdlMoneda.SelectedValue}")
ObjFactura.TipoDocto = If(IfNull(ViewState("CveRemision"), 0).ToString().ToEntero() > 0, "Ing", DdlTipoComprobante.SelectedValue)
If VistaPrevia AndAlso Not String.IsNullOrEmpty(TipoDoctoVistaPrevia) Then
ObjFactura.TipoDocto = TipoDoctoVistaPrevia
End If
ObjFactura.FacturarSucursal = (Me.FacturarSucursal AndAlso DdlSucursalCliente.SelectedValue.ToEntero() > 0 AndAlso (Me.ClienteSucursal IsNot Nothing AndAlso Not String.IsNullOrEmpty(Me.ClienteSucursal.RFC)))
ObjFactura.VentaDesglosaIEPS = Me.VentaDesglosaIEPS
@@ -16940,6 +16944,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
@@ -16949,6 +16968,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)
@@ -24469,8 +24492,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)
@@ -36088,6 +36112,8 @@ Partial Class Ventas
Dim dRow As DataRow = objVenta.DtResultados.Rows(0)
DdlMedico.SelectedValueExist(dRow("CveMedico").ToString.ToEntero)
DdlProcedimiento.SelectedValueExist(dRow("CveProcedimiento").ToString.ToEntero)
TxtPaciente.Text = dRow("Paciente").ToString
TxtEpisodio.Text = dRow("Episodio").ToString
SeEstaFActurandoVentaMedica = True
CveTipoVenta = dRow("CveTipoVenta").ToString.ToEntero
ChkRequiereTecnico_CheckedChanged(Nothing, Nothing)
@@ -36704,9 +36730,18 @@ Partial Class Ventas
CargaAnticipos(CveCliente)
End Sub
Protected Sub LBVistaPrevia_Click(sender As Object, e As EventArgs)
CreaObjetosVenta(True, TipoDoctoVistaPrevia:="Ing")
If ObjFactura Is Nothing Or (ObjFactura.Cliente Is Nothing And Not CveEmpresaCRM > 0) Then
Alert("Ocurrió un error al procesar los datos para la vista previa. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgError)
ObjFactura = Nothing
Exit Sub
End If
Dim CartaPorte As Modelos.MSubReportData = Nothing
ImprimirbytesPDF(PdfFactura(ObjFactura, Guardar:=False, SubReportData:=CartaPorte), "Factura", "PDF")
End Sub
End Class