This commit is contained in:
2022-12-26 12:53:46 -07:00
11 changed files with 689 additions and 595 deletions

View File

@@ -218,7 +218,8 @@
<div class="row"> <div class="row">
<div class="col-md-4 "> <div class="col-md-4 ">
<label class=" control-label"><asp:Label runat="server" ID="LblFechaCompra">Fecha de Compra:</asp:Label></label> <label class=" control-label">
<asp:Label runat="server" ID="LblFechaCompra">Fecha de Compra:</asp:Label></label>
</div> </div>
<div class="col-md-3"> <div class="col-md-3">
@@ -253,7 +254,8 @@
<div class="row"> <div class="row">
<div class="col-md-4 "> <div class="col-md-4 ">
<label class=" control-label"><asp:Label runat="server" ID="LblFechaBaja">Fecha de Baja:</asp:Label></label> <label class=" control-label">
<asp:Label runat="server" ID="LblFechaBaja">Fecha de Baja:</asp:Label></label>
</div> </div>
<div class="col-md-3"> <div class="col-md-3">
@@ -463,7 +465,31 @@
</div> </div>
</div> </div>
</div> </div>
<asp:Panel runat="server" ID="LatLong" Visible="false">
<div class="row">
<div class="col-md-4 ">
<label class=" control-label">Latitud: </label>
</div>
<div class="col-md-7">
<div class="form-group">
<asp:TextBox ID="TxtLatitud" runat="server"></asp:TextBox>
</div>
</div>
</div>
<div class="row">
<div class="col-md-4 ">
<label class=" control-label">Longitud: </label>
</div>
<div class="col-md-7">
<div class="form-group">
<asp:TextBox ID="TxtLongitud" runat="server"></asp:TextBox>
</div>
</div>
</div>
</asp:Panel>
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>
@@ -1202,7 +1228,7 @@
</div> </div>
<div class="actions"> <div class="actions">
<div class="btn-group"> <div class="btn-group">
<asp:LinkButton runat="server" CssClass="btn btn-circle btn-sm blue" data-original-title="Agregar Mantenimiento" title="Agregar Mantenimiento" ID="LnkAgregarMantenimiento" OnClick="LnkAgregarMantenimiento_Click" style="font-size:13px!important"><i class="fa fa-plus-circle" aria-hidden="true"></i>Agregar</asp:LinkButton> <asp:LinkButton runat="server" CssClass="btn btn-circle btn-sm blue" data-original-title="Agregar Mantenimiento" title="Agregar Mantenimiento" ID="LnkAgregarMantenimiento" OnClick="LnkAgregarMantenimiento_Click" Style="font-size: 13px!important"><i class="fa fa-plus-circle" aria-hidden="true"></i>Agregar</asp:LinkButton>
</div> </div>
</div> </div>
@@ -1211,7 +1237,6 @@
<a href="" class="reload" data-original-title="" title=""></a> <a href="" class="reload" data-original-title="" title=""></a>
<a href="" class="fullscreen" data-original-title="" title=""></a> <a href="" class="fullscreen" data-original-title="" title=""></a>
<a href="" class="remove" data-original-title="" title=""></a>--%> <a href="" class="remove" data-original-title="" title=""></a>--%>
</div> </div>
</div> </div>
<div class="portlet-body form-horizontal form-row-sepe formnombottom label12"> <div class="portlet-body form-horizontal form-row-sepe formnombottom label12">
@@ -2139,12 +2164,11 @@
</div> </div>
<div class="actions"> <div class="actions">
<div class="btn-group"> <div class="btn-group">
<asp:LinkButton runat="server" CssClass="btn btn-circle btn-sm blue" data-original-title="Agregar Producción" title="Agregar Producción" ID="LnkAgregarProduccion" OnClick="LnkAgregarProduccion_Click" style="font-size:13px!important"><i class="fa fa-plus-circle" aria-hidden="true"></i>Agregar</asp:LinkButton> <asp:LinkButton runat="server" CssClass="btn btn-circle btn-sm blue" data-original-title="Agregar Producción" title="Agregar Producción" ID="LnkAgregarProduccion" OnClick="LnkAgregarProduccion_Click" Style="font-size: 13px!important"><i class="fa fa-plus-circle" aria-hidden="true"></i>Agregar</asp:LinkButton>
</div> </div>
</div> </div>
<div class="tools"> <div class="tools">
</div> </div>
</div> </div>
<div class="portlet-body form-horizontal form-row-sepe formnombottom label12"> <div class="portlet-body form-horizontal form-row-sepe formnombottom label12">
@@ -2736,7 +2760,7 @@
<div class="row"> <div class="row">
<div class="col-md-5"> <div class="col-md-5">
<div class="form-group form-md-line-input input-iconright"> <div class="form-group form-md-line-input input-iconright">
<ADS:DropDownLost ID="DdlProveedor" Width="100%" CssStyle="width: 100%;" runat="server" UsaWebService="true" data-metodo="getproveedores" DataValueField="CveProveedor" DataTextField="RazonSocial" CssClass="form-control select2me" AppendDataBoundItems="true"></ADS:DropDownLost> <ADS:Dropdownlost ID="DdlProveedor" Width="100%" CssStyle="width: 100%;" runat="server" UsaWebService="true" data-metodo="getproveedores" DataValueField="CveProveedor" DataTextField="RazonSocial" CssClass="form-control select2me" AppendDataBoundItems="true"></ADS:Dropdownlost>
<%--<asp:RequiredFieldValidator ID="RFVProveedor" runat="server" ControlToValidate="DdlProveedor" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Compañia''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpObligatorioP"></asp:RequiredFieldValidator>--%> <%--<asp:RequiredFieldValidator ID="RFVProveedor" runat="server" ControlToValidate="DdlProveedor" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Compañia''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpObligatorioP"></asp:RequiredFieldValidator>--%>
<label for="<%= DdlProveedor.ClientID.ToString()%>">Proveedor:</label> <label for="<%= DdlProveedor.ClientID.ToString()%>">Proveedor:</label>
</div> </div>
@@ -3300,7 +3324,8 @@
<button type="button" class="close" data-dismiss="modal" aria-label="Close"> <button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span> <span aria-hidden="true">&times;</span>
</button> </button>
<h4 class="modal-title" id="H4" runat="server"><asp:Label runat="server" ID="LblModaProduccionTitulo"></asp:Label></h4> <h4 class="modal-title" id="H4" runat="server">
<asp:Label runat="server" ID="LblModaProduccionTitulo"></asp:Label></h4>
</div> </div>
<div class="modal-body"> <div class="modal-body">
<asp:UpdatePanel ID="UpdatePanel4" UpdateMode="Conditional" runat="server"> <asp:UpdatePanel ID="UpdatePanel4" UpdateMode="Conditional" runat="server">
@@ -3392,7 +3417,8 @@
<button type="button" class="close" data-dismiss="modal" aria-label="Close"> <button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span> <span aria-hidden="true">&times;</span>
</button> </button>
<h4 class="modal-title" id="H5" runat="server"><asp:Label runat="server" ID="LblModaMantenimientoTitulo"></asp:Label></h4> <h4 class="modal-title" id="H5" runat="server">
<asp:Label runat="server" ID="LblModaMantenimientoTitulo"></asp:Label></h4>
</div> </div>
<div class="modal-body"> <div class="modal-body">
<asp:UpdatePanel ID="UpdatePanel5" UpdateMode="Conditional" runat="server"> <asp:UpdatePanel ID="UpdatePanel5" UpdateMode="Conditional" runat="server">
@@ -3490,7 +3516,8 @@
<button type="button" class="close" data-dismiss="modal" aria-label="Close"> <button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span> <span aria-hidden="true">&times;</span>
</button> </button>
<h4 class="modal-title" id="H6" runat="server"><asp:Label runat="server" ID="LblModalTituloPlagaEnfermedad"></asp:Label></h4> <h4 class="modal-title" id="H6" runat="server">
<asp:Label runat="server" ID="LblModalTituloPlagaEnfermedad"></asp:Label></h4>
</div> </div>
<div class="modal-body"> <div class="modal-body">

View File

@@ -832,6 +832,8 @@ Partial Class AF_AF
Protected Sub DdlTipoActivoFijo_SelectedIndexChanged(sender As Object, e As System.EventArgs) Handles DdlTipoActivoFijo.SelectedIndexChanged Protected Sub DdlTipoActivoFijo_SelectedIndexChanged(sender As Object, e As System.EventArgs) Handles DdlTipoActivoFijo.SelectedIndexChanged
CargaFolios() CargaFolios()
ModalidadesPaginaAF() ModalidadesPaginaAF()
LatLong.Visible = UsuarioActual.CveEmpresa = 158 And ((DdlTipoActivoFijo.SelectedItem.Text.ToUpper() = "POZOS") Or (DdlSubTipoActivoFijo.SelectedItem.Text.ToUpper() = "POZOS"))
UPEstatus.Update()
End Sub End Sub
Private Sub CargaFolios() Private Sub CargaFolios()
@@ -939,9 +941,14 @@ Partial Class AF_AF
TxtFechaBaja.Text = If(ObjActivoFijo.FechaBaja = New Date(1900, 1, 1), "", ObjActivoFijo.FechaBaja.ToString("dd/MM/yyyy")) TxtFechaBaja.Text = If(ObjActivoFijo.FechaBaja = New Date(1900, 1, 1), "", ObjActivoFijo.FechaBaja.ToString("dd/MM/yyyy"))
DdlTipoActivoFijo.SelectedValue = ObjActivoFijo.CveTipoActivoFijo.ToString DdlTipoActivoFijo.SelectedValue = ObjActivoFijo.CveTipoActivoFijo.ToString()
CargaSubTipoActivoFijo() CargaSubTipoActivoFijo()
DdlSubTipoActivoFijo.SelectedValue = ObjActivoFijo.CveSubTipoActivoFijo.ToString DdlSubTipoActivoFijo.SelectedValue = ObjActivoFijo.CveSubTipoActivoFijo.ToString()
LatLong.Visible = UsuarioActual.CveEmpresa = 158 And ((DdlTipoActivoFijo.SelectedItem.Text.ToUpper() = "POZOS") Or (DdlSubTipoActivoFijo.SelectedItem.Text.ToUpper() = "POZOS"))
TxtLatitud.Text = ObjActivoFijo.DtResultados.Rows(0)("Lat").ToString()
TxtLongitud.Text = ObjActivoFijo.DtResultados.Rows(0)("Long").ToString()
UPEstatus.Update()
If ObjActivoFijo.CveMovimientoInv > 0 Then If ObjActivoFijo.CveMovimientoInv > 0 Then
UpAFInvMovimiento.Visible = True UpAFInvMovimiento.Visible = True
@@ -2483,7 +2490,7 @@ Partial Class AF_AF
DdlEstadoActivoFijo.SelectedValue.ToEntero, DdlCtaContableDepreciacion.SelectedValue.ToEntero, TxtPorDepreciacion.Text.Trim.ToDouble, DdlEstadoActivoFijo.SelectedValue.ToEntero, DdlCtaContableDepreciacion.SelectedValue.ToEntero, TxtPorDepreciacion.Text.Trim.ToDouble,
TxtObservaciones.Text.Trim, Ddlclientes.SelectedValue.ToEntero, CveMovimientoSalidaInv, UsuarioActual.CveUsuario, CveEmpresaActual, CveMarca:=DdlMarcas.SelectedValue.ToEntero, TxtObservaciones.Text.Trim, Ddlclientes.SelectedValue.ToEntero, CveMovimientoSalidaInv, UsuarioActual.CveUsuario, CveEmpresaActual, CveMarca:=DdlMarcas.SelectedValue.ToEntero,
CveModelo:=DdlModelos.SelectedValue.ToEntero, CveGrupo:=DdlGrupo.SelectedValue.ToEntero, CveAFPadre:=DdlAFPadres.SelectedValue.ToEntero, CveDispositivo:=DdlDispositivo.SelectedValue.ToEntero, CveModelo:=DdlModelos.SelectedValue.ToEntero, CveGrupo:=DdlGrupo.SelectedValue.ToEntero, CveAFPadre:=DdlAFPadres.SelectedValue.ToEntero, CveDispositivo:=DdlDispositivo.SelectedValue.ToEntero,
FechaBaja:=FechaBaja) > 0 Then FechaBaja:=FechaBaja, Lat:=TxtLatitud.Text, Longi:=TxtLongitud.Text) > 0 Then
ViewState("CveActivoFijo") = ObjAF.CveActivoFijo ViewState("CveActivoFijo") = ObjAF.CveActivoFijo
Else Else
ErrorGuardar = True ErrorGuardar = True
@@ -2589,7 +2596,7 @@ Partial Class AF_AF
DdlSubProyecto.SelectedValue.ToEntero, DdlCtaContable.SelectedValue.Trim.ToEntero, DdlEstadoActivoFijo.SelectedValue.ToEntero, DdlCtaContableDepreciacion.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, DdlCtaContable.SelectedValue.Trim.ToEntero, DdlEstadoActivoFijo.SelectedValue.ToEntero, DdlCtaContableDepreciacion.SelectedValue.ToEntero,
TxtPorDepreciacion.Text.Trim.ToDouble, TxtObservaciones.Text.Trim, Ddlclientes.SelectedValue.ToEntero, UsuarioActual.CveUsuario, CveEmpresaActual, TxtPorDepreciacion.Text.Trim.ToDouble, TxtObservaciones.Text.Trim, Ddlclientes.SelectedValue.ToEntero, UsuarioActual.CveUsuario, CveEmpresaActual,
CveMarca:=DdlMarcas.SelectedValue.ToEntero, CveModelo:=DdlModelos.SelectedValue.ToEntero, CveGrupo:=DdlGrupo.SelectedValue.ToEntero, CveAFPadre:=DdlAFPadres.SelectedValue.ToEntero, CveDispositivo:=DdlDispositivo.SelectedValue.ToEntero, CveMarca:=DdlMarcas.SelectedValue.ToEntero, CveModelo:=DdlModelos.SelectedValue.ToEntero, CveGrupo:=DdlGrupo.SelectedValue.ToEntero, CveAFPadre:=DdlAFPadres.SelectedValue.ToEntero, CveDispositivo:=DdlDispositivo.SelectedValue.ToEntero,
FechaBaja:=FechaBaja) Then FechaBaja:=FechaBaja, Lat:=TxtLatitud.Text, Longi:=TxtLongitud.Text) Then
'Comentado porque te redirecciona no se ocupa - 22 Enero 2016 - Israel Piña 'Comentado porque te redirecciona no se ocupa - 22 Enero 2016 - Israel Piña
'CargaDatos() 'CargaDatos()
@@ -3098,7 +3105,8 @@ Partial Class AF_AF
CargaCaracteristicas() CargaCaracteristicas()
CargaDispositivos() CargaDispositivos()
ModalidadesPaginaAF() ModalidadesPaginaAF()
LatLong.Visible = UsuarioActual.CveEmpresa = 158 And ((DdlTipoActivoFijo.SelectedItem.Text.ToUpper() = "POZOS") Or (DdlSubTipoActivoFijo.SelectedItem.Text.ToUpper() = "POZOS"))
UPEstatus.Update()
End Sub End Sub
#Region "CARGAR CUENTA CONTABLE" #Region "CARGAR CUENTA CONTABLE"

View File

@@ -400,9 +400,12 @@ Public Class ClsAF
Public Function AddActivosFijos(Codigo As String, Descripcion As String, ValorCompra As Double, FechaCompra As Date, CveSubTipoActivoFijo As Integer, CvePersonalResponsable As Integer, NoSerie As String, Año As Integer, Public Function AddActivosFijos(Codigo As String, Descripcion As String, ValorCompra As Double, FechaCompra As Date, CveSubTipoActivoFijo As Integer, CvePersonalResponsable As Integer, NoSerie As String, Año As Integer,
CveSubProyecto As Integer, Cuenta As Integer, CveEstadoActivoFijo As Integer, IdCtaContDepreciacion As Integer, PorDepreciacion As Double, Observaciones As String, CveCliente As Integer, CveSubProyecto As Integer, Cuenta As Integer, CveEstadoActivoFijo As Integer, IdCtaContDepreciacion As Integer, PorDepreciacion As Double, Observaciones As String, CveCliente As Integer,
CveMovimiento As Integer, CveUsuario As Integer, CveEmpresa As Integer, Optional CveMarca As Integer = -1, Optional CveModelo As Integer = -1, Optional CveGrupo As Integer = -1, CveMovimiento As Integer, CveUsuario As Integer, CveEmpresa As Integer, Optional CveMarca As Integer = -1, Optional CveModelo As Integer = -1, Optional CveGrupo As Integer = -1,
Optional CveAFPadre As Integer = -1, Optional CveDispositivo As Integer = -1, Optional FechaBaja As Date = MinFecha) As Integer Optional CveAFPadre As Integer = -1, Optional CveDispositivo As Integer = -1, Optional FechaBaja As Date = MinFecha,
Optional Lat As String = "", Optional Longi As String = "") As Integer
Dim Retorno As Integer = -1 Dim Retorno As Integer = -1
DataAdapter("PA_AF_ActivosFijosAdd") DataAdapter("PA_AF_ActivosFijosAdd")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
@@ -432,6 +435,9 @@ Public Class ClsAF
.Add("@CveDispositivo", SqlDbType.Int).Value = CveDispositivo .Add("@CveDispositivo", SqlDbType.Int).Value = CveDispositivo
.Add("@FechaBaja", SqlDbType.Date).Value = FechaBaja .Add("@FechaBaja", SqlDbType.Date).Value = FechaBaja
.Add("@Lat", SqlDbType.VarChar).Value = Lat
.Add("@Long", SqlDbType.VarChar).Value = Longi
.Add("@CveActivoFijo", SqlDbType.Int).Direction = ParameterDirection.Output .Add("@CveActivoFijo", SqlDbType.Int).Direction = ParameterDirection.Output
.Add("@RETURN_VALUE", SqlDbType.Int).Direction = ParameterDirection.ReturnValue .Add("@RETURN_VALUE", SqlDbType.Int).Direction = ParameterDirection.ReturnValue
End With End With
@@ -445,6 +451,9 @@ Public Class ClsAF
If Ex1.Message.Contains("Número: 2627;") Then If Ex1.Message.Contains("Número: 2627;") Then
If Ex1.Message.Contains("UN_ActivoFijo") Then If Ex1.Message.Contains("UN_ActivoFijo") Then
Alert("El Codigo ya se encuentra registrado", TipoMensaje.MsgAdvertencia) Alert("El Codigo ya se encuentra registrado", TipoMensaje.MsgAdvertencia)
ElseIf Ex1.Message.Contains("FK_AF_ActivosFijos_AF_SubTiposActivosFijos") Then
Alert("Capture un SubTipo de Activo Fijo Valido", TipoMensaje.MsgAdvertencia)
Else Else
Alert("Ya existe un Activo Fijo con el mismo nombre: " & Descripcion & ".", TipoMensaje.MsgAdvertencia) Alert("Ya existe un Activo Fijo con el mismo nombre: " & Descripcion & ".", TipoMensaje.MsgAdvertencia)
End If End If
@@ -462,7 +471,8 @@ Public Class ClsAF
CvePersonalResponsable As Integer, NoSerie As String, Año As Integer, CveSubProyecto As Integer, IdCtaContActivoFijo As Integer, CvePersonalResponsable As Integer, NoSerie As String, Año As Integer, CveSubProyecto As Integer, IdCtaContActivoFijo As Integer,
CveEstadoActivoFijo As Integer, IdCtaContDepreciacion As Integer, PorDepreciacion As Double, Observaciones As String, CveCliente As Integer, CveEstadoActivoFijo As Integer, IdCtaContDepreciacion As Integer, PorDepreciacion As Double, Observaciones As String, CveCliente As Integer,
CveUsuarioModifico As Integer, CveEmpresa As Integer, Optional CveMarca As Integer = -1, Optional CveModelo As Integer = -1, Optional CveGrupo As Integer = -1, CveUsuarioModifico As Integer, CveEmpresa As Integer, Optional CveMarca As Integer = -1, Optional CveModelo As Integer = -1, Optional CveGrupo As Integer = -1,
Optional CveAFPadre As Integer = -1, Optional CveDispositivo As Integer = -1, Optional FechaBaja As Date = MinFecha) As Boolean Optional CveAFPadre As Integer = -1, Optional CveDispositivo As Integer = -1, Optional FechaBaja As Date = MinFecha,
Optional Lat As String = "", Optional Longi As String = "") As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_AF_ActivosFijosUpdate") DataAdapter("PA_AF_ActivosFijosUpdate")
@@ -495,6 +505,8 @@ Public Class ClsAF
.Add("@CveAFPadre", SqlDbType.Int).Value = CveAFPadre .Add("@CveAFPadre", SqlDbType.Int).Value = CveAFPadre
.Add("@CveDispositivo", SqlDbType.Int).Value = CveDispositivo .Add("@CveDispositivo", SqlDbType.Int).Value = CveDispositivo
.Add("@FechaBaja", SqlDbType.Date).Value = FechaBaja .Add("@FechaBaja", SqlDbType.Date).Value = FechaBaja
.Add("@Lat", SqlDbType.VarChar).Value = Lat
.Add("@Long", SqlDbType.VarChar).Value = Longi
End With End With
Try Try
@@ -503,6 +515,8 @@ Public Class ClsAF
Catch Ex1 As SqlException Catch Ex1 As SqlException
If Ex1.Message.Contains("Número: 2627;") Then If Ex1.Message.Contains("Número: 2627;") Then
Alert("Ya existe un Activo Fijo con el mismo nombre: " & Descripcion & ".", TipoMensaje.MsgAdvertencia) Alert("Ya existe un Activo Fijo con el mismo nombre: " & Descripcion & ".", TipoMensaje.MsgAdvertencia)
ElseIf Ex1.Message.Contains("FK_AF_ActivosFijos_AF_SubTiposActivosFijos") Then
Alert("Capture un SubTipo de Activo Fijo Valido", TipoMensaje.MsgAdvertencia)
Else Else
Me.OnError("Ocurrió un error al guardar los cambios en el Activo Fijo", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) Me.OnError("Ocurrió un error al guardar los cambios en el Activo Fijo", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End If End If

View File

@@ -2616,7 +2616,7 @@ Public Class ClsNominas
End Try End Try
Return retorno Return retorno
End Function End Function
Public Function GetNominaEmpleado(CveProyecto As Integer, CveSubProyecto As Integer, CveTurno As Integer, CvePeriodo As Integer, CveEmpresa As Integer, Agrupador As Integer, Optional RegimenContratacion As Integer = 1, Optional CvePersonal As Integer = -1, Optional SalarioDiario As Decimal = 0) As Boolean Public Function GetNominaEmpleado(CveProyecto As Integer, CveSubProyecto As Integer, CveTurno As Integer, CvePeriodo As Integer, CveEmpresa As Integer, Agrupador As Integer, Optional RegimenContratacion As Integer = 1, Optional CvePersonal As Integer = -1, Optional SalarioDiario As Decimal = 0, Optional CveTipoTrabajador As Integer = -1) As Boolean
Dim retorno As Boolean = False Dim retorno As Boolean = False
Try Try
DTSet = New DataSet() DTSet = New DataSet()
@@ -2631,6 +2631,7 @@ Public Class ClsNominas
.Add("@RegimenContratacion", SqlDbType.Int).Value = RegimenContratacion .Add("@RegimenContratacion", SqlDbType.Int).Value = RegimenContratacion
.Add("@CvePersonal", SqlDbType.Decimal).Value = CvePersonal .Add("@CvePersonal", SqlDbType.Decimal).Value = CvePersonal
.Add("@SalarioDiario", SqlDbType.Decimal).Value = SalarioDiario .Add("@SalarioDiario", SqlDbType.Decimal).Value = SalarioDiario
.Add("@CveTipoTrabajador", SqlDbType.Decimal).Value = CveTipoTrabajador
End With End With

File diff suppressed because it is too large Load Diff

View File

@@ -2207,7 +2207,7 @@ Partial Class Inventarios_TraspasoAlmacen
Dim dtvirtual As DataTable = Nothing Dim dtvirtual As DataTable = Nothing
If ObjInventario.GetMovimientosDetalleVirtual(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then If ObjInventario.GetMovimientosDetalleVirtual(CveMovimientoSalidaTransitorio, UsuarioActual.CveEmpresa) Then
dtvirtual = ObjInventario.DtResultados dtvirtual = ObjInventario.DtResultados
If dtvirtual.Rows.Count > 0 Then If dtvirtual.Rows.Count > 0 Then

View File

@@ -401,6 +401,12 @@
<asp:ListItem Text="Todos" Value="3"></asp:ListItem> <asp:ListItem Text="Todos" Value="3"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
</div> </div>
<label class="col-md-1 compoonenlabel" style="line-height: 1; max-width: 85px;">Tipo Trabajador:</label>
<div class="col-md-1">
<asp:DropDownList Width="100%" ID="DdlTipoTrabajador" CssClass="form-control input-sm select2me" runat="server" AutoPostBack="true"
DataTextField="TipoTrabajadorB" DataValueField="CveTipoTrabajador" ValidationGroup="GrpGuardar">
</asp:DropDownList>
</div>
<div class="col-md-2" style="max-width: 160px !important; white-space: nowrap;"> <div class="col-md-2" style="max-width: 160px !important; white-space: nowrap;">
<label class="compoonenlabel">Ver obligaciones:</label> <label class="compoonenlabel">Ver obligaciones:</label>
<asp:CheckBox ID="Chkobligaciones" Text=" " CssClass="chksino" runat="server" /> <asp:CheckBox ID="Chkobligaciones" Text=" " CssClass="chksino" runat="server" />

View File

@@ -134,6 +134,17 @@ public partial class Nomina_Nomina2 : ClsPaginas
set { ViewState["PermisoEmitir"] = value; } set { ViewState["PermisoEmitir"] = value; }
} }
protected int CveTipoTrabajador
{
get
{
if (ViewState["CveTipoTrabajador"] == null) { return 0; }
else { return ViewState["CveTipoTrabajador"].ToString().ToEntero(); }
}
set { ViewState["CveTipoTrabajador"] = value; }
}
protected int CvePeriodoSeleccionado protected int CvePeriodoSeleccionado
{ {
get get
@@ -236,7 +247,23 @@ public partial class Nomina_Nomina2 : ClsPaginas
if (!IsPostBack) if (!IsPostBack)
{ {
if(UsuarioActual.CveUsuario == 100) { using (ClsRH objrh = new ClsRH())
{
if(objrh.TiposTrabajadorGet(-1, UsuarioActual.CveEmpresa))
{
DataTable dt = objrh.DtResultados;
DataRow drow = dt.NewRow();
drow["CveTipoTrabajador"] = "-1";
drow["TipoTrabajadorB"] = "Todos";
dt.Rows.InsertAt(drow, 0);
dt.AcceptChanges();
DdlTipoTrabajador.DataSource = dt;
DdlTipoTrabajador.DataBind();
DdlTipoTrabajador.SelectedValueExist( "-1");
}
}
if (UsuarioActual.CveUsuario == 100)
{
Alert("recuerda que solo la empresa (119) tiene activado el timbrado 4.0", TipoMensaje.ToastAdventencia); Alert("recuerda que solo la empresa (119) tiene activado el timbrado 4.0", TipoMensaje.ToastAdventencia);
} }
//CreaObjetoEmpresa(UsuarioActual); //CreaObjetoEmpresa(UsuarioActual);
@@ -461,6 +488,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
FiltCveTurno = DdlTurno.SelectedValue.ToEntero(); FiltCveTurno = DdlTurno.SelectedValue.ToEntero();
FiltCvePeriodo = DdlPeriodo.SelectedValue.ToEntero(); FiltCvePeriodo = DdlPeriodo.SelectedValue.ToEntero();
FiltAgrupador = 1; FiltAgrupador = 1;
CveTipoTrabajador = DdlTipoTrabajador.SelectedValue.ToEntero();
HypPDFSTimbrados.Attributes.Add("onclick", string.Format("GETPDF({0},{1})", -1, FiltCvePeriodo)); HypPDFSTimbrados.Attributes.Add("onclick", string.Format("GETPDF({0},{1})", -1, FiltCvePeriodo));
cargaDatos(); cargaDatos();
LtlPeriodoseleccionado.Text = string.Format("{0} ({1} Empleados)", DdlPeriodo.SelectedItem.Text, dtempleados.COUNT("CvePersonal", " CvePersonal >0 ")); LtlPeriodoseleccionado.Text = string.Format("{0} ({1} Empleados)", DdlPeriodo.SelectedItem.Text, dtempleados.COUNT("CvePersonal", " CvePersonal >0 "));
@@ -519,7 +547,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
LnkFormatoTabular.Visible = true; LnkFormatoTabular.Visible = true;
HypPDFSTimbrados.Visible = true; HypPDFSTimbrados.Visible = true;
if (objnom.GetNominaEmpleado(FiltCveProyecto, FiltCveSubProyecto, FiltCveTurno, FiltCvePeriodo, CveEmpresa, FiltAgrupador, DdlRegimenContratacion.SelectedValue.ToEntero()) && objnom.DTSetResultados.Tables.Count > 4) if (objnom.GetNominaEmpleado(FiltCveProyecto, FiltCveSubProyecto, FiltCveTurno, FiltCvePeriodo, CveEmpresa, FiltAgrupador, DdlRegimenContratacion.SelectedValue.ToEntero(), CveTipoTrabajador: CveTipoTrabajador) && objnom.DTSetResultados.Tables.Count > 4)
{ {
dtempleados = objnom.DTSetResultados.Tables[3]; dtempleados = objnom.DTSetResultados.Tables[3];
dtempleadosConceptos = objnom.DTSetResultados.Tables[4]; dtempleadosConceptos = objnom.DTSetResultados.Tables[4];
@@ -6395,7 +6423,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
ObjPersonal.IniciaTransacSQL(); ObjPersonal.IniciaTransacSQL();
bool OcurrioError = false; bool OcurrioError = false;
if (!ObjPersonal.AddAsistenciaMasiva2(DdlPeriodoCM.SelectedValue.ToEntero(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)) if (!ObjPersonal.AddAsistenciaMasiva2(DdlPeriodoCM.SelectedValue.ToEntero(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa,-1))
OcurrioError = true; OcurrioError = true;
if (OcurrioError) if (OcurrioError)

View File

@@ -1094,30 +1094,30 @@ Partial Class RH_Personal
Else Else
'If (objrh.AgroDepartamentosGet(UsuarioActual.CveEmpresa, -1, -1)) Then If (objrh.AgroDepartamentosGet(UsuarioActual.CveEmpresa, -1, -1)) Then
' Dim dt As DataTable = objrh.DtResultados.FiltraParametros(String.Format("CveSubProyecto ={0}", DdlSubProyectoAsignado.SelectedValue), "", {"CveTipoTrabajador", "TipoTrabajadorB"}) Dim dt As DataTable = objrh.DtResultados.FiltraParametros(String.Format("CveSubProyecto ={0}", DdlSubProyectoAsignado.SelectedValue), "", {"CveTipoTrabajador", "TipoTrabajadorB"})
' Dim drow As DataRow = dt.NewRow() Dim drow As DataRow = dt.NewRow()
' If UsuarioActual.CveEmpresa <> 158 Then If UsuarioActual.CveEmpresa <> 158 Then
' drow = dt.NewRow() drow = dt.NewRow()
' drow("CveTipoTrabajador") = "2" drow("CveTipoTrabajador") = "2"
' drow("TipoTrabajadorB") = "Operativo" drow("TipoTrabajadorB") = "Operativo"
' dt.Rows.InsertAt(drow, 0) dt.Rows.InsertAt(drow, 0)
' drow = dt.NewRow() drow = dt.NewRow()
' drow("CveTipoTrabajador") = "3" drow("CveTipoTrabajador") = "3"
' drow("TipoTrabajadorB") = "Administrativo" drow("TipoTrabajadorB") = "Administrativo"
' dt.Rows.InsertAt(drow, 0) dt.Rows.InsertAt(drow, 0)
' End If End If
' drow = dt.NewRow() drow = dt.NewRow()
' drow("CveTipoTrabajador") = "-1" drow("CveTipoTrabajador") = "-1"
' drow("TipoTrabajadorB") = "Seleccione" drow("TipoTrabajadorB") = "Seleccione"
' dt.Rows.InsertAt(drow, 0) dt.Rows.InsertAt(drow, 0)
' If DdlTipoTrabajador.Items.Count() > 0 Then If DdlTipoTrabajador.Items.Count() > 0 Then
' DdlTipoTrabajador.SelectedValueExist("-1") DdlTipoTrabajador.SelectedValueExist("-1")
' End If End If
' DdlTipoTrabajador.DataSource = dt DdlTipoTrabajador.DataSource = dt
' DdlTipoTrabajador.DataBind() DdlTipoTrabajador.DataBind()
'End If End If
End If End If
End Using End Using
End Sub End Sub
@@ -1125,7 +1125,7 @@ Partial Class RH_Personal
Protected Sub cargaagrodeptos() Protected Sub cargaagrodeptos()
Using objrh As New ClsRH() Using objrh As New ClsRH()
If (objrh.AgroDepartamentosGet(UsuarioActual.CveEmpresa, -1, -1)) Then If (objrh.AgroDepartamentosGet(UsuarioActual.CveEmpresa, -1, -1)) Then
Dim dt As DataTable = objrh.DtResultados.FiltraParametros(String.Format("CveTipoTrabajador ={0}", DdlTipoTrabajador.SelectedValue)) Dim dt As DataTable = objrh.DtResultados.FiltraParametros(String.Format("CveTipoTrabajador ={0}", DdlTipoTrabajador.SelectedValue.ToEntero()))
Dim drow As DataRow = dt.NewRow() Dim drow As DataRow = dt.NewRow()
drow("CveDepartamento") = "-1" drow("CveDepartamento") = "-1"
drow("Departamento") = "Seleccione" drow("Departamento") = "Seleccione"

View File

@@ -2086,14 +2086,14 @@ Partial Class Clientes
UpDatos.Update() UpDatos.Update()
End Sub End Sub
Public Sub CargaAFAsignados() Public Sub CargaAFAsignados()
Dim ObjAF As New ClsAF() 'Dim ObjAF As New ClsAF()
If ObjAF.GetActivosFijos(-1, UsuarioActual.CveEmpresa, "-1", "-1", -1, -1, "-1", -1, -1, -1, -1, -1, "-1", CveCliente) Then 'If ObjAF.GetActivosFijos(-1, UsuarioActual.CveEmpresa, "-1", "-1", -1, -1, "-1", -1, -1, -1, -1, -1, "-1", CveCliente) Then
GvAFAsignado.DataSource = ObjAF.DtResultados ' GvAFAsignado.DataSource = ObjAF.DtResultados
Else 'Else
GvAFAsignado.DataSource = Nothing ' GvAFAsignado.DataSource = Nothing
End If 'End If
GvAFAsignado.DataBind() 'ObjAF.Dispose()
ObjAF.Dispose() 'GvAFAsignado.DataBind()
End Sub End Sub
Private Sub CargaMetodosPago33() Private Sub CargaMetodosPago33()
DdlMetodoPago33.Items.Clear() DdlMetodoPago33.Items.Clear()

View File

@@ -592,12 +592,12 @@ Partial Class Ventas
End Property End Property
Private ReadOnly Property Mail As String Private ReadOnly Property Mail As String
Get Get
Return ViewState("Mail").ToString() Return IfNull(ViewState("Mail"), "").ToString()
End Get End Get
End Property End Property
Private ReadOnly Property MailCC As String Private ReadOnly Property MailCC As String
Get Get
Return ViewState("MailCC").ToString() Return IfNull(ViewState("MailCC"), "").ToString()
End Get End Get
End Property End Property
Private ReadOnly Property CveVenta As Integer Private ReadOnly Property CveVenta As Integer
@@ -21150,17 +21150,17 @@ Partial Class Ventas
Dim ObjMail As New ClsSisMail() Dim ObjMail As New ClsSisMail()
Dim ResultadoMail As Integer = 0 Dim ResultadoMail As Integer = 0
Dim CorreoDestino As String = "" Dim CorreoDestino As String = ""
If Me.Mail.Trim.Length > 0 Then
CorreoDestino = Me.Mail
End If
If CorreoContactoCRM.Trim.Length > 0 Then If CorreoContactoCRM.Trim.Length > 0 Then
CorreoDestino = CorreoContactoCRM CorreoDestino = CorreoContactoCRM
ViewState("MailCC") = "" ViewState("MailCC") = ""
End If End If
Try Try
Dim Asunto As String = String.Empty Dim Asunto As String = String.Empty