RepServicioDomicilio mejoras, compras requeriri vinculacion de nc a facturas caundoe s acumuladora.
This commit is contained in:
@@ -3866,7 +3866,7 @@ Public Class ClsContabilidad
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function GetBalanzaComprobacion(FechaI As Date, FechaF As Date, TipoCuentas As Integer, TipoReporte As Integer, CveSubProyecto As String, CveEmpresa As Integer, Optional Sat As Integer = 0) As Boolean
|
||||
Public Function GetBalanzaComprobacion(FechaI As Date, FechaF As Date, TipoCuentas As Integer, TipoReporte As Integer, CveSubProyecto As String, CveEmpresa As Integer, Optional Sat As Integer = 0, Optional NivelCuenta As Integer = -1) As Boolean
|
||||
Dim Retorno = False
|
||||
|
||||
|
||||
@@ -3880,6 +3880,7 @@ Public Class ClsContabilidad
|
||||
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@SAT", SqlDbType.Int).Value = Sat
|
||||
.Add("@NivelCuenta", SqlDbType.Int).Value = NivelCuenta
|
||||
End With
|
||||
SqlAdapter.SelectCommand.CommandTimeout = 0
|
||||
|
||||
|
||||
@@ -726,7 +726,7 @@ Public Class ClsOS
|
||||
End Function
|
||||
|
||||
|
||||
Public Function UpdateOrdenesServiciosFinaliza(CveOS As Integer, CveOSDetalle As Integer, CvePS As Integer, CveEmpresa As Integer) As Boolean
|
||||
Public Function UpdateOrdenesServiciosFinaliza(CveOS As Integer, CveOSDetalle As Integer, CvePS As Integer, CveEmpresa As Integer, Optional Opcion As Integer = 1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_OS_OrdenesServiciosFinalizaUpdate")
|
||||
@@ -736,6 +736,7 @@ Public Class ClsOS
|
||||
.Add("@CveOSDetalle", SqlDbType.Int).Value = CveOSDetalle
|
||||
.Add("@CvePS", SqlDbType.Int).Value = CvePS
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@Opcion", SqlDbType.Int).Value = Opcion
|
||||
|
||||
End With
|
||||
|
||||
@@ -744,7 +745,16 @@ Public Class ClsOS
|
||||
Retorno = True
|
||||
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al guardar los cambios en La Orden de Servicio.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
|
||||
If Opcion = 1 Then
|
||||
OnError("Ocurrió un error al finalizar la orden de servicio.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
ElseIf Opcion = 2 Then
|
||||
OnError("Ocurrió un error al cencelar la orden de servicio.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
Else
|
||||
OnError("Ocurrió un error al finalizar la orden de servicio.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End If
|
||||
|
||||
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
|
||||
@@ -1316,7 +1316,7 @@ Public Class ClsSisUsuarios
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function GetPermisosPorUsuarioProcesos(CveUsuario As Integer, CvePadre As Integer, CveRol As Integer, CveModulo As Integer, CveProceso As Integer, Optional CveUsuarioActual As Integer = -1) As Boolean
|
||||
Public Function GetPermisosPorUsuarioProcesos(CveUsuario As Integer, CvePadre As Integer, CveRol As Integer, CveModulo As Integer, CveProceso As Integer, Optional CveUsuarioActual As Integer = -1, Optional CveEmpresa As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Sis_PermisosPorUsuarioProcesosGet")
|
||||
@@ -1327,6 +1327,7 @@ Public Class ClsSisUsuarios
|
||||
.Add("@CveModulo", SqlDbType.Int).Value = CveModulo
|
||||
.Add("@CveProceso", SqlDbType.Int).Value = CveProceso
|
||||
.Add("@CveUsuarioActual", SqlDbType.Int).Value = CveUsuarioActual
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa 'Opcional si se envia en -1 se cargan los usuarios de la empresa de los usuarios enviados
|
||||
End With
|
||||
|
||||
Try
|
||||
|
||||
@@ -4198,6 +4198,13 @@ Partial Class Compras_Compras
|
||||
|
||||
'------------------ INICIA VALIDACIONES ------------------
|
||||
|
||||
If Not ValidaVincuacionNotaFactura() Then
|
||||
Alert("Se requiere que la nota este aplciada a las facturas", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
|
||||
|
||||
If Not ValidaSeleccionAnticipo() Then
|
||||
Alert("El proveedor tiene anticipos sin aplicar, favor de especiar uno.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
@@ -8327,6 +8334,34 @@ Partial Class Compras_Compras
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Function ValidaVincuacionNotaFactura() As Boolean
|
||||
|
||||
Dim Respuesta As Boolean = False
|
||||
|
||||
|
||||
If DdlTipoComprobante.SelectedValue.Contiene("NC") Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(531).ToString.ToEntero = 1 Then
|
||||
|
||||
For Each GvRow As GridViewRow In GvFacturaNC.Rows
|
||||
If GvRow.RowType = DataControlRowType.DataRow Then
|
||||
If GvRow.FCCheckBox("ChkFacturaNC").Checked Then
|
||||
Respuesta = True
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
Else
|
||||
Respuesta = True
|
||||
End If
|
||||
Else
|
||||
Respuesta = True
|
||||
End If
|
||||
|
||||
|
||||
Return Respuesta
|
||||
|
||||
End Function
|
||||
|
||||
Private Function AjustaCombustibles() As Boolean
|
||||
|
||||
@@ -16127,6 +16162,15 @@ Partial Class Compras_Compras
|
||||
|
||||
End If
|
||||
|
||||
|
||||
If CveFactura > 0 Then
|
||||
If DdlTipoComprobante.SelectedValue = "NC" Then
|
||||
NCSeleccionFacturasRelacionadas(UUIDSList)
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
UPCondicionesPago.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
<div class="row">
|
||||
<label class="col-md-1 ">Fecha Inicio:</label>
|
||||
<div class="col-md-2">
|
||||
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="width: 140px !important; padding: 0px;">
|
||||
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="width: 110px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtFechaDel" runat="server" CssClass="form-control" Width="99%" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgCalendarioDel" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton></span>
|
||||
@@ -44,7 +44,7 @@
|
||||
</div>
|
||||
<label class="col-md-1 truncate">Fecha Fin:</label>
|
||||
<div class="col-md-2">
|
||||
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="width: 140px !important; padding: 0px;">
|
||||
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="width: 110px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtFechaAl" runat="server" CssClass="form-control" Width="99%" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgCalendarioAl" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton></span>
|
||||
@@ -58,7 +58,7 @@
|
||||
</div>
|
||||
<label class="col-md-1 truncate">Cuentas:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList CssClass="form-control input-sm" runat="server" ID="DdlTipoCuentas" Width="150px">
|
||||
<asp:DropDownList CssClass="form-control input-sm select2me" runat="server" ID="DdlTipoCuentas" Width="150px">
|
||||
<asp:ListItem Text="Todas" Value="1" />
|
||||
<asp:ListItem Text="Con Movimientos" Value="2" />
|
||||
<asp:ListItem Text="Saldo Actual no igual a cero" Value="3" />
|
||||
@@ -76,23 +76,31 @@
|
||||
</div>
|
||||
<div class="portlet-body" style="display: none">
|
||||
<div class="row">
|
||||
<label class="col-md-2" style="width: 80px;">SubProyecto: </label>
|
||||
<label class="col-md-1" >SubProyecto: </label>
|
||||
<div class="col-md-2 ">
|
||||
<asp:DropDownList ID="DdlSubproyecto" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-sm select2me" Style="max-width: 200px !important;">
|
||||
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-2" runat="server" id="tdTipoReporte" visible="true">
|
||||
<div class="row">
|
||||
<label class="col-md-3 truncate">Tipo:</label>
|
||||
<div class="col-md-9">
|
||||
<asp:DropDownList ID="DdlTipoReporte" CssClass="form-control input-sm" runat="server">
|
||||
<asp:ListItem Text="Contable" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Contable y Complementarias" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Complementarias" Value="3"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<label class="col-md-1 truncate">Tipo:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlTipoReporte" CssClass="form-control input-sm select2me" runat="server">
|
||||
<asp:ListItem Text="Contable" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Contable y Complementarias" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Complementarias" Value="3"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<label class="col-md-1" >Nivel: </label>
|
||||
<div class="col-md-2 ">
|
||||
<asp:DropDownList ID="DdlNivel" runat="server" AppendDataBoundItems="true" CssClass="form-control input-sm select2me" >
|
||||
<asp:ListItem Selected="True" Text="Todo" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Mayor" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Último nivel" Value="2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -101,7 +101,7 @@ Partial Class Contabilidad2_RepBalanzaComprobacion
|
||||
|
||||
Dim TipoReporte = DdlTipoReporte.SelectedValue.ToEntero
|
||||
|
||||
If ObjConta.GetBalanzaComprobacion(FechaInicio, FechaFin, DdlTipoCuentas.SelectedValue.ToEntero, TipoReporte, CveSubProyecto, UsuarioActual.CveEmpresa, 0) Then
|
||||
If ObjConta.GetBalanzaComprobacion(FechaInicio, FechaFin, DdlTipoCuentas.SelectedValue.ToEntero, TipoReporte, CveSubProyecto, UsuarioActual.CveEmpresa, 0, DdlNivel.SelectedValue.ToEntero) Then
|
||||
DtDatos = ObjConta.DtResultados
|
||||
|
||||
|
||||
|
||||
@@ -454,6 +454,8 @@
|
||||
|
||||
<label for="<%= HLkFolio.ClientID.ToString()%>" style="font-size:20px" >Folio: </label>
|
||||
<asp:HyperLink ID="HLkFolio" runat="server" CssClass="Texto" Target="_blank" />
|
||||
|
||||
<asp:HyperLink ID="HLKPDF" runat="server" CssClass="Texto" Target="_blank" ToolTip="Descargar PDF" ><i class="fa fa-file-pdf-o" aria-hidden="true"></i></asp:HyperLink>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
@@ -662,6 +664,8 @@
|
||||
<div class="modal-footer">
|
||||
<asp:LinkButton runat="server" ID="LnkModalAsignar" CssClass="btn btn-success" Text="Guardar" OnClick="LnkModalAsignar_Click" ValidationGroup="GrpAsignar"></asp:LinkButton>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
|
||||
<asp:LinkButton runat="server" ID="LnkCancelarOrden" CssClass="btn btn-danger" Text="Cancelar Orden" OnClick="LnkCancelarOrden_Click" Visible="false" >
|
||||
</asp:LinkButton>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
@@ -722,32 +726,8 @@
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server" HighlightCssClass="vco" TargetControlID="CVHoraFin" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<%-- <div class="row">
|
||||
<div class="col-md-4">
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<label for="<%= TxtHorarioEnvio.ClientID.ToString() %>" style="font-size: 13px; color: #888888;">Hora de Envío:</label>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<cc1:TimeSelector ID="TxtHorarioEnvio" runat="server" DisplaySeconds="false" DisplayButtons="false">
|
||||
</cc1:TimeSelector>
|
||||
<asp:CustomValidator ID="CustomValidator1" runat="server" ControlToValidate="TxtHorarioEnvio" Display="None" ErrorMessage="El campo <b>''Hora''</b> es necesario, por favor seleccione la hora correcta." ValidationGroup="GrpObligatorio" ValidateEmptyText="true"></asp:CustomValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender3" runat="server" HighlightCssClass="vco" TargetControlID="CVHoraInicio" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>--%>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:LinkButton runat="server" ID="LnkGuardarHorarioNoOpeartivo" CssClass="btn btn-success" Text="Guardar" OnClick="LnkGuardarHorarioNoOpeartivo_Click" ></asp:LinkButton>
|
||||
@@ -759,6 +739,45 @@
|
||||
</div>
|
||||
|
||||
|
||||
<div id="DVModalCancelacionOrden" class="modal ADS fade" role="dialog">
|
||||
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpmodalCacelaOrden" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-content">
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Label runat="server" ID="LblModalCancelarTitulo">Cancelar Orden de Servicio</asp:Label></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtModalCancelarOrdenMotivo" CssClass="form-control" runat="server" MaxLength="100" CausesValidation="true"></asp:TextBox>
|
||||
<asp:Label AssociatedControlID="TxtAnio" runat="server" Text="Motivo:"></asp:Label>
|
||||
<asp:RequiredFieldValidator ID="RfvTxtModalCancelarOrdenMotivo" runat="server" ControlToValidate="TxtModalCancelarOrdenMotivo" CssClass="help-block errorimput"
|
||||
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Motivo''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpCancelaOrden"></asp:RequiredFieldValidator>
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:LinkButton runat="server" ID="LnkmodalCancelarORdenServicio" CssClass="btn btn-danger" Text="Cancelar Orden" OnClick="LnkmodalCancelarORdenServicio_Click" ValidationGroup="GrpCancelaOrden" CausesValidation="true"
|
||||
data-toggle="confirmation" data-popout="true" data-original-title="confirmar" data-btn-ok-label="si"></asp:LinkButton>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div style="display:none">
|
||||
|
||||
|
||||
@@ -255,6 +255,22 @@ Partial Class OS_RepServicioDomicilio
|
||||
End Property
|
||||
|
||||
|
||||
Private Property DTTecnicos As DataTable
|
||||
Get
|
||||
If ViewState("DTTecnicos") Is Nothing Then
|
||||
ViewState("DTTecnicos") = New DataTable
|
||||
End If
|
||||
|
||||
Return DirectCast(ViewState("DTTecnicos"), DataTable)
|
||||
End Get
|
||||
|
||||
Set(ByVal value As DataTable)
|
||||
ViewState("DTTecnicos") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
|
||||
Enum OSModalTipoAccion
|
||||
Agregar
|
||||
@@ -268,7 +284,7 @@ Partial Class OS_RepServicioDomicilio
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
|
||||
CargaUsuariosTecnicos()
|
||||
CargarCentrosDeCosto(Nothing, DdlSubProyecto, Nothing, LblSubProyectoEtiqueta)
|
||||
LblSubProyectoFiltro.Text = LblSubProyectoEtiqueta.Text
|
||||
' LblModalSubProyectoLabel.Text = LblSubProyectoEtiqueta.Text
|
||||
@@ -281,10 +297,15 @@ Partial Class OS_RepServicioDomicilio
|
||||
cargaDropsModal()
|
||||
CargaClientePublicoGeneral()
|
||||
|
||||
|
||||
If UsuarioActual.TienePermisoProceso(348) Then
|
||||
DVModalAsignacion.Visible = True
|
||||
End If
|
||||
|
||||
If UsuarioActual.TienePermisoProceso(352) Then
|
||||
LnkCancelarOrden.Visible = True
|
||||
End If
|
||||
|
||||
|
||||
|
||||
'RegistraScript(" PrimeraCargaCalendario = true;")
|
||||
@@ -293,6 +314,18 @@ Partial Class OS_RepServicioDomicilio
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CargaUsuariosTecnicos()
|
||||
|
||||
DTTecnicos = New DataTable
|
||||
|
||||
Dim ObjUsuarios As New ClsSisUsuarios
|
||||
If ObjUsuarios.GetPermisosPorUsuarioProcesos(-1, -1, -1, -1, 351, UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa) Then
|
||||
DTTecnicos = ObjUsuarios.DtResultados.FiltraParametros(" CveProcesoUsuarioAcceso > 0")
|
||||
End If
|
||||
ObjUsuarios.Dispose()
|
||||
|
||||
End Sub
|
||||
|
||||
#Region "CARGAS"
|
||||
|
||||
#End Region
|
||||
@@ -323,7 +356,7 @@ Partial Class OS_RepServicioDomicilio
|
||||
End Sub
|
||||
|
||||
Private Sub CargaTecnicos()
|
||||
DdlTecnico.DataSource = GlobalDTUsuarios(CveEmpresa:=UsuarioActual.CveEmpresa)
|
||||
DdlTecnico.DataSource = DTTecnicos 'GlobalDTUsuarios(CveEmpresa:=UsuarioActual.CveEmpresa)
|
||||
DdlTecnico.DataBind()
|
||||
DdlTecnico.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
End Sub
|
||||
@@ -352,7 +385,7 @@ Partial Class OS_RepServicioDomicilio
|
||||
|
||||
'ObjOS.Dispose()
|
||||
|
||||
DdlTecnicoAsignar.DataSource = GlobalDTUsuarios(-1, UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True'")
|
||||
DdlTecnicoAsignar.DataSource = DTTecnicos 'GlobalDTUsuarios(-1, UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True'")
|
||||
DdlTecnicoAsignar.DataBind()
|
||||
DdlTecnicoAsignar.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
|
||||
|
||||
@@ -716,6 +749,9 @@ Partial Class OS_RepServicioDomicilio
|
||||
HLkFolio.Text = ObjOS.Folio.ToString
|
||||
HLkFolio.NavigateUrl = $"/OS/OrdenesServicios.aspx?CveOS={ObjOS.CveOS}"
|
||||
|
||||
HLKPDF.NavigateUrl = $"/Compras/PopUpVerFactura.aspx?P={Encripta(String.Format("OP=OS&CVEOS={0}", ObjOS.CveOS))}"
|
||||
|
||||
|
||||
HFCveOS.Value = ObjOS.CveOS.ToString
|
||||
HFCveOsDetalle.Value = ObjOS.CveOSDetalle.ToString
|
||||
TxtDescripcion.Text = ObjOS.Descripcion
|
||||
@@ -743,18 +779,31 @@ Partial Class OS_RepServicioDomicilio
|
||||
FechaInicioOriginal = ObjOS.FechaInicio
|
||||
TxtModalFechaOS.Text = ObjOS.FechaInicio.ToString.ToDate.ToString("dd/MM/yyyy HH:mm")
|
||||
DvModalSubProyecto.Visible = True
|
||||
LblModalOStitulo.Text = "Actualizar Orden de Servicio"
|
||||
'TSTimeSelector.Hour = If(ObjOS.FechaInicio.Hour > 12, ObjOS.FechaInicio.Hour - 12, ObjOS.FechaInicio.Hour)
|
||||
'TSTimeSelector.Minute = ObjOS.FechaInicio.Minute
|
||||
'TSTimeSelector.AmPm = If(ObjOS.FechaInicio.Hour > 12, MKB.TimePicker.TimeSelector.AmPmSpec.PM, MKB.TimePicker.TimeSelector.AmPmSpec.AM)
|
||||
End If
|
||||
|
||||
|
||||
Dim TipoEstatus As Integer = 0
|
||||
TipoEstatus = GlobalDTEstatusOrdenServicios(UsuarioActual.CveEmpresa).FiltroPrimeroValor("TipoEstatus", String.Format("CveEstatusOrdenServicio = {0}", ObjOS.CveEstatusOrdenServicio), "CveEstatusOrdenServicio ASC").ToEntero
|
||||
|
||||
LnkModalAsignar.Visible = If(TipoEstatus.Contiene(5), False, True)
|
||||
LnkCancelarOrden.Visible = If(TipoEstatus.Contiene(5), False, True)
|
||||
|
||||
If (TipoEstatus = 5) Then
|
||||
LblModalOStitulo.Text = "Orden Cancelada"
|
||||
End If
|
||||
|
||||
RegistraScript("$('#DVModalOS').modal('show');")
|
||||
|
||||
End If
|
||||
|
||||
|
||||
ObjOS.Dispose()
|
||||
|
||||
LblModalOStitulo.Text = "Actualizar Orden de Servicio"
|
||||
|
||||
|
||||
ElseIf False Then ' Anterior
|
||||
|
||||
@@ -1255,7 +1304,7 @@ Partial Class OS_RepServicioDomicilio
|
||||
|
||||
DdlTecnicoAsignarHorario.Items.Clear()
|
||||
|
||||
DdlTecnicoAsignarHorario.DataSource = GlobalDTUsuarios(-1, UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True'")
|
||||
DdlTecnicoAsignarHorario.DataSource = DTTecnicos 'GlobalDTUsuarios(-1, UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True'")
|
||||
DdlTecnicoAsignarHorario.DataBind()
|
||||
DdlTecnicoAsignarHorario.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
|
||||
DdlTecnicoAsignarHorario.SelectedValueExist("-1")
|
||||
@@ -1393,4 +1442,89 @@ Partial Class OS_RepServicioDomicilio
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Protected Sub LnkCancelarOrden_Click(sender As Object, e As EventArgs)
|
||||
|
||||
|
||||
|
||||
RegistraScript($"$('#{TxtModalCancelarOrdenMotivo.ClientID}').focus();;$('#DVModalCancelacionOrden').modal('show');")
|
||||
|
||||
|
||||
TxtModalCancelarOrdenMotivo.Focus()
|
||||
TxtModalCancelarOrdenMotivo.Text = ""
|
||||
UpmodalCacelaOrden.Update()
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
'Protected Sub BtnGuardarEventoBitacora_Click(sender As Object, e As EventArgs) Handles BtnGuardarEventoBitacora.Click
|
||||
' Dim ObjEventoBitacora As New ClsOIEventos
|
||||
|
||||
' Dim FileExtension As String = "-1"
|
||||
' Dim filesgral As List(Of Archivo) = Anexo.getfiles().Archivos
|
||||
' Dim filemove As String = ""
|
||||
|
||||
' For Each fileItem As Archivo In filesgral
|
||||
' FileExtension = IO.Path.GetExtension(String.Format("{0}Temp\{1}", AppDomain.CurrentDomain.BaseDirectory, fileItem.filename)).Replace(".", "")
|
||||
' filemove = fileItem.filename
|
||||
' Next
|
||||
|
||||
' If ObjEventoBitacora.AddEventoBitacora(TxtEventoDescripcion.Text.Trim, String.Format(".{0}", FileExtension), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, CveOS, -1, -1, -1, -1) Then
|
||||
' If filemove <> "" Then
|
||||
' filemove.FilesMove(String.Format("OI{0}", ObjEventoBitacora.CveEvento.ToString), String.Format("{0}OI", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:=False)
|
||||
' End If
|
||||
|
||||
' GvEB.DataSource = ObjEventoBitacora.DtResultados
|
||||
' TxtEventoDescripcion.Text = ""
|
||||
' Anexo.Text = "[]"
|
||||
' Alert("La bitácora/observación se guardó correctamente", TipoMensaje.MsgInformacion)
|
||||
' RegistraScript("$('#ModalBitacora').modal('hide')", "hidemodal")
|
||||
' End If
|
||||
' ObjEventoBitacora.Dispose()
|
||||
' GvEB.DataBind()
|
||||
|
||||
' UPEventoBitacora.Update()
|
||||
' CargaEventoBitacora()
|
||||
' UPAddEventoBitacora.Update()
|
||||
'End Sub
|
||||
|
||||
|
||||
|
||||
Protected Sub LnkmodalCancelarORdenServicio_Click(sender As Object, e As EventArgs)
|
||||
|
||||
Dim TieneError As Boolean = True
|
||||
|
||||
Dim CveOS As Integer = HFCveOS.Value.ToEntero
|
||||
|
||||
|
||||
Dim objOS As New ClsOS
|
||||
Dim ObjEventoBitacora As New ClsOIEventos(objOS.IniciaTransacSQL)
|
||||
|
||||
|
||||
If objOS.UpdateOrdenesServiciosFinaliza(CveOS, -1, -1, UsuarioActual.CveEmpresa, Opcion:=2) Then 'Opcion:=2 Es para cancelar
|
||||
If ObjEventoBitacora.AddEventoBitacora($"Motivo Cancelación: {TxtModalCancelarOrdenMotivo.Text.Trim}", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, CveOS, -1, -1, -1, -1) Then
|
||||
TieneError = False
|
||||
End If
|
||||
End If
|
||||
|
||||
If TieneError Then
|
||||
objOS.RollBack()
|
||||
Else
|
||||
objOS.Commit()
|
||||
End If
|
||||
|
||||
objOS.Dispose()
|
||||
|
||||
|
||||
If Not TieneError Then
|
||||
Alert("Orden Cancelada Correctamente", TipoMensaje.MsgInformacion, "location.reload(true);")
|
||||
RegistraScript("$('#DVModalCancelacionOrden').modal('hide');")
|
||||
RegistraScript("$('#DVModalFinalizarOrden').modal('hide');")
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
@@ -207,12 +207,19 @@ Partial Class CatSubProyectos
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub GvDatos_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvDatos.RowDeleting
|
||||
|
||||
Dim ObjSubProyectos As New ClsSubProyectos
|
||||
|
||||
ObjSubProyectos.IniciaTransacSQL()
|
||||
|
||||
If ObjSubProyectos.RemoveSubProyecto(GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero) Then
|
||||
ObjSubProyectos.Commit()
|
||||
GvDatos.EditIndex = -1
|
||||
ViewState("DTSubProyectos") = ObjSubProyectos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GlobalDTSubProyectos(UsuarioActual.CveEmpresa) = ObjSubProyectos.DtResultados
|
||||
Alert("El SubProyecto se eliminó correctamente.", TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
ObjSubProyectos.RollBack()
|
||||
End If
|
||||
|
||||
ObjSubProyectos.Dispose()
|
||||
|
||||
@@ -804,6 +804,10 @@ Partial Class RH_Reclutamiento
|
||||
If Not Page.IsPostBack Then
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
CrearEstructuraTablasTemporales()
|
||||
|
||||
DDLEstadoCivil4.DataSource = GlobalDTEstadoCivil
|
||||
|
||||
Reference in New Issue
Block a user