RepServicioDomicilio base
This commit is contained in:
@@ -5606,7 +5606,7 @@ Public Class ClsPaginas
|
||||
PaginaDict.Add("/Contabilidad/OCDetalleAlmacen.aspx".ToUpper(), -1)
|
||||
|
||||
PaginaDict.Add("/Agropecuaria/CierreCultivo.aspx".ToUpper(), 1326)
|
||||
|
||||
|
||||
PaginaDict.Add("/Inventarios/RepRSCO.aspx".ToUpper(), 1328)
|
||||
|
||||
|
||||
@@ -5641,6 +5641,9 @@ Public Class ClsPaginas
|
||||
|
||||
PaginaDict.Add("/Contabilidad2/RepBalanceGeneralHorizontal.aspx".ToUpper(), -1)
|
||||
|
||||
PaginaDict.Add("/OS/RepServicioDomicilio.aspx".ToUpper(), -1)
|
||||
|
||||
|
||||
|
||||
|
||||
'ECOMMERCE
|
||||
@@ -7041,6 +7044,9 @@ Public Class ClsPaginas
|
||||
Vta.SelloCFDi = "Sin Timbrar"
|
||||
Vta.SelloSAT = "Sin Timbrar"
|
||||
|
||||
Dim CETipoOperacion = "", CEClavePedimento As String = "", CEIncoterm As String = "", CEId As String = "", CEMotivoTraslado As String = "", CETipoCambio As String = ""
|
||||
Dim RCETipoOperacion As String = "", RCEClavePedimento As String = "", RCEIncoterm As String = "", RCEMotivoTraslado As String = ""
|
||||
|
||||
'SI ESTA TIMBRADA - CON XML
|
||||
If File.Exists(PathXML) AndAlso Vta.Serie <> "VistaPrevia" Then 'Cuando es vista previe y coincide la serie y folio se ponen los datos fiscales
|
||||
Dim XmlDoc As New System.Xml.XmlDocument
|
||||
@@ -7077,6 +7083,38 @@ Public Class ClsPaginas
|
||||
Vta.SelloCFDi = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("SelloCFD").InnerText
|
||||
Vta.SelloSAT = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("SelloSAT").InnerText
|
||||
End If
|
||||
|
||||
If XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Name = "cce11:ComercioExterior" Then
|
||||
|
||||
CETipoOperacion = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("TipoOperacion").InnerText
|
||||
CEClavePedimento = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("ClaveDePedimento").InnerText
|
||||
CEIncoterm = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("Incoterm").InnerText
|
||||
|
||||
|
||||
Dim namespaces As XmlNamespaceManager = New XmlNamespaceManager(XmlDoc.NameTable)
|
||||
namespaces.AddNamespace("cce11", "http://www.sat.gob.mx/ComercioExterior11")
|
||||
|
||||
CEId = ""
|
||||
Try
|
||||
CEId = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).SelectSingleNode("//cce11:Destinatario", namespaces).Attributes("NumRegIdTrib").InnerText 'XmlDoc.SelectNodes("//cfdi:Complemento/tfd:TimbreFiscalDigital/cce11:Destinatario")
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
|
||||
|
||||
CEMotivoTraslado = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("MotivoTraslado").InnerText
|
||||
CETipoCambio = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("TipoCambioUSD").InnerText
|
||||
|
||||
|
||||
|
||||
|
||||
RCETipoOperacion = GlobalDTTipoOperacion.FiltroPrimeroValor("Descripcion", $"ClaveSATTipoOperacion = '{CETipoOperacion}'")
|
||||
RCEClavePedimento = GlobalDTClavePedimento.FiltroPrimeroValor("Descripcion", $"ClaveSATPedimento = '{CEClavePedimento}'")
|
||||
RCEIncoterm = GlobalDTIncoterm.FiltroPrimeroValor("Descripcion", $"ClaveSATIncoterm = '{CEIncoterm}'")
|
||||
RCEMotivoTraslado = GlobalDTSATMotivoTraslado.FiltroPrimeroValor("MotivoTraslado", $"ClaveSATMotivoTraslado = '{CEMotivoTraslado}'")
|
||||
'RCETipoCambio = {RCETipoCambio
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
End If
|
||||
@@ -7191,6 +7229,17 @@ Public Class ClsPaginas
|
||||
Dim params As New List(Of ReportParameter)
|
||||
|
||||
|
||||
|
||||
If RCETipoOperacion.Trim.Length > 0 Then
|
||||
params.Add(New ReportParameter("CETipoOperacion", RCETipoOperacion))
|
||||
params.Add(New ReportParameter("CEClavePedimento", RCEClavePedimento))
|
||||
params.Add(New ReportParameter("CEIncoterm", RCEIncoterm))
|
||||
params.Add(New ReportParameter("CEId", CEId))
|
||||
params.Add(New ReportParameter("CEMotivoTraslado", RCEMotivoTraslado))
|
||||
params.Add(New ReportParameter("CETipoCamvio", CETipoCambio))
|
||||
End If
|
||||
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
|
||||
params.Add(New ReportParameter("CFDIVersion", Vta.Version))
|
||||
If Vta.Cliente.CodigoRegimenFiscal.ToString.Length > 0 Then
|
||||
@@ -7915,7 +7964,7 @@ Public Class ClsPaginas
|
||||
Dim payload As New JObject(
|
||||
New JProperty("formato", Formato),
|
||||
New JProperty("ruta", RutaReporte),
|
||||
New JProperty("UsarFormatoCompilado", false),
|
||||
New JProperty("UsarFormatoCompilado", False),
|
||||
New JProperty("parametros", paramsArray),
|
||||
New JProperty("dataSource", dataSourceArray)
|
||||
)
|
||||
|
||||
@@ -22,22 +22,60 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
|
||||
Dim FI As Date
|
||||
Dim FF As Date
|
||||
|
||||
If context.Request("U").ToEntero > 0 Then
|
||||
CveUsuario = context.Request("U").ToEntero
|
||||
CveEmpresa = context.Request("E").ToEntero
|
||||
FI = context.Request("start").ToDate
|
||||
If context.Request("METODO") IsNot Nothing Then
|
||||
|
||||
FF = context.Request("end").ToDate
|
||||
If Not GetEventos(CveUsuario, CveEmpresa, FI, FF) 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)
|
||||
Select Case context.Request("METODO")
|
||||
Case "servicio_domicilio"
|
||||
|
||||
If context.Request("U").ToEntero > 0 Then
|
||||
|
||||
CveUsuario = context.Request("U").ToEntero
|
||||
CveEmpresa = context.Request("E").ToEntero
|
||||
FI = context.Request("start").ToDate
|
||||
FF = context.Request("end").ToDate
|
||||
|
||||
If Not GetEventos(CveUsuario, CveEmpresa, FI, FF, CveOS:=-2) 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
|
||||
End Select
|
||||
|
||||
|
||||
|
||||
Else
|
||||
If context.Request("U").ToEntero > 0 Then
|
||||
CveUsuario = context.Request("U").ToEntero
|
||||
CveEmpresa = context.Request("E").ToEntero
|
||||
FI = context.Request("start").ToDate
|
||||
|
||||
FF = context.Request("end").ToDate
|
||||
If Not GetEventos(CveUsuario, CveEmpresa, FI, FF) 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
|
||||
|
||||
context.Response.Write(sJSON)
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Public ReadOnly Property IsReusable() As Boolean Implements IHttpHandler.IsReusable
|
||||
@@ -47,14 +85,15 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
|
||||
End Property
|
||||
|
||||
|
||||
Private Function GetEventos(CveUsuario As Integer, CveEmpresa As Integer, pFI As Date, pFF As Date) As Boolean
|
||||
Private Function GetEventos(CveUsuario As Integer, CveEmpresa As Integer, pFI As Date, pFF As Date, Optional CveOS As Integer = -1) As Boolean
|
||||
Dim ObjEventos As New ClsOIEventos
|
||||
Dim ErrorEventos = False
|
||||
Dim CveEmpresaCRM As Integer = 0
|
||||
If ObjEventos.GetEventos(-1, -1, -1, "-1", "-1", -1, CveUsuario, CveUsuario, -1, -1, -1, "-1", -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, CveUsuario, CveUsuario, CveUsuario, CveEmpresa, pFI, pFF) Then
|
||||
If ObjEventos.GetEventos(-1, -1, -1, "-1", "-1", -1, CveUsuario, CveUsuario, -1, -1, -1, "-1", -1, -1, -1, -1, CveOS, -1, -1, -1, -1, -1, CveUsuario, CveUsuario, CveUsuario, CveEmpresa, pFI, pFF) Then
|
||||
|
||||
If ObjEventos.DtResultados.Rows.Count > 0 Then
|
||||
events = New List(Of CalendarEvent)
|
||||
|
||||
Try
|
||||
For Each dr As DataRow In ObjEventos.DtResultados.Rows
|
||||
Dim cevent As CalendarEvent = New CalendarEvent()
|
||||
|
||||
@@ -6246,7 +6246,9 @@
|
||||
});
|
||||
|
||||
$('input[name*=HdnOC1IVA]').each(function () {
|
||||
SumaIVA += ToDouble($(this).val());
|
||||
|
||||
let tmpiva = (ToDouble($(this).val())).toFixed(2)
|
||||
SumaIVA += ToDouble(tmpiva);
|
||||
});
|
||||
|
||||
$('input[name*=HdnOC1RetIVA]').each(function () {
|
||||
|
||||
@@ -3173,8 +3173,468 @@
|
||||
</Border>
|
||||
</Style>
|
||||
</Rectangle>
|
||||
<Rectangle Name="Rectangle1">
|
||||
<ReportItems>
|
||||
<Textbox Name="Textbox93">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Tipo Operación:</Value>
|
||||
<Style>
|
||||
<FontFamily>calibri</FontFamily>
|
||||
<FontSize>7pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
<Color>SteelBlue</Color>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox80</rd:DefaultName>
|
||||
<Top>0.44458cm</Top>
|
||||
<Left>0.12081cm</Left>
|
||||
<Height>0.36214cm</Height>
|
||||
<Width>2.29375cm</Width>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<Textbox Name="Textbox94">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Parameters!CETipoOperacion.Value</Value>
|
||||
<Style>
|
||||
<FontFamily>calibri</FontFamily>
|
||||
<FontSize>6pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox80</rd:DefaultName>
|
||||
<Top>0.44458cm</Top>
|
||||
<Left>2.46012cm</Left>
|
||||
<Height>0.36214cm</Height>
|
||||
<Width>13.59648cm</Width>
|
||||
<ZIndex>1</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<Textbox Name="Textbox95">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Incoterm</Value>
|
||||
<Style>
|
||||
<FontFamily>calibri</FontFamily>
|
||||
<FontSize>7pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
<Color>SteelBlue</Color>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox80</rd:DefaultName>
|
||||
<Top>0.91255cm</Top>
|
||||
<Left>0.12081cm</Left>
|
||||
<Height>0.36214cm</Height>
|
||||
<Width>2.29375cm</Width>
|
||||
<ZIndex>2</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<Textbox Name="Textbox140">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Parameters!CEIncoterm.Value</Value>
|
||||
<Style>
|
||||
<FontFamily>calibri</FontFamily>
|
||||
<FontSize>6pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox80</rd:DefaultName>
|
||||
<Top>0.87728cm</Top>
|
||||
<Left>2.46012cm</Left>
|
||||
<Height>0.36214cm</Height>
|
||||
<Width>13.59648cm</Width>
|
||||
<ZIndex>3</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<Textbox Name="Textbox141">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Motivo Traslado</Value>
|
||||
<Style>
|
||||
<FontFamily>calibri</FontFamily>
|
||||
<FontSize>7pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
<Color>SteelBlue</Color>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox80</rd:DefaultName>
|
||||
<Top>1.35583cm</Top>
|
||||
<Left>0.12081cm</Left>
|
||||
<Height>0.36214cm</Height>
|
||||
<Width>2.29375cm</Width>
|
||||
<ZIndex>4</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<Textbox Name="Textbox142">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Parameters!CEMotivoTraslado.Value</Value>
|
||||
<Style>
|
||||
<FontFamily>calibri</FontFamily>
|
||||
<FontSize>6pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox80</rd:DefaultName>
|
||||
<Top>1.35583cm</Top>
|
||||
<Left>2.46012cm</Left>
|
||||
<Height>0.36214cm</Height>
|
||||
<Width>13.59648cm</Width>
|
||||
<ZIndex>5</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<Textbox Name="Textbox145">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Clave Pedimento</Value>
|
||||
<Style>
|
||||
<FontFamily>calibri</FontFamily>
|
||||
<FontSize>7pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
<Color>SteelBlue</Color>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox80</rd:DefaultName>
|
||||
<Top>1.78853cm</Top>
|
||||
<Left>0.12081cm</Left>
|
||||
<Height>0.36214cm</Height>
|
||||
<Width>2.29375cm</Width>
|
||||
<ZIndex>6</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<Textbox Name="Textbox146">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Parameters!CEClavePedimento.Value</Value>
|
||||
<Style>
|
||||
<FontFamily>calibri</FontFamily>
|
||||
<FontSize>6pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox80</rd:DefaultName>
|
||||
<Top>1.78853cm</Top>
|
||||
<Left>2.46012cm</Left>
|
||||
<Height>0.36214cm</Height>
|
||||
<Width>13.59648cm</Width>
|
||||
<ZIndex>7</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<Textbox Name="Textbox147">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Num Reg Id Trib</Value>
|
||||
<Style>
|
||||
<FontFamily>calibri</FontFamily>
|
||||
<FontSize>7pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
<Color>SteelBlue</Color>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox80</rd:DefaultName>
|
||||
<Top>2.26356cm</Top>
|
||||
<Left>0.12081cm</Left>
|
||||
<Height>0.36214cm</Height>
|
||||
<Width>2.29375cm</Width>
|
||||
<ZIndex>8</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<Textbox Name="Textbox148">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Parameters!CEId.Value</Value>
|
||||
<Style>
|
||||
<FontFamily>calibri</FontFamily>
|
||||
<FontSize>6pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox80</rd:DefaultName>
|
||||
<Top>2.26356cm</Top>
|
||||
<Left>2.46012cm</Left>
|
||||
<Height>0.36214cm</Height>
|
||||
<Width>13.59648cm</Width>
|
||||
<ZIndex>9</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<Textbox Name="Textbox166">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Tipo Cambio</Value>
|
||||
<Style>
|
||||
<FontFamily>calibri</FontFamily>
|
||||
<FontSize>9pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
<Color>SteelBlue</Color>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox80</rd:DefaultName>
|
||||
<Top>2.73506cm</Top>
|
||||
<Left>0.12081cm</Left>
|
||||
<Height>0.36214cm</Height>
|
||||
<Width>2.29375cm</Width>
|
||||
<ZIndex>10</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<Textbox Name="Textbox167">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Parameters!CETipoCamvio.Value</Value>
|
||||
<Style>
|
||||
<FontFamily>calibri</FontFamily>
|
||||
<FontSize>6pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Left</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox80</rd:DefaultName>
|
||||
<Top>2.73506cm</Top>
|
||||
<Left>2.46012cm</Left>
|
||||
<Height>0.36214cm</Height>
|
||||
<Width>13.59648cm</Width>
|
||||
<ZIndex>11</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<Textbox Name="Textbox168">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>COMPLEMENTO COMERCIO EXTERIOR</Value>
|
||||
<Style>
|
||||
<FontSize>7pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
<Color>SteelBlue</Color>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox143</rd:DefaultName>
|
||||
<Left>0.12081cm</Left>
|
||||
<Height>0.33869cm</Height>
|
||||
<Width>15.93579cm</Width>
|
||||
<ZIndex>12</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</ReportItems>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Top>16.99253cm</Top>
|
||||
<Left>0.53823cm</Left>
|
||||
<Height>3.0972cm</Height>
|
||||
<Width>19.06642cm</Width>
|
||||
<ZIndex>47</ZIndex>
|
||||
<Visibility>
|
||||
<Hidden>= IIF( LEN(Parameters!CETipoOperacion.Value) > 0, False, True)</Hidden>
|
||||
</Visibility>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
</Style>
|
||||
</Rectangle>
|
||||
</ReportItems>
|
||||
<Height>16.79496cm</Height>
|
||||
<Height>20.08973cm</Height>
|
||||
<Style />
|
||||
</Body>
|
||||
<Width>20.5164cm</Width>
|
||||
@@ -4176,6 +4636,42 @@
|
||||
<AllowBlank>true</AllowBlank>
|
||||
<Prompt>ReportParameter1</Prompt>
|
||||
</ReportParameter>
|
||||
<ReportParameter Name="CETipoOperacion">
|
||||
<DataType>String</DataType>
|
||||
<Nullable>true</Nullable>
|
||||
<AllowBlank>true</AllowBlank>
|
||||
<Prompt>ReportParameter1</Prompt>
|
||||
</ReportParameter>
|
||||
<ReportParameter Name="CEClavePedimento">
|
||||
<DataType>String</DataType>
|
||||
<Nullable>true</Nullable>
|
||||
<AllowBlank>true</AllowBlank>
|
||||
<Prompt>ReportParameter1</Prompt>
|
||||
</ReportParameter>
|
||||
<ReportParameter Name="CEIncoterm">
|
||||
<DataType>String</DataType>
|
||||
<Nullable>true</Nullable>
|
||||
<AllowBlank>true</AllowBlank>
|
||||
<Prompt>ReportParameter1</Prompt>
|
||||
</ReportParameter>
|
||||
<ReportParameter Name="CEId">
|
||||
<DataType>String</DataType>
|
||||
<Nullable>true</Nullable>
|
||||
<AllowBlank>true</AllowBlank>
|
||||
<Prompt>ReportParameter1</Prompt>
|
||||
</ReportParameter>
|
||||
<ReportParameter Name="CEMotivoTraslado">
|
||||
<DataType>String</DataType>
|
||||
<Nullable>true</Nullable>
|
||||
<AllowBlank>true</AllowBlank>
|
||||
<Prompt>ReportParameter1</Prompt>
|
||||
</ReportParameter>
|
||||
<ReportParameter Name="CETipoCamvio">
|
||||
<DataType>String</DataType>
|
||||
<Nullable>true</Nullable>
|
||||
<AllowBlank>true</AllowBlank>
|
||||
<Prompt>ReportParameter1</Prompt>
|
||||
</ReportParameter>
|
||||
</ReportParameters>
|
||||
<EmbeddedImages>
|
||||
<EmbeddedImage Name="Logo">
|
||||
|
||||
@@ -175,7 +175,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body">
|
||||
<asp:GridView ID="GvNA" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron Órdenes de Servicio No Asignadas" DataKeyNames="CveOSDetalle, CveOS,CveUsuarioAtendio,TipoEstatus,EstatusOrdenServicio,CveSubProyecto"
|
||||
<asp:GridView ID="GvNA" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron Órdenes de Servicio No Asignadas" DataKeyNames="CveOSDetalle, CveOS,CveUsuarioAtendio,TipoEstatus,EstatusOrdenServicio,CveSubProyecto,Folio"
|
||||
CssClass="table table-striped table-hover Widthall table-advance" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="">
|
||||
|
||||
@@ -191,6 +191,9 @@ Partial Class OS_Asignaciones
|
||||
Dim time As DateTime
|
||||
Dim contadorOrdenesAsignadas As Integer = 0
|
||||
|
||||
|
||||
ObjOS.IniciaTransacSQL()
|
||||
|
||||
For Each row As GridViewRow In GvNA.Rows
|
||||
If row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
@@ -215,20 +218,44 @@ Partial Class OS_Asignaciones
|
||||
|
||||
|
||||
If Not TieneError Then
|
||||
|
||||
If Not ObjOS.UpdateOrdenesServiciosEstatus(CveEstatusOS.ToEntero, UsuarioActual.CveUsuario, row.DataKey("CveOS").ToEntero) Then
|
||||
TieneError = True
|
||||
End If
|
||||
|
||||
|
||||
If Not TieneError Then
|
||||
|
||||
Dim RecurrenciaTipo = 0, Frecuencia = -1, DiasSemana = "-1", Dias = -1, Mes = -1, RecurrenciaFin = "-1"
|
||||
Dim Fecha As DateTime = time
|
||||
|
||||
|
||||
Dim OIDescripcion As String = $"{DdlTecnico.SelectedItem.Text} <b><a href='/OS/OrdenesServicios.aspx?CveOS={row.DataKey("CveOS")}' target='_blank' class='Texto' >Orden de servicio {row.DataKey("Folio")} </a></b>"
|
||||
|
||||
Dim ObjEventos As New ClsOIEventos(ObjOS.IniciaTransacSQL())
|
||||
If Not ObjEventos.AddEventoAgenda(2, DdlTecnico.SelectedItem.Text, OIDescripcion, 2, time, time.AddHours(1), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa,
|
||||
RecurrenciaTipo:=RecurrenciaTipo, Frecuencia:=Frecuencia, DiasSemana:=DiasSemana, Dia:=Dias, Mes:=Mes, RecurrenciaFin:=RecurrenciaFin, CveTipoEvento:=2, Importe:=0, CveOS:=row.DataKey("CveOS").ToEntero) Then
|
||||
TieneError = True
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
If contadorOrdenesAsignadas > 0 Then
|
||||
|
||||
If Not TieneError Then
|
||||
ObjOS.Commit()
|
||||
Alert("Se asignaron las ordenes de servicio correctamente", TipoMensaje.MsgInformacion)
|
||||
CargaOrdenesServiciosAsignadasXPersona()
|
||||
CargaOrdenesServiciosNoAsignadas()
|
||||
End If
|
||||
Else
|
||||
ObjOS.RollBack()
|
||||
Alert("No se han seleccionado ordenes de servicio para asignar", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
|
||||
@@ -359,6 +359,8 @@ Partial Class OS_OrdenesServicios
|
||||
|
||||
hdnEsThickbox.Value = "S"
|
||||
hdnClientIDLink.Value = "NoDefinido"
|
||||
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
@@ -1080,6 +1082,9 @@ Partial Class OS_OrdenesServicios
|
||||
Next
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
If Not Errores Then
|
||||
ViewState("CveOS") = ObjOrdenServicio.CveOS
|
||||
ViewState("Folio") = ObjOrdenServicio.Folio
|
||||
@@ -1098,8 +1103,8 @@ Partial Class OS_OrdenesServicios
|
||||
LimpiaDatos()
|
||||
Else
|
||||
ObjOrdenServicio.RollBack()
|
||||
|
||||
End If
|
||||
|
||||
Else
|
||||
If CveTecnico = UsuarioActual.CveUsuario Then
|
||||
If ObjOrdenServicio.UpdateOrdenesServicios(TxtSolicito.Text, TxtFechaRecibido.Text, TxtDescripcion.Text, UsuarioActual.CveUsuario, DdlEstatusOS.SelectedValue.ToEntero, CveOS, UsuarioActual.CveUsuario, DdlTipoOrdenOS.SelectedValue.ToEntero, CveClienteSucursal:=DdlSucursalCliente.SelectedValue.ToEntero) Then
|
||||
@@ -1335,6 +1340,8 @@ Partial Class OS_OrdenesServicios
|
||||
AddPS(Consecutivo, -1, DdlPSDetalle.SelectedValue.ToEntero, DdlPSDetalle.SelectedItem.Text, TxtCantidad.Text.ToEntero, TxtObservacionesServicioDetalle.Text, HdnEspecificaciones.Value.ToString, LtlPSEspecificaciones.Text, "",
|
||||
DdlIdentificador.SelectedValue.ToEntero, DdlIdentificador.SelectedItem.Text, "-1", -1, "-1", "-1", "-1", -1, "-1", ChkSeFacturara.Checked, ChkSeSuperviso.Checked, False, If(Filename <> "", Archivo.Name, "-1"), "", UsuarioActual.CveUsuario)
|
||||
|
||||
|
||||
|
||||
Else
|
||||
Dim Consecutivo As Integer = TmpDT.Rows.Count - 1
|
||||
|
||||
@@ -1425,6 +1432,10 @@ Partial Class OS_OrdenesServicios
|
||||
DivCuentaDetalle.Visible = True
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||
DivCuentaDetalle.Visible = False
|
||||
End If
|
||||
|
||||
UpBodyGv.Update()
|
||||
UpFooterGv.Update()
|
||||
RegistraScript("showDivGv();")
|
||||
|
||||
742
OS/RepServicioDomicilio.aspx
Normal file
742
OS/RepServicioDomicilio.aspx
Normal file
@@ -0,0 +1,742 @@
|
||||
<%@ Page Title="Reporte Servicio Domicilio" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepServicioDomicilio.aspx.vb" Inherits="OS_RepServicioDomicilio" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
|
||||
|
||||
<style type="text/css">
|
||||
.unoaunoold {
|
||||
color: #999b9b;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.Dia {
|
||||
background-image: url(/Imagenes/FondoCal.jpg);
|
||||
background-repeat: repeat-x;
|
||||
height: 17px;
|
||||
font-size: 10px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.Hora {
|
||||
background-color: #E3EFFF;
|
||||
height: 30px;
|
||||
font-size: 10px;
|
||||
border-right: solid 1px #5D8CC9;
|
||||
border-bottom: solid 1px #5D8CC9;
|
||||
}
|
||||
|
||||
.Mes {
|
||||
background-image: url(/Imagenes/Caption.jpg);
|
||||
height: 27px;
|
||||
}
|
||||
|
||||
.Link {
|
||||
color: #0000b9;
|
||||
}
|
||||
|
||||
.calendariopanel {
|
||||
z-index: 999;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
border: 0px;
|
||||
background-color: transparent;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.calendarioback {
|
||||
background-color: #000;
|
||||
z-index: -90;
|
||||
top: 0px;
|
||||
opacity: 0.3;
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.calendariobody {
|
||||
width: 520px;
|
||||
display: table;
|
||||
background-color: #fff;
|
||||
margin-top: 7%;
|
||||
margin-left: 28%;
|
||||
}
|
||||
|
||||
.calendariobody label {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
|
||||
.tareasinicio tr td:nth-child(1) {
|
||||
}
|
||||
|
||||
.portlet.light > .portlet-title > .caption > .caption-subject {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.fix > div {
|
||||
height: inherit !important;
|
||||
width: inherit !important;
|
||||
}
|
||||
|
||||
|
||||
.fix > div > .ajax__html_editor_extender_texteditor {
|
||||
height: 150px !important;
|
||||
}
|
||||
|
||||
/*#overlay a:hover {
|
||||
position: fixed;
|
||||
display: none;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background-color: rgba(0,0,0,0.5);
|
||||
z-index: 2;
|
||||
cursor: pointer;
|
||||
}*/
|
||||
|
||||
|
||||
#moopio a {
|
||||
display: block;
|
||||
}
|
||||
|
||||
#moopio a:hover {
|
||||
background-color: rgba(0,0,0,0.5);
|
||||
transform: scale(1.2);
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
|
||||
.MultiLineTextBox {
|
||||
resize: none;
|
||||
}
|
||||
|
||||
|
||||
.select2-container--open {
|
||||
z-index: 1000 !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Reporte Servicios a Domicilio
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6 col-sm-6">
|
||||
|
||||
<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">Servicios a Domicilio</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body">
|
||||
|
||||
<div id="calendar">
|
||||
</div>
|
||||
|
||||
<asp:UpdatePanel runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:Button Text="" runat="server" ID="BtnActualizaAdd" ClientIDMode="Static" Style="display: none;" OnClick="BtnActualizaAdd_Click" />
|
||||
<asp:HiddenField runat="server" ID="HdnU" ClientIDMode="Static" />
|
||||
<asp:HiddenField runat="server" ID="HdnE" ClientIDMode="Static" />
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<div id="ModalAgenda" class="modal ADS fade" role="dialog">
|
||||
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpModalAgenda" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title"><span id="SpanTituloAgenda">Servicios a Domicilio</span></h4>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-md-12" style="text-align: center;">
|
||||
<asp:Label ID="LblEmpresaCRM" runat="server" Text="" Style="font-size: 16px; display: none; text-align: center;"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="form-group col-md-6 form-md-line-input input-iconright selectmodal">
|
||||
<asp:DropDownList ID="DdlAgedaTipo" ClientIDMode="Static" Width="100%" Enabled="false" DataTextField="AgendaTipo" DataValueField="CveAgendaTipo" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true">
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVAgendaTipo" InitialValue="-1" runat="server" ControlToValidate="DdlAgedaTipo" CssClass="help-block errorimput" ErrorMessage="<span style='font-size: 11px;'><b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de agenda''</b> es necesario.</span>" ValidationGroup="VGGuardarAgenda"></asp:RequiredFieldValidator>
|
||||
<label style="width: 90%;" for="<%=DdlAgedaTipo.ClientID.ToString()%>">Tipo de Asunto:</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-6 form-md-line-input input-iconright selectmodal">
|
||||
<asp:DropDownList ID="DdlPrioridad" ClientIDMode="Static" Width="100%" runat="server" CssClass="form-control input-sm select2me" Enabled="false">
|
||||
<asp:ListItem Selected="True" Text="Baja" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Media" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Alta" Value="3"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<label for="<%=DdlPrioridad.ClientID.ToString()%>">Prioridad:</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtAsuntoAgenda" ClientIDMode="Static" MaxLength="100" CssClass="form-control" runat="server" CausesValidation="true"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVAsuntoAgenda" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtAsuntoAgenda" ErrorMessage="<span style='font-size: 11px;'><b><span style='text-decoration: underline'>ERROR</span></b>: El campo <b>''Asunto''</b> es necesario.</span>" ValidationGroup="VGGuardarAgenda"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtAsuntoAgenda.ClientID.ToString()%>">Asunto:</label>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<div id="DivDescripcionUpdate" style="width: 400px; height: 75px; padding-top: 10px; font-size: 14px; display: none;"></div>
|
||||
<asp:TextBox ID="TxtDescripcionAgenda" ClientIDMode="Static" MaxLength="5000" runat="server" TextMode="MultiLine" Rows="2" CausesValidation="true" Width="100%" CssClass="form-control MultiLineTextBox"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVDescripcionAgenda" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtDescripcionAgenda" ErrorMessage="<span style='font-size: 11px;'><b><span style='text-decoration: underline'>ERROR</span></b>: El campo <b>''Descripción''</b> es necesario.</span>" ValidationGroup="VGGuardarAgenda"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtDescripcionAgenda.ClientID.ToString()%>" style="height: 60px;">Descripción:</label>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="form-group col-md-6 form-md-line-input input-iconright" style="padding-left: 0px !important;">
|
||||
<div class="input-group input-sm date date-picker" data-date-format="dd/mm/yyyy hh:mm" style="width: 70%;">
|
||||
<asp:TextBox ID="TxtFechaInicioAgenda" Enabled="false" ClientIDMode="Static" runat="server" Width="100%" CssClass="form-control input-sm ADDateTimePicker" CausesValidation="true" MaxLength="18"></asp:TextBox>
|
||||
<label style="margin-left: -3px; padding-bottom: 30px; width: 70%;" for="<%= TxtFechaInicioAgenda.ClientID.ToString()%>">Fecha de Inicio:</label>
|
||||
</div>
|
||||
<asp:RequiredFieldValidator ID="RFVFechaInicioAdd" Display="None" CssClass="help-block errorimput" runat="server" ControlToValidate="TxtFechaInicioAgenda" ErrorMessage="<b><span style='text-decoration: underline'>ERROR</span></b>:<br>El campo <b>''Fecha de Inicio''</b> es necesario." ValidationGroup="VGGuardarAgenda"></asp:RequiredFieldValidator>
|
||||
</div>
|
||||
<div class="form-group col-md-6 form-md-line-input input-iconright" style="padding-left: 0px !important;">
|
||||
<div class="input-group input-sm date date-picker" data-date-format="dd/mm/yyyy hh:mm" style="width: 70%;">
|
||||
<asp:TextBox ID="TxtFechaFinAgenda" Enabled="false" ClientIDMode="Static" runat="server" Width="100%" CssClass="form-control input-sm ADDateTimePicker" CausesValidation="true" MaxLength="18"></asp:TextBox>
|
||||
<label style="margin-left: -3px; padding-bottom: 30px; width: 70%;" for="<%= TxtFechaFinAgenda.ClientID.ToString()%>">Fecha de Fin:</label>
|
||||
</div>
|
||||
<asp:RequiredFieldValidator ID="RFVFechaFinAdd" Display="None" CssClass="help-block errorimput" runat="server" ControlToValidate="TxtFechaFinAgenda" ErrorMessage="<b><span style='text-decoration: underline'>ERROR</span></b>: El campo <b>''Fecha de Fin''</b> es necesario." ValidationGroup="VGGuardarAgenda"></asp:RequiredFieldValidator>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="display:none">
|
||||
<asp:CheckBox Text="Recurrencia" ClientIDMode="Static" runat="server" ID="CheckRecurrencia" />
|
||||
</div>
|
||||
|
||||
|
||||
<asp:UpdatePanel runat="server" ClientIDMode="Static" UpdateMode="Conditional" ID="UpRecurrencia">
|
||||
<ContentTemplate>
|
||||
|
||||
<div style="width: 100%; float: left; margin-bottom: 10px; margin-left: 0px;">
|
||||
<hr style="margin-top: 0px; margin-bottom: 15px;" />
|
||||
<div style="float: left; width: 20%; height: 130px;">
|
||||
<asp:RadioButtonList runat="server" CssClass="tablenopadding" RepeatDirection="Vertical" ID="RBLRecurrencia" AutoPostBack="true" OnSelectedIndexChanged="RBLRecurrencia_SelectedIndexChanged">
|
||||
<asp:ListItem Text="1- Hora" Value="1" Selected="True" />
|
||||
<asp:ListItem Text="2- Diario" Value="2" />
|
||||
<asp:ListItem Text="3- Semanal" Value="3" />
|
||||
<asp:ListItem Text="4- Mensual" Value="4" />
|
||||
<asp:ListItem Text="5- Anual" Value="5" />
|
||||
</asp:RadioButtonList>
|
||||
</div>
|
||||
<div style="float: left; width: 80%; height: 130px;">
|
||||
<div runat="server" id="DivRecurrencia" visible="true" style="width: 100%; height: 100%;">
|
||||
<asp:HiddenField runat="server" ID="HdnDiasSemanaAgendar" ClientIDMode="Static" Value="" />
|
||||
<div class="col-md-12"></div>
|
||||
<div class="row">
|
||||
<div class="col-md-2" style="padding-right: 0px; text-align: right;">Cada:</div>
|
||||
<div class="form-group col-md-1 form-md-line-input input-iconright" style="padding-left: 0px !important; padding-right: 0px; padding-top: 0px; padding-bottom: 0px; margin-top: -6px;">
|
||||
<div class="input-group input-sm" style="padding-top: 0px;">
|
||||
<asp:TextBox ID="TxtFrecuencia" ClientIDMode="Static" Text="1" runat="server" Style="padding-top: 0px; padding-bottom: 0px;" Width="20px" CssClass="form-control input-sm" CausesValidation="true" TextMode="Number"></asp:TextBox>
|
||||
<label style="margin-top: -3px; margin-left: -5px; width: 20px;" for="<%= TxtFechaFinAgenda.ClientID.ToString()%>"></label>
|
||||
</div>
|
||||
</div>
|
||||
<%--<td>
|
||||
<asp:TextBox runat="server" ClientIDMode="Static" ID="TxtFrecuencia" Text="1" Width="20px" />
|
||||
</td>--%>
|
||||
<div class="col-md-2" style="padding-left: 0px;">
|
||||
<asp:Label Text="Hora(s)" runat="server" ID="LblTextoFrecuencia" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" id="TrDiasSemanaAdd" runat="server" style="display: none;">
|
||||
<div class="col-md-12">
|
||||
<asp:CheckBoxList runat="server" ID="CheckDiasSemana" ClientIDMode="Static" RepeatColumns="5" RepeatDirection="Horizontal">
|
||||
<asp:ListItem Text="Lunes" Value="2" />
|
||||
<asp:ListItem Text="Martes" Value="3" />
|
||||
<asp:ListItem Text="Miercoles" Value="4" />
|
||||
<asp:ListItem Text="Jueves" Value="5" />
|
||||
<asp:ListItem Text="Viernes" Value="6" />
|
||||
<asp:ListItem Text="Sabado" Value="7" />
|
||||
<asp:ListItem Text="Domingo" Value="1" />
|
||||
</asp:CheckBoxList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row" style="width: 100%; float: left; margin-bottom: 10px; margin-left: 0px;display:none"">
|
||||
<hr style="margin-top: 0px; margin-bottom: 15px;" />
|
||||
<div class="col-md-6" style="padding-left: 0px !important;">
|
||||
<div class="col-md-8" style="padding-left: 0px; padding-right: 0px;">
|
||||
<asp:RadioButton Text="Terminar despues de:" ID="RBNumeroOcurrencias" ClientIDMode="Static" GroupName="GNFrecuenciaFinAdd" runat="server" />
|
||||
</div>
|
||||
<div class="form-group col-md-1 form-md-line-input input-iconright" style="padding: 0px !important; margin-top: -5px; margin-left: -10px">
|
||||
<div class="input-group input-sm" style="padding-top: 0px; padding-left: 0px; padding-right: 0px;">
|
||||
<asp:TextBox runat="server" onclick="FechaFinSet('RBNumeroOcurrencias','TxtFechaFinRecurrencia');" ClientIDMode="Static" CssClass="form-control" TextMode="Number" ID="TxtNumeroOcurrencias" Width="20px" />
|
||||
<label style="margin-top: 5px; margin-left: -15px; width: 20px;" for="<%= TxtNumeroOcurrencias.ClientID.ToString()%>"></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2" style="margin-top: 5px; padding-left: 5px;">Veces</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="row">
|
||||
<div class="col-md-5" style="padding-left: 0px !important;">
|
||||
<asp:RadioButton Text="Terminar en:" ID="RBFechaFin" ClientIDMode="Static" GroupName="GNFrecuenciaFinAdd" runat="server" Width="85px" />
|
||||
</div>
|
||||
<div class="col-md-6" style="padding-left: 0px !important;">
|
||||
<div class="form-group form-md-line-input input-iconright" style="padding: 0px !important; margin-top: -5px; margin-left: -10px">
|
||||
<div class="input-group input-sm date date-picker" data-date-format="dd/mm/yyyy" style="width: 108px!important; padding-top: 0px;">
|
||||
<asp:TextBox ID="TxtFechaFinRecurrencia" ClientIDMode="Static" runat="server" CssClass="form-control" Height="28px" Width="80px" Font-Size="13px"></asp:TextBox>
|
||||
<label style="margin-left: 10px; width: 85%;" for="<%= TxtFechaFinRecurrencia.ClientID.ToString()%>"></label>
|
||||
<span class="input-group-btn " style="width: 28px">
|
||||
<asp:LinkButton ID="imgFechaFinRecurrenciaAdd" class="btn default" runat="server" Style="padding-left: 8px; padding-top: 5px;" Height="28px" Width="28px"><i class="fa fa-calendar"></i></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaFinRecurrenciaAdd" runat="server" TargetControlID="TxtFechaFinRecurrencia" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CalendarioFechaFinRecurrenciaAdd" TargetControlID="TxtFechaFinRecurrencia" PopupButtonID="ImgFechaFinRecurrenciaAdd" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<%--<asp:RequiredFieldValidator ID="RFVFechaFinRecurrenciaAdd" runat="server" ControlToValidate="TxtFechaFinRecurrencia" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Fin''</b> es necesario, por favor ingréselo."></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEFechaFinRecurrenciaAdd" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaFinRecurrenciaAdd" Width="300px"></ajax:ValidatorCalloutExtender>--%>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" style="width: 100%; float: left; margin-bottom: 10px; margin-left: 0px;display:none">
|
||||
<hr style="margin-top: 5px; margin-bottom: 10px;" />
|
||||
<div class="col-md-3" style="padding-left: 0px; padding-right: 0px;">
|
||||
<asp:CheckBox Text="Gasto Recurrente:" ClientIDMode="Static" runat="server" ID="ChkGastoRecurrente" />
|
||||
</div>
|
||||
<div class="form-group col-md-4 form-md-line-input input-iconright" style="padding: 0px !important; margin-top: -5px; margin-left: 0px">
|
||||
<div class="input-group input-sm" style="padding-top: 0px; padding-left: 0px; padding-right: 0px;">
|
||||
<asp:TextBox runat="server" ClientIDMode="Static" CssClass="form-control" ID="TxtImporteGastoRecurrente" Width="100px" onkeyup="FormatoMoneda(this)" />
|
||||
<label style="margin-top: 5px; margin-left: -15px;" for="<%= TxtImporteGastoRecurrente.ClientID.ToString()%>"></label>
|
||||
<%--<ajax:MaskedEditExtender ID="MEEgastoRecurrente" runat="server" TargetControlID="TxtImporteGastoRecurrente" Mask="999,999.99" MaskType="Number" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>--%>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<div style="display:none">
|
||||
<asp:HiddenField runat="server" ID="HdnCveEvento" ClientIDMode="Static" Value="-1" />
|
||||
<asp:Button ID="BtnGuardar" OnClick="BtnGuardar_Click" runat="server" ClientIDMode="Static" Text="Guardar" CssClass="btn btn-primary" ValidationGroup="VGGuardarAgenda" />
|
||||
<asp:Button ID="BtnEliminar" runat="server" CssClass="btn btn-danger" OnClick="BtnEliminar_Click" Text="Eliminar" Style="display: none" data-toggle="confirmation" data-popout="true" data-original-title="¿Seguro que desea continuar?" data-btn-ok-label="si" />
|
||||
</div>
|
||||
|
||||
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
function FechaFinSet(RB, TXT) {
|
||||
RB = "#" + RB
|
||||
TXT = "#" + TXT
|
||||
$(RB).prop('checked', true);
|
||||
$(TXT).val('');
|
||||
}
|
||||
|
||||
|
||||
function AyudaHora(txt) {
|
||||
Hora = txt;
|
||||
var opt = $get("HdnHora").value;
|
||||
|
||||
if (opt == "1") {
|
||||
$("#TxtHoraInicioAdd").val(txt);
|
||||
$("#TxtHoraFinAdd").val(txt);
|
||||
} else if (opt == "2") {
|
||||
$("#TxtHoraFinAdd").val(txt);
|
||||
} else if (opt == "3") {
|
||||
$("#TxtHoraInicioUpdate").val(txt);
|
||||
$("#TxtHoraFinUpdate").val(txt);
|
||||
} else if (opt == "4") {
|
||||
$("#TxtHoraFinUpdate").val(txt);
|
||||
}
|
||||
|
||||
$get('DivHora').style.display = 'none';
|
||||
}
|
||||
|
||||
var currentUpdateEvent;
|
||||
var addStartDate;
|
||||
var addEndDate;
|
||||
var globalAllDay;
|
||||
|
||||
|
||||
function selectDate(start, end, allDay) {
|
||||
$('#ModalAgenda').modal('show');
|
||||
$("#SpanTituloAgenda").html("Agregar Evento");;
|
||||
|
||||
$("#<%=BtnGuardar.ClientID%>").val('Guardar');
|
||||
$("#<%=BtnEliminar.ClientID%>").css("display", "none");
|
||||
|
||||
$("#HdnCveEvento").val(-1);
|
||||
|
||||
$("#DdlAgedaTipo").val("-1");
|
||||
$("#DdlPrioridad").val("1");
|
||||
|
||||
$("#TxtAsuntoAgenda").val("");
|
||||
$("#TxtDescripcionAgenda").val("");
|
||||
$("#TxtFechaInicioAgenda").val("" + start.format("DD/MM/YYYY 08:00"));
|
||||
$("#TxtFechaFinAgenda").val("" + start.format("DD/MM/YYYY 09:00"));
|
||||
|
||||
$("#UpRecurrencia").hide();
|
||||
$("#CheckRecurrencia").prop('checked', false);
|
||||
|
||||
$get("HdnDiasSemanaAgendar").value = -1;
|
||||
|
||||
$('#<%=RBLRecurrencia.ClientID %>').find("input[value='1']").prop("checked", true);
|
||||
$('#<%=TrDiasSemanaAdd.ClientID %>').css("display", "none");
|
||||
$("#DivDescripcionUpdate").css("display", "none");
|
||||
$("#<%=TxtDescripcionAgenda.ClientID%>").css("display", "block");
|
||||
$('#<%=LblTextoFrecuencia.ClientID%>').html("Hora(s)");
|
||||
|
||||
$("#TxtFrecuencia").val("1");
|
||||
$("#TxtNumeroOcurrencias").val("");
|
||||
$("#TxtFechaFinRecurrencia").val("");
|
||||
|
||||
$("#ChkGastoRecurrente").prop('checked', false);
|
||||
$("#TxtImporteGastoRecurrente").val("");
|
||||
}
|
||||
|
||||
function updateEvent(event, element) {
|
||||
$('#ModalAgenda').modal('show');
|
||||
$("#SpanTituloAgenda").html("Actualizar Evento");;
|
||||
$("#<%=BtnGuardar.ClientID%>").val('Actualizar');
|
||||
$("#<%=BtnEliminar.ClientID%>").css("display", "");
|
||||
|
||||
$("#DivDescripcionUpdate").css("display", "block");
|
||||
$("#<%=TxtDescripcionAgenda.ClientID%>").css("display", "none");
|
||||
$("#HdnCveEvento").val(event.id);
|
||||
|
||||
$("#TxtNumeroOcurrencias").val('');
|
||||
$("#TxtFechaFinRecurrencia").val('');
|
||||
$("#TxtFrecuencia").val('');
|
||||
|
||||
$("#TxtAsuntoAgenda").val(event.title);
|
||||
//SE MUESTRA EL TEXTO HTML EN EL DIV DE LA DESCRIPCION SIN PERMITIR EDITAR,
|
||||
//SE ASIGNA -1 EN EL TEXBOX PARA QUE NO REALICE CAMBIOS EN BD
|
||||
$("#DivDescripcionUpdate").html(event.description);
|
||||
$("#TxtDescripcionAgenda").val("-1");
|
||||
|
||||
$("#DdlAgedaTipo").val(event.cveagendatipo);
|
||||
$("#DdlPrioridad").val(event.prioridad);
|
||||
|
||||
$("#TxtFechaInicioAgenda").val("" + event.start.format("DD/MM/YYYY HH:mm"));
|
||||
|
||||
$("#TxtFechaFinAgenda").val("" + event.end.format("DD/MM/YYYY HH:mm"));
|
||||
|
||||
//Identifica el tipo de Fecha Termino de la Recurrencia
|
||||
if (event.recurrenciafin == 0) {
|
||||
//$("#RBSinFechaFinUpdate").prop('checked', true);
|
||||
$("#TxtFrecuencia").val('0');
|
||||
} else if (!isNaN(event.recurrenciafin)) {
|
||||
$("#RBNumeroOcurrencias").prop('checked', true);
|
||||
$("#TxtNumeroOcurrencias").val(event.recurrenciafin);
|
||||
} else {
|
||||
$("#RBFechaFin").prop('checked', true);
|
||||
$("#TxtFechaFinRecurrencia").val("" + event.recurrenciafin);
|
||||
}
|
||||
|
||||
//GASTO RECURRENTE
|
||||
//Si el evento es tipo 10 = Gasto Mes, activa gasto recurrente
|
||||
if (event.CveTipoEvento == 10) {
|
||||
$("#ChkGastoRecurrente").prop('checked', true);
|
||||
$("#TxtImporteGastoRecurrente").val(event.Importe);
|
||||
} else {
|
||||
$("#ChkGastoRecurrente").prop('checked', false);
|
||||
$("#TxtImporteGastoRecurrente").val('');
|
||||
}
|
||||
|
||||
//Verifica que hay Recurrencia para activar los campos y poner sus valores respectivos
|
||||
if (event.recurrenciatipo > 0) {
|
||||
$("#CheckRecurrencia").prop('checked', true);
|
||||
|
||||
// CHECKEA EL TIPO DE RECURRENCIA QUE TENGA EL EVENTO
|
||||
var text = event.recurrenciatipo;
|
||||
var radio = $("[id*=RBLRecurrencia] label:contains('" + text + "')").closest("td").find("input");
|
||||
radio.attr("checked", "checked");
|
||||
|
||||
// CHECKEA LOS DIAS SELECCIONADOS DE LA RECURRENCIA DE SEMANA
|
||||
$get("HdnDiasSemanaAgendar").value = event.diassemana;
|
||||
|
||||
//LLENA TEXTO DE FRECUENCIA DE RECURRENCIA
|
||||
$("#TxtFrecuencia").val("" + event.frecuencia);
|
||||
} else {
|
||||
$("#CheckRecurrencia").prop('checked', false);
|
||||
}
|
||||
|
||||
|
||||
//ESCONDE O MUESTRA EL DIV DE LAS OPCIONES DE RECURRENCIA
|
||||
if ($get('CheckRecurrencia').checked) {
|
||||
$("#UpRecurrencia").show();
|
||||
} else {
|
||||
$("#UpRecurrencia").hide();
|
||||
}
|
||||
|
||||
//LLAMA EL INDEXCHANGED DEL RADIOBUTTONLIST DE LOS TIPOS DE RECURRENCIA
|
||||
$("#BtnActualizaAdd").click();
|
||||
|
||||
//Muestra nombre de la empresa si esta tarea sea asigno desde EmpresaCRM
|
||||
if (event.EmpresaCRM != "") {
|
||||
$("#<%=LblEmpresaCRM.ClientID%>").css("display", "")
|
||||
$("#<%=LblEmpresaCRM.ClientID%>").text(event.EmpresaCRM);
|
||||
} else {
|
||||
$("#<%=LblEmpresaCRM.ClientID%>").css("display", "none")
|
||||
}
|
||||
|
||||
}
|
||||
function RadionButtonSelectedValueSet(name, SelectdValue) {
|
||||
$('input[name="' + name + '"][value="' + SelectdValue + '"]').prop('checked', true);
|
||||
}
|
||||
|
||||
|
||||
function CheckUpdate(check) {
|
||||
if (check.checked) {
|
||||
$("#UpRecurrenciaUpdate").show("slow");
|
||||
} else {
|
||||
$("#UpRecurrenciaUpdate").hide("slow");
|
||||
}
|
||||
}
|
||||
|
||||
function CheckAdd(check) {
|
||||
if (check.checked) {
|
||||
$("#UpRecurrencia").show("slow");
|
||||
} else {
|
||||
$("#UpRecurrencia").hide("slow");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
function deleteEvent() {
|
||||
//var id = $get('HdnId').val;
|
||||
//PageMethods.EliminaEvento(id, deleteSuccess);
|
||||
}
|
||||
|
||||
function updateSuccess(updateResult) {
|
||||
//alert(updateResult);
|
||||
}
|
||||
|
||||
function deleteSuccess(deleteResult) {
|
||||
//alert("eliminado exitosamente: " + deleteResult);
|
||||
}
|
||||
|
||||
function addSuccess(addResult) {
|
||||
// if addresult is -1, means event was not added
|
||||
// alert("added key: " + addResult);
|
||||
|
||||
if (addResult != -1) {
|
||||
$('#calendar').fullCalendar('renderEvent',
|
||||
{
|
||||
title: $("#addEventName").val(),
|
||||
start: addStartDate,
|
||||
end: addEndDate,
|
||||
id: addResult,
|
||||
description: $("#addEventDesc").val(),
|
||||
allDay: globalAllDay
|
||||
},
|
||||
true // make the event "stick"
|
||||
);
|
||||
|
||||
|
||||
$('#calendar').fullCalendar('unselect');
|
||||
}
|
||||
}
|
||||
|
||||
function UpdateTimeSuccess(updateResult, userContext, methodName) {
|
||||
//alert(userContext);
|
||||
}
|
||||
|
||||
function updateEventOnDropResize(event, allDay) {
|
||||
|
||||
//alert("allday: " + allDay);
|
||||
var eventToUpdate = {
|
||||
id: event.id,
|
||||
start: event.start
|
||||
};
|
||||
|
||||
// FullCalendar 1.x
|
||||
//if (allDay) {
|
||||
// eventToUpdate.start.setHours(0, 0, 0);
|
||||
//}
|
||||
|
||||
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 checkForSpecialChars(stringToCheck) {
|
||||
var pattern = /[^A-Za-z0-9 ]/;
|
||||
return pattern.test(stringToCheck);
|
||||
}
|
||||
|
||||
function isAllDay(startDate, endDate) {
|
||||
var allDay;
|
||||
|
||||
if (startDate.format("HH:mm:ss") == "00:00:00" && endDate.format("HH:mm:ss") == "00:00:00") {
|
||||
allDay = true;
|
||||
globalAllDay = true;
|
||||
}
|
||||
else {
|
||||
allDay = false;
|
||||
globalAllDay = false;
|
||||
}
|
||||
|
||||
return allDay;
|
||||
}
|
||||
|
||||
var view = null;
|
||||
var date = null;
|
||||
function GetView() {
|
||||
view = $('#calendar').fullCalendar('getView');
|
||||
date = $('#calendar').fullCalendar('getDate');
|
||||
}
|
||||
|
||||
function SetView() {
|
||||
$('#calendar').fullCalendar('gotoDate', date.format());
|
||||
$('#calendar').fullCalendar('changeView', view.name);
|
||||
}
|
||||
|
||||
function Calendario() {
|
||||
//$get('DivActualizarEvento').style.display = 'none';
|
||||
//$get('DivAgregarEvento').style.display = 'none';
|
||||
|
||||
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,
|
||||
events: {
|
||||
url: '/Ashx/CargaEventos.ashx',
|
||||
type: 'GET',
|
||||
data: {
|
||||
U: ' <%= UsuarioActual.CveUsuario %>',
|
||||
E: '<%= UsuarioActual.CveEmpresa %>',
|
||||
METODO:'servicio_domicilio'
|
||||
}
|
||||
},
|
||||
eventDrop: eventDropped,
|
||||
eventResize: eventResized
|
||||
});
|
||||
}
|
||||
|
||||
function InitCalendar() {
|
||||
$(document).ready(function () {
|
||||
Calendario();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
</asp:Content>
|
||||
272
OS/RepServicioDomicilio.aspx.vb
Normal file
272
OS/RepServicioDomicilio.aspx.vb
Normal file
@@ -0,0 +1,272 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports Extensiones
|
||||
Imports System.Data
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Imports System.Web.Services
|
||||
|
||||
Partial Class OS_RepServicioDomicilio
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region "PROPIEDADES"
|
||||
|
||||
|
||||
Private Property DtDatos As DataTable
|
||||
Get
|
||||
DtDatos = DirectCast(ViewState("DtDatos"), DataTable)
|
||||
End Get
|
||||
|
||||
Set(ByVal value As DataTable)
|
||||
ViewState("DtDatos") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property DtColor As DataTable
|
||||
Get
|
||||
Return DirectCast(ViewState("DtColor"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DtColor") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property Agrupador As String
|
||||
Get
|
||||
Return ViewState("Agrupador").ToString
|
||||
End Get
|
||||
|
||||
Set(value As String)
|
||||
ViewState("Agrupador") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TCEspecifico As Double
|
||||
Get
|
||||
Return ViewState("TCEspecifico").ToString.ToDouble
|
||||
End Get
|
||||
|
||||
Set(value As Double)
|
||||
ViewState("TCEspecifico") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TipoCambio As Integer
|
||||
Get
|
||||
Return ViewState("TipoCambio").ToString.ToEntero
|
||||
End Get
|
||||
|
||||
Set(value As Integer)
|
||||
ViewState("TipoCambio") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
#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
|
||||
|
||||
#Region "CARGAS"
|
||||
|
||||
Private Sub SetValues()
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub CargaDatos()
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region " FULL CALENDAR "
|
||||
Private Sub InicializaCalendar()
|
||||
RegistraScript("InitCalendar();")
|
||||
|
||||
HdnU.Value = UsuarioActual.CveUsuario.ToString
|
||||
HdnE.Value = UsuarioActual.CveEmpresa.ToString
|
||||
|
||||
DirectCast(Master.FindControl("TSM"), ScriptManager).EnablePageMethods = True
|
||||
CargaTiposAgenda()
|
||||
CheckRecurrencia.Attributes.Add("onclick", "CheckAdd(this);")
|
||||
End Sub
|
||||
Private Sub CargaTiposAgenda()
|
||||
Dim ObjEventos As New ClsOIEventos
|
||||
|
||||
If ObjEventos.GetAgendaTipo() Then
|
||||
DdlAgedaTipo.DataSource = ObjEventos.DtResultados
|
||||
DdlAgedaTipo.DataBind()
|
||||
DdlAgedaTipo.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
Else
|
||||
Alert("Ocurrió un error al obtener los tipos de agenda. Por favor recargue la página", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
ObjEventos.Dispose()
|
||||
End Sub
|
||||
Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs)
|
||||
Dim ObjEventos As New ClsOIEventos
|
||||
|
||||
Dim FechaInicio = TxtFechaInicioAgenda.Text.ToDateTime()
|
||||
Dim FechaFin = TxtFechaFinAgenda.Text.ToDateTime()
|
||||
|
||||
RegistraScript("GetView();")
|
||||
|
||||
Dim RecurrenciaTipo = 0, Frecuencia = -1, DiasSemana = "-1", Dias = -1, Mes = -1, RecurrenciaFin = "-1"
|
||||
If CheckRecurrencia.Checked Then
|
||||
RecurrenciaTipo = RBLRecurrencia.SelectedValue.ToEntero
|
||||
Frecuencia = TxtFrecuencia.Text.ToEntero
|
||||
|
||||
'OBTENEMOS LOS DIAS SELECCIONADOS EN LA OPCION DE RECURRENCIA POR SEMANA
|
||||
Select Case RecurrenciaTipo
|
||||
Case 3
|
||||
Dim StringDias = ""
|
||||
For Each item As ListItem In CheckDiasSemana.Items
|
||||
If item.Selected Then
|
||||
If StringDias.Length > 0 Then
|
||||
StringDias += ","
|
||||
End If
|
||||
StringDias += item.Value
|
||||
End If
|
||||
Next
|
||||
If StringDias.Length > 0 Then
|
||||
DiasSemana = StringDias
|
||||
End If
|
||||
End Select
|
||||
|
||||
|
||||
'If RBSinFechaFinAdd.Checked Then
|
||||
' RecurrenciaFin = "-1"
|
||||
'Else
|
||||
If RBNumeroOcurrencias.Checked Then
|
||||
RecurrenciaFin = TxtNumeroOcurrencias.Text
|
||||
ElseIf RBFechaFin.Checked Then
|
||||
RecurrenciaFin = TxtFechaFinRecurrencia.Text
|
||||
Else
|
||||
RecurrenciaFin = "-1"
|
||||
End If
|
||||
Else
|
||||
If HdnCveEvento.Value.ToEntero > 0 Then
|
||||
Frecuencia = -2 : DiasSemana = "-2" : Dias = -2 : Mes = -2 : RecurrenciaFin = "-2"
|
||||
End If
|
||||
End If
|
||||
|
||||
'11/05/2018 - GASTO RECURRENTE
|
||||
Dim CveTipoEvento As Integer = IIf(ChkGastoRecurrente.Checked, 10, 2).ToString().ToEntero()
|
||||
Dim Importe As Double = Convert.ToDouble(IIf(ChkGastoRecurrente.Checked, TxtImporteGastoRecurrente.Text, "-1"))
|
||||
|
||||
If HdnCveEvento.Value.ToEntero > 0 Then
|
||||
If ObjEventos.UpdateEvento(TxtAsuntoAgenda.Text, TxtDescripcionAgenda.Text, DdlPrioridad.SelectedValue.ToEntero, DdlAgedaTipo.SelectedValue.ToEntero, -1, FechaInicio, FechaFin, -1, "-1", HdnCveEvento.Value.ToEntero, "-1",
|
||||
RecurrenciaTipo, Frecuencia, DiasSemana, Dias, Mes, RecurrenciaFin, Importe:=Importe) Then
|
||||
Alert("El Evento se actualizó correctamente", TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
Alert("Ocurrió un error al actualizar el evento", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
Else
|
||||
If ObjEventos.AddEventoAgenda(DdlAgedaTipo.SelectedValue.ToEntero, TxtAsuntoAgenda.Text, TxtDescripcionAgenda.Text, DdlPrioridad.SelectedValue.ToEntero, FechaInicio, FechaFin, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa,
|
||||
RecurrenciaTipo:=RecurrenciaTipo, Frecuencia:=Frecuencia, DiasSemana:=DiasSemana, Dia:=Dias, Mes:=Mes, RecurrenciaFin:=RecurrenciaFin, CveTipoEvento:=CveTipoEvento, Importe:=Importe) Then
|
||||
|
||||
Alert("El Evento se guardó correctamente", TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
Alert("Ocurrió un error al Guardar el evento", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
End If
|
||||
|
||||
ObjEventos.Dispose()
|
||||
RegistraScript("Calendario();SetView();$('#ModalAgenda').modal('hide');", "1234")
|
||||
LimpiaModalAgenda()
|
||||
|
||||
End Sub
|
||||
Private Sub LimpiaModalAgenda()
|
||||
TxtDescripcionAgenda.Text = ""
|
||||
TxtAsuntoAgenda.Text = ""
|
||||
DdlPrioridad.SelectedValue = "1"
|
||||
TxtNumeroOcurrencias.Text = ""
|
||||
TxtFechaFinRecurrencia.Text = ""
|
||||
RBFechaFin.Checked = False
|
||||
RBNumeroOcurrencias.Checked = False
|
||||
RBLRecurrencia.SelectedValue = "1"
|
||||
CheckDiasSemana.ClearSelection()
|
||||
RBLRecurrencia_SelectedIndexChanged(RBLRecurrencia, EventArgs.Empty)
|
||||
TxtFrecuencia.Text = "1"
|
||||
LblEmpresaCRM.Text = ""
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnEliminar_Click(sender As Object, e As EventArgs)
|
||||
|
||||
Dim ObjEventos As New ClsOIEventos
|
||||
RegistraScript("GetView();")
|
||||
|
||||
If ObjEventos.RemoveEvento(HdnCveEvento.Value.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
RegistraScript("Calendario();SetView();$('#ModalAgenda').modal('hide');", "1234")
|
||||
Alert("El evento se eliminó correctamente", TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
Alert("Ocurrió un error al eliminar el evento, por favor intente de nuevo.", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
ObjEventos.Dispose()
|
||||
End Sub
|
||||
|
||||
<WebMethod()> <Script.Services.ScriptMethodAttribute()>
|
||||
Public Shared Function EliminaEvento(CveEvento As Integer, CveEmpresa As Integer) As String
|
||||
Dim ObjEventos As New ClsOIEventos
|
||||
|
||||
ObjEventos.RemoveEvento(CveEvento, CveEmpresa)
|
||||
|
||||
ObjEventos.Dispose()
|
||||
Return CveEvento.ToString
|
||||
End Function
|
||||
|
||||
<WebMethod()> <Script.Services.ScriptMethodAttribute()>
|
||||
Public Shared Function ActualizaEvento(ClsEvent As CalendarEvent) As String
|
||||
Dim ObjEventos As New ClsOIEventos
|
||||
|
||||
Dim FechaInicio = DateTimeOffset.Parse(ClsEvent.start).DateTime
|
||||
Dim FechaFin = DateTimeOffset.Parse(ClsEvent.end).DateTime
|
||||
|
||||
If ObjEventos.UpdateEvento("-1", "-1", -1, -1, -1, FechaInicio, FechaFin, -1, "-1", ClsEvent.id) Then
|
||||
End If
|
||||
|
||||
ObjEventos.Dispose()
|
||||
Return "a"
|
||||
End Function
|
||||
Protected Sub RBLRecurrencia_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
Select Case RBLRecurrencia.SelectedValue.ToEntero
|
||||
Case 1
|
||||
LblTextoFrecuencia.Text = "Hora(s)"
|
||||
TrDiasSemanaAdd.Style("display") = "none"
|
||||
Case 2
|
||||
LblTextoFrecuencia.Text = "Dia(s)"
|
||||
TrDiasSemanaAdd.Style("display") = "none"
|
||||
Case 3
|
||||
LblTextoFrecuencia.Text = "Semana(s)"
|
||||
TrDiasSemanaAdd.Style("display") = "block"
|
||||
|
||||
'Chequea los dias seleccionados en la recurrencia
|
||||
For Each item As ListItem In CheckDiasSemana.Items
|
||||
If HdnDiasSemanaAgendar.Value.Contains(item.Value) Then
|
||||
item.Selected = True
|
||||
Else
|
||||
item.Selected = False
|
||||
End If
|
||||
Next
|
||||
Case 4
|
||||
LblTextoFrecuencia.Text = "Mes(es)"
|
||||
TrDiasSemanaAdd.Style("display") = "none"
|
||||
Case 5
|
||||
LblTextoFrecuencia.Text = "Año(s)"
|
||||
TrDiasSemanaAdd.Style("display") = "none"
|
||||
Case Else
|
||||
End Select
|
||||
UpRecurrencia.Update()
|
||||
End Sub
|
||||
Protected Sub BtnActualizaAdd_Click(sender As Object, e As EventArgs)
|
||||
RBLRecurrencia_SelectedIndexChanged(RBLRecurrencia, EventArgs.Empty)
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
End Class
|
||||
Reference in New Issue
Block a user