Merge branch 'master' of http://192.168.10.111:8383/SIG into oi_documentos
This commit is contained in:
@@ -43,7 +43,7 @@
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Literal ID="LtlTituloModalTiposD" runat="server">Tipo de Servicio</asp:Literal></h4>
|
||||
<asp:Literal ID="LtlTituloModalTiposD" runat="server">Actividad</asp:Literal></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ public partial class AF_CatActividades : ClsPaginas
|
||||
}
|
||||
DdlPuesto.DataSource = get_GlobalDTRHPuestos(UsuarioActual.CveEmpresa);
|
||||
DdlPuesto.DataBind();
|
||||
DdlPuesto.Items.Insert(0,new ListItem("-1","Seleccione"));
|
||||
DdlPuesto.Items.Insert(0,new ListItem("Seleccione", "-1"));
|
||||
ObjAF.Dispose();
|
||||
}
|
||||
|
||||
|
||||
@@ -23,9 +23,9 @@
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveCheckList, CveTipoServicio, CveCheckListActividad, Nombre, CheckListActividad" EmptyDataText="No se encontraron Tipo Gasto" ToolTip="Listado de Tipo Gasto " CssClass="table table-striped table-advance table-hover" Style="margin-top: -10px; width: 100%" GridLines="None">
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveCheckList, CveTipoServicio, CveCheckListActividad, CheckListActividad" EmptyDataText="No se encontraron Tipo Gasto" ToolTip="Listado de Tipo Gasto " CssClass="table table-striped table-advance table-hover" Style="margin-top: -10px; width: 100%" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Nombre" DataField="Nombre" />
|
||||
<asp:BoundField HeaderText="Actividad" DataField="CheckListActividad" />
|
||||
<asp:BoundField HeaderText="CheckList Actividad" DataField="CheckListActividad" />
|
||||
<asp:TemplateField ItemStyle-Width="13%" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Left" HeaderText="Editar">
|
||||
<ItemTemplate>
|
||||
|
||||
@@ -33,7 +33,7 @@ public partial class AF_CatCheckList : ClsPaginas
|
||||
private void CargaDatos()
|
||||
{
|
||||
ClsAF ObjAF = new ClsAF();
|
||||
if (ObjAF.GetCheckList(-1, -1, -1))
|
||||
if (ObjAF.GetCheckList(-1, -1, -1,UsuarioActual.CveEmpresa))
|
||||
{
|
||||
GvDatos.DataSource = ObjAF.DtResultados;
|
||||
GvDatos.DataBind();
|
||||
@@ -48,7 +48,7 @@ public partial class AF_CatCheckList : ClsPaginas
|
||||
}
|
||||
|
||||
DdlCheckListActividad.Items.Clear();
|
||||
if (ObjAF.GetCheckListActividad(-1, -1))
|
||||
if (ObjAF.GetCheckListActividad(-1, -1,UsuarioActual.CveEmpresa))
|
||||
{
|
||||
DdlCheckListActividad.DataSource = ObjAF.DtResultados;
|
||||
DdlCheckListActividad.DataBind();
|
||||
|
||||
@@ -25,8 +25,8 @@
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveCheckListActividad, CheckListActividad, CveCheckListActividadGrupo, CheckListActividadGrupo" EmptyDataText="No se encontraron Tipo Gasto" ToolTip="Listado de Tipo Gasto " CssClass="table table-striped table-advance table-hover" Style="margin-top: -10px; width: 100%" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Actividad CheckList" DataField="CheckListActividad" />
|
||||
<asp:BoundField HeaderText="Grupo Actividad de CheckList" DataField="CheckListActividadGrupo" />
|
||||
<asp:BoundField HeaderText="Actividad" DataField="CheckListActividad" />
|
||||
<asp:BoundField HeaderText="Grupo" DataField="CheckListActividadGrupo" />
|
||||
<asp:TemplateField ItemStyle-Width="13%" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Left" HeaderText="Editar">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkEditar" OnClick="LnkEditar_Click" runat="server" Visible="true" AlternateText="Subir" CausesValidation="False" CssClass="btn btn-circle btn-sm green" Text="<i title='Editar' class='fa fa-pencil' title='Editar' ></i>" />
|
||||
|
||||
@@ -33,7 +33,7 @@ public partial class AF_CatCheckListActividades : ClsPaginas
|
||||
private void CargaDatos()
|
||||
{
|
||||
ClsAF ObjAF = new ClsAF();
|
||||
if (ObjAF.GetCheckListActividad(-1, -1))
|
||||
if (ObjAF.GetCheckListActividad(-1, -1,UsuarioActual.CveEmpresa))
|
||||
{
|
||||
GvDatos.DataSource = ObjAF.DtResultados;
|
||||
GvDatos.DataBind();
|
||||
|
||||
@@ -1985,7 +1985,7 @@ Public Class ClsNominas
|
||||
End Try
|
||||
Return retorno
|
||||
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) 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) As Boolean
|
||||
Dim retorno As Boolean = False
|
||||
Try
|
||||
DTSet = New DataSet()
|
||||
@@ -1998,6 +1998,7 @@ Public Class ClsNominas
|
||||
.Add("@Agrupador", SqlDbType.VarChar).Value = Agrupador
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@RegimenContratacion", SqlDbType.Int).Value = RegimenContratacion
|
||||
.Add("@CvePersonal", SqlDbType.Decimal).Value = CvePersonal
|
||||
End With
|
||||
|
||||
|
||||
|
||||
@@ -5287,9 +5287,12 @@ Public Class ClsPaginas
|
||||
If sw IsNot Nothing AndAlso Not (Not User.Identity.IsAuthenticated OrElse UsuarioActual Is Nothing) Then
|
||||
|
||||
sw.Stop()
|
||||
Using ObjUsuario As New ClsSisUsuarios
|
||||
ObjUsuario.AddBitacora(CveModulo, "", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Request.Url.PathAndQuery.ToString(), sw.ElapsedMilliseconds)
|
||||
End Using
|
||||
If Not Page.IsPostBack Then
|
||||
Using ObjUsuario As New ClsSisUsuarios
|
||||
ObjUsuario.AddBitacora(CveModulo, "", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Request.Url.PathAndQuery.ToString(), sw.ElapsedMilliseconds)
|
||||
End Using
|
||||
End If
|
||||
|
||||
End If
|
||||
If Not IsNothing(ViewState("strToastMsglargonoreplace")) AndAlso ViewState("strToastMsglargonoreplace").ToString.Length > 0 Then
|
||||
RegistraScript(ViewState("strToastMsglargonoreplace").ToString(), "esteseraunticklargoparaquenosesobrescribaconotro")
|
||||
|
||||
@@ -2159,7 +2159,7 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al obtener el reporte de Altas.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
OnError("Ocurrió un error al actualizar las bajas.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
|
||||
@@ -31,9 +31,12 @@ Public Class ClsValidaCFDi
|
||||
Public Property FechaCertificacion As String
|
||||
Public Property Monto As String
|
||||
Public Property FechaCancelacion As String
|
||||
Public Property ResponseHTML As String
|
||||
Public Property ResponseHTML As String
|
||||
|
||||
Public Property EnListaEFOS As Boolean = False
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
Public Sub New()
|
||||
|
||||
End Sub
|
||||
@@ -102,6 +105,12 @@ Public Class ClsValidaCFDi
|
||||
EsValida = 2
|
||||
End If
|
||||
|
||||
If oAcuse.ValidacionEFOS = "100" Then
|
||||
EnListaEFOS = True
|
||||
Else
|
||||
EnListaEFOS = False
|
||||
End If
|
||||
|
||||
'SI NO PUEDE ENCONTRAR EL ESTATUS UTILIZA EL SERVICIO PARA ESTATUS DE CANCELACION
|
||||
If EsValida = 0 Then
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@ Public Class SIGGPS : Implements IHttpHandler, IRequiresSessionState
|
||||
'Dim contextc = Microsoft.AspNet.SignalR.GlobalHost.ConnectionManager.GetHubContext(Of MyGPSHub)()
|
||||
'SendNotificacionGPS(contextc, 5, 1727, "Encabezado", "Mensaje", 2, "{""timeOut"":15000, ""extendedTimeOut"":16000}", "142608__autistic-lucario__error.wav", 0, SQLToGmapsJArray("POINT (-99.211688 19.717715)", "POINT").ToString())
|
||||
Using ObjGPS As New ClsSisNotificaciones
|
||||
ObjGPS.ObtenerNotificaciones()
|
||||
Retorno = $"[""IsOk""=""{ObjGPS.ObtenerNotificaciones()}""]"
|
||||
End Using
|
||||
context.Response.Write(Retorno)
|
||||
End Sub
|
||||
|
||||
@@ -5993,7 +5993,7 @@ Partial Class Bancos_IE
|
||||
PDFReciboDePagos(-1, -1, Banco.CveComplementoPago, False)
|
||||
Str.AppendFormat("Folio: <b>{0}</b> ", Banco.ComplementoSerieFolio)
|
||||
Str.AppendFormat("<a class=""texto"" style='color:#337ab7' href=""/Compras/PopUpVerFactura.aspx?P={0}"" target=""_blank"">XML <i class=""fa fa-file""></i></i></a> ", Encripta(String.Format("OP=CompP&EXT=xml&SerieFolio={0}&CveComplementoPago={1}", Banco.ComplementoSerieFolio, Banco.CveComplementoPago)))
|
||||
Str.AppendFormat("<a class=""texto"" style='color:#337ab7' href=""/Compras/PopUpVerFactura.aspx?P={0}"" target=""_blank"">PDF <i class=""fa fa-ad-pdf""></i></i></i></a> ", Encripta(String.Format("OP=CompP&EXT=pdf&SerieFolio={0}&CveComplementoPago={1}", Banco.ComplementoSerieFolio, Banco.CveComplementoPago)))
|
||||
Str.AppendFormat("<a class=""texto"" style='color:#337ab7' href=""/Compras/PopUpVerFactura.aspx?P={0}"" target=""_blank"">PDF <i class=""fa fa-ad-pdf""></i></i></i></a> ", Encripta(String.Format("OP=CompP&EXT=pdf&SerieFolio={0}&CveComplementoPago={1}&CveIE={2}", Banco.ComplementoSerieFolio, Banco.CveComplementoPago, CveIE)))
|
||||
Str.AppendFormat("<a style='color:#337ab7' target='_blank' href='./IE.aspx?CveIE={0}'>{1}</a> {2}<br>", CveIE, Folio, DdlCliente.SelectedText.ToString())
|
||||
MandaCorreo(Banco.ComplementoSerieFolio, CorreoCobranzaCliente)
|
||||
End If
|
||||
|
||||
2246
Compras/Compras.aspx
2246
Compras/Compras.aspx
File diff suppressed because it is too large
Load Diff
@@ -1165,57 +1165,6 @@ Partial Class Compras_Compras
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Private Property CveContratoObra As Integer
|
||||
Get
|
||||
If ViewState("CveContratoObra") Is Nothing Then
|
||||
Return -1
|
||||
Else
|
||||
Return ViewState("CveContratoObra").ToString.ToEntero
|
||||
End If
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveContratoObra") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
Private Property MaxIVAProcentaje As Decimal
|
||||
Get
|
||||
If ViewState("MaxIVAProcentaje") Is Nothing Then
|
||||
Return 0
|
||||
Else
|
||||
Return ViewState("MaxIVAProcentaje").ToString.ToDecimal
|
||||
End If
|
||||
End Get
|
||||
Set(value As Decimal)
|
||||
ViewState("MaxIVAProcentaje") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Private Property MAXRetIVAPorcentaje As Decimal
|
||||
Get
|
||||
If ViewState("MAXRetIVAPorcentaje") Is Nothing Then
|
||||
Return 0
|
||||
Else
|
||||
Return ViewState("MAXRetIVAPorcentaje").ToString.ToDecimal
|
||||
End If
|
||||
End Get
|
||||
Set(value As Decimal)
|
||||
ViewState("MAXRetIVAPorcentaje") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
'ImgBtnBuscarOC.Attributes.Add("data-toggle", "tooltip")
|
||||
@@ -1237,7 +1186,6 @@ Partial Class Compras_Compras
|
||||
CveConceptoContableAlmacen = 0
|
||||
EsNoDeducible = False
|
||||
CveTipoConcepto = 1
|
||||
'CargaContratos()
|
||||
'******** Prorrateo ********************************************
|
||||
If UsuarioActual.Empresa.Funcionalidad(117) <> "" Then
|
||||
btnProrateo.Visible = True
|
||||
@@ -1366,15 +1314,14 @@ Partial Class Compras_Compras
|
||||
Dim ObjPersonal As New ClsRH
|
||||
ObjPersonal.GetPersonal(-1, UsuarioActual.CveEmpresa)
|
||||
DdlPersonal.DataSource = ObjPersonal.DtResultados
|
||||
|
||||
|
||||
If UsuarioActual.CveEmpresa = 119 Then
|
||||
DdlPersonalReembolso.DataSource = ObjPersonal.DtResultados
|
||||
Else
|
||||
DdlPersonalReembolso.DataSource = ObjPersonal.DtResultados.FiltraParametros("CveEstatusPersonal = 1")
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
ObjPersonal.Dispose()
|
||||
DdlPersonal.DataBind()
|
||||
DdlPersonalReembolso.DataBind()
|
||||
@@ -1502,8 +1449,6 @@ Partial Class Compras_Compras
|
||||
DivEsNoDeducible.Visible = True
|
||||
DivActualizarVincular.Visible = True
|
||||
|
||||
'LiAccionesContratos.Visible = False
|
||||
|
||||
Else
|
||||
|
||||
ViewState("CveProveedor") = -1
|
||||
@@ -1728,6 +1673,7 @@ Partial Class Compras_Compras
|
||||
If IO.File.Exists(Archivo) Then
|
||||
|
||||
Dim Validada As Boolean = True
|
||||
Dim EnListadoEFOS As Boolean = False
|
||||
If Not UsuarioActual.Empresa.Funcionalidad(529) = "1" Then
|
||||
'verificacion doble, si no la han cancelado, ya tiene una validaci[on para que llegue aqui
|
||||
|
||||
@@ -1750,6 +1696,13 @@ Partial Class Compras_Compras
|
||||
Valida.EsValida = 1
|
||||
End If
|
||||
|
||||
|
||||
EnListadoEFOS = Valida.EnListaEFOS
|
||||
|
||||
If EnListadoEFOS Then
|
||||
Alert("El emisor de la factura se encuentra dentro del listado de EFOS.", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
If Valida.EsValida > 0 Then
|
||||
If Valida.EsValida = 2 Then
|
||||
Validada = False
|
||||
@@ -1777,7 +1730,7 @@ Partial Class Compras_Compras
|
||||
UpPSS.Update()
|
||||
|
||||
|
||||
If Validada Then
|
||||
If Validada And Not EnListadoEFOS Then
|
||||
|
||||
|
||||
|
||||
@@ -1820,17 +1773,6 @@ Partial Class Compras_Compras
|
||||
Xml.Append(Replace(Replace(Replace(nodeconceptos.OuterXml, "<cfdi:", "<"), "</cfdi:", "</"), "xmlns:cfdi=""http://www.sat.gob.mx/cfd/3""", ""))
|
||||
If ObjeFacturas.GetFacturasComparacionXML(Version, Xml.ToString, UsuarioActual.CveEmpresa) Then
|
||||
TmpDT = ObjeFacturas.DtResultados
|
||||
|
||||
If ObjeFacturas.DtResultados.Rows.Count > 0 Then
|
||||
MaxIVAProcentaje = ObjeFacturas.DtResultados.MAX("IVAPorcentaje").ToDecimal
|
||||
MAXRetIVAPorcentaje = ObjeFacturas.DtResultados.MAX("RetIVAPorcentaje").ToDecimal
|
||||
Else
|
||||
MaxIVAProcentaje = 0
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
'TmpDT.Columns.Add("IVAPorcentaje")
|
||||
'TmpDT.Columns.Add("RetIVAPorcentaje")
|
||||
'TmpDT.Columns.Add("RetISRPorcentaje")
|
||||
@@ -1878,10 +1820,10 @@ Partial Class Compras_Compras
|
||||
DdlTipoCompra.Items.Clear()
|
||||
DdlTipoCompra.Items.Add(New ListItem("Seleccione", "-1"))
|
||||
DdlTipoCompra.Items.Add(New ListItem("NC Con Productos", "6"))
|
||||
DdlTipoCompra.Items.Add(New ListItem("Apoyo Logístico", "9"))
|
||||
DdlTipoCompra.Items.Add(New ListItem("Apoyo Logístico", "9"))
|
||||
DdlTipoCompra.Items.Add(New ListItem("NC Por Devolución", "11"))
|
||||
|
||||
LiAccionesContratos.Visible = True
|
||||
|
||||
End Select
|
||||
|
||||
'DIV ALIAS
|
||||
@@ -2762,7 +2704,9 @@ Partial Class Compras_Compras
|
||||
|
||||
TmpDT.Columns.Add("CveContrato", GetType(Integer))
|
||||
TmpDT.Columns.Add("DifPSSat", GetType(Integer))
|
||||
|
||||
|
||||
|
||||
|
||||
If Not TmpDT.Columns.Contains("CveContratoDetalle") Then
|
||||
TmpDT.Columns.Add("CveContratoDetalle", GetType(Integer))
|
||||
End If
|
||||
@@ -2773,10 +2717,6 @@ Partial Class Compras_Compras
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
GvPS.DataSource = TmpDT
|
||||
GvPS.DataBind()
|
||||
|
||||
@@ -4043,7 +3983,6 @@ Partial Class Compras_Compras
|
||||
|
||||
Protected Sub BtnGuardar_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles BtnGuardar.Click
|
||||
|
||||
|
||||
'------------------INICIA VALIDACIONES------------------
|
||||
Dim EstatusCredito As Integer = 0
|
||||
Dim CveSubProyecto As Integer = 0
|
||||
@@ -4643,7 +4582,7 @@ Partial Class Compras_Compras
|
||||
'End If
|
||||
|
||||
'METODO DE PREPOLIZA DE ALMACEN
|
||||
If UsuarioActual.CveEmpresa.Contiene(1, 119, 72, 80, 140, 141, 153) And UsuarioActual.Empresa.UsaInventarios And Not UsuarioActual.Empresa.Funcionalidad(126) = "1" Then
|
||||
If UsuarioActual.CveEmpresa.Contiene(1, 119, 72, 80, 140, 141, 152, 153, 159, 160, 161, 162, 163) And UsuarioActual.Empresa.UsaInventarios And Not UsuarioActual.Empresa.Funcionalidad(126) = "1" Then
|
||||
Dim ImporteAlmacen = TmpDT.SUM(If(ListaDocumentos IsNot Nothing AndAlso ListaDocumentos.Count > 0 AndAlso ArrAnticipos IsNot Nothing AndAlso ArrAnticipos.Count > 0, "ImporteSinImpuestos", "Total"), $"ISNULL(TipoAF,0) <> 2 AND ISNULL(CveAlmacen,0) = 0 AND ISNULL(AplicaCostoIndirecto,0) <> 1 AND CveTipoPS = 2").ToString.ToDecimal
|
||||
If ImporteAlmacen > 0 Then
|
||||
If Not DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV", "Ant") Then
|
||||
@@ -4677,18 +4616,19 @@ Partial Class Compras_Compras
|
||||
CveEstatusFactura = 6
|
||||
End If
|
||||
'hay amortización directa como descuento. RMF Temporal
|
||||
If UsuarioActual.CveEmpresa = 119 Then
|
||||
'If LblAmortizacion.Text.ToDouble > 0 AndAlso TxtDescuento.Text.ToDouble = 0 Then
|
||||
' TxtDescuento.Text = LblAmortizacion.Text
|
||||
' LblAmortizacion.Text = "0.00"
|
||||
'End If
|
||||
|
||||
'If LblAmortizacion.Text.ToDouble > 0 AndAlso TxtDescuento.Text.ToDouble = 0 Then
|
||||
' TxtDescuento.Text = LblAmortizacion.Text
|
||||
' LblAmortizacion.Text = "0.00"
|
||||
'End If
|
||||
|
||||
'o si el descuento es igual a la amortizacion
|
||||
'If LblAmortizacion.Text.ToDouble = TxtDescuento.Text.ToDouble Then
|
||||
' TxtDescuento.Text = LblAmortizacion.Text
|
||||
' LblAmortizacion.Text = "0.00"
|
||||
'End If
|
||||
'o si el descuento es igual a la amortizacion
|
||||
'If LblAmortizacion.Text.ToDouble = TxtDescuento.Text.ToDouble Then
|
||||
' TxtDescuento.Text = LblAmortizacion.Text
|
||||
' LblAmortizacion.Text = "0.00"
|
||||
'End If
|
||||
|
||||
End If
|
||||
'si el registro es manual, toma el mismo dato
|
||||
If CveFactura <= 0 Then TotalOriginal = TxtTotal.Text.ToDecimal
|
||||
|
||||
@@ -4709,7 +4649,7 @@ Partial Class Compras_Compras
|
||||
TxtRedondeo.Text.ToDouble, TxtTotal.Text.ToDouble, TxtFecha.Text.Trim.ToDate, DdlMoneda.SelectedValue.ToEntero, TipoCambio, TxtFechaPago.Text.Trim.ToDate, ChkAplicaNotaCredito.Checked, TxtObsFact.Text.Trim, CveEstatusFactura,
|
||||
CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, IdPoliza, CveCajaChica:=CveCajaChica, CvePersonal:=CvePersonal, NumeroReembolso:=NumeroReembolso, CveProveedorSucursal:=DdlProveedorSucursal.SelectedValue.ToEntero,
|
||||
AplicoPromocion:=ChkOCPromocion.Checked, PorcentajeIVA:=PorcentajeIVA, CveMetodoPago:=CveMetodoPago, CveRetIVAConcepto:=If(DdlRetIVAConcepto.Items.Count > 0, DdlRetIVAConcepto.SelectedValue.ToEntero, -1), CveConceptoContableAlmacen:=CveConceptoContableAlmacen,
|
||||
CveRetISRConcepto:=If(DdlRetISRConcepto.Items.Count > 0, DdlRetISRConcepto.SelectedValue.ToEntero, -1), NoDeducible:=EsNoDeducible, CveTipoCompra:=DdlTipoCompra.SelectedValue.ToEntero, TotalOriginal:=TotalOriginal, CveTipoConcepto:=CveTipoConcepto, CveContrato:=CveContratoObra) Then
|
||||
CveRetISRConcepto:=If(DdlRetISRConcepto.Items.Count > 0, DdlRetISRConcepto.SelectedValue.ToEntero, -1), NoDeducible:=EsNoDeducible, CveTipoCompra:=DdlTipoCompra.SelectedValue.ToEntero, TotalOriginal:=TotalOriginal, CveTipoConcepto:=CveTipoConcepto) Then
|
||||
|
||||
ViewState("CveCompra") = ObjCompras.CveCompra
|
||||
If ObjCompras.DtResultados.Rows.Count > 0 Then ViewState("CompraFolio") = ObjCompras.DtResultados.Rows(0)("vFolio").ToString
|
||||
@@ -5102,7 +5042,7 @@ Partial Class Compras_Compras
|
||||
|
||||
Dim AutoConta As Boolean = UsuarioActual.Empresa.Funcionalidad(200) = "1"
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(119, 158) AndAlso (DdlPersonalReembolso.SelectedValue.ToEntero > 0 Or DdlCuentaCajaChicaReembolso.SelectedValue.ToEntero > 0 Or DdlTipoComprobante.SelectedValue = "Ant") Then
|
||||
If UsuarioActual.CveEmpresa = 119 AndAlso (DdlPersonalReembolso.SelectedValue.ToEntero > 0 Or DdlCuentaCajaChicaReembolso.SelectedValue.ToEntero > 0 Or DdlTipoComprobante.SelectedValue = "Ant") Then
|
||||
AutoConta = False
|
||||
End If
|
||||
|
||||
@@ -5305,7 +5245,7 @@ Partial Class Compras_Compras
|
||||
If Not UsuarioActual.Empresa.UsaAC Then fecha = Now
|
||||
|
||||
folio = ObjInventario.GetFolioSiguiente(2, UsuarioActual.CveEmpresa)
|
||||
cvemovimientoentrada = ObjInventario.AddMovimiento(tcvealmacen, 2, 1, fecha, folio, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCompra, -1, -1, -1, TipoCambio:=If(DdlMoneda.SelectedValue.ToEntero = 1, -1, TipoCambioGuardar), Modulo:="Comp/G")
|
||||
cvemovimientoentrada = ObjInventario.AddMovimiento(tcvealmacen, 2, 1, fecha, folio, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCompra, -1, -1, -1, TipoCambio:=If(DdlMoneda.SelectedValue.ToEntero = 1, -1, TipoCambioGuardar), Modulo:="Comp/G4")
|
||||
If cvemovimientoentrada <= 0 Then
|
||||
ErrorMovInv = True
|
||||
Exit For
|
||||
@@ -5329,7 +5269,7 @@ Partial Class Compras_Compras
|
||||
|
||||
'agregamos la salida gasto
|
||||
folio = ObjInventario.GetFolioSiguiente(3, UsuarioActual.CveEmpresa)
|
||||
cvemovimientosalidagasto = ObjInventario.AddMovimiento(tcvealmacen, 3, DdlMoneda.SelectedValue.ToEntero, fecha.AddSeconds(1), folio, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCompra, -1, -1, -1, Modulo:="Comp/G")
|
||||
cvemovimientosalidagasto = ObjInventario.AddMovimiento(tcvealmacen, 3, DdlMoneda.SelectedValue.ToEntero, fecha.AddSeconds(1), folio, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCompra, -1, -1, -1, Modulo:="Comp/G3")
|
||||
If cvemovimientosalidagasto <= 0 Then
|
||||
ErrorMovInv = True
|
||||
Exit For
|
||||
@@ -5386,7 +5326,7 @@ Partial Class Compras_Compras
|
||||
Dim fecha As Date = TxtFecha.Text.ToDate
|
||||
If Not UsuarioActual.Empresa.UsaAC Then fecha = Now
|
||||
|
||||
CveMovimientoInventario = ObjInventario.AddMovimiento(tCveAlmacen, 2, 1, fecha, 0, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCompra, -1, -1, -1, TipoCambio:=If(DdlMoneda.SelectedValue.ToEntero = 1, -1, TipoCambioGuardar), Modulo:="Comp/G")
|
||||
CveMovimientoInventario = ObjInventario.AddMovimiento(tCveAlmacen, 2, 1, fecha, 0, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCompra, -1, -1, -1, TipoCambio:=If(DdlMoneda.SelectedValue.ToEntero = 1, -1, TipoCambioGuardar), Modulo:="Comp/G2")
|
||||
|
||||
If CveMovimientoInventario <= 0 Then
|
||||
ErrorMovInv = True
|
||||
@@ -6551,7 +6491,7 @@ Partial Class Compras_Compras
|
||||
End If
|
||||
Case 6 'Compra
|
||||
|
||||
Dim AgregaMercanciaInventario As Boolean = UsuarioActual.CveEmpresa.Contiene(1, 72, 80, 119, 140, 141) AndAlso UsuarioActual.Empresa.UsaInventarios AndAlso Not UsuarioActual.Empresa.Funcionalidad(126) = "1"
|
||||
Dim AgregaMercanciaInventario As Boolean = UsuarioActual.CveEmpresa.Contiene(1, 72, 80, 119, 140, 141,152,159,160,161,162,163) andalso UsuarioActual.Empresa.UsaInventarios AndAlso Not UsuarioActual.Empresa.Funcionalidad(126) = "1"
|
||||
|
||||
Dim RegistraConcepto225 As Boolean = UsuarioActual.Empresa.UsaInventarios AndAlso DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV") AndAlso Not UsuarioActual.Empresa.Funcionalidad(126) = "1"
|
||||
|
||||
@@ -6841,20 +6781,20 @@ Partial Class Compras_Compras
|
||||
End If
|
||||
End If
|
||||
Case 6
|
||||
PorcentajeImpuesto = TmpDT.MAX("IVAPorcentaje").ToDecimal
|
||||
Concepto = $"{NombreProveedor} {TxtSerie.Text} - {TxtFolio.Text}"
|
||||
|
||||
For Each RowDetalle As DataRow In TmpDT.FiltraParametros("ISNULL(TipoAF,0) <> 2", "", {"CveClasificacion", "CveSubProyecto", "IVAPorcentaje"}).Rows
|
||||
For Each RowDetalle As DataRow In TmpDT.FiltraParametros("ISNULL(TipoAF,0) <> 2", "", {"CveClasificacion", "CveSubProyecto"}).Rows
|
||||
|
||||
If ObjConta.GetRetCuenta(6, RowDetalle("CveClasificacion").ToString().ToEntero()) Then
|
||||
If ObjConta.DtResultados.Rows.Count > 0 Then
|
||||
IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaGasto").ToString.ToEntero
|
||||
CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaGastoSIG").ToString.ToEntero
|
||||
End If
|
||||
End If
|
||||
|
||||
If importeMN <> 0 Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMN, Referencia, 6, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, TipoCambio:=tipoCambioActual,
|
||||
CveClasificacion:=RowDetalle("CveClasificacion").ToString().ToEntero(), CveSubProyecto:=RowDetalle("CveSubProyecto").ToString().ToEntero(), Contabilizable:=SeContabiliza, PorcentajeImpuesto:=RowDetalle("IVAPorcentaje").ToString.ToDecimal) Then
|
||||
CveClasificacion:=RowDetalle("CveClasificacion").ToString().ToEntero(), CveSubProyecto:=RowDetalle("CveSubProyecto").ToString().ToEntero(), Contabilizable:=SeContabiliza) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
End If
|
||||
@@ -6879,8 +6819,8 @@ Partial Class Compras_Compras
|
||||
|
||||
importeMovimiento = TmpDT.SUM(If(ListaDocumentos IsNot Nothing AndAlso ListaDocumentos.Count > 0 AndAlso ArrAnticipos IsNot Nothing AndAlso ArrAnticipos.Count > 0 AndAlso TxtTotal.Text.ToDecimal = 0, "ImporteSinImpuestos", "Total"), $"ISNULL(TipoAF,0) <> 2 And ISNULL(CveAlmacen,0) = 0 And ISNULL(AplicaCostoIndirecto,0) <> 1 And ISNULL(CveTipoPS,0) = 2").ToString.ToDecimal
|
||||
importeMN = importeMovimiento * tipoCambioActual * Multiplicador
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then 'cuando es emp acumuladora
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then 'cuando es emp acumuladora
|
||||
|
||||
Dim Valor = (From dr1 In GlobalDTAcumTamaños().FiltraParametros("CveEmpresa = 140").AsEnumerable()
|
||||
Join dr2 In TmpDT.AsEnumerable On dr1.Field(Of Integer)("CvePSCargo") Equals dr2.Field(Of Integer)("CvePS")
|
||||
@@ -6969,7 +6909,7 @@ Partial Class Compras_Compras
|
||||
|
||||
If Not RegistroCuentaPuente AndAlso Not ChkNCInvNC.Checked Then
|
||||
'GASTO
|
||||
If UsuarioActual.CveEmpresa.Contiene(119, 158) Then
|
||||
If UsuarioActual.CveEmpresa = 119 Then
|
||||
DT = TmpDT
|
||||
Else
|
||||
DT = TmpDT.FiltraParametros("ISNULL(AplicaCostoIndirecto,0) <> 1")
|
||||
@@ -7067,7 +7007,7 @@ Partial Class Compras_Compras
|
||||
End If
|
||||
|
||||
Dim usacomplementariaProveedor As Boolean = False
|
||||
usacomplementariaProveedor = If(tipoCambioActual > 1 AndAlso UsuarioActual.CveEmpresa.Contiene(1, 119), True, False)
|
||||
usacomplementariaProveedor = If(tipoCambioActual > 1 AndAlso UsuarioActual.CveEmpresa.Contiene(1, 119, 158), True, False)
|
||||
|
||||
If usacomplementariaProveedor AndAlso DdlTipoComprobante.SelectedValue = "Ant" Then
|
||||
'importeMovimiento
|
||||
@@ -7106,7 +7046,7 @@ Partial Class Compras_Compras
|
||||
End If
|
||||
Case 5 'Proveedores
|
||||
If CveTipoConcepto = 2 Then ConceptoContable = 305 'cuando es acreedor
|
||||
Dim UsaComplementaria As Boolean = UsuarioActual.CveEmpresa.Contiene(119, 158)
|
||||
Dim UsaComplementaria As Boolean = UsuarioActual.CveEmpresa.Contiene(119, 158)
|
||||
If tipoCambioActual <> 1 Then
|
||||
Select Case ConceptoContable
|
||||
Case 5
|
||||
@@ -7132,7 +7072,7 @@ Partial Class Compras_Compras
|
||||
Else
|
||||
IdCtaContable = CtaProveedorComplementaria
|
||||
CveCuenta = CveCuentaProveedorComplementaria
|
||||
If importeMovimiento <> 0 AndAlso (IdCtaContable > 0 Or CveCuenta > 0 OrElse UsaComplementaria) Then 'Cuando tiene complementaria lo dividimos en dos Then
|
||||
If importeMovimiento <> 0 AndAlso (IdCtaContable > 0 Or CveCuenta > 0 Or UsaComplementaria) Then 'Cuando tiene complementaria lo dividimos en dos Then
|
||||
importeMN = importeMovimiento
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, Referencia, CveConceptoContableComplementaria, Concepto, FechaMovimiento, IdCtaContable, -1, CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, ImporteMX:=importeMovimiento * tipoCambioActual - importeMovimiento, ImporteME:=importeMovimiento, CveCuenta:=CveCuenta, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then
|
||||
ErrorPrepoliza = True
|
||||
@@ -7142,12 +7082,13 @@ Partial Class Compras_Compras
|
||||
CveCuenta = CveCuentaProveedorExtranjera
|
||||
End If
|
||||
End If
|
||||
|
||||
If CveCompraRefacturacion > 0 Then
|
||||
|
||||
If CveCompraRefacturacion > 0 Then
|
||||
importeMovimiento = 0
|
||||
importeMN = 0
|
||||
End If
|
||||
|
||||
|
||||
Case 59 'Documentos
|
||||
importeMovimiento = importeCreditos
|
||||
importeMN = importeMovimiento * tipoCambioActual * Multiplicador
|
||||
@@ -13147,7 +13088,7 @@ Partial Class Compras_Compras
|
||||
End If
|
||||
|
||||
'CONTADO
|
||||
Select Case RBLContado.SelectedValue
|
||||
Select Case RBLContado.SelectedValue
|
||||
Case "1" ' Bancos
|
||||
PnlContadoBancos.Visible = True
|
||||
TxtDocumentoImporte.Text = (TxtTotal.Text.ToDecimal - LblAmortizacion.Text.ToDecimal).FormatoNumero
|
||||
@@ -13196,7 +13137,7 @@ Partial Class Compras_Compras
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnContado_Click(sender As Object, e As EventArgs)
|
||||
TxtRembolsoNumero.Text = TxtNumeroReembolso.Text
|
||||
TxtRembolsoNumero.Text = TxtNumeroReembolso.Text
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivContadoModal"))
|
||||
End Sub
|
||||
|
||||
@@ -14296,17 +14237,26 @@ Partial Class Compras_Compras
|
||||
'si el subtotal es iwal a la nc lo guardo si no marco error
|
||||
If subtotal > subtotaldevolucion - 1 AndAlso subtotal < subtotaldevolucion + 1 Then
|
||||
|
||||
CveMovimientoEntrada = ObjInventario.AddMovimiento(CveAlmacen, 13, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCompra, -1, -1, -1, Modulo:="Comp/G")
|
||||
CveMovimientoEntrada = ObjInventario.AddMovimiento(CveAlmacen, 13, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCompra, -1, -1, -1, Modulo:="Comp/G1")
|
||||
If CveMovimientoEntrada <= 0 Then
|
||||
ErrorMovInv = True
|
||||
Else
|
||||
Dim Acumulado As Decimal = 0
|
||||
Dim PU As Decimal = 0
|
||||
Dim CantidadRenglones As Integer = 0
|
||||
Dim ii As Integer = 0
|
||||
For Each Dr As GridViewRow In GVDevolucion.Rows
|
||||
If Dr.FCTextBox("TxtCantidad").Text.ToDouble > 0 Then
|
||||
CantidadRenglones += 1
|
||||
End If
|
||||
Next
|
||||
|
||||
For Each Dr As GridViewRow In GVDevolucion.Rows
|
||||
If Dr.FCTextBox("TxtCantidad").Text.ToDouble > 0 Then
|
||||
Acumulado += (Dr.FCTextBox("TxtCantidad").Text.ToDecimal * Dr.DataKey("PU").ToString.ToDecimal)
|
||||
PU = Dr.DataKey("PU").ToString.ToDecimal
|
||||
If subtotal < Acumulado Then
|
||||
ii += 1
|
||||
If CantidadRenglones = ii Then
|
||||
Dim dif As Decimal = subtotal - Acumulado
|
||||
PU = (((Dr.FCTextBox("TxtCantidad").Text.ToDecimal * Dr.DataKey("PU").ToString.ToDecimal)) + dif) / Dr.FCTextBox("TxtCantidad").Text.ToDecimal
|
||||
End If
|
||||
@@ -14379,18 +14329,18 @@ Partial Class Compras_Compras
|
||||
'End Sub
|
||||
Protected Sub BtnVinculaDevolucion_Click(sender As Object, e As EventArgs)
|
||||
Try
|
||||
Dim subtotaldevolucion As Decimal = 0
|
||||
Dim subtotaldevolucion As Double = 0
|
||||
Dim realizadevolucion As Boolean = False
|
||||
|
||||
|
||||
'Calculo los subtotales para comparar con la NC
|
||||
Dim cantidad As Decimal = 0
|
||||
Dim cantidad As Double = 0.0
|
||||
|
||||
For Each Dr As GridViewRow In GVDevolucion.Rows
|
||||
cantidad = Dr.FCTextBox("TxtCantidad").Text.ToDecimal
|
||||
cantidad = Dr.FCTextBox("TxtCantidad").Text.ToDouble
|
||||
If cantidad > 0 Then
|
||||
realizadevolucion = True
|
||||
subtotaldevolucion += Dr.DataKey("PU").ToString.ToDecimal * cantidad
|
||||
subtotaldevolucion += Dr.DataKey("PU").ToString.ToDouble * cantidad
|
||||
End If
|
||||
Next
|
||||
|
||||
@@ -14424,11 +14374,19 @@ Partial Class Compras_Compras
|
||||
Dim IEPSCompra As Decimal = TxtIEPS.Text.ToDecimal()
|
||||
Dim RetIVACompra As Decimal = TxtRetIVA.Text.ToDecimal()
|
||||
Dim RetISRCompra As Decimal = TxtRetISR.Text.ToDecimal()
|
||||
Dim Acumulado As Decimal = 0
|
||||
Dim Acumulado As Decimal = 0
|
||||
|
||||
'Dim TotalCalculable As Decimal = TotalCompra - IEPSCompra + RetIVACompra + RetISRCompra
|
||||
|
||||
Dim IVAPorcentajeCompra As Decimal = Math.Round((IVACompra / SubTotalCompra), 2)
|
||||
Dim Contador As Integer = 0
|
||||
Dim Consec As Integer = 0
|
||||
|
||||
For Each gvr As GridViewRow In GVDevolucion.Rows
|
||||
If gvr.FCTextBox("TxtCantidad").Text.ToDecimal > 0 Then
|
||||
Contador += 1
|
||||
End If
|
||||
Next
|
||||
|
||||
'Iteramos el GridView de la OC
|
||||
For Each gvr As GridViewRow In GVDevolucion.Rows
|
||||
@@ -14455,12 +14413,16 @@ Partial Class Compras_Compras
|
||||
Dim Descuento As Decimal = 0
|
||||
|
||||
Acumulado += (PU * Cantidad)
|
||||
Consec += 1
|
||||
|
||||
If SubTotalCompra < Acumulado Then
|
||||
If Consec = Contador Then 'SubTotalCompra < Acumulado Then
|
||||
'ajusta el valor
|
||||
Dim dif As Decimal = SubTotalCompra - Acumulado
|
||||
PU = ((PU * Cantidad) + dif) / Cantidad
|
||||
Total = Cantidad * PU
|
||||
If dif <> 0 Then
|
||||
PU = ((PU * Cantidad) + dif) / Cantidad
|
||||
Total = Cantidad * PU
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
AddPS(Cantidad, CveUM, UM, CveClasificacion, Clasificacion, CvePS, PS, CveTipoPS, CveSubProyectoContrato, SubProyecto, Proyecto, CveProyecto, Obs, PU, Total, IVA, 0, 0, 0, 0, Descuento, -1, False)
|
||||
@@ -15330,7 +15292,7 @@ Partial Class Compras_Compras
|
||||
|
||||
'SI PUEDE RECIBIR POR OC Y COMPRA
|
||||
' si usa almacen, si tiene activado que reciba por OC, y que si la compra tipo Proveedor. que lo muestre
|
||||
If UsuarioActual.CveEmpresa.Contiene(119, 158) AndAlso UsuarioActual.Empresa.UsaInventarios And UsuarioActual.Empresa.Funcionalidad(131).ToEntero > 0 AndAlso CveTipoConcepto = 1 Then
|
||||
If UsuarioActual.CveEmpresa = 119 AndAlso UsuarioActual.Empresa.UsaInventarios And UsuarioActual.Empresa.Funcionalidad(131).ToEntero > 0 AndAlso CveTipoConcepto = 1 Then
|
||||
DivOCVinculaInv.Visible = True
|
||||
End If
|
||||
|
||||
@@ -15372,7 +15334,7 @@ Partial Class Compras_Compras
|
||||
|
||||
'PROMOCIONES
|
||||
LtOCPromocion.Text = StrPromos.ToString
|
||||
If LtOCPromocion.Text.Length > 0 And UsuarioActual.CveEmpresa.Contiene(119, 158) Then
|
||||
If LtOCPromocion.Text.Length > 0 And UsuarioActual.CveEmpresa = 119 Then
|
||||
DivOCPromocion.Visible = True
|
||||
End If
|
||||
|
||||
@@ -15646,6 +15608,12 @@ Partial Class Compras_Compras
|
||||
'If DdlOCVinculaInv.SelectedValue.ToEntero = 237 And Not CveFlete > 0 Then Alert("Necesita vincular un flete si selecciona Factura de Flete", TipoMensaje.MsgAdvertencia) : Exit Sub
|
||||
'If DdlOCVinculaInv.SelectedValue.ToEntero = 240 And Not CveImportacion > 0 Then Alert("Necesita vincular una Importación si selecciona Factura de Importación", TipoMensaje.MsgAdvertencia) : Exit Sub
|
||||
|
||||
'If UsuarioActual.CveEmpresa = 119 And DdlTipoComprobante.SelectedValue = "Fac" Then
|
||||
' If Not VerificarProductosCompraConOC() Then
|
||||
' Exit Sub
|
||||
' End If
|
||||
'End If
|
||||
|
||||
Dim SubTotalGV = 0.0D
|
||||
Dim Amortizacion As Decimal = TmpDT.SUMD("Total")
|
||||
If ListaDocumentos IsNot Nothing AndAlso ListaDocumentos.Count > 0 AndAlso ArrAnticipos IsNot Nothing AndAlso ArrAnticipos.Count > 0 Then
|
||||
@@ -15708,7 +15676,7 @@ Partial Class Compras_Compras
|
||||
|
||||
'SI PUEDE RECIBIR POR OC Y COMPRA
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(119, 158) AndAlso UsuarioActual.Empresa.UsaInventarios And UsuarioActual.Empresa.Funcionalidad(131).ToEntero > 0 AndAlso CveTipoConcepto = 1 Then
|
||||
If UsuarioActual.CveEmpresa = 119 AndAlso UsuarioActual.Empresa.UsaInventarios And UsuarioActual.Empresa.Funcionalidad(131).ToEntero > 0 AndAlso CveTipoConcepto = 1 Then
|
||||
|
||||
If DdlOCVinculaInv.SelectedValue.ToEntero <= 0 Then
|
||||
Alert("El campo <b>Tipo de recepción almacén</b> es necesario. Por favor verifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
|
||||
@@ -16699,19 +16667,12 @@ Partial Class Compras_Compras
|
||||
|
||||
Protected Sub DdlTipoComprobante_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
|
||||
LiAccionesContratos.Visible = False
|
||||
|
||||
If DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV", "Ant") Then
|
||||
|
||||
If DdlTipoComprobante.SelectedValue = "NC" Then
|
||||
DivReembolso.Visible = False
|
||||
RBLPago.Items(2).Enabled = False
|
||||
|
||||
|
||||
If Not CveCompra > 0 Then
|
||||
LiAccionesContratos.Visible = True
|
||||
End If
|
||||
|
||||
Else
|
||||
DivReembolso.Visible = True
|
||||
RBLPago.Items(2).Enabled = True
|
||||
@@ -16735,8 +16696,6 @@ Partial Class Compras_Compras
|
||||
|
||||
End If
|
||||
|
||||
|
||||
UpAccionesContratos.Update()
|
||||
UPCondicionesPago.Update()
|
||||
|
||||
End Sub
|
||||
@@ -17380,7 +17339,7 @@ Partial Class Compras_Compras
|
||||
LblAmortizacion.Text = "0.00"
|
||||
End If
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(119, 158) AndAlso TieneAmortizacion Then
|
||||
If UsuarioActual.CveEmpresa = 119 AndAlso TieneAmortizacion Then
|
||||
Amortizacion = LblAmortizacion.Text.Trim.ToDecimal
|
||||
TxtSubTotal.Text = (TxtSubTotal.Text.ToDouble + Amortizacion).ToString
|
||||
End If
|
||||
@@ -18971,7 +18930,7 @@ Partial Class Compras_Compras
|
||||
CargaAnticipos(CveProveedor, If(ChkNCInv.Checked, "NC", "-1"))
|
||||
UpAnticipos.Update()
|
||||
End Sub
|
||||
Private Sub CargaNCINV()
|
||||
Private Sub CargaNCINV()
|
||||
|
||||
Dim SaldoAnticipo = 0.0
|
||||
Dim CveCompras As String = ""
|
||||
@@ -19108,7 +19067,7 @@ Partial Class Compras_Compras
|
||||
GuardaAnticipos(Nothing, Nothing)
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnNCInvAlmacen_Click(sender As Object, e As EventArgs)
|
||||
Protected Sub BtnNCInvAlmacen_Click(sender As Object, e As EventArgs)
|
||||
|
||||
'Dim ObjCompras As New ClsCompras
|
||||
'Dim ObjConta As New ClsContabilidad(ObjCompras.IniciaTransacSQL)
|
||||
@@ -19756,8 +19715,8 @@ Partial Class Compras_Compras
|
||||
Dim Multiplicador = If(DdlTipoComprobante.SelectedValue = "NC", -1, 1)
|
||||
|
||||
If DdlMoneda.SelectedValue.ToString.ToEntero = 2 Then
|
||||
'tipoCambioActual = GlobalTipoCambio(TxtFecha.Text.ToDate).ToString.ToDecimal
|
||||
tipoCambioActual = TxtTC.Text.ToDecimal
|
||||
tipoCambioActual = GlobalTipoCambio(TxtFecha.Text.ToDate).ToString.ToDecimal
|
||||
tipoCambioActual = If(DivTC.Visible, TipoCambio.ToDecimal, tipoCambioActual)
|
||||
Else
|
||||
tipoCambioActual = 1
|
||||
End If
|
||||
@@ -20601,184 +20560,6 @@ Partial Class Compras_Compras
|
||||
Return True
|
||||
End Function
|
||||
|
||||
|
||||
'Private Sub CargaContratos()
|
||||
' DdlContrato.DataSource = GlobalDTContratos.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa} AND CveContratoTipo IN(30,31) ")
|
||||
' DdlContrato.DataBind()
|
||||
' DdlContrato.Items.Insert(0, New System.Web.UI.WebControls.ListItem("Todos", "-1"))
|
||||
'End Sub
|
||||
|
||||
'Protected Sub BtnModalContratos_Click(sender As Object, e As EventArgs)
|
||||
|
||||
' RegistraScript("$('#DvModalContratos').modal('hide');")
|
||||
' CveContratoObra = DdlContrato.SelectedValue.ToEntero
|
||||
|
||||
|
||||
'End Sub
|
||||
|
||||
|
||||
Protected Sub LnkContratos_Click(sender As Object, e As EventArgs)
|
||||
|
||||
'RegistraScript("$('#DvModalContratos').modal('show');")
|
||||
|
||||
DdlContratosObra.Items.Clear()
|
||||
DdlContratosObra.DataSource = GlobalDTContratos.FiltraParametros(String.Format($"CveContratoTipo in (30,31) AND CveEmpresa = {UsuarioActual.CveEmpresa}"))
|
||||
DdlContratosObra.DataBind()
|
||||
'DdlContratosObra.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
|
||||
|
||||
DdlTipoGastoObra.Items.Clear()
|
||||
DdlTipoGastoObra.DataSource = GlobalDTTiposGastos(UsuarioActual.CveEmpresa)
|
||||
DdlTipoGastoObra.DataBind()
|
||||
DdlTipoGastoObra.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
|
||||
|
||||
|
||||
RegistraScript($"$('#DivmodalConmtrato').modal('show'); $( '#BtnAplicarContrato' ).prop( 'disabled', true ); ValidaBotonContrato({TxtSubTotal2.Text.ToDecimal});")
|
||||
UpModalContrato.Update()
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub DdlContratosCompras_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
|
||||
|
||||
If DdlContratosObra.SelectedValue.ToEntero > 0 Then
|
||||
Dim ObjContratos As New ClsContratos()
|
||||
|
||||
If ObjContratos.GetContratosObraCompras(DdlContratosObra.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
|
||||
If ObjContratos.DtResultados.Rows.Count > 0 Then
|
||||
GvContratosControl.DataSource = ObjContratos.DtResultados
|
||||
'BtnAplicarContrato.Visible = True
|
||||
Else
|
||||
GvContratosControl.DataSource = Nothing
|
||||
'BtnAplicarContrato.Visible = False
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
ObjContratos.Dispose()
|
||||
|
||||
GvContratosControl.DataBind()
|
||||
|
||||
UpModalContrato.Update()
|
||||
End If
|
||||
|
||||
RegistraScript("$( '#BtnAplicarContrato' ).prop( 'disabled', true );")
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub BtnAplicarContrato_Click(sender As Object, e As EventArgs)
|
||||
|
||||
|
||||
TmpDT.Rows.Clear()
|
||||
|
||||
Dim CveTipoGastoObra As Integer = DdlTipoGasto.SelectedValue.ToEntero
|
||||
|
||||
For Each GvRow As GridViewRow In GvContratosControl.Rows
|
||||
|
||||
Dim CveContratoDetalle As Integer = GvRow.DataKey("CveContratoDetalle").ToEntero
|
||||
|
||||
Dim Cantidad As Double = GvRow.FCTextBox("TxtCantidad").Text.ToDouble
|
||||
Dim CvePS As Integer = GvRow.DataKey("CvePS").ToEntero
|
||||
Dim PS As String = GvRow.DataKey("PS")
|
||||
Dim PU As Double = GvRow.FCTextBox("TxtPU").Text.ToDouble
|
||||
Dim TotalPS As Double = GvRow.FCTextBox("TxtImporte").Text.ToDouble
|
||||
Dim CveUnidadMedida As Integer = GvRow.DataKey("CveUnidadMedida").ToEntero
|
||||
Dim UMAbreviatura As String = GvRow.DataKey("Abreviatura").ToString
|
||||
|
||||
Dim SubProyecto As String = GvRow.DataKey("SubProyecto")
|
||||
Dim CveSubProyecto As Integer = GvRow.DataKey("CveSubProyecto").ToEntero
|
||||
Dim Codigo As String = "" 'GvRow.DataKey("Codigo")
|
||||
|
||||
Dim Proyecto As String = GvRow.DataKey("Proyecto")
|
||||
Dim CveProyecto As Integer = GvRow.DataKey("CveProyecto").ToEntero
|
||||
|
||||
Dim RetISR As Double = GvRow.DataKey("RetISR").ToString.ToDouble
|
||||
Dim RetIVA As Double = MAXRetIVAPorcentaje 'GvRow.DataKey("RetIVA").ToString.ToDouble
|
||||
|
||||
Dim IvaPS As Double = MaxIVAProcentaje
|
||||
|
||||
Dim CveClasificacion As Integer = GvRow.DataKey("CveClasificacion").ToString.ToEntero
|
||||
Dim Clasificacion As String = GvRow.DataKey("Clasificacion")
|
||||
|
||||
|
||||
Dim IEPSPS As Double = GvRow.DataKey("IEPSPorcentaje").ToString.ToDouble
|
||||
Dim IEPSPSIVA As Double = If(GvRow.DataKey("IEPSGrabaIVA").ToString = "True", IEPSPS, 0)
|
||||
|
||||
|
||||
Dim CveTipoPS As Integer = GvRow.DataKey("CveTipoPS").ToEntero
|
||||
|
||||
Dim CveSATPS As Integer = GvRow.DataKey("CveSATPS").ToEntero
|
||||
|
||||
|
||||
Dim IdCuentaPorEjercer As Integer = -1
|
||||
Dim IdCuentaComprometido As Integer = -1
|
||||
|
||||
Dim TotalRow As Decimal = (PU * Cantidad).RoundSQL(2).ToDecimal
|
||||
|
||||
If Cantidad > 0 Then
|
||||
|
||||
|
||||
AddPS(Cantidad, CveUnidadMedida, UMAbreviatura, CveClasificacion, Clasificacion, CvePS, PS, CveTipoPS, CveSubProyecto.ToString, SubProyecto, Proyecto, CveProyecto.ToString, "", PU, TotalRow, IvaPS, RetIVA, RetISR, IEPSPS, IEPSPSIVA, 0, -1, False,
|
||||
CantidadF:=0, EntregaDirecta:=0, CveSATPS:=CveSATPS, CveTipoGasto:=DdlTipoGastoObra.SelectedValue.ToEntero, TipoGasto:=DdlTipoGastoObra.SelectedItem.Text, CveContratoDetalle:=CveContratoDetalle, CveCultivoCuadroDetalle:=-1)
|
||||
|
||||
|
||||
'AddPS(Cantidad, CvePS, PS, PS, PU, 0, TotalPS,
|
||||
'CveUnidadMedida, IvaPS, IEPSPS, IEPSPSIVA, CveClasificacion, UMAbreviatura, Clasificacion, CveProyecto, Proyecto,
|
||||
'CveSubProyecto, SubProyecto, Codigo, -1, 0, -1, -1, IdCuentaPorEjercer,
|
||||
'IdCuentaComprometido, -1, -1, -1, -1,
|
||||
'-1, RetIVA, RetISR, CveContratoDetalle:=CveContratoDetalle, CveTipoGastoObra:=CveTipoGastoObra, CveCultivoCuadroDetalle:=-1, Cuadro:="")
|
||||
|
||||
|
||||
'' ContratoObraAplciado = True
|
||||
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
'CargaSuperior()
|
||||
'CargaDatosDetalles()
|
||||
|
||||
|
||||
|
||||
GvPS.DataSource = TmpDT
|
||||
GvPS.DataBind()
|
||||
UpPS.Update()
|
||||
|
||||
RegistraScript("$('#DivmodalConmtrato').modal('hide')")
|
||||
' UPPDetalle.Update()
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub GvContratosControl_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvContratosControl.RowDataBound
|
||||
|
||||
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
Dim CveContratoDetalle As Integer = e.Row.DataKey("CveContratoDetalle").ToEntero
|
||||
|
||||
e.Row.FCTextBox("TxtCantidad").CssClass = $"CssCantidad{CveContratoDetalle}"
|
||||
e.Row.FCTextBox("TxtCantidad").Attributes.Add("onkeyup", $"ValidateCant('{CveContratoDetalle}',{TxtSubTotal2.Text.ToDecimal})")
|
||||
|
||||
e.Row.FCTextBox("TxtPU").CssClass = $"CssPU{CveContratoDetalle}"
|
||||
e.Row.FCTextBox("TxtPU").Attributes.Add("onkeyup", $"ValidateCant('{CveContratoDetalle}',{TxtSubTotal2.Text.ToDecimal})")
|
||||
|
||||
|
||||
e.Row.FCTextBox("TxtImporte").CssClass = $"ImporteCSS CssImporte{CveContratoDetalle}"
|
||||
|
||||
|
||||
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub TabModoNC_ActiveTabChanged(sender As Object, e As EventArgs)
|
||||
Select Case TabModoNC.ActiveTabIndex
|
||||
Case 0
|
||||
@@ -20793,6 +20574,22 @@ Partial Class Compras_Compras
|
||||
|
||||
UpFooterFacturaNC.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkContratos_Click(sender As Object, e As EventArgs)
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub DdlContratosObra_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnAplicarContrato_Click(sender As Object, e As EventArgs)
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
Public Class MMensajeDevolucion
|
||||
|
||||
@@ -194,6 +194,7 @@
|
||||
<ADS:Dropdownlost ID="DdlClientes" CssStyle="width: 100%;" CssClassDdl="select2me" runat="server" AppendDataBoundItems="true" DataTextField="NombreComercial" DataValueField="CveCliente" Width="160px" Visible="false" AutoPostBack="true"></ADS:Dropdownlost>
|
||||
<br />
|
||||
<asp:DropDownList ID="DdlVentas" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="Folio" DataValueField="CveVenta" Width="160px" Visible="false"></asp:DropDownList><br />
|
||||
<asp:DropDownList ID="DdlClasificacionesE" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="Clasificacion" DataValueField="CveClasificacion" Width="160px" Visible="false" ></asp:DropDownList>
|
||||
</th>
|
||||
<th>
|
||||
<asp:DropDownList ID="DdlCtaContable" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="Id" Width="160px">
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -650,6 +650,7 @@
|
||||
<asp:DropDownList ID="DdlPersonalE" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="NombreCompleto" DataValueField="CvePersonal" Width="160px" Visible="false"></asp:DropDownList>
|
||||
<ADS:Dropdownlost ID="DdlClientesE" CssStyle="width: 100%;" CssClassDdl="select2me" runat="server" AppendDataBoundItems="true" DataTextField="NombreComercial" DataValueField="CveCliente" Width="160px" Visible="false" AutoPostBack="true"></ADS:Dropdownlost>
|
||||
<asp:DropDownList ID="DdlVentasE" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="Folio" DataValueField="CveVenta" Width="160px" Visible="false"></asp:DropDownList>
|
||||
<asp:DropDownList ID="DdlClasificacionesE" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="Clasificacion" DataValueField="CveClasificacion" Width="160px" Visible="false" ></asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1079,6 +1079,13 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
Else
|
||||
DdlPersonalE.Visible = False
|
||||
End If
|
||||
|
||||
If DdlConceptosContablesE.SelectedValue.ToEntero.Contiene(51) Then
|
||||
CargaClasificacionesE()
|
||||
DdlClasificacionesE.Visible = True
|
||||
Else
|
||||
DdlClasificacionesE.Visible = False
|
||||
End If
|
||||
If DdlConceptosContablesE.SelectedValue.ToEntero.Contiene(1, 2, 203, 207, 13, 61, 8, 9, 62, 63, 38, 39) Then
|
||||
CargaClientesE()
|
||||
DdlClientesE.Visible = True
|
||||
@@ -1136,6 +1143,12 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
DdlPersonalE.DataSource = GlobalDTRHPersonal(UsuarioActual.CveEmpresa)
|
||||
DdlPersonalE.DataBind()
|
||||
DdlPersonalE.Items.Insert(0, New ListItem(" - ", "-1"))
|
||||
End Sub
|
||||
|
||||
Private Sub CargaClasificacionesE()
|
||||
DdlClasificacionesE.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa)
|
||||
DdlClasificacionesE.DataBind()
|
||||
DdlClasificacionesE.Items.Insert(0, New ListItem(" - ", "-1"))
|
||||
End Sub
|
||||
Private Sub DdlProveedoresE_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlProveedoresE.SelectedIndexChanged
|
||||
CargaComprasE(DdlProveedoresE.SelectedValue.ToEntero)
|
||||
|
||||
@@ -113,7 +113,7 @@
|
||||
|
||||
<table class="table table-striped Widthall">
|
||||
<tr>
|
||||
<th style="width: 300px;"></th>
|
||||
<th style="width: 400px;"></th>
|
||||
<th style="width: 100px;"></th>
|
||||
<th style="width: 100px;"></th>
|
||||
<th style="width: 100px;"></th>
|
||||
@@ -147,11 +147,18 @@
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Cantidad Total">
|
||||
<ItemTemplate>
|
||||
<span><%# Eval("CantidadTotal", "{0:N2}")%></span>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="UM">
|
||||
<ItemTemplate>
|
||||
<span><%# Eval("Abreviatura")%></span>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<asp:TemplateField HeaderText="Cantidad">
|
||||
<ItemTemplate>
|
||||
|
||||
@@ -3306,7 +3306,7 @@ Partial Class Contratos_ContratoObra
|
||||
StrReturn = "True|" & CvePS.ToString
|
||||
Else
|
||||
|
||||
StrReturn = "False| - No se encontró " & Valor & " en la fila " & NumRow & ", columna " & Opt
|
||||
StrReturn = "False|" & Valor & " en la fila " & NumRow & ", columna " & Opt
|
||||
End If
|
||||
Return StrReturn
|
||||
End Function
|
||||
@@ -4506,8 +4506,13 @@ Partial Class Contratos_ContratoObra
|
||||
|
||||
UpModalCargaPresupuesto.Update()
|
||||
|
||||
|
||||
DTPS = DTPS.FiltraParametros("Cantidad > 0")
|
||||
|
||||
|
||||
Return DTPS
|
||||
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
@@ -4580,16 +4585,12 @@ Partial Class Contratos_ContratoObra
|
||||
If CBool(StrArray(0)) = True Then
|
||||
CvePS = StrArray(1).ToEntero
|
||||
Else
|
||||
RowNoEncontrados &= StrArray(1) & "<\BR>"
|
||||
RowNoEncontrados &= "Producto: " & StrArray(1) & "<\BR>"
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
If CvePS > 0 And DrowPS("Cantidad").ToString.ToDouble > 0 Then
|
||||
|
||||
|
||||
|
||||
CveUM = GlobalDTUnidadesMedida(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveUnidadMedida", $" UnidadMedida = '{ DrowPS("UnidadMedida").ToString.Trim }' OR Abreviatura = '{ DrowPS("UnidadMedida").ToString.Trim }'").ToEntero
|
||||
|
||||
If CveUM <= 0 Then
|
||||
@@ -4718,7 +4719,7 @@ Partial Class Contratos_ContratoObra
|
||||
|
||||
DTPS.Rows.Add(Row)
|
||||
Else
|
||||
|
||||
ErrorProceso = True
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -4764,7 +4765,8 @@ Partial Class Contratos_ContratoObra
|
||||
|
||||
DTPS.Rows.Add(Row)
|
||||
Else
|
||||
|
||||
ErrorProceso = True
|
||||
RowNoEncontrados &= "Sub Tipo: " & DrowPS("SubTipoAF").ToString & "<\BR>"
|
||||
End If
|
||||
|
||||
|
||||
@@ -4876,7 +4878,7 @@ Partial Class Contratos_ContratoObra
|
||||
|
||||
|
||||
If RowNoEncontrados.Length > 0 Then
|
||||
Alert($"Productos no encontrados <br> {RowNoEncontrados} ")
|
||||
Alert($"Productos y Sub Tipos no encontrados <br> {RowNoEncontrados} ", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
|
||||
|
||||
@@ -294,6 +294,11 @@ Partial Class Inventarios_EntradasSalidas
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
|
||||
If Not IsPostBack Then
|
||||
If UsuarioActual.CveUsuario = 100 AndAlso IfNull(Request("Regenera"), "").ToString = "1" Then
|
||||
RegeneraRM(Request("CveMovimiento").ToString.ToEntero, 119)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
CveMovimiento = -1
|
||||
CveMovimientoRelacionado = -1
|
||||
TieneRelacionado = -1
|
||||
@@ -3594,45 +3599,52 @@ Partial Class Inventarios_EntradasSalidas
|
||||
End If
|
||||
Next
|
||||
Else
|
||||
If ObjInventario.Modulo = "ASA/G1" Then
|
||||
If ObjInventario.Modulo.Contiene("TA/G1", "Recons") Then
|
||||
Contabilizable = False
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not MovAlmacen, DtCostos.SUMD("Total").RoundSQL, Concepto, 68, Concepto, TxtFecha.Text.ToDate, IdCtaContable, -1, CveVenta:=CveVenta, CveMovimientoAlmacen:=CveMovimientoRelacionado, ImporteMX:=DtCostos.SUMD("Total").RoundSQL, Contabilizable:=Contabilizable) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not MovAlmacen, DtCostos.SUMD("Total").RoundSQL, Concepto, 289, Concepto, TxtFecha.Text.ToDate, IdCtaContable, -1, CveVenta:=CveVenta, CveMovimientoAlmacen:=CveMovimientoRelacionado, ImporteMX:=DtCostos.SUMD("Total").RoundSQL, Contabilizable:=Contabilizable) Then
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
Else
|
||||
If DdlConcepto.SelectedValue.Contiene("6", "22", "23", "7", "16", "21", "24") Then
|
||||
'genero las prepolizas manuales
|
||||
Dim tCveConcepto As Integer = 95
|
||||
Dim CveCuenta As Integer
|
||||
If UsuarioActual.CveEmpresa = 119 Then CveCuenta = 55519
|
||||
IdCtaContable = 1
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not MovAlmacen, DtCostos.SUMD("Total"), Concepto, tCveConcepto, Concepto, TxtFecha.Text.ToDate, IdCtaContable, -1, CveVenta:=CveVenta, CveClasificacion:=-1, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=DtCostos.SUMD("Total"), CveSubProyecto:=-1, CveCuenta:=CveCuenta, Contabilizable:=Contabilizable) Then
|
||||
If ObjInventario.Modulo = "ASA/G1" Then
|
||||
Contabilizable = False
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not MovAlmacen, DtCostos.SUMD("Total").RoundSQL, Concepto, 68, Concepto, TxtFecha.Text.ToDate, IdCtaContable, -1, CveVenta:=CveVenta, CveMovimientoAlmacen:=CveMovimientoRelacionado, ImporteMX:=DtCostos.SUMD("Total").RoundSQL, Contabilizable:=Contabilizable) Then
|
||||
ErrorMovInv = True
|
||||
|
||||
End If
|
||||
|
||||
Else
|
||||
|
||||
Dim tCveSubProyecto = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen={DdlAlmacen.SelectedValue.ToEntero}").ToEntero
|
||||
Dim tCveConcepto As Integer = 69
|
||||
If DdlConcepto.SelectedValue = "30" Then
|
||||
tCveConcepto = 181
|
||||
IdCtaContable = UsuarioActual.Empresa.Funcionalidad(342).ToEntero
|
||||
End If
|
||||
|
||||
For Each RowInv As DataRow In tmpCostos.Rows
|
||||
ValorInventario = DtCostos.SUM("Total", $"CveClasificacion = {RowInv("CveClasificacion")}").ToString.ToDecimal.RoundSQL
|
||||
If tCveConcepto = 69 Then
|
||||
IdCtaContable = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero
|
||||
End If
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not MovAlmacen, ValorInventario, Concepto, tCveConcepto, Concepto, TxtFecha.Text.ToDate, IdCtaContable, -1, CveVenta:=CveVenta, CveClasificacion:=RowInv("CveClasificacion").ToString.ToEntero, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=ValorInventario, CveSubProyecto:=tCveSubProyecto) Then
|
||||
If DdlConcepto.SelectedValue.Contiene("6", "22", "23", "7", "16", "21", "24") Then
|
||||
'genero las prepolizas manuales
|
||||
Dim tCveConcepto As Integer = 95
|
||||
Dim CveCuenta As Integer
|
||||
If UsuarioActual.CveEmpresa = 119 Then CveCuenta = 55519
|
||||
IdCtaContable = 1
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not MovAlmacen, DtCostos.SUMD("Total"), Concepto, tCveConcepto, Concepto, TxtFecha.Text.ToDate, IdCtaContable, -1, CveVenta:=CveVenta, CveClasificacion:=-1, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=DtCostos.SUMD("Total"), CveSubProyecto:=-1, CveCuenta:=CveCuenta, Contabilizable:=Contabilizable) Then
|
||||
ErrorMovInv = True
|
||||
Exit For
|
||||
|
||||
End If
|
||||
|
||||
Next
|
||||
Else
|
||||
|
||||
Dim tCveSubProyecto = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen={DdlAlmacen.SelectedValue.ToEntero}").ToEntero
|
||||
Dim tCveConcepto As Integer = 69
|
||||
If DdlConcepto.SelectedValue = "30" Then
|
||||
tCveConcepto = 181
|
||||
IdCtaContable = UsuarioActual.Empresa.Funcionalidad(342).ToEntero
|
||||
End If
|
||||
|
||||
For Each RowInv As DataRow In tmpCostos.Rows
|
||||
ValorInventario = DtCostos.SUM("Total", $"CveClasificacion = {RowInv("CveClasificacion")}").ToString.ToDecimal.RoundSQL
|
||||
If tCveConcepto = 69 Then
|
||||
IdCtaContable = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero
|
||||
End If
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not MovAlmacen, ValorInventario, Concepto, tCveConcepto, Concepto, TxtFecha.Text.ToDate, IdCtaContable, -1, CveVenta:=CveVenta, CveClasificacion:=RowInv("CveClasificacion").ToString.ToEntero, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=ValorInventario, CveSubProyecto:=tCveSubProyecto) Then
|
||||
ErrorMovInv = True
|
||||
Exit For
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
@@ -4840,6 +4852,76 @@ Partial Class Inventarios_EntradasSalidas
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub RegeneraRM(CveMovD As Integer, CveMov2 As Integer)
|
||||
'Dim Retorno As Integer = -1
|
||||
'Dim ErrorMovInv As Boolean = False
|
||||
'Dim ObjConta As New ClsContabilidad
|
||||
'ObjConta.IniciaTransacSQL()
|
||||
'Dim ObjInventario As New ClsInventarios(ObjConta.IniciaTransacSQL)
|
||||
'Dim CveMovimientoInsertado As Integer = 0
|
||||
'Dim Fecha As Date
|
||||
'Dim Importe As Decimal
|
||||
|
||||
'If ObjInventario.GetMovimientosDetalleTransitorio(CveMovD, UsuarioActual.CveEmpresa) Then
|
||||
|
||||
|
||||
' Fecha = ObjInventario.DtResultados.Rows(0)("FechaMovto").ToString.ToDate
|
||||
|
||||
' Dim dtvirtual As DataTable = ObjInventario.DtResultados
|
||||
|
||||
' If dtvirtual.Rows.Count > 0 Then
|
||||
' CveMovimientoInsertado = ObjInventario.AddMovimiento(352, 8, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, Modulo:="TA/VM")
|
||||
|
||||
' For Each RowVirtual As DataRow In dtvirtual.Rows
|
||||
' Dim CvePS = RowVirtual("CvePS").ToString().ToEntero()
|
||||
' Dim CantidadUsado As Double = RowVirtual("Cantidad").ToString().ToDouble()
|
||||
' Dim PU As Decimal = RowVirtual("PUOriginal").ToString().ToDecimal()
|
||||
' Dim CveUM As Integer = RowVirtual("CveUM").ToString().ToEntero()
|
||||
' Dim CveMovimientoDetalle As Integer = RowVirtual("CveMovimientoDetalle").ToString().ToEntero()
|
||||
|
||||
' If Not ObjInventario.AddMovimientoDetalle(CveMovimientoInsertado, CantidadUsado, CveUM, CvePS, PU, -1, CveMovimientoDetalleEntrada:=CveMovimientoDetalle, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
||||
' ErrorMovInv = True
|
||||
' Exit For
|
||||
' End If
|
||||
' Next
|
||||
|
||||
' If ObjInventario.GetMovimientosDetalle(CveMovimientoInsertado, UsuarioActual.CveEmpresa) Then
|
||||
|
||||
' Dim resultado As DataTable = ObjInventario.DtResultados
|
||||
' Importe = resultado.SUMD("Total").RoundSQL
|
||||
|
||||
' Dim Contabilizable As Boolean = False
|
||||
' Dim Concepto As String = "Traspaso"
|
||||
' Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("Manualx", 53, 0, 0, 1, Fecha, Concepto, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Importe, "", 68, Concepto, Fecha, -1, -1, CveMovimientoAlmacen:=CveMovimientoInsertado, ImporteMX:=Importe, Contabilizable:=Contabilizable) Then
|
||||
' ErrorMovInv = True
|
||||
' End If
|
||||
|
||||
' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Importe, "", 68, Concepto, Fecha, -1, -1, CveMovimientoAlmacen:=CveMovD, ImporteMX:=Importe, Contabilizable:=Contabilizable) Then
|
||||
' ErrorMovInv = True
|
||||
' End If
|
||||
|
||||
' If Not ErrorMovInv Then Retorno = CvePrePoliza
|
||||
|
||||
' End If
|
||||
' End If
|
||||
'Else
|
||||
' ErrorMovInv = True
|
||||
'End If
|
||||
|
||||
'If ErrorMovInv Then
|
||||
' ObjConta.RollBack()
|
||||
' Alert("No se aplico", TipoMensaje.MsgError)
|
||||
'Else
|
||||
' ObjConta.Commit()
|
||||
' Alert("Se aplico", TipoMensaje.MsgInformacion)
|
||||
'End If
|
||||
|
||||
'ObjConta.Dispose()
|
||||
'ObjInventario.Dispose()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
@@ -2398,11 +2398,16 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
CostoIndirecto = DtInv.Rows(gvr.RowIndex)("CostoIndirecto").ToString.ToDecimal
|
||||
PUExtranjero = DtInv.Rows(gvr.RowIndex)("PUExtranjero").ToString.ToDecimal
|
||||
|
||||
' por redondeo
|
||||
If gvr.FCTextBox("TbCantidadF").Text.ToDouble = 1 Then PU = PU.RoundAD
|
||||
|
||||
'SI FUE POR SERIE LOTE
|
||||
DtDetalle = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", gvr.DataKey("Consec").ToEntero))
|
||||
DtDetalleLote = DtDatosLoteDetalle.FiltraParametros(String.Format("ConsecId = {0}", gvr.DataKey("Consec").ToEntero))
|
||||
If DtDetalle.Rows.Count > 0 Then
|
||||
Dim ContDt As Integer = 0
|
||||
' por redondeo
|
||||
If gvr.FCTextBox("TbCantidadF").Text.ToDouble = 1 Then PU = PU.RoundAD
|
||||
For Each Dr As DataRow In DtDetalle.Rows
|
||||
SumaTotal += PU + CostoIndirecto
|
||||
If RecibidaCompleta AndAlso Cont + 1 = GvInv.Rows.Count AndAlso ContDt + 1 = DtDetalle.Rows.Count AndAlso Math.Round((TotalCompraOC * If(TipoCambio > 1, TipoCambio, 1)), 2) <> SumaTotal Then
|
||||
@@ -2418,6 +2423,8 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
Next
|
||||
ElseIf DtDetalleLote.Rows.Count > 0 Then
|
||||
Dim ContDt As Integer = 0
|
||||
' por redondeo
|
||||
If gvr.FCTextBox("TbCantidadF").Text.ToDouble = 1 Then PU = PU.RoundAD
|
||||
For Each Dr As DataRow In DtDetalleLote.Rows
|
||||
SumaTotal += Dr("Cantidad").ToString.ToDecimal * (PU + CostoIndirecto)
|
||||
If RecibidaCompleta AndAlso Cont + 1 = GvInv.Rows.Count AndAlso ContDt + 1 = DtDetalleLote.Rows.Count AndAlso Math.Round((TotalCompraOC * If(TipoCambio > 1, TipoCambio, 1)), 2) <> SumaTotal Then
|
||||
@@ -2433,6 +2440,9 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
ContDt += 1
|
||||
Next
|
||||
Else
|
||||
' por redondeo
|
||||
If gvr.FCTextBox("TbCantidadF").Text.ToDouble = 1 Then PU = PU.RoundAD
|
||||
|
||||
SumaTotal += gvr.FCTextBox("TbCantidadF").Text.ToDecimal * (PU + CostoIndirecto) ' considerar el costo indirecto para el ajuste
|
||||
If RecibidaCompleta AndAlso Cont + 1 = GvInv.Rows.Count AndAlso Math.Round((TotalCompraOC * If(TipoCambio > 1, TipoCambio, 1)), 2) <> Math.Round(SumaTotal, 2) Then
|
||||
Dim tTotal As Decimal = gvr.FCTextBox("TbCantidadF").Text.ToDecimal * (PU)
|
||||
@@ -2497,8 +2507,10 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
DtDetalleLote = DtDatosLoteDetalle.FiltraParametros(String.Format("ConsecId = {0}", gvr.DataKey("Consec").ToEntero))
|
||||
If DtDetalle.Rows.Count > 0 Then
|
||||
Dim ContDt As Integer = 0
|
||||
' por redondeo
|
||||
PU = PU.RoundAD
|
||||
For Each Dr As DataRow In DtDetalle.Rows
|
||||
SumaTotal += PU + CostoIndirecto
|
||||
SumaTotal += PU.RoundAD + CostoIndirecto ' se redondea a dos decimales. por la unidad es uno
|
||||
If RecibidaCompleta AndAlso Cont + 1 = GvInv.Rows.Count AndAlso ContDt + 1 = DtDetalle.Rows.Count AndAlso Math.Round((TotalCompraOC * If(TipoCambio > 1, TipoCambio, 1)), 2) <> SumaTotal Then
|
||||
If Not UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||
PU = Math.Round((TotalCompraOC * If(TipoCambio > 1, TipoCambio, 1)), 2).ToDecimal - (SumaTotal - (PU))
|
||||
@@ -2512,6 +2524,8 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
Next
|
||||
ElseIf DtDetalleLote.Rows.Count > 0 Then
|
||||
Dim ContDt As Integer = 0
|
||||
' por redondeo
|
||||
If gvr.FCTextBox("TbCantidadF").Text.ToDouble = 1 Then PU = PU.RoundAD
|
||||
For Each Dr As DataRow In DtDetalleLote.Rows
|
||||
SumaTotal += Dr("Cantidad").ToString.ToDecimal * (PU + CostoIndirecto)
|
||||
If RecibidaCompleta AndAlso Cont + 1 = GvInv.Rows.Count AndAlso ContDt + 1 = DtDetalleLote.Rows.Count AndAlso Math.Round((TotalCompraOC * If(TipoCambio > 1, TipoCambio, 1)), 2) <> SumaTotal Then
|
||||
@@ -2527,6 +2541,8 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
ContDt += 1
|
||||
Next
|
||||
Else
|
||||
' por redondeo
|
||||
If gvr.FCTextBox("TbCantidadF").Text.ToDouble = 1 Then PU = PU.RoundAD
|
||||
SumaTotal += gvr.FCTextBox("TbCantidadF").Text.ToDecimal * (PU + CostoIndirecto) ' considerar el costo indirecto para el ajuste
|
||||
If RecibidaCompleta AndAlso Cont + 1 = GvInv.Rows.Count AndAlso Math.Round((TotalCompraOC * If(TipoCambio > 1, TipoCambio, 1)), 2) <> Math.Round(SumaTotal, 2) Then
|
||||
Dim tTotal As Decimal = gvr.FCTextBox("TbCantidadF").Text.ToDecimal * (PU)
|
||||
@@ -2563,7 +2579,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
If CveTipoCompra = 8 Then 'entrada almacen con costo indirecto cargado en la misma compra
|
||||
tTotalInsertado = dtt.SUMD("Total") ' está incluido el costo indirecto en la factura
|
||||
End If
|
||||
If Math.Round(TotalCompraOC * If(TipoCambio > 1, TipoCambio, 1), 2) <> Math.Round(tTotalInsertado, 2) Then
|
||||
If (TotalCompraOC * If(TipoCambio > 1, TipoCambio, 1)).RoundAD <> tTotalInsertado.RoundAD Then
|
||||
ErrorMovInv = True
|
||||
Alert("La Entrada no coincide con el valor del documento." & Math.Round(TotalCompraOC * If(TipoCambio > 1, TipoCambio, 1), 2) & " -" & tTotalInsertado, TipoMensaje.MsgError)
|
||||
GuardaLog("La Entrada no coincide con el valor del documento." & Math.Round(TotalCompraOC * If(TipoCambio > 1, TipoCambio, 1), 2) & " -" & tTotalInsertado)
|
||||
|
||||
@@ -971,7 +971,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then
|
||||
|
||||
Dim resultado As DataTable = ObjInventario.DtResultados
|
||||
Dim importe As Decimal = resultado.SUMD("Total").RoundSQL
|
||||
Dim importe As Decimal = resultado.SUMD("Total").RoundAD
|
||||
'Dim IdCtaContableSalida As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", DdlAlmacenOrigen.SelectedValue.ToEntero)).ToEntero
|
||||
'Dim IdCtaContableEntrada As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", DdlAlmacenDestino.SelectedValue.ToEntero)).ToEntero
|
||||
Dim Contabilizable As Boolean = True
|
||||
@@ -1012,7 +1012,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then
|
||||
|
||||
Dim resultado As DataTable = ObjInventario.DtResultados
|
||||
Dim importe As Decimal = resultado.SUMD("Total").RoundSQL
|
||||
Dim importe As Decimal = resultado.SUMD("Total").RoundAD
|
||||
Dim IdCtaContable As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", DdlAlmacenTransitorio.SelectedValue.ToEntero)).ToEntero
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importe, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, IdCtaContable, -1, CveMovimientoAlmacen:=CveMovimientoSalida, ImporteMX:=importe, Contabilizable:=False) Then
|
||||
@@ -1736,7 +1736,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
End If
|
||||
|
||||
If Not ErrorMovInv Then
|
||||
Dim ImporteDecimal As Decimal = importe.ToDecimal.RoundSQL
|
||||
Dim ImporteDecimal As Decimal = importe.ToDecimal.RoundAD
|
||||
Dim IdCtaContable As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", DdlAlmacenTransitorioRecepcion.SelectedValue.ToEntero)).ToEntero
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteDecimal, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, IdCtaContable, -1,
|
||||
@@ -1912,7 +1912,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
If ObjInventario.GetMovimientosDetalle(CveMovimientoEntrada, UsuarioActual.CveEmpresa) Then
|
||||
|
||||
Dim resultado As DataTable = ObjInventario.DtResultados
|
||||
Dim importe As Decimal = resultado.SUMD("Total").RoundSQL
|
||||
Dim importe As Decimal = resultado.SUMD("Total").RoundAD
|
||||
Dim IdCtaContable As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", DdlAlmacenTransitorioRecepcion.SelectedValue.ToEntero)).ToEntero
|
||||
Dim tCveConcepto As Integer = 68
|
||||
|
||||
|
||||
@@ -537,16 +537,8 @@ Aguinaldoapagar
|
||||
if (Listaparametros!= null)
|
||||
{
|
||||
foreach (parametroQuery pr in Listaparametros)
|
||||
{
|
||||
if (pr.SqlDataType != null)
|
||||
{
|
||||
if (pr.ParameterDirection != null)
|
||||
SqlAdapter.SelectCommand.Parameters.Add(pr.ParameterName, pr.SqlDataType).Direction = pr.ParameterDirection;
|
||||
else
|
||||
SqlAdapter.SelectCommand.Parameters.Add(pr.ParameterName, pr.SqlDataType).Value = pr.SqlValue != null ? pr.SqlValue : DBNull.Value;
|
||||
}
|
||||
else
|
||||
SqlAdapter.SelectCommand.Parameters.AddWithValue(pr.ParameterName, pr.SqlValue);
|
||||
{
|
||||
SqlAdapter.SelectCommand.Parameters.Add(pr.ParameterName, pr.SqlDataType).Direction = pr.ParameterDirection;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -586,15 +578,7 @@ Aguinaldoapagar
|
||||
{
|
||||
foreach (parametroQuery pr in Listaparametros)
|
||||
{
|
||||
if ( pr.SqlDataType != null)
|
||||
{
|
||||
if ( pr.ParameterDirection != null)
|
||||
SqlAdapter.SelectCommand.Parameters.Add(pr.ParameterName, pr.SqlDataType).Direction = pr.ParameterDirection;
|
||||
else
|
||||
SqlAdapter.SelectCommand.Parameters.Add(pr.ParameterName, pr.SqlDataType).Value = pr.SqlValue != null ? pr.SqlValue : DBNull.Value;
|
||||
}
|
||||
else
|
||||
SqlAdapter.SelectCommand.Parameters.AddWithValue(pr.ParameterName, pr.SqlValue);
|
||||
SqlAdapter.SelectCommand.Parameters.Add(pr.ParameterName, pr.SqlDataType).Direction = pr.ParameterDirection;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -714,18 +698,18 @@ Aguinaldoapagar
|
||||
}
|
||||
}
|
||||
|
||||
public class parametroQuery
|
||||
{
|
||||
public parametroQuery(string parameterName, object sqlValue, SqlDbType sqlDataType = default(SqlDbType), ParameterDirection parameterDirection = default(ParameterDirection))
|
||||
{
|
||||
this.ParameterName = parameterName;
|
||||
this.SqlDataType = sqlDataType;
|
||||
this.ParameterDirection = parameterDirection;
|
||||
this.SqlValue = sqlValue;
|
||||
}
|
||||
//public class parametroQuery
|
||||
//{
|
||||
// public parametroQuery(string parameterName, object sqlValue, SqlDbType sqlDataType = default(SqlDbType), ParameterDirection parameterDirection = default(ParameterDirection))
|
||||
// {
|
||||
// this.ParameterName = parameterName;
|
||||
// this.SqlDataType = sqlDataType;
|
||||
// this.ParameterDirection = parameterDirection;
|
||||
// this.SqlValue = sqlValue;
|
||||
// }
|
||||
|
||||
public string ParameterName { get; set; }
|
||||
public SqlDbType SqlDataType { get; set; }
|
||||
public ParameterDirection ParameterDirection { get; set; }
|
||||
public object SqlValue { get; set; }
|
||||
}
|
||||
// public string ParameterName { get; set; }
|
||||
// public SqlDbType SqlDataType { get; set; }
|
||||
// public ParameterDirection ParameterDirection { get; set; }
|
||||
// public object SqlValue { get; set; }
|
||||
//}
|
||||
|
||||
@@ -4,6 +4,37 @@
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
.dtosEmpleado .row {
|
||||
padding-top: 10px;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
a.TextLink {
|
||||
color: #2196f3;
|
||||
}
|
||||
|
||||
.dtosEmpleado {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
|
||||
.dnone {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
|
||||
.GvConceptos tr td a {
|
||||
color: #5b9bd1;
|
||||
}
|
||||
|
||||
.GvConceptos {
|
||||
border: 1px solid #E87E04;
|
||||
}
|
||||
|
||||
table.GvConceptos td {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.GvConceptos.table > tbody > tr > th {
|
||||
border-top: 1px solid #E87E04;
|
||||
color: #fff;
|
||||
@@ -11,41 +42,12 @@
|
||||
background-color: #E87E04;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.portlet > .portlet-title {
|
||||
min-height: 30px;
|
||||
}
|
||||
|
||||
.portlet > .portlet-title > .caption {
|
||||
font-size: 13px;
|
||||
padding: 5px 0 5px 0;
|
||||
}
|
||||
|
||||
.portlet > .portlet-title > .tools {
|
||||
padding: 5px 0 5px 0;
|
||||
}
|
||||
|
||||
.GvConceptos.table > tbody > tr.thTituloConcepto > th:nth-child(1),
|
||||
.GvConceptos.table > tbody > tr:not(.thTituloConcepto) > th:nth-child(2),
|
||||
.GvConceptos.table > tbody > tr > td:nth-child(2) {
|
||||
.GvConceptos.table > tbody > tr:not(.thTituloConcepto) > th:nth-child(3),
|
||||
.GvConceptos.table > tbody > tr > td:nth-child(3) {
|
||||
border-right: 1px solid #E87E04;
|
||||
}
|
||||
|
||||
.dtosEmpleado {
|
||||
font-size: 15px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.dtosEmpleado a {
|
||||
color: #2196f3;
|
||||
}
|
||||
|
||||
.dtosEmpleado .row {
|
||||
padding-top: 10px;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
.GvConceptos.table > tbody > tr > td span {
|
||||
display: block;
|
||||
min-height: 12px;
|
||||
@@ -58,24 +60,21 @@
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
Finiquito
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
|
||||
<asp:UpdatePanel ID="UpAcciones" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:HyperLink ID="HypCambiarEmpleado" onclick="$('#ModalEmpleados').modal();" runat="server"><i class="fa fa-exchange" aria-hidden="true"></i>Cambiar Empleado</asp:HyperLink></li>
|
||||
<asp:LinkButton ID="LnkAutorizar" Visible="false" OnClick="LnkAutorizar_Click" runat="server"><i class='material-icons'>done_all</i>Autorizar</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkReCalcular" OnClick="LnkCalcular_Click" runat="server"><i class="fa fa-pencil"></i>ReCalcular </asp:LinkButton></li>
|
||||
<asp:LinkButton ID="LnkTimbrar" Visible="false" OnClick="LnkTimbrar_Click" runat="server"><i class="fa fa-bell"></i>Timbrar</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkAutorizar" OnClick="LnkAutorizar_Click" runat="server"><i class='material-icons'>done_all</i>Autorizar</asp:LinkButton></li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkTimbrar" OnClick="LnkTimbrar_Click" runat="server"><i class="fa fa-bell"></i>Timbrar</asp:LinkButton></li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkFormatoRenuncia" OnClick="LnkFormatoRenuncia_Click" runat="server"><i class="fa fa-bell"></i>Formato Renuncia</asp:LinkButton></li>
|
||||
<asp:LinkButton ID="LnkFormatoRenuncia" OnClick="LnkFormatoRenuncia_Click" runat="server"><i class="fa fa-bell"></i>Formato Finiquito</asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
@@ -83,79 +82,177 @@
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
<asp:UpdatePanel ID="upDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="row ">
|
||||
<div class="col-md-6 col-md-offset-3 col-sm-10 col-sm-offset-1">
|
||||
|
||||
<div class="portlet box yellow-gold smallpadding" id="pnldl">
|
||||
<div class="portlet-title">
|
||||
<div class="caption ">
|
||||
<i class="icon-pin "></i>
|
||||
<span class="caption-subject bold uppercase">Datos del Empleado</span>
|
||||
</div>
|
||||
<div class="tools">
|
||||
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
|
||||
<a href="javascript:;" class="fullscreen" data-original-title="" title=""></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body dtosEmpleado">
|
||||
<div class="row ">
|
||||
<div class="col-sm-4 col-lg-3">Empleado: </div>
|
||||
<div class="col-sm-8 col-lg-9">
|
||||
<asp:HyperLink ID="HypEmpleado" CssClass="LinkEmpleado" runat="server"></asp:HyperLink>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row ">
|
||||
<div class="col-sm-4 col-lg-3">Estatus</div>
|
||||
<div class="col-sm-8 col-lg-9">
|
||||
<asp:Label ID="LblEstatus" runat="server" Text=""></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row ">
|
||||
<div class="col-sm-4 col-lg-3">Motivo Baja</div>
|
||||
<div class="col-sm-8 col-lg-9 ">
|
||||
<asp:Label ID="LblMotivoBaja" runat="server" Text=""></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row ">
|
||||
<div class="col-sm-4 col-lg-3">Fecha Baja</div>
|
||||
<div class="col-sm-8 col-lg-9">
|
||||
<asp:Label ID="LblFechaBaja" runat="server" Text=""></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row ">
|
||||
<div class="col-sm-4 col-lg-3">Perido Finiquito</div>
|
||||
<div class="col-sm-8 col-lg-9">
|
||||
<asp:Label ID="LblPerido" runat="server" Text=""></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<ajax:TabContainer ID="Tab" runat="server" Width="100%" AutoPostBack="True">
|
||||
<ajax:TabPanel ID="TabSobreRecibo" runat="server" HeaderText="Sobre Recibo">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="portlet box yellow-gold smallpadding" id="pnlSobreRecivo">
|
||||
<div class="portlet-title" style="display: none;">
|
||||
<div class="row ">
|
||||
<div class="col-sm-6 ">
|
||||
<%--class="col-md-6 col-md-offset-3 col-sm-10 col-sm-offset-1"--%>
|
||||
<div class="portlet light xspadding bordered" id="pnldl">
|
||||
<div class="portlet-title">
|
||||
<div class="caption ">
|
||||
<i class="icon-pin "></i>
|
||||
<span class="caption-subject bold uppercase ">Sobre Recibo</span>
|
||||
<i class="fa fa-bookmark font-yellow-gold"></i>
|
||||
<span class="caption-subject bold uppercase font-yellow-gold">Datos del Empleado</span>
|
||||
</div>
|
||||
<div class="tools">
|
||||
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
|
||||
<a href="javascript:;" class="fullscreen" data-original-title="" title=""></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body " style="padding: 0px;">
|
||||
<div class="portlet-body dtosEmpleado">
|
||||
<div class="row ">
|
||||
<div class="col-sm-3">
|
||||
<span class="bold">Codigo:</span>
|
||||
<br />
|
||||
<asp:HyperLink ID="HypCodigo" CssClass="LinkEmpleado TextLink" Text="--" runat="server"></asp:HyperLink>
|
||||
</div>
|
||||
<div class="col-sm-9">
|
||||
<span class="bold">Empleado:</span>
|
||||
<br />
|
||||
<asp:HyperLink ID="HypEmpleado" CssClass="LinkEmpleado TextLink" Text="--" runat="server"></asp:HyperLink>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row ">
|
||||
<div class="col-sm-3 ">
|
||||
<span class="bold">Fecha alta:</span>
|
||||
<br />
|
||||
<asp:Label ID="LblFechaAlta" runat="server" Text="--"></asp:Label>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="bold">Puesto:</span>
|
||||
<br />
|
||||
<asp:Label ID="LblPuesto" runat="server" Text="--"></asp:Label>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<span class="bold">Salario:</span>
|
||||
<br />
|
||||
<asp:Label ID="LblSalario" runat="server" Text="--"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row ">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<asp:GridView ID="GvConceptos" runat="server" AutoGenerateColumns="False" CssClass="table table-striped table-hover Widthall GvConceptos"
|
||||
Style="text-align: center;" GridLines="None" OnRowDataBound="GvConceptos_RowDataBound"
|
||||
DataKeyNames="ConceptoP,CveConceptoP,ImporteP,EstatusP,ConceptoD,CveConceptoD,ImporteD,EstatusD">
|
||||
<div class="col-sm-6 ">
|
||||
<%--class="col-md-6 col-md-offset-3 col-sm-10 col-sm-offset-1"--%>
|
||||
<div class="portlet light xspadding bordered" id="pnlfiniqito">
|
||||
<div class="portlet-title">
|
||||
<div class="caption ">
|
||||
<i class="fa fa-bookmark font-yellow-gold"></i>
|
||||
<span class="caption-subject bold uppercase font-yellow-gold">Información finiquito</span>
|
||||
</div>
|
||||
<div class="tools">
|
||||
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
|
||||
<a href="javascript:;" class="fullscreen" data-original-title="" title=""></a>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
<asp:LinkButton ID="LnkGuardarDatos" OnClick="LnkGuardarDatos_Click" ValidationGroup="GrpGuardar" CssClass="btn btn-primary" runat="server">Guardar</asp:LinkButton>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body dtosEmpleado">
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlMotivoBaja" runat="server" AppendDataBoundItems="True" DataTextField="MotivoBaja" DataValueField="CveMotivoBaja" Width="100%"
|
||||
CssClass="form-control select2me" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Selected="True" Text="Sin asignar Motivo de baja" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RfvMotivoBaja" runat="server" ControlToValidate="DdlMotivoBaja" CssClass=" dnone" InitialValue="-1"
|
||||
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />Seleccione el <b>''motivo''</b>."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<asp:Label runat="server" Text="Motivo de Baja: " AssociatedControlID="DdlMotivoBaja"></asp:Label>
|
||||
</div>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoMotivoBaja" runat="server" HighlightCssClass="vco" TargetControlID="RfvMotivoBaja" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group form-md-line-input input-iconright" style="width: 120px; display: inline-block">
|
||||
<asp:TextBox ID="TxtFechaBaja" runat="server" CausesValidation="True" CssClass="form-control"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RfvTxtFechaBaja" runat="server" ControlToValidate="TxtFechaBaja" CssClass="dnone"
|
||||
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha de Baja''</b> es necesario "
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<asp:Label runat="server" Text="Fecha de Baja: " AssociatedControlID="TxtFechaBaja"></asp:Label>
|
||||
<ajax:MaskedEditExtender ID="MKEFechaBaja" runat="server" TargetControlID="TxtFechaBaja" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left" BehaviorID="_content_MKEFechaBaja" Century="2000" CultureAMPMPlaceholder="" CultureCurrencySymbolPlaceholder="" CultureDateFormat="" CultureDatePlaceholder="" CultureDecimalPlaceholder="" CultureThousandsPlaceholder="" CultureTimePlaceholder=""></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="CEFechaBaja" runat="server" TargetControlID="TxtFechaBaja" PopupButtonID="ImgFechaBaja" PopupPosition="BottomRight" BehaviorID="_content_CEFechaBaja"></ajax:CalendarExtender>
|
||||
<asp:CompareValidator ID="CVFechaBaja" runat="server" ControlToValidate="TxtFechaBaja" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha de Baja''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar" Visible="False"></asp:CompareValidator>
|
||||
</div>
|
||||
<span class="input-group-btn " style="display: inline-block">
|
||||
<asp:LinkButton ID="ImgFechaBaja" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoTxtFechaBaja" runat="server" HighlightCssClass="vco" TargetControlID="RfvTxtFechaBaja" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
¿es liquidación?<br />
|
||||
<asp:CheckBox ID="ChkesLiquidacion" CssClass="chksino" Text=" " runat="server" />
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtAntiguedad" runat="server" Enabled="false" Text="--" CausesValidation="True" CssClass="form-control"></asp:TextBox>
|
||||
<asp:Label runat="server" Text="Antiguedad: " AssociatedControlID="TxtAntiguedad"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtDiasTransAnio" runat="server" Enabled="false" Text="--" CausesValidation="True" CssClass="form-control"></asp:TextBox>
|
||||
<asp:Label runat="server" Text="Dias trans. en el año: " AssociatedControlID="TxtDiasTransAnio"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtSalarioMinimo" runat="server" Enabled="false" Text="--" CausesValidation="True" CssClass="form-control"></asp:TextBox>
|
||||
<asp:Label runat="server" Text="Salario minimo: " AssociatedControlID="TxtSalarioMinimo"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<%--<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlTipoPeriodo" runat="server" AppendDataBoundItems="true" Width="100%" CssClass="form-control select2me" AutoPostBack="true" DataTextField="TipoPeriodo" DataValueField="CveTipoPeriodo" OnSelectedIndexChanged="DdlTipoPeriodo_SelectedIndexChanged">
|
||||
<asp:ListItem Selected="True" Text="Ordinario" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Extraordinario" Value="6"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:Label runat="server" Text="Tipo Período: " AssociatedControlID="DdlTipoPeriodo"></asp:Label>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlPeriodo" runat="server" AppendDataBoundItems="true" Width="100%" CssClass="form-control select2me" DataTextField="NominaEstatus" DataValueField="CvePeriodo">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:Label runat="server" Text="Período:" AssociatedControlID="DdlPeriodo"></asp:Label>
|
||||
</div>--%>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
|
||||
<div class="portlet light xspadding bordered" id="pnlNomina">
|
||||
<div class="portlet-title">
|
||||
<div class="caption ">
|
||||
<i class="fa fa-bookmark font-yellow-gold"></i>
|
||||
<span class="caption-subject bold uppercase font-yellow-gold">Finiquito (Ordinario)</span>
|
||||
</div>
|
||||
<div class="tools">
|
||||
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
|
||||
<a href="javascript:;" class="fullscreen" data-original-title="" title=""></a>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
<%--<a onclick="$('#C_BtnImprimirsobrerecibo').click()" class="btn btn-default">Imprimir</a>--%>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body ">
|
||||
|
||||
<asp:GridView ID="GvFinOrdinario" runat="server" AutoGenerateColumns="False" CssClass="table table-striped table-hover Widthall GvConceptos"
|
||||
Style="text-align: center;" GridLines="None" OnRowDataBound="GvConceptos_RowDataBound" ShowHeaderWhenEmpty="true"
|
||||
DataKeyNames="ConceptoP,CveConceptoP,ImporteP,ValorP,EstatusP,ConceptoD,CveConceptoD,ImporteD,isOnlyBisibleP,isOnlyBisibleD,EstatusD,ValorD,isEditedD,isEditedP">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Concepto">
|
||||
<ItemTemplate>
|
||||
@@ -164,353 +261,156 @@
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" Width="37%" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Valor">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtlValorP" runat="server" Text='<%# Eval("ValorP", "{0:##,###.##}") %>' Style="word-break: break-all;"></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right" Width="13%" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Importe">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtlImporte" runat="server" Text='<%# Eval("ImporteP", "${0:N}") %>' Style="word-break: break-all;"></asp:Label>
|
||||
<asp:LinkButton ID="LnkImporte" OnClick="LnkConcepto_Click" runat="server" Text='<%# Eval("ImporteP", "${0:N}") %>'></asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkImporte" OnClick="LnkConcepto_Click" runat="server"></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right" Width="13%" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Concepto">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtlConceptoD" runat="server" Text='<%# Eval("ConceptoD") %>' Style="word-break: break-all;"></asp:Label>
|
||||
<asp:LinkButton ID="LnkConceptoD" OnClick="LnkConceptoD_Click" runat="server" Text='<%# Eval("ConceptoD") %>'></asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkConceptoD" OnClick="LnkConcepto_Click" runat="server" Text='<%# Eval("ConceptoD") %>'></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" Width="37%" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Valor">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtlValorD" runat="server" Text='<%# Eval("ValorD", "{0:##,###.##}") %>' Style="word-break: break-all;"></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right" Width="13%" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Importe">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtlImporteD" runat="server" Text='<%# Eval("ImporteD", "${0:N}") %>' Style="word-break: break-all;"></asp:Label>
|
||||
<asp:LinkButton ID="LnkImporteD" OnClick="LnkConceptoD_Click" runat="server" Text='<%# Eval("ImporteD", "${0:N}") %>'></asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkImporteD" OnClick="LnkConcepto_Click" runat="server"></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right" Width="13%" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<HeaderStyle CssClass="SearchADHeader" />
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
<ajax:TabPanel ID="TabAguinaldo" runat="server" HeaderText="Aguinaldo">
|
||||
<ContentTemplate>
|
||||
<div class="portlet light xspadding bordered" id="pnlAguinaldo">
|
||||
<div class="portlet-title" style="display: none;">
|
||||
<div class="caption ">
|
||||
<i class="icon-pin font-yellow-gold "></i>
|
||||
<span class="caption-subject bold uppercase font-yellow-gold ">Aguinaldo</span>
|
||||
</div>
|
||||
<div class="tools">
|
||||
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body " style="padding: 0px;">
|
||||
<div class="row">
|
||||
<div class="col-md-3 ">
|
||||
<div class="indicador2 red">
|
||||
<div class="visual">$</div>
|
||||
<div class="value"> <asp:Label ID="LblAguinaldoCompleto" runat="server" Text="$ ##,###.##"></asp:Label>
|
||||
</div>
|
||||
<div class="details">Aguinaldo ejercicio completo </div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="indicador2 red">
|
||||
<div class="visual">$</div>
|
||||
<div class="value"> <asp:Label ID="LblAguinaldo" runat="server" Text="$ ##,###.##"></asp:Label>
|
||||
</div>
|
||||
<div class="details">Aguinaldo </div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="indicador2 red">
|
||||
<div class="visual"><i class="fa fa-money"></i></div>
|
||||
<div class="value"> <asp:Label ID="LblAguinaldoPagado" runat="server" Text="$ ##,###.##"></asp:Label>
|
||||
</div>
|
||||
<div class="details">Aguinaldo Pagado</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="indicador2 bluesky">
|
||||
<div class="visual"><i class="fa fa-money"></i></div>
|
||||
<div class="value"> <asp:Label ID="LblAguinaldoporPagar" runat="server" Text="$ ##,###.##"></asp:Label>
|
||||
</div>
|
||||
<div class="details">Aguinaldo por pagar</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-3 ">
|
||||
<div class="indicador2 green">
|
||||
<div class="visual"><i class="fa fa-cubes"></i></div>
|
||||
<div class="value"> <asp:Label ID="Label1" runat="server" Text="###"></asp:Label>
|
||||
</div>
|
||||
<div class="details">Dias Ejercicio </div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="indicador2 green">
|
||||
<div class="visual"><i class="fa fa-cubes"></i></div>
|
||||
<div class="value"> <asp:Label ID="Label2" runat="server" Text="###"></asp:Label>
|
||||
</div>
|
||||
<div class="details">Dias Laborados </div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="indicador2 green">
|
||||
<div class="visual"><i class="fa fa-cubes"></i></div>
|
||||
<div class="value"> <asp:Label ID="Label3" runat="server" Text="###"></asp:Label>
|
||||
</div>
|
||||
<div class="details">Dias pago Aguinaldo</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
|
||||
<div class="portlet light xspadding bordered" id="pnlFiniquito">
|
||||
<div class="portlet-title">
|
||||
<div class="caption ">
|
||||
<i class="fa fa-bookmark font-yellow-gold"></i>
|
||||
<span class="caption-subject bold uppercase font-yellow-gold">Finiquito (Indemnización)</span>
|
||||
</div>
|
||||
<div class="tools">
|
||||
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
|
||||
<a href="javascript:;" class="fullscreen" data-original-title="" title=""></a>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
<%--<a onclick="$('#C_BtnImprimirsobrerecibo').click()" class="btn btn-default">Imprimir</a>--%>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
<ajax:TabPanel ID="TabVacaciones" runat="server" HeaderText="Vacaciones">
|
||||
<ContentTemplate>
|
||||
<div class="portlet light xspadding bordered" id="pnlVacaciones">
|
||||
<div class="portlet-title" style="display: none;">
|
||||
<div class="caption ">
|
||||
<i class="icon-pin font-yellow-gold "></i>
|
||||
<span class="caption-subject bold uppercase font-yellow-gold ">Vacaciones</span>
|
||||
</div>
|
||||
<div class="tools">
|
||||
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body " style="padding: 0px;">
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtAntiguedad" runat="server" CssClass="form-control"></asp:TextBox>
|
||||
<asp:Label runat="server" Text="Antiguedad" AssociatedControlID="TxtAntiguedad"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtdiasVacaciones" runat="server" CssClass="form-control"></asp:TextBox>
|
||||
<asp:Label runat="server" Text="Días Vacaciones(ejercicio)" AssociatedControlID="TxtdiasVacaciones"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtDiasLaborados" runat="server" CssClass="form-control"></asp:TextBox>
|
||||
<asp:Label runat="server" Text="Días Laborados " AssociatedControlID="TxtDiasLaborados"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtDiasProporcion" runat="server" CssClass="form-control"></asp:TextBox>
|
||||
<asp:Label runat="server" Text="Días Proporcional" AssociatedControlID="TxtDiasProporcion"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtVaciones" runat="server" CssClass="form-control"></asp:TextBox>
|
||||
<asp:Label runat="server" Text="Vacaciones" AssociatedControlID="TxtVaciones"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtDiasPago" runat="server" CssClass="form-control"></asp:TextBox>
|
||||
<asp:Label runat="server" Text="Días Pagados" AssociatedControlID="TxtDiasPago"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtDiasPendientes" runat="server" CssClass="form-control"></asp:TextBox>
|
||||
<asp:Label runat="server" Text="Días pendientes " AssociatedControlID="TxtDiasPendientes"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtVacacionesporPagar" runat="server" CssClass="form-control"></asp:TextBox>
|
||||
<asp:Label runat="server" Text="Vacaciones por pagar" AssociatedControlID="TxtVacacionesporPagar"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtPorcentjePrima" runat="server" CssClass="form-control"></asp:TextBox>
|
||||
<asp:Label runat="server" Text="Porcentaje Prima" AssociatedControlID="TxtPrimaPagada"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtPrimaVacacional" runat="server" CssClass="form-control"></asp:TextBox>
|
||||
<asp:Label runat="server" Text="Prima Vacacional" AssociatedControlID="TxtPrimaPagada"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtPrimaPagada" runat="server" CssClass="form-control"></asp:TextBox>
|
||||
<asp:Label runat="server" Text="Prima Vac. Pagada" AssociatedControlID="TxtPrimaPagada"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtPrimaPorPagar" runat="server" CssClass="form-control"></asp:TextBox>
|
||||
<asp:Label runat="server" Text="Prima vac. por Pagar" AssociatedControlID="TxtPrimaPorPagar"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
</ajax:TabContainer>
|
||||
|
||||
|
||||
<div id="ModalConceptos" class="modal ADS fade " role="dialog">
|
||||
|
||||
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpModalConceptos" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header ">
|
||||
<h4 class="modal-title">LtlTituloConcepto</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlConcepto" runat="server" AppendDataBoundItems="true" CssClass="form-control select2me" DataTextField="NominaEstatus" DataValueField="CvePeriodo">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:Label runat="server" Text="Concepto:" AssociatedControlID="DdlConcepto"></asp:Label>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtImporte" CssClass="form-control" runat="server"></asp:TextBox>
|
||||
<asp:Label runat="server" Text="Importe:" AssociatedControlID="TxtImporte"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:UpdatePanel runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:LinkButton ID="LnkAceptarConceptos" runat="server" CssClass="btn btn-primary" ValidationGroup="GrpSeleccionar" OnClick="LnkAceptarConceptos_Click"> Aceptar</asp:LinkButton>
|
||||
<asp:Literal ID="Literal1" Visible="false" runat="server"> <button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button></asp:Literal>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body ">
|
||||
<asp:GridView ID="GVFinIndemnizacion" runat="server" AutoGenerateColumns="False" CssClass="table table-striped table-hover Widthall GvConceptos"
|
||||
Style="text-align: center;" GridLines="None" OnRowDataBound="GvConceptos_RowDataBound" ShowHeaderWhenEmpty="true"
|
||||
DataKeyNames="ConceptoP,CveConceptoP,ImporteP,ValorP,EstatusP,ConceptoD,CveConceptoD,ImporteD,isOnlyBisibleP,isOnlyBisibleD,EstatusD,ValorD,isEditedD,isEditedP">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Concepto">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtlConcepto" runat="server" Text='<%# Eval("ConceptoP") %>' Style="word-break: break-all;"></asp:Label>
|
||||
<asp:LinkButton ID="LnkConcepto" OnClick="LnkConcepto_Click" runat="server" Text='<%# Eval("ConceptoP") %>'></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" Width="37%" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Valor">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtlValorP" runat="server" Text='<%# Eval("ValorP", "{0:##,###.##}") %>' Style="word-break: break-all;"></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right" Width="13%" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Importe">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtlImporte" runat="server" Text='<%# Eval("ImporteP", "${0:N}") %>' Style="word-break: break-all;"></asp:Label>
|
||||
<asp:LinkButton ID="LnkImporte" OnClick="LnkConcepto_Click" runat="server"></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right" Width="13%" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Concepto">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtlConceptoD" runat="server" Text='<%# Eval("ConceptoD") %>' Style="word-break: break-all;"></asp:Label>
|
||||
<asp:LinkButton ID="LnkConceptoD" OnClick="LnkConcepto_Click" runat="server" Text='<%# Eval("ConceptoD") %>'></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" Width="37%" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Valor">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtlValorD" runat="server" Text='<%# Eval("ValorD", "{0:##,###.##}") %>' Style="word-break: break-all;"></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right" Width="13%" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Importe">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtlImporteD" runat="server" Text='<%# Eval("ImporteD", "${0:N}") %>' Style="word-break: break-all;"></asp:Label>
|
||||
<asp:LinkButton ID="LnkImporteD" OnClick="LnkConcepto_Click" runat="server"></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right" Width="13%" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<HeaderStyle CssClass="SearchADHeader" />
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="ModalEmpleados" class="modal ADS fade " role="dialog" data-backdrop="static" data-keyboard="false">
|
||||
<div id="ModalEmpleados" class="modal ADS fade " role="dialog" data-backdrop="static" data-keyboard="false">
|
||||
|
||||
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpModalEmpleados" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header ">
|
||||
<h4 class="modal-title">Seleccione un Empleado</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlPersonal" DataTextField="Nombre" DataValueField="CvePersonal" runat="server" Width="100%" AppendDataBoundItems="true" CssClass="form-control select2me" AutoPostBack="true" OnSelectedIndexChanged="DdlPersonal_SelectedIndexChanged">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:Label runat="server" Text="Empleado: " AssociatedControlID="DdlPersonal"></asp:Label>
|
||||
</div>
|
||||
<asp:Panel ID="pnlupValoresFiniquito" runat="server" Visible="false">
|
||||
<h4>Debe llenar los siguientes valores para continuar</h4>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlMotivoBaja" runat="server" AppendDataBoundItems="True" DataTextField="MotivoBaja" DataValueField="CveMotivoBaja" Width="100%"
|
||||
CssClass="form-control select2me" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Selected="True" Text="Sin asignar Motivo de Baja" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:Label runat="server" Text="Motivo de Baja: " AssociatedControlID="DdlMotivoBaja"></asp:Label>
|
||||
</div>
|
||||
<div class="">
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6" style="padding-right: 0px">
|
||||
<div class="form-group form-md-line-input input-iconright" style="width: 120px; display: inline-block">
|
||||
<asp:TextBox ID="TxtFechaBaja" runat="server" CausesValidation="True" CssClass="form-control"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RfvTxtFechaBaja" runat="server" ControlToValidate="TxtFechaBaja" CssClass="help-block errorimput"
|
||||
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha de Baja''</b> es necesario "
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<asp:Label runat="server" Text="Fecha de Baja: " AssociatedControlID="TxtFechaBaja"></asp:Label>
|
||||
<ajax:MaskedEditExtender ID="MKEFechaBaja" runat="server" TargetControlID="TxtFechaBaja" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left" BehaviorID="_content_MKEFechaBaja" Century="2000" CultureAMPMPlaceholder="" CultureCurrencySymbolPlaceholder="" CultureDateFormat="" CultureDatePlaceholder="" CultureDecimalPlaceholder="" CultureThousandsPlaceholder="" CultureTimePlaceholder=""></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="CEFechaBaja" runat="server" TargetControlID="TxtFechaBaja" PopupButtonID="ImgFechaBaja" PopupPosition="BottomRight" BehaviorID="_content_CEFechaBaja"></ajax:CalendarExtender>
|
||||
<asp:CompareValidator ID="CVFechaBaja" runat="server" ControlToValidate="TxtFechaBaja" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha de Baja''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar" Visible="False"></asp:CompareValidator>
|
||||
|
||||
</div>
|
||||
<span class="input-group-btn " style="display: inline-block">
|
||||
<asp:LinkButton ID="ImgFechaBaja" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<div class="col-md-6" style="padding-left: 0px">
|
||||
¿es Liquidación?
|
||||
<asp:CheckBox ID="ChkesLiquidacion" CssClass="chksino" Text=" " runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlTipoPeriodo" runat="server" AppendDataBoundItems="true" Width="100%" CssClass="form-control select2me" AutoPostBack="true" DataTextField="TipoPeriodo" DataValueField="CveTipoPeriodo" OnSelectedIndexChanged="DdlTipoPeriodo_SelectedIndexChanged">
|
||||
<asp:ListItem Selected="True" Text="Ordinario" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Extraordinario" Value="6"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:Label runat="server" Text="Tipo Período: " AssociatedControlID="DdlTipoPeriodo"></asp:Label>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlPeriodo" runat="server" AppendDataBoundItems="true" Width="100%" CssClass="form-control select2me" DataTextField="NominaEstatus" DataValueField="CvePeriodo">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:Label runat="server" Text="Período:" AssociatedControlID="DdlPeriodo"></asp:Label>
|
||||
</div>
|
||||
|
||||
|
||||
</asp:Panel>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:UpdatePanel runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:LinkButton ID="LnkCampiarEmpleado" runat="server" CssClass="btn btn-primary" ValidationGroup="GrpSeleccionar" OnClick="LnkCampiarEmpleado_Click"> Aceptar</asp:LinkButton>
|
||||
<asp:Literal ID="LtlEmpleadoCancelar" Visible="false" runat="server"> <button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button></asp:Literal>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpModalEmpleados" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header ">
|
||||
<h4 class="modal-title">Seleccione un empleado</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlPersonal" DataTextField="Nombre" DataValueField="CvePersonal" runat="server" Width="100%" AppendDataBoundItems="true" CssClass="form-control select2me">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:Label runat="server" Text="Empleado: " AssociatedControlID="DdlPersonal"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<div class="modal-footer">
|
||||
<asp:UpdatePanel runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:LinkButton ID="LnkCampiarEmpleado" runat="server" CssClass="btn btn-primary" ValidationGroup="GrpSeleccionarEmpleado" OnClick="LnkCampiarEmpleado_Click"> Aceptar</asp:LinkButton>
|
||||
<asp:Literal ID="LtlEmpleadoCancelar" Visible="false" runat="server"> <button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button></asp:Literal>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||
<%--"<tr class=\"thTituloConcepto\"> <th scope=\"col\" colspan=\"2\">Percepciones</th><th scope=\"col\" colspan=\"2\">Deducciones</th> </tr>"--%>
|
||||
<script>
|
||||
function insertParam(key, value) {
|
||||
key = encodeURIComponent(key); value = encodeURIComponent(value);
|
||||
|
||||
var s = document.location.search;
|
||||
var kvp = key + "=" + value;
|
||||
|
||||
var r = new RegExp("(&|\\?)" + key + "=[^\&]*");
|
||||
|
||||
s = s.replace(r, "$1" + kvp);
|
||||
|
||||
if (!RegExp.$1) { s += (s.length > 0 ? '&' : '?') + kvp; };
|
||||
|
||||
//again, do what you will here
|
||||
document.location.search = s;
|
||||
}
|
||||
|
||||
function ADSBegin() {
|
||||
if ($('.thTituloConcepto').length == 0) {
|
||||
$('.GvConceptos').prepend("<tr class=\"thTituloConcepto\"> <th scope=\"col\" colspan=\"2\">Percepciones</th><th scope=\"col\" colspan=\"2\">Deducciones</th> </tr>");
|
||||
if ($('.GvConceptos .thTituloConcepto').length == 0) {
|
||||
$('.GvConceptos').prepend("<tr class=\"thTituloConcepto\"> <th scope=\"col\" colspan=\"3\">Percepciones</th><th scope=\"col\" colspan=\"3\">Deducciones</th> </tr>");
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
</asp:Content>
|
||||
|
||||
|
||||
@@ -1,213 +1,69 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Microsoft.VisualBasic;
|
||||
using System.Data;
|
||||
using Extensiones;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using Extensiones;
|
||||
|
||||
partial class Nomina_Finiquito : ClsPaginas
|
||||
public partial class Nomina_Finiquito : ClsPaginas
|
||||
{
|
||||
private class NConcepto
|
||||
{
|
||||
//Concepto,CveConcepto,Importe,Estatus,ConceptoD,CveConceptoD,ImporteD,EstatusD
|
||||
|
||||
|
||||
|
||||
public string NoConceptoP { get; set; }
|
||||
public string ConceptoP { get; set; }
|
||||
public string LabelValorP { get; set; }
|
||||
public int CveConceptoP { get; set; }
|
||||
public double ImporteP { get; set; }
|
||||
public double ValorP { get; set; }
|
||||
public int EstatusP { get; set; }
|
||||
public bool isEditedP { get; set; }
|
||||
|
||||
|
||||
public string NoConceptoD { get; set; }
|
||||
public string ConceptoD { get; set; }
|
||||
public string LabelValorD { get; set; }
|
||||
public int CveConceptoD { get; set; }
|
||||
public double ImporteD { get; set; }
|
||||
public double ValorD { get; set; }
|
||||
public int EstatusD { get; set; }
|
||||
public bool isEditedD { get; set; }
|
||||
}
|
||||
|
||||
private class ConceptosPersonal
|
||||
{
|
||||
public ConceptosPersonal()
|
||||
{
|
||||
Concepto = "";
|
||||
ConceptoD = "";
|
||||
CveConcepto = 0;
|
||||
CveConceptoD = 0;
|
||||
Estatus = 0;
|
||||
Estatus = 0;
|
||||
}
|
||||
public string Concepto { get; set; }
|
||||
public int CveConcepto { get; set; }
|
||||
public decimal Importe { get; set; }
|
||||
public int Estatus { get; set; }
|
||||
|
||||
public string ConceptoD { get; set; }
|
||||
public int CveConceptoD { get; set; }
|
||||
public decimal ImporteD { get; set; }
|
||||
public int EstatusD { get; set; }
|
||||
}
|
||||
#region Propiedades
|
||||
private int CvePersonal
|
||||
{
|
||||
get { return ViewState["CvePersonal"] != null ? ViewState["CvePersonal"].ToString().ToEntero() : 0; }
|
||||
set { ViewState["CvePersonal"] = value; }
|
||||
//set { ViewState["CvePersonal"] = value; }
|
||||
}
|
||||
private int CveTipoPeriodo
|
||||
|
||||
|
||||
private int CvePersonalAltas
|
||||
{
|
||||
get { return ViewState["CveTipoPeriodo"] != null ? ViewState["CveTipoPeriodo"].ToString().ToEntero() : 0; }
|
||||
set
|
||||
{
|
||||
ViewState["CveTipoPeriodo"] = value;
|
||||
}
|
||||
get { return ViewState["CvePersonalAltas"] != null ? ViewState["CvePersonalAltas"].ToString().ToEntero() : 0; }
|
||||
set { ViewState["CvePersonalAltas"] = value; }
|
||||
}
|
||||
private int CvePeriodoIndemnizacion
|
||||
{
|
||||
get { return ViewState["CvePeriodoIndemnizacion"] != null ? ViewState["CvePeriodoIndemnizacion"].ToString().ToEntero() : 0; }
|
||||
set { ViewState["CvePeriodoIndemnizacion"] = value; }
|
||||
}
|
||||
private int CvePeriodoFiniquito
|
||||
{
|
||||
get { return ViewState["CvePeriodoFiniquito"] != null ? ViewState["CvePeriodoFiniquito"].ToString().ToEntero() : 0; }
|
||||
set { ViewState["CvePeriodoFiniquito"] = value; }
|
||||
}
|
||||
|
||||
private int GCEstatus
|
||||
private DateTime FechaInicio
|
||||
{
|
||||
get { return ViewState["GCEstatus"] != null ? ViewState["GCEstatus"].ToString().ToEntero() : 0; }
|
||||
set { ViewState["GCEstatus"] = value; }
|
||||
get { return ViewState["FechaInicio"] != null ? (DateTime)ViewState["FechaInicio"] : DateTime.Now; }
|
||||
set { ViewState["FechaInicio"] = value; }
|
||||
}
|
||||
private int GCCveConcepto
|
||||
private DataTable DtAltas
|
||||
{
|
||||
get { return ViewState["GCCveConcepto"] != null ? ViewState["GCCveConcepto"].ToString().ToEntero() : 0; }
|
||||
set { ViewState["GCCveConcepto"] = value; }
|
||||
get { return ViewState["DtAltas"] != null ? (DataTable)ViewState["DtAltas"] : null; }
|
||||
set { ViewState["DtAltas"] = value; }
|
||||
}
|
||||
private decimal GCImporte
|
||||
{
|
||||
get { return ViewState["GCImporte"] != null ? ViewState["GCImporte"].ToString().ToDecimal() : 0; }
|
||||
set { ViewState["GCImporte"] = value; }
|
||||
}
|
||||
|
||||
|
||||
private DataTable DTConceptosPersonal
|
||||
{
|
||||
get { return ViewState["DTConceptosPersonal"] != null ? (DataTable)ViewState["DTConceptosPersonal"] : null; }
|
||||
set { ViewState["DTConceptosPersonal"] = value; }
|
||||
}
|
||||
private DataTable DTConceptos
|
||||
{
|
||||
get { return ViewState["DTConceptos"] != null ? (DataTable)ViewState["DTConceptos"] : null; }
|
||||
set { ViewState["DTConceptos"] = value; }
|
||||
}
|
||||
private bool esLiquidacion
|
||||
{
|
||||
get { return ViewState["esLiquidacion"] != null ? System.Convert.ToBoolean(ViewState["esLiquidacion"]) : false; }
|
||||
set { ViewState["esLiquidacion"] = value; }
|
||||
}
|
||||
#endregion
|
||||
|
||||
private List<ConceptosPersonal> ConceptsPersonas
|
||||
{
|
||||
get
|
||||
{
|
||||
List<ConceptosPersonal> listaconceptos = new List<ConceptosPersonal>();
|
||||
decimal TotalP = 0;
|
||||
decimal TotalD = 0;
|
||||
if ((!Information.IsNothing(DTConceptosPersonal) && DTConceptosPersonal.Rows.Count > 0))
|
||||
{
|
||||
DataTable dtP = DTConceptosPersonal.FiltraParametros("Tipo=1");
|
||||
DataTable dtD = DTConceptosPersonal.FiltraParametros("Tipo=2");
|
||||
var noP = dtP.Rows.Count;
|
||||
var noD = dtD.Rows.Count;
|
||||
var max = noP > noD ? noP : noD;
|
||||
TotalP = dtP.SUM("Importe").ToString().ToDecimal();
|
||||
TotalD = dtD.SUM("Importe").ToString().ToDecimal();
|
||||
for (int index = 0; index <= max; index++)
|
||||
{
|
||||
ConceptosPersonal obj = new ConceptosPersonal();
|
||||
if (index < noP)
|
||||
{
|
||||
obj.Importe = dtP.Rows[index]["Importe"].ToString().ToDecimal();
|
||||
obj.CveConcepto = dtP.Rows[index]["CveConcepto"].ToString().ToEntero();
|
||||
obj.Concepto = dtP.Rows[index]["Concepto"].ToString();
|
||||
obj.Estatus = dtP.Rows[index]["Estatus"].ToString().ToEntero();
|
||||
}
|
||||
else if (index == noP)
|
||||
{
|
||||
obj.Estatus = -1;
|
||||
obj.Concepto = "Agregar";
|
||||
}
|
||||
if (index < noD)
|
||||
{
|
||||
obj.ImporteD = dtD.Rows[index]["Importe"].ToString().ToDecimal();
|
||||
obj.CveConceptoD = dtD.Rows[index]["CveConcepto"].ToString().ToEntero();
|
||||
obj.ConceptoD = dtD.Rows[index]["Concepto"].ToString();
|
||||
obj.EstatusD = dtD.Rows[index]["Estatus"].ToString().ToEntero();
|
||||
}
|
||||
else if (index == noD)
|
||||
{
|
||||
obj.EstatusD = -1;
|
||||
obj.ConceptoD = "Agregar";
|
||||
}
|
||||
listaconceptos.Add(obj);
|
||||
}
|
||||
}
|
||||
listaconceptos.Add(new ConceptosPersonal());
|
||||
|
||||
|
||||
ConceptosPersonal objST = new ConceptosPersonal();
|
||||
objST.Importe = TotalP;
|
||||
objST.CveConcepto = 0;
|
||||
objST.Concepto = "Total Percepciones";
|
||||
objST.Estatus = -2;
|
||||
objST.ImporteD = TotalD;
|
||||
objST.CveConceptoD = 0;
|
||||
objST.ConceptoD = "Total Deducciones";
|
||||
objST.EstatusD = -2;
|
||||
|
||||
listaconceptos.Add(objST);
|
||||
|
||||
ConceptosPersonal objT = new ConceptosPersonal();
|
||||
|
||||
objT.CveConcepto = 0;
|
||||
objT.Concepto = "";
|
||||
objT.Estatus = -3;
|
||||
objT.ImporteD = objST.Importe + objST.ImporteD;
|
||||
objT.CveConceptoD = 0;
|
||||
objT.ConceptoD = "Total";
|
||||
objT.EstatusD = -3;
|
||||
listaconceptos.Add(objT);
|
||||
return listaconceptos;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
CargaDdlPersonal();
|
||||
CargaMotivoBaja();
|
||||
CvePeriodoFiniquito = 0;
|
||||
GvFinOrdinario.DataSource = new DataTable();
|
||||
GVFinIndemnizacion.DataSource = new DataTable();
|
||||
GvFinOrdinario.DataBind();
|
||||
GVFinIndemnizacion.DataBind();
|
||||
if (Request["CvePersonal"] != null && Request["CvePersonal"].ToString().ToEntero() > 0)
|
||||
{
|
||||
CvePersonal = Request["CvePersonal"].ToString().ToEntero();
|
||||
ViewState["CvePersonal"] = Request["CvePersonal"].ToString().ToEntero();
|
||||
CargaPersonal();
|
||||
CargaMotivoBaja();
|
||||
}
|
||||
else
|
||||
{
|
||||
CvePersonal = -1;
|
||||
CargaDdlPersonal();
|
||||
ViewState["CvePersonal"] = -1;
|
||||
LtlEmpleadoCancelar.Visible = false;
|
||||
RegistraScript("$('#ModalEmpleados').modal();");
|
||||
}
|
||||
if (!CargaDatosFiniquito())
|
||||
{
|
||||
}
|
||||
RegistraScript("$('#ModalEmpleados').modal();");
|
||||
}
|
||||
|
||||
if (CvePersonal > 0 & CvePeriodoFiniquito > 0)
|
||||
{
|
||||
LtlEmpleadoCancelar.Visible = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -218,222 +74,148 @@ partial class Nomina_Finiquito : ClsPaginas
|
||||
}
|
||||
private void CargaDdlPersonal()
|
||||
{
|
||||
ClsRH ObjPersonal = new ClsRH();
|
||||
if (ObjPersonal.GetPersonal(-1, UsuarioActual.CveEmpresa))
|
||||
using (ClsRH ObjPersonal = new ClsRH())
|
||||
{
|
||||
DdlPersonal.DataSource = ObjPersonal.DtResultados;
|
||||
DdlPersonal.DataBind();
|
||||
}
|
||||
ObjPersonal.Dispose();
|
||||
}
|
||||
|
||||
private bool CargaDatosFiniquito()
|
||||
{
|
||||
bool retorno = true;
|
||||
if (CvePersonal > 0)
|
||||
{
|
||||
DdlPersonal.SelectedValueExist(CvePersonal.ToString());
|
||||
string Nombre = "";
|
||||
string FechaBaja = "";
|
||||
string EstatusPersonal = "";
|
||||
CvePeriodoFiniquito = 0;
|
||||
CveTipoPeriodo = 0;
|
||||
esLiquidacion = false;
|
||||
pnlupValoresFiniquito.Visible = false;
|
||||
DdlMotivoBaja.SelectedValue = "-1";
|
||||
using (ClsRH ObjPersonal = new ClsRH())
|
||||
if (ObjPersonal.GetPersonal(-1, UsuarioActual.CveEmpresa))
|
||||
{
|
||||
if (ObjPersonal.GetPersonal(CvePersonal, UsuarioActual.CveEmpresa) && ObjPersonal.DtResultados.Rows.Count > 0)
|
||||
{
|
||||
DataRow prow = ObjPersonal.DtResultados.Rows[0];
|
||||
Nombre = prow["Nombre"].ToString();
|
||||
FechaBaja = string.Format("{0:dd/MM/yyyy}", ObjPersonal.FechaBaja);
|
||||
EstatusPersonal = string.Format("{0}", prow["EstatusPersonal"]);
|
||||
CveTipoPeriodo = prow["CveTipoPeriodo"].ToString().ToEntero();
|
||||
}
|
||||
DdlPersonal.DataSource = ObjPersonal.DtResultados;
|
||||
DdlPersonal.DataBind();
|
||||
}
|
||||
}
|
||||
}
|
||||
private void CargaPersonal()
|
||||
{
|
||||
using (ClsRH ObjPersonal = new ClsRH())
|
||||
{
|
||||
if (ObjPersonal.GetPersonal(CvePersonal, UsuarioActual.CveEmpresa) && ObjPersonal.DtResultados.Rows.Count > 0)
|
||||
{
|
||||
DataRow drow = ObjPersonal.DtResultados.Rows[0];
|
||||
HypCodigo.Text = drow["Codigo"].ToString();
|
||||
HypEmpleado.Text = drow["NombreCompleto"].ToString();
|
||||
LblPuesto.Text = drow["Puesto"].ToString();
|
||||
LblSalario.Text = drow["SalarioDiario"].ToString();
|
||||
if (ObjPersonal.GetPersonalAltas(CvePersonal) && ObjPersonal.DtResultados.Rows.Count > 0)
|
||||
{
|
||||
DataRow prow = ObjPersonal.DtResultados.Rows[0];
|
||||
CvePeriodoFiniquito = prow["CvePeriodoFiniquito"].ToString().ToEntero();
|
||||
FechaBaja = string.Format("{0:dd/MM/yyyy}", prow["FechaFin"]);
|
||||
DdlMotivoBaja.SelectedValueExist(prow["CveMotivoBaja"].ToString().ToEntero());
|
||||
var stringesliquidacion = prow["esLiquidacion"].ToString();
|
||||
esLiquidacion = (stringesliquidacion == "True" || stringesliquidacion == "1");
|
||||
ChkesLiquidacion.Checked = esLiquidacion;
|
||||
}
|
||||
}
|
||||
if (DdlMotivoBaja.SelectedValue.ToEntero() > 0)
|
||||
LblMotivoBaja.Text = DdlMotivoBaja.SelectedItem.Text;
|
||||
else
|
||||
LblMotivoBaja.Text = "";
|
||||
HypEmpleado.Text = Nombre;
|
||||
HypEmpleado.NavigateUrl = string.Format("/RH/Personal.aspx?CvePersonal={0}", CvePersonal);
|
||||
LblFechaBaja.Text = FechaBaja;
|
||||
LblEstatus.Text = EstatusPersonal;
|
||||
TxtFechaBaja.Text = FechaBaja;
|
||||
DdlTipoPeriodo_SelectedIndexChanged(null, null);
|
||||
LblPerido.Text = DdlPeriodo.SelectedItem.Text;
|
||||
if (CvePeriodoFiniquito <= 0)
|
||||
retorno = false;
|
||||
pnlupValoresFiniquito.Visible = true;
|
||||
using (ClsNominas ObjNom = new ClsNominas())
|
||||
{
|
||||
if (ObjNom.GetFiniquitosPersonal(CvePersonal, UsuarioActual.CveEmpresa))
|
||||
{
|
||||
DataRow finrow = ObjNom.DtResultados.Rows[0];
|
||||
TxtAntiguedad.Text = $"{finrow["Antiguedad"]}";
|
||||
TxtdiasVacaciones.Text = $"{finrow["Diasvacaciones"]}";
|
||||
TxtDiasLaborados.Text = $"{finrow["diaslaborados"]}";
|
||||
TxtDiasProporcion.Text = $"{finrow["diasProporcion"]}";
|
||||
|
||||
TxtVaciones.Text = $"{finrow["Vacaciones"]}";
|
||||
TxtDiasPago.Text = $"{finrow["Diasvacaciones"]}";
|
||||
TxtDiasPendientes.Text = $"{finrow["diasporpagar"]}";
|
||||
TxtVacacionesporPagar.Text = $"{finrow["VacacionesporPagar"]}";
|
||||
|
||||
TxtPorcentjePrima.Text = $"{finrow["PrimaPorcentaje"]}";
|
||||
TxtPrimaVacacional.Text = $"{finrow["PrimaVacacional"]}";
|
||||
TxtPrimaPagada.Text = $"{finrow["PrimaPagada"]}";
|
||||
TxtPrimaPorPagar.Text = $"{finrow["PrimaVacacionalPorPagar"]}";
|
||||
}
|
||||
if (ObjNom.DTSetResultados.Tables.Count > 5)
|
||||
{
|
||||
DataTable dtconceptos = ObjNom.DTSetResultados.Tables[1];
|
||||
DataTable dtconpersonal = ObjNom.DTSetResultados.Tables[5];
|
||||
|
||||
int maxFila = dtconpersonal.MAX("Fila", "Tipo<3").ToEntero();
|
||||
List<NConcepto> lfin = new List<NConcepto>();
|
||||
|
||||
if (maxFila > 0)
|
||||
DtAltas = ObjPersonal.DtResultados.FiltraParametros("", "FechaInicio");
|
||||
DataRow da = ObjPersonal.DtResultados.Rows[0];
|
||||
CvePersonalAltas = da["CvePersonalAltas"].ToString().ToEntero();
|
||||
LblFechaAlta.Text = string.Format("{0:dd/MM/yyyy}", da["FechaInicio"]);
|
||||
FechaInicio = LblFechaAlta.Text.ToDateTime();
|
||||
TxtFechaBaja.Text = string.Format("{0:dd/MM/yyyy}", da["FechaFin"]);
|
||||
DdlMotivoBaja.SelectedValueExist(da["CveMotivoBaja"]);
|
||||
ChkesLiquidacion.Checked = (da["esLiquidacion"].ToString() == "1" || da["esLiquidacion"].ToString().ToUpper() == "TRUE");
|
||||
CvePeriodoIndemnizacion = da["CvePeriodoIndemnizacion"].ToString().ToEntero();
|
||||
CvePeriodoFiniquito = da["CvePeriodoFiniquito"].ToString().ToEntero();
|
||||
if (CvePeriodoIndemnizacion > 0)
|
||||
{
|
||||
DataRow conPerrow;
|
||||
DataRow conrow;
|
||||
NConcepto sr;
|
||||
|
||||
for (int i = 1; i <= maxFila; i++)
|
||||
{
|
||||
sr = new NConcepto();
|
||||
conPerrow = dtconpersonal.FiltroPrimero(string.Format("Tipo=1 AND Fila ={0}", i));
|
||||
if (conPerrow != null)
|
||||
{
|
||||
sr.CveConceptoP = conPerrow["CveConcepto"].ToString().ToEntero();
|
||||
conrow = dtconceptos.FiltroPrimero(string.Format("CveConcepto ={0}", sr.CveConceptoP));
|
||||
sr.ConceptoP = conrow["Concepto"].ToString();
|
||||
sr.ValorP = conPerrow["Valor"].ToString().ToDouble();
|
||||
sr.ImporteP = conPerrow["Importe"].ToString().ToDouble();
|
||||
sr.NoConceptoP = conrow["Codigo"].ToString();
|
||||
}
|
||||
|
||||
|
||||
conPerrow = dtconpersonal.FiltroPrimero(string.Format("Tipo=2 AND Fila ={0}", i));
|
||||
if (conPerrow != null)
|
||||
{
|
||||
sr.CveConceptoD = conPerrow["CveConcepto"].ToString().ToEntero();
|
||||
conrow = dtconceptos.FiltroPrimero(string.Format("CveConcepto ={0}", sr.CveConceptoD));
|
||||
sr.ConceptoD = conrow["Concepto"].ToString();
|
||||
sr.ValorD= conPerrow["Valor"].ToString().ToDouble();
|
||||
sr.ImporteD = conPerrow["Importe"].ToString().ToDouble();
|
||||
sr.NoConceptoD = conrow["Codigo"].ToString();
|
||||
}
|
||||
|
||||
|
||||
|
||||
lfin.Add(sr);
|
||||
}
|
||||
loadsobrerecibo();
|
||||
}
|
||||
GvConceptos.DataSource = lfin;
|
||||
GvConceptos.DataBind();
|
||||
}
|
||||
CamposCalculados();
|
||||
}
|
||||
//GvConceptos.DataSource = ConceptsPersonas;
|
||||
//GvConceptos.DataBind();
|
||||
}
|
||||
else
|
||||
retorno = false;
|
||||
return retorno;
|
||||
}
|
||||
|
||||
|
||||
protected void LnkCampiarEmpleado_Click(object sender, EventArgs e)
|
||||
{
|
||||
CvePersonal = DdlPersonal.SelectedValue.ToEntero();
|
||||
|
||||
|
||||
using (ClsRH ObjPersonal = new ClsRH())
|
||||
{
|
||||
if (ObjPersonal.UpPersonalAltas(CvePersonal, "", TxtFechaBaja.Text.ToDateTime().ToString("yyyy/MM/dd"), DdlPeriodo.SelectedValue.ToEntero(), DdlMotivoBaja.SelectedValue.ToEntero(), ChkesLiquidacion.Checked) && ObjPersonal.DtResultados.Rows.Count > 0)
|
||||
{
|
||||
}
|
||||
}
|
||||
if (pnlupValoresFiniquito.Visible)
|
||||
{
|
||||
}
|
||||
if (!CargaDatosFiniquito())
|
||||
RegistraScript("$('#ModalEmpleados').modal('hide');");
|
||||
upDatos.Update();
|
||||
}
|
||||
protected void LnkCalcular_Click(object sender, EventArgs e)
|
||||
{
|
||||
}
|
||||
protected void LnkAutorizar_Click(object sender, EventArgs e)
|
||||
{
|
||||
}
|
||||
protected void LnkTimbrar_Click(object sender, EventArgs e)
|
||||
{
|
||||
}
|
||||
protected void LnkFormatoRenuncia_Click(object sender, EventArgs e)
|
||||
{
|
||||
}
|
||||
protected void DdlPersonal_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
Response.Redirect($"/Nomina/Finiquito.aspx?CvePersonal={DdlPersonal.SelectedValue}");
|
||||
}
|
||||
protected void DdlTipoPeriodo_SelectedIndexChanged(object sender, EventArgs e)
|
||||
|
||||
private void CamposCalculados()
|
||||
{
|
||||
int CveTipoPeriodoactual = DdlTipoPeriodo.SelectedValue.ToEntero() > 0 ? DdlTipoPeriodo.SelectedValue.ToEntero() : CveTipoPeriodo;
|
||||
string fechabaja = TxtFechaBaja.Text;
|
||||
DataTable dtperiodos = new DataTable();
|
||||
ClsNominas ObjPeriodos = new ClsNominas();
|
||||
if (ObjPeriodos.GetPeriodos(-1, UsuarioActual.CveEmpresa, -1, -1, -1))
|
||||
TxtSalarioMinimo.Text = "123.22";
|
||||
if (TxtFechaBaja.Text.Length > 9)
|
||||
{
|
||||
dtperiodos = ObjPeriodos.DtResultados;
|
||||
if (Information.IsNothing(sender) && CvePeriodoFiniquito > 0)
|
||||
{
|
||||
DataRow row = dtperiodos.FiltroPrimero(string.Format("CvePeriodo={0} ", CvePeriodoFiniquito));
|
||||
if (!Information.IsNothing(row))
|
||||
{
|
||||
CveTipoPeriodoactual = row["CveTipoPeriodo"].ToString().ToEntero();
|
||||
DdlTipoPeriodo.SelectedValueExist(CveTipoPeriodoactual == 6 ? "6" : "-1");
|
||||
}
|
||||
}
|
||||
dtperiodos = ObjPeriodos.DtResultados.FiltraParametros(string.Format("(Estatus IN (1,2,3,4) AND CveTipoPeriodo={0}) ", CveTipoPeriodoactual));
|
||||
// FechaInicio, P.FechaFin
|
||||
DdlPeriodo.Items.Clear();
|
||||
DdlPeriodo.Items.Add(new ListItem("Seleccione", "-1"));
|
||||
DdlPeriodo.SelectedValue = "-1";
|
||||
DdlPeriodo.DataSource = dtperiodos;
|
||||
DateTime fechafin = TxtFechaBaja.Text.ToDateTime();
|
||||
decimal antiguedad = getyearsresult(fechafin, FechaInicio);
|
||||
TxtAntiguedad.Text = string.Format("{0}", antiguedad);
|
||||
TxtDiasTransAnio.Text = string.Format("{0}", fechafin.DayOfYear);
|
||||
}
|
||||
else
|
||||
DdlPeriodo.DataSource = null;
|
||||
ObjPeriodos.Dispose();
|
||||
DdlPeriodo.DataBind();
|
||||
if (fechabaja.Length > 0 && dtperiodos.Rows.Count > 0)
|
||||
{
|
||||
if ((CvePeriodoFiniquito > 0) && Information.IsNothing(sender))
|
||||
DdlPeriodo.SelectedValueExist(CvePeriodoFiniquito);
|
||||
else
|
||||
{
|
||||
DataRow row = dtperiodos.FiltroPrimero(string.Format("(FechaInicio<='{0:yyyy/MM/dd}' AND FechaFin>='{0:yyyy/MM/dd}') ", fechabaja.ToDate()));
|
||||
if (!Information.IsNothing(row))
|
||||
DdlPeriodo.SelectedValueExist(row["CvePeriodo"]);
|
||||
}
|
||||
|
||||
TxtAntiguedad.Text = "--";
|
||||
TxtDiasTransAnio.Text = "--";
|
||||
}
|
||||
}
|
||||
|
||||
private decimal getyearsresult(DateTime fechafin, DateTime fechainicio)
|
||||
{
|
||||
decimal retorno = 0;
|
||||
DateTime zeroTime = new DateTime(1, 1, 1);
|
||||
TimeSpan span;
|
||||
if (fechainicio < fechafin)
|
||||
{
|
||||
span = fechafin - fechainicio;
|
||||
decimal years = (zeroTime + span).Year - 1;
|
||||
retorno = Math.Round(years + (span.TotalDays.ToString().ToDecimal() / 365), 4);
|
||||
}
|
||||
return retorno;
|
||||
}
|
||||
protected void LnkConcepto_Click(object sender, EventArgs e)
|
||||
{
|
||||
//SRCveConcepto = ((LinkButton)sender).CommandArgument.ToEntero();
|
||||
//SRTipoConcepto = ((LinkButton)sender).CommandArgument;
|
||||
//#region carga conceptos
|
||||
//DataTable dtCon;
|
||||
//if (SRCveConcepto > 0)
|
||||
//{
|
||||
// DataRow drow = dtConceptos.FiltroPrimero(string.Format("CveConcepto={0}", SRCveConcepto));
|
||||
// if (drow != null)
|
||||
// {
|
||||
// SRTipoConcepto = drow["Tipo"].ToString();
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// SRCveConcepto = 0;
|
||||
// SRTipoConcepto = "D";
|
||||
// }
|
||||
//}
|
||||
|
||||
|
||||
//if (SRTipoConcepto == "P")
|
||||
//{
|
||||
// dtCon = dtConceptos.FiltraParametros("Tipo ='P' AND EsPadre = 1 ").Copy();
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// dtCon = dtConceptos.FiltraParametros("Tipo ='D' AND EsPadre = 1 ").Copy();
|
||||
// SRTipoConcepto = "D";
|
||||
//}
|
||||
//dtCon.Columns.Add(new DataColumn("CodigoConcepto"));
|
||||
//foreach (DataRow trow in dtCon.Rows)
|
||||
//{
|
||||
// trow["CodigoConcepto"] = string.Format("{0} - {1}", trow["Codigo"], trow["Concepto"]);
|
||||
//}
|
||||
//dtCon.AcceptChanges();
|
||||
//DataRow row = dtCon.NewRow();
|
||||
//row["CveConcepto"] = "-1";
|
||||
//row["CodigoConcepto"] = "Seleccione";
|
||||
//dtCon.Rows.InsertAt(row, 0);
|
||||
//#endregion
|
||||
//DdlmcConceptos.DataSource = dtCon;
|
||||
//DdlmcConceptos.DataBind();
|
||||
//if (SRCveConcepto > 0)
|
||||
//{
|
||||
// DdlmcConceptos.SelectedValueExist(SRCveConcepto);
|
||||
//}
|
||||
|
||||
//DdlmcConceptos_SelectedIndexChanged(DdlmcConceptos, null);
|
||||
//RegistraScript(string.Format("$('#ModalUpConcepto').on('shown.bs.modal', function () {{$('#{0}').trigger('focus')}});$('#ModalUpConcepto').modal();", TxtmcImporte.ClientID));
|
||||
//UPpanelModalUpConcepto.Update();
|
||||
}
|
||||
|
||||
|
||||
int CveConceptoPolgvc, CveConceptoDolgvc;
|
||||
protected void GvConceptos_RowDataBound(object sender, GridViewRowEventArgs e)
|
||||
{
|
||||
if (e.Row.RowType == DataControlRowType.DataRow)
|
||||
{
|
||||
if (e.Row.RowIndex == 0)
|
||||
{
|
||||
CveConceptoPolgvc = 1;
|
||||
CveConceptoDolgvc = 1;
|
||||
}
|
||||
// Datakeys
|
||||
// Concepto,CveConcepto,Importe,Estatus,ConceptoD,CveConceptoD,ImporteD,EstatusD
|
||||
int CveConcepto = e.Row.DataKey("CveConceptoP").ToEntero();
|
||||
@@ -442,7 +224,11 @@ partial class Nomina_Finiquito : ClsPaginas
|
||||
// Dim ImporteD As Decimal = e.Row.DataKey("ImporteD").ToDecimal()
|
||||
int Estatus = e.Row.DataKey("EstatusP").ToEntero();
|
||||
int EstatusD = e.Row.DataKey("EstatusD").ToEntero();
|
||||
|
||||
int isOnlyBisibleP = e.Row.DataKey("isOnlyBisibleP").ToEntero();
|
||||
int isOnlyBisibleD = e.Row.DataKey("isOnlyBisibleD").ToEntero();
|
||||
bool isEditedP = e.Row.DataKey("isEditedP").ToEntero() > 0;
|
||||
bool isEditedD = e.Row.DataKey("isEditedD").ToEntero() > 0;
|
||||
//isEditedD
|
||||
// Controles
|
||||
Label LtlConcepto = e.Row.FCLabel("LtlConcepto");
|
||||
LinkButton LnkConcepto = e.Row.FCLinkButton("LnkConcepto");
|
||||
@@ -452,63 +238,292 @@ partial class Nomina_Finiquito : ClsPaginas
|
||||
LinkButton LnkImporte = e.Row.FCLinkButton("LnkImporte");
|
||||
Label LtlImporteD = e.Row.FCLabel("LtlImporteD");
|
||||
LinkButton LnkImporteD = e.Row.FCLinkButton("LnkImporteD");
|
||||
//isEditedD
|
||||
if (isOnlyBisibleP == 1)
|
||||
{
|
||||
e.Row.CssClass = string.Format("{0} isOnlyBisibleP", e.Row.CssClass);
|
||||
}
|
||||
if (isOnlyBisibleD == 1)
|
||||
{
|
||||
e.Row.CssClass = string.Format("{0} isOnlyBisibleD", e.Row.CssClass);
|
||||
}
|
||||
if (isEditedP)
|
||||
{
|
||||
e.Row.CssClass = string.Format("{0} isEditedP", e.Row.CssClass);
|
||||
}
|
||||
if (isEditedD)
|
||||
{
|
||||
e.Row.CssClass = string.Format("{0} isEditedD", e.Row.CssClass);
|
||||
}
|
||||
|
||||
if (Estatus == -1) { LtlConcepto.Visible = false; }
|
||||
else if (Estatus > 0) { LtlImporte.Visible = false; }
|
||||
|
||||
if (EstatusD == -1) { LtlConceptoD.Visible = false; }
|
||||
else if (EstatusD > 0) { LtlImporteD.Visible = false; }
|
||||
|
||||
LtlImporte.Visible = false;
|
||||
LtlImporteD.Visible = false;
|
||||
if (Estatus < -1 | EstatusD < -1)
|
||||
{
|
||||
e.Row.CssClass = "ConceptosTotales";
|
||||
if (CveConcepto == 0 && (Estatus == 0 || Estatus == -1 || Estatus == -3))
|
||||
LtlImporte.Text = "";
|
||||
LtlImporte.Visible = true;
|
||||
LtlImporteD.Visible = true;
|
||||
}
|
||||
LnkImporte.CommandArgument = (CveConcepto > 0 ? CveConcepto.ToString() : "P");
|
||||
LnkImporteD.CommandArgument = (CveConceptoD > 0 ? CveConceptoD.ToString() : "D");
|
||||
|
||||
if (CveConceptoD == 0 && (EstatusD == 0 || EstatusD == -1))
|
||||
LtlImporteD.Text = "";
|
||||
LnkImporte.Text = (CveConcepto > 0 ? string.Format("${0:N2}", e.Row.DataKey("ImporteP").ToDecimal()) : (CveConceptoPolgvc > 0 ? "<i class=\"fa fa-plus\"></i>" : ""));
|
||||
LnkImporteD.Text = (CveConceptoD > 0 ? string.Format("${0:N2}", e.Row.DataKey("ImporteD").ToDecimal()) : (CveConceptoDolgvc > 0 ? "<i class=\"fa fa-plus\"></i>" : ""));
|
||||
|
||||
if (Estatus == -1)
|
||||
LtlConcepto.Visible = false;
|
||||
else if (Estatus > 0)
|
||||
LtlImporte.Visible = false;
|
||||
|
||||
if (EstatusD == -1)
|
||||
LtlConceptoD.Visible = false;
|
||||
else if (EstatusD > 0)
|
||||
LtlImporteD.Visible = false;
|
||||
|
||||
if (CveConcepto == 0 && (Estatus == 0 || Estatus == -1 || Estatus == -3)) { LtlImporte.Text = ""; }
|
||||
|
||||
if (CveConceptoD == 0 && (EstatusD == 0 || EstatusD == -1)) { LtlImporteD.Text = ""; }
|
||||
|
||||
|
||||
|
||||
LnkConcepto.Visible = !LtlConcepto.Visible;
|
||||
LnkConceptoD.Visible = !LtlConceptoD.Visible;
|
||||
LnkImporte.Visible = !LtlImporte.Visible;
|
||||
LnkImporteD.Visible = !LtlImporteD.Visible;
|
||||
|
||||
|
||||
CveConceptoPolgvc = CveConcepto;
|
||||
CveConceptoDolgvc = CveConceptoD;
|
||||
}
|
||||
}
|
||||
|
||||
protected void LnkConcepto_Click(object sender, EventArgs e)
|
||||
protected void LnkTimbrar_Click(object sender, EventArgs e)
|
||||
{
|
||||
GridViewRow gvRow = (GridViewRow)((LinkButton)sender).NamingContainer;
|
||||
GCEstatus = gvRow.DataKey("Estatus").ToEntero();
|
||||
GCCveConcepto = gvRow.DataKey("CveConcepto").ToEntero();
|
||||
GCImporte = gvRow.DataKey("Importe").ToDecimal();
|
||||
OpenModalConceptos(1);
|
||||
}
|
||||
protected void LnkConceptoD_Click(object sender, EventArgs e)
|
||||
{
|
||||
GridViewRow gvRow = (GridViewRow)((LinkButton)sender).NamingContainer;
|
||||
GCEstatus = gvRow.DataKey("Estatus").ToEntero();
|
||||
GCCveConcepto = gvRow.DataKey("CveConcepto").ToEntero();
|
||||
GCImporte = gvRow.DataKey("Importe").ToDecimal();
|
||||
OpenModalConceptos(2);
|
||||
Alert("El finiquito se ha timbrado satisfactoriamente");
|
||||
LnkTimbrar.Visible = false;
|
||||
}
|
||||
|
||||
private void OpenModalConceptos(int Tipo)
|
||||
protected void LnkFormatoRenuncia_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (GCEstatus == -1)
|
||||
|
||||
}
|
||||
|
||||
protected void LnkCambiarEmpleado_Click(object sender, EventArgs e)
|
||||
{
|
||||
CargaDdlPersonal();
|
||||
this.RegistraScript("$('#ModalEmpleados').modal();");
|
||||
UpModalEmpleados.Update();
|
||||
}
|
||||
|
||||
|
||||
private class NConcepto
|
||||
{
|
||||
public string NoConceptoP { get; set; }
|
||||
public string ConceptoP { get; set; }
|
||||
public string LabelValorP { get; set; }
|
||||
public int CveConceptoP { get; set; }
|
||||
public double ImporteP { get; set; }
|
||||
public double ValorP { get; set; }
|
||||
public int EstatusP { get; set; }
|
||||
public int isEditedP { get; set; }
|
||||
public int isOnlyBisibleP { get; set; }
|
||||
|
||||
|
||||
public string NoConceptoD { get; set; }
|
||||
public string ConceptoD { get; set; }
|
||||
public string LabelValorD { get; set; }
|
||||
public int CveConceptoD { get; set; }
|
||||
public double ImporteD { get; set; }
|
||||
public double ValorD { get; set; }
|
||||
public int EstatusD { get; set; }
|
||||
public int isEditedD { get; set; }
|
||||
public int isOnlyBisibleD { get; set; }
|
||||
}
|
||||
private List<NConcepto> cargasobrericiboconceptos(DataTable dtConceptos, DataTable dtempleadosConceptos, DataTable dtempleados)
|
||||
{
|
||||
int SRCvePersonal = this.CvePersonal;
|
||||
DataTable dtper = dtConceptos.FiltraParametros("Tipo IN ('P') AND EsPadre = 1 ");
|
||||
DataTable dtded = dtConceptos.FiltraParametros("Tipo IN ('D') AND EsPadre = 1 ");
|
||||
dtper.Columns.Add("BorradoLogico", typeof(int));
|
||||
dtded.Columns.Add("BorradoLogico", typeof(int));
|
||||
|
||||
foreach (DataRow row in dtper.Rows)
|
||||
{
|
||||
int BorradoLogico = 0;
|
||||
int CveConcepto = row["CveConcepto"].ToString().ToEntero();
|
||||
if (!(dtempleados.SUM(string.Format("[V_{0}]", CveConcepto)) != 0))
|
||||
{
|
||||
BorradoLogico = 1;
|
||||
}
|
||||
row["BorradoLogico"] = BorradoLogico;
|
||||
}
|
||||
dtper.AcceptChanges();
|
||||
foreach (DataRow row in dtded.Rows)
|
||||
{
|
||||
int BorradoLogico = 0;
|
||||
int CveConcepto = row["CveConcepto"].ToString().ToEntero();
|
||||
if (!(dtempleados.SUM(string.Format("[V_{0}]", CveConcepto)) != 0))
|
||||
{
|
||||
BorradoLogico = 1;
|
||||
}
|
||||
row["BorradoLogico"] = BorradoLogico;
|
||||
}
|
||||
dtded.AcceptChanges();
|
||||
dtper = dtper.FiltraParametros("BorradoLogico=0");
|
||||
dtded = dtded.FiltraParametros("BorradoLogico=0");
|
||||
int maxper = dtper.Rows.Count;
|
||||
int maxded = dtded.Rows.Count;
|
||||
int i = 0;
|
||||
List<NConcepto> lconc = new List<NConcepto>();
|
||||
for (i = 0; i < maxper || i < maxded; i++)
|
||||
{
|
||||
NConcepto nConcepto = new NConcepto();
|
||||
DataRow row;
|
||||
if (maxper > i)
|
||||
{
|
||||
row = dtper.Rows[i];
|
||||
int CveConcepto = row["CveConcepto"].ToString().ToEntero();
|
||||
string Concepto = row["Concepto"].ToString();
|
||||
string Codigo = row["Codigo"].ToString();
|
||||
//bool visible = (dtempleados.SUM(string.Format("[V_{0}]", CveConcepto)) > 0);
|
||||
double Importe = dtempleados.SUM(string.Format("[V_{0}]", CveConcepto), string.Format("CvePersonal = {0}", SRCvePersonal));
|
||||
nConcepto.CveConceptoP = CveConcepto;
|
||||
nConcepto.ConceptoP = Concepto;
|
||||
nConcepto.NoConceptoP = Codigo;
|
||||
nConcepto.ImporteP = Importe;
|
||||
nConcepto.ValorP = dtempleados.SUM(string.Format("[VAL_{0}]", CveConcepto), string.Format("CvePersonal = {0}", SRCvePersonal));
|
||||
nConcepto.isOnlyBisibleP = row["SoloVisible"].ToString().ToEntero();
|
||||
|
||||
nConcepto.isEditedP = dtempleadosConceptos.COUNT("CveConcepto", string.Format("CveConcepto={0} AND CvePersonal ={1} AND Estatus =2", CveConcepto, SRCvePersonal));
|
||||
}
|
||||
if (maxded > i)
|
||||
{
|
||||
row = dtded.Rows[i];
|
||||
int CveConcepto = row["CveConcepto"].ToString().ToEntero();
|
||||
string Concepto = row["Concepto"].ToString();
|
||||
string Codigo = row["Codigo"].ToString();
|
||||
//bool visible = (dtempleados.SUM(string.Format("[V_{0}]", CveConcepto)) > 0);
|
||||
double Importe = dtempleados.SUM(string.Format("[V_{0}]", CveConcepto), string.Format("CvePersonal = {0}", SRCvePersonal));
|
||||
nConcepto.CveConceptoD = CveConcepto;
|
||||
nConcepto.ConceptoD = Concepto;
|
||||
nConcepto.NoConceptoD = Codigo;
|
||||
nConcepto.ImporteD = Importe;
|
||||
nConcepto.ValorD = dtempleados.SUM(string.Format("[VAL_{0}]", CveConcepto), string.Format("CvePersonal = {0}", SRCvePersonal));
|
||||
nConcepto.isOnlyBisibleD = row["SoloVisible"].ToString().ToEntero();
|
||||
nConcepto.isEditedD = dtempleadosConceptos.COUNT("CveConcepto", string.Format("CveConcepto={0} AND CvePersonal ={1} AND Estatus =2", CveConcepto, SRCvePersonal));
|
||||
}
|
||||
lconc.Add(nConcepto);
|
||||
}
|
||||
|
||||
lconc.Add(new NConcepto());
|
||||
|
||||
NConcepto SubTotales = new NConcepto();
|
||||
SubTotales.CveConceptoP = 0;
|
||||
SubTotales.ConceptoP = "Total Percepciones";
|
||||
SubTotales.EstatusP = -2;
|
||||
SubTotales.ImporteP = dtempleados.SUM("SumaPercepciones", string.Format("CvePersonal = {0}", SRCvePersonal));
|
||||
///Alert(SubTotales.ImporteP.ToString());
|
||||
|
||||
SubTotales.CveConceptoD = 0;
|
||||
SubTotales.ConceptoD = "Total Deducciones";
|
||||
SubTotales.EstatusD = -2;
|
||||
SubTotales.ImporteD = dtempleados.SUM("SumaDeducciones", string.Format("CvePersonal = {0}", SRCvePersonal));
|
||||
|
||||
NConcepto Totales = new NConcepto();
|
||||
Totales.CveConceptoD = 0;
|
||||
Totales.ConceptoD = "Total";
|
||||
Totales.EstatusD = -3;
|
||||
Totales.ImporteD = dtempleados.SUM("Total", string.Format("CvePersonal = {0}", SRCvePersonal));
|
||||
|
||||
lconc.Add(SubTotales);
|
||||
lconc.Add(Totales);
|
||||
return lconc;
|
||||
|
||||
}
|
||||
|
||||
|
||||
protected void LnkGuardarDatos_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (LblFechaAlta.Text.ToDate() > TxtFechaBaja.Text.ToDate())
|
||||
{
|
||||
Alert("la fecha de baja no puede ser menor a la fecha alta", ModExtensiones.TipoMensaje.MsgAdvertencia);
|
||||
}
|
||||
else
|
||||
{
|
||||
bool continuar = false;
|
||||
|
||||
using (ClsRH ObjPersonal = new ClsRH())
|
||||
using (ClsNominas onom = new ClsNominas(ObjPersonal.IniciaTransacSQL()))
|
||||
{
|
||||
if (ObjPersonal.UpPersonalAltas(CvePersonal, "", TxtFechaBaja.Text.ToDateTime().ToString("yyyy/MM/dd"), -1, DdlMotivoBaja.SelectedValue.ToEntero(), ChkesLiquidacion.Checked) && ObjPersonal.GetPersonalAltas(CvePersonal) && ObjPersonal.DtResultados.Rows.Count > 0)
|
||||
{
|
||||
DataRow da = ObjPersonal.DtResultados.Rows[0];
|
||||
CvePeriodoIndemnizacion = da["CvePeriodoIndemnizacion"].ToString().ToEntero();
|
||||
CvePeriodoFiniquito = da["CvePeriodoFiniquito"].ToString().ToEntero();
|
||||
continuar = onom.GetFiniquitosPersonal(CvePersonal, UsuarioActual.CveEmpresa);
|
||||
}
|
||||
if (continuar)
|
||||
{
|
||||
ObjPersonal.Commit();
|
||||
}
|
||||
else
|
||||
{
|
||||
ObjPersonal.RollBack();
|
||||
}
|
||||
if (continuar) { loadsobrerecibo(); }
|
||||
}
|
||||
|
||||
}
|
||||
RegistraScript("$('#ModalConceptos').modal();");
|
||||
}
|
||||
public void loadsobrerecibo()
|
||||
{
|
||||
List<NConcepto> finordin = null;
|
||||
List<NConcepto> finindem = null;
|
||||
|
||||
DataTable dtConceptos = null;
|
||||
DataTable dtempleadosConceptos = null;
|
||||
DataTable dtempleados = null;
|
||||
|
||||
|
||||
using (ClsNominas objnom = new ClsNominas())
|
||||
{
|
||||
if (objnom.GetNominaEmpleado(-1, -1, -1, CvePeriodoFiniquito, UsuarioActual.CveEmpresa, 1, 3, CvePersonal) && objnom.DTSetResultados.Tables.Count > 1)
|
||||
{
|
||||
dtempleados = objnom.DTSetResultados.Tables[3];
|
||||
dtempleadosConceptos = objnom.DTSetResultados.Tables[4];
|
||||
dtConceptos = objnom.DTSetResultados.Tables[0];
|
||||
}
|
||||
if (dtConceptos != null && dtempleadosConceptos != null && dtempleados != null)
|
||||
{
|
||||
finordin = cargasobrericiboconceptos(dtConceptos, dtempleadosConceptos, dtempleados);
|
||||
}
|
||||
dtempleadosConceptos = null;
|
||||
dtempleados = null;
|
||||
if (objnom.GetNominaEmpleado(-1, -1, -1, CvePeriodoIndemnizacion, UsuarioActual.CveEmpresa, 1, 3, CvePersonal) && objnom.DTSetResultados.Tables.Count > 1)
|
||||
{
|
||||
dtempleados = objnom.DTSetResultados.Tables[3];
|
||||
dtempleadosConceptos = objnom.DTSetResultados.Tables[4];
|
||||
dtConceptos = objnom.DTSetResultados.Tables[0];
|
||||
}
|
||||
if (dtConceptos != null && dtempleadosConceptos != null && dtempleados != null)
|
||||
{
|
||||
finindem = cargasobrericiboconceptos(dtConceptos, dtempleadosConceptos, dtempleados);
|
||||
}
|
||||
|
||||
}
|
||||
GvFinOrdinario.DataSource = finordin;
|
||||
GVFinIndemnizacion.DataSource = finindem;
|
||||
GvFinOrdinario.DataBind();
|
||||
GVFinIndemnizacion.DataBind();
|
||||
LnkGuardarDatos.Enabled = false;
|
||||
LnkGuardarDatos.CssClass = "btn btn-default";
|
||||
LnkGuardarDatos.ToolTip = "el finiquito ha sido capturado.";
|
||||
LnkAutorizar.Visible = true;
|
||||
}
|
||||
|
||||
protected void LnkAceptarConceptos_Click(object sender, EventArgs e)
|
||||
protected void LnkAutorizar_Click(object sender, EventArgs e)
|
||||
{
|
||||
RegistraScript("$('#ModalConceptos').modal('hide');");
|
||||
|
||||
Alert("El finiquito se ha autorizado satisfactoriamente.");
|
||||
LnkAutorizar.Visible = false;
|
||||
LnkTimbrar.Visible = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
516
Nomina/FiniquitoOld.aspx
Normal file
516
Nomina/FiniquitoOld.aspx
Normal file
@@ -0,0 +1,516 @@
|
||||
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="FiniquitoOld.aspx.cs" Inherits="Nomina_Finiquito" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
.GvConceptos.table > tbody > tr > th {
|
||||
border-top: 1px solid #E87E04;
|
||||
color: #fff;
|
||||
font-size: 15px;
|
||||
background-color: #E87E04;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.portlet > .portlet-title {
|
||||
min-height: 30px;
|
||||
}
|
||||
|
||||
.portlet > .portlet-title > .caption {
|
||||
font-size: 13px;
|
||||
padding: 5px 0 5px 0;
|
||||
}
|
||||
|
||||
.portlet > .portlet-title > .tools {
|
||||
padding: 5px 0 5px 0;
|
||||
}
|
||||
|
||||
.GvConceptos.table > tbody > tr.thTituloConcepto > th:nth-child(1),
|
||||
.GvConceptos.table > tbody > tr:not(.thTituloConcepto) > th:nth-child(2),
|
||||
.GvConceptos.table > tbody > tr > td:nth-child(2) {
|
||||
border-right: 1px solid #E87E04;
|
||||
}
|
||||
|
||||
.dtosEmpleado {
|
||||
font-size: 15px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.dtosEmpleado a {
|
||||
color: #2196f3;
|
||||
}
|
||||
|
||||
.dtosEmpleado .row {
|
||||
padding-top: 10px;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
.GvConceptos.table > tbody > tr > td span {
|
||||
display: block;
|
||||
min-height: 12px;
|
||||
}
|
||||
|
||||
.GvConceptos.table > tbody > tr.ConceptosTotales {
|
||||
font-weight: bold;
|
||||
font-size: 15px;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
Finiquito
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
|
||||
<asp:UpdatePanel ID="UpAcciones" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:HyperLink ID="HypCambiarEmpleado" onclick="$('#ModalEmpleados').modal();" runat="server"><i class="fa fa-exchange" aria-hidden="true"></i>Cambiar Empleado</asp:HyperLink></li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkReCalcular" OnClick="LnkCalcular_Click" runat="server"><i class="fa fa-pencil"></i>ReCalcular </asp:LinkButton></li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkAutorizar" OnClick="LnkAutorizar_Click" runat="server"><i class='material-icons'>done_all</i>Autorizar</asp:LinkButton></li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkTimbrar" OnClick="LnkTimbrar_Click" runat="server"><i class="fa fa-bell"></i>Timbrar</asp:LinkButton></li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkFormatoRenuncia" OnClick="LnkFormatoRenuncia_Click" runat="server"><i class="fa fa-bell"></i>Formato Renuncia</asp:LinkButton></li>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
<asp:UpdatePanel ID="upDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="row ">
|
||||
<div class="col-md-6 col-md-offset-3 col-sm-10 col-sm-offset-1">
|
||||
|
||||
<div class="portlet box yellow-gold smallpadding" id="pnldl">
|
||||
<div class="portlet-title">
|
||||
<div class="caption ">
|
||||
<i class="icon-pin "></i>
|
||||
<span class="caption-subject bold uppercase">Datos del Empleado</span>
|
||||
</div>
|
||||
<div class="tools">
|
||||
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
|
||||
<a href="javascript:;" class="fullscreen" data-original-title="" title=""></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body dtosEmpleado">
|
||||
<div class="row ">
|
||||
<div class="col-sm-4 col-lg-3">Empleado: </div>
|
||||
<div class="col-sm-8 col-lg-9">
|
||||
<asp:HyperLink ID="HypEmpleado" CssClass="LinkEmpleado" runat="server"></asp:HyperLink>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row ">
|
||||
<div class="col-sm-4 col-lg-3">Estatus</div>
|
||||
<div class="col-sm-8 col-lg-9">
|
||||
<asp:Label ID="LblEstatus" runat="server" Text=""></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row ">
|
||||
<div class="col-sm-4 col-lg-3">Motivo Baja</div>
|
||||
<div class="col-sm-8 col-lg-9 ">
|
||||
<asp:Label ID="LblMotivoBaja" runat="server" Text=""></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row ">
|
||||
<div class="col-sm-4 col-lg-3">Fecha Baja</div>
|
||||
<div class="col-sm-8 col-lg-9">
|
||||
<asp:Label ID="LblFechaBaja" runat="server" Text=""></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row ">
|
||||
<div class="col-sm-4 col-lg-3">Perido Finiquito</div>
|
||||
<div class="col-sm-8 col-lg-9">
|
||||
<asp:Label ID="LblPerido" runat="server" Text=""></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<ajax:TabContainer ID="Tab" runat="server" Width="100%" AutoPostBack="True">
|
||||
<ajax:TabPanel ID="TabSobreRecibo" runat="server" HeaderText="Sobre Recibo">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="portlet box yellow-gold smallpadding" id="pnlSobreRecivo">
|
||||
<div class="portlet-title" style="display: none;">
|
||||
<div class="caption ">
|
||||
<i class="icon-pin "></i>
|
||||
<span class="caption-subject bold uppercase ">Sobre Recibo</span>
|
||||
</div>
|
||||
<div class="tools">
|
||||
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
|
||||
<a href="javascript:;" class="fullscreen" data-original-title="" title=""></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body " style="padding: 0px;">
|
||||
|
||||
<asp:GridView ID="GvConceptos" runat="server" AutoGenerateColumns="False" CssClass="table table-striped table-hover Widthall GvConceptos"
|
||||
Style="text-align: center;" GridLines="None" OnRowDataBound="GvConceptos_RowDataBound"
|
||||
DataKeyNames="ConceptoP,CveConceptoP,ImporteP,EstatusP,ConceptoD,CveConceptoD,ImporteD,EstatusD">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Concepto">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtlConcepto" runat="server" Text='<%# Eval("ConceptoP") %>' Style="word-break: break-all;"></asp:Label>
|
||||
<asp:LinkButton ID="LnkConcepto" OnClick="LnkConcepto_Click" runat="server" Text='<%# Eval("ConceptoP") %>'></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" Width="37%" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Importe">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtlImporte" runat="server" Text='<%# Eval("ImporteP", "${0:N}") %>' Style="word-break: break-all;"></asp:Label>
|
||||
<asp:LinkButton ID="LnkImporte" OnClick="LnkConcepto_Click" runat="server" Text='<%# Eval("ImporteP", "${0:N}") %>'></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right" Width="13%" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Concepto">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtlConceptoD" runat="server" Text='<%# Eval("ConceptoD") %>' Style="word-break: break-all;"></asp:Label>
|
||||
<asp:LinkButton ID="LnkConceptoD" OnClick="LnkConceptoD_Click" runat="server" Text='<%# Eval("ConceptoD") %>'></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" Width="37%" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Importe">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtlImporteD" runat="server" Text='<%# Eval("ImporteD", "${0:N}") %>' Style="word-break: break-all;"></asp:Label>
|
||||
<asp:LinkButton ID="LnkImporteD" OnClick="LnkConceptoD_Click" runat="server" Text='<%# Eval("ImporteD", "${0:N}") %>'></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right" Width="13%" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
<ajax:TabPanel ID="TabAguinaldo" runat="server" HeaderText="Aguinaldo">
|
||||
<ContentTemplate>
|
||||
<div class="portlet light xspadding bordered" id="pnlAguinaldo">
|
||||
<div class="portlet-title" style="display: none;">
|
||||
<div class="caption ">
|
||||
<i class="icon-pin font-yellow-gold "></i>
|
||||
<span class="caption-subject bold uppercase font-yellow-gold ">Aguinaldo</span>
|
||||
</div>
|
||||
<div class="tools">
|
||||
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body " style="padding: 0px;">
|
||||
<div class="row">
|
||||
<div class="col-md-3 ">
|
||||
<div class="indicador2 red">
|
||||
<div class="visual">$</div>
|
||||
<div class="value"> <asp:Label ID="LblAguinaldoCompleto" runat="server" Text="$ ##,###.##"></asp:Label>
|
||||
</div>
|
||||
<div class="details">Aguinaldo ejercicio completo </div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="indicador2 red">
|
||||
<div class="visual">$</div>
|
||||
<div class="value"> <asp:Label ID="LblAguinaldo" runat="server" Text="$ ##,###.##"></asp:Label>
|
||||
</div>
|
||||
<div class="details">Aguinaldo </div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="indicador2 red">
|
||||
<div class="visual"><i class="fa fa-money"></i></div>
|
||||
<div class="value"> <asp:Label ID="LblAguinaldoPagado" runat="server" Text="$ ##,###.##"></asp:Label>
|
||||
</div>
|
||||
<div class="details">Aguinaldo Pagado</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="indicador2 bluesky">
|
||||
<div class="visual"><i class="fa fa-money"></i></div>
|
||||
<div class="value"> <asp:Label ID="LblAguinaldoporPagar" runat="server" Text="$ ##,###.##"></asp:Label>
|
||||
</div>
|
||||
<div class="details">Aguinaldo por pagar</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-3 ">
|
||||
<div class="indicador2 green">
|
||||
<div class="visual"><i class="fa fa-cubes"></i></div>
|
||||
<div class="value"> <asp:Label ID="Label1" runat="server" Text="###"></asp:Label>
|
||||
</div>
|
||||
<div class="details">Dias Ejercicio </div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="indicador2 green">
|
||||
<div class="visual"><i class="fa fa-cubes"></i></div>
|
||||
<div class="value"> <asp:Label ID="Label2" runat="server" Text="###"></asp:Label>
|
||||
</div>
|
||||
<div class="details">Dias Laborados </div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="indicador2 green">
|
||||
<div class="visual"><i class="fa fa-cubes"></i></div>
|
||||
<div class="value"> <asp:Label ID="Label3" runat="server" Text="###"></asp:Label>
|
||||
</div>
|
||||
<div class="details">Dias pago Aguinaldo</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
<ajax:TabPanel ID="TabVacaciones" runat="server" HeaderText="Vacaciones">
|
||||
<ContentTemplate>
|
||||
<div class="portlet light xspadding bordered" id="pnlVacaciones">
|
||||
<div class="portlet-title" style="display: none;">
|
||||
<div class="caption ">
|
||||
<i class="icon-pin font-yellow-gold "></i>
|
||||
<span class="caption-subject bold uppercase font-yellow-gold ">Vacaciones</span>
|
||||
</div>
|
||||
<div class="tools">
|
||||
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body " style="padding: 0px;">
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtAntiguedad" runat="server" CssClass="form-control"></asp:TextBox>
|
||||
<asp:Label runat="server" Text="Antiguedad" AssociatedControlID="TxtAntiguedad"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtdiasVacaciones" runat="server" CssClass="form-control"></asp:TextBox>
|
||||
<asp:Label runat="server" Text="Días Vacaciones(ejercicio)" AssociatedControlID="TxtdiasVacaciones"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtDiasLaborados" runat="server" CssClass="form-control"></asp:TextBox>
|
||||
<asp:Label runat="server" Text="Días Laborados " AssociatedControlID="TxtDiasLaborados"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtDiasProporcion" runat="server" CssClass="form-control"></asp:TextBox>
|
||||
<asp:Label runat="server" Text="Días Proporcional" AssociatedControlID="TxtDiasProporcion"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtVaciones" runat="server" CssClass="form-control"></asp:TextBox>
|
||||
<asp:Label runat="server" Text="Vacaciones" AssociatedControlID="TxtVaciones"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtDiasPago" runat="server" CssClass="form-control"></asp:TextBox>
|
||||
<asp:Label runat="server" Text="Días Pagados" AssociatedControlID="TxtDiasPago"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtDiasPendientes" runat="server" CssClass="form-control"></asp:TextBox>
|
||||
<asp:Label runat="server" Text="Días pendientes " AssociatedControlID="TxtDiasPendientes"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtVacacionesporPagar" runat="server" CssClass="form-control"></asp:TextBox>
|
||||
<asp:Label runat="server" Text="Vacaciones por pagar" AssociatedControlID="TxtVacacionesporPagar"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtPorcentjePrima" runat="server" CssClass="form-control"></asp:TextBox>
|
||||
<asp:Label runat="server" Text="Porcentaje Prima" AssociatedControlID="TxtPrimaPagada"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtPrimaVacacional" runat="server" CssClass="form-control"></asp:TextBox>
|
||||
<asp:Label runat="server" Text="Prima Vacacional" AssociatedControlID="TxtPrimaPagada"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtPrimaPagada" runat="server" CssClass="form-control"></asp:TextBox>
|
||||
<asp:Label runat="server" Text="Prima Vac. Pagada" AssociatedControlID="TxtPrimaPagada"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtPrimaPorPagar" runat="server" CssClass="form-control"></asp:TextBox>
|
||||
<asp:Label runat="server" Text="Prima vac. por Pagar" AssociatedControlID="TxtPrimaPorPagar"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
</ajax:TabContainer>
|
||||
|
||||
|
||||
<div id="ModalConceptos" class="modal ADS fade " role="dialog">
|
||||
|
||||
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpModalConceptos" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header ">
|
||||
<h4 class="modal-title">LtlTituloConcepto</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlConcepto" runat="server" AppendDataBoundItems="true" CssClass="form-control select2me" DataTextField="NominaEstatus" DataValueField="CvePeriodo">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:Label runat="server" Text="Concepto:" AssociatedControlID="DdlConcepto"></asp:Label>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtImporte" CssClass="form-control" runat="server"></asp:TextBox>
|
||||
<asp:Label runat="server" Text="Importe:" AssociatedControlID="TxtImporte"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:UpdatePanel runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:LinkButton ID="LnkAceptarConceptos" runat="server" CssClass="btn btn-primary" ValidationGroup="GrpSeleccionar" OnClick="LnkAceptarConceptos_Click"> Aceptar</asp:LinkButton>
|
||||
<asp:Literal ID="Literal1" Visible="false" runat="server"> <button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button></asp:Literal>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
<div id="ModalEmpleados" class="modal ADS fade " role="dialog" data-backdrop="static" data-keyboard="false">
|
||||
|
||||
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpModalEmpleados" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header ">
|
||||
<h4 class="modal-title">Seleccione un Empleado</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlPersonal" DataTextField="Nombre" DataValueField="CvePersonal" runat="server" Width="100%" AppendDataBoundItems="true" CssClass="form-control select2me" AutoPostBack="true" OnSelectedIndexChanged="DdlPersonal_SelectedIndexChanged">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:Label runat="server" Text="Empleado: " AssociatedControlID="DdlPersonal"></asp:Label>
|
||||
</div>
|
||||
<asp:Panel ID="pnlupValoresFiniquito" runat="server" Visible="false">
|
||||
<h4>Debe llenar los siguientes valores para continuar</h4>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlMotivoBaja" runat="server" AppendDataBoundItems="True" DataTextField="MotivoBaja" DataValueField="CveMotivoBaja" Width="100%"
|
||||
CssClass="form-control select2me" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Selected="True" Text="Sin asignar Motivo de Baja" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:Label runat="server" Text="Motivo de Baja: " AssociatedControlID="DdlMotivoBaja"></asp:Label>
|
||||
</div>
|
||||
<div class="">
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6" style="padding-right: 0px">
|
||||
<div class="form-group form-md-line-input input-iconright" style="width: 120px; display: inline-block">
|
||||
<asp:TextBox ID="TxtFechaBaja" runat="server" CausesValidation="True" CssClass="form-control"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RfvTxtFechaBaja" runat="server" ControlToValidate="TxtFechaBaja" CssClass="help-block errorimput"
|
||||
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha de Baja''</b> es necesario "
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<asp:Label runat="server" Text="Fecha de Baja: " AssociatedControlID="TxtFechaBaja"></asp:Label>
|
||||
<ajax:MaskedEditExtender ID="MKEFechaBaja" runat="server" TargetControlID="TxtFechaBaja" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left" BehaviorID="_content_MKEFechaBaja" Century="2000" CultureAMPMPlaceholder="" CultureCurrencySymbolPlaceholder="" CultureDateFormat="" CultureDatePlaceholder="" CultureDecimalPlaceholder="" CultureThousandsPlaceholder="" CultureTimePlaceholder=""></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="CEFechaBaja" runat="server" TargetControlID="TxtFechaBaja" PopupButtonID="ImgFechaBaja" PopupPosition="BottomRight" BehaviorID="_content_CEFechaBaja"></ajax:CalendarExtender>
|
||||
<asp:CompareValidator ID="CVFechaBaja" runat="server" ControlToValidate="TxtFechaBaja" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha de Baja''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar" Visible="False"></asp:CompareValidator>
|
||||
|
||||
</div>
|
||||
<span class="input-group-btn " style="display: inline-block">
|
||||
<asp:LinkButton ID="ImgFechaBaja" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<div class="col-md-6" style="padding-left: 0px">
|
||||
¿es Liquidación?
|
||||
<asp:CheckBox ID="ChkesLiquidacion" CssClass="chksino" Text=" " runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlTipoPeriodo" runat="server" AppendDataBoundItems="true" Width="100%" CssClass="form-control select2me" AutoPostBack="true" DataTextField="TipoPeriodo" DataValueField="CveTipoPeriodo" OnSelectedIndexChanged="DdlTipoPeriodo_SelectedIndexChanged">
|
||||
<asp:ListItem Selected="True" Text="Ordinario" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Extraordinario" Value="6"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:Label runat="server" Text="Tipo Período: " AssociatedControlID="DdlTipoPeriodo"></asp:Label>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlPeriodo" runat="server" AppendDataBoundItems="true" Width="100%" CssClass="form-control select2me" DataTextField="NominaEstatus" DataValueField="CvePeriodo">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:Label runat="server" Text="Período:" AssociatedControlID="DdlPeriodo"></asp:Label>
|
||||
</div>
|
||||
|
||||
|
||||
</asp:Panel>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:UpdatePanel runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:LinkButton ID="LnkCampiarEmpleado" runat="server" CssClass="btn btn-primary" ValidationGroup="GrpSeleccionar" OnClick="LnkCampiarEmpleado_Click"> Aceptar</asp:LinkButton>
|
||||
<asp:Literal ID="LtlEmpleadoCancelar" Visible="false" runat="server"> <button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button></asp:Literal>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||
<%--"<tr class=\"thTituloConcepto\"> <th scope=\"col\" colspan=\"2\">Percepciones</th><th scope=\"col\" colspan=\"2\">Deducciones</th> </tr>"--%>
|
||||
<script>
|
||||
function insertParam(key, value) {
|
||||
key = encodeURIComponent(key); value = encodeURIComponent(value);
|
||||
|
||||
var s = document.location.search;
|
||||
var kvp = key + "=" + value;
|
||||
|
||||
var r = new RegExp("(&|\\?)" + key + "=[^\&]*");
|
||||
|
||||
s = s.replace(r, "$1" + kvp);
|
||||
|
||||
if (!RegExp.$1) { s += (s.length > 0 ? '&' : '?') + kvp; };
|
||||
|
||||
//again, do what you will here
|
||||
document.location.search = s;
|
||||
}
|
||||
|
||||
function ADSBegin() {
|
||||
if ($('.thTituloConcepto').length == 0) {
|
||||
$('.GvConceptos').prepend("<tr class=\"thTituloConcepto\"> <th scope=\"col\" colspan=\"2\">Percepciones</th><th scope=\"col\" colspan=\"2\">Deducciones</th> </tr>");
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
</asp:Content>
|
||||
514
Nomina/FiniquitoOld.aspx.cs
Normal file
514
Nomina/FiniquitoOld.aspx.cs
Normal file
@@ -0,0 +1,514 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Microsoft.VisualBasic;
|
||||
using System.Data;
|
||||
using Extensiones;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
partial class Nomina_Finiquito : ClsPaginas
|
||||
{
|
||||
private class NConcepto
|
||||
{
|
||||
//Concepto,CveConcepto,Importe,Estatus,ConceptoD,CveConceptoD,ImporteD,EstatusD
|
||||
|
||||
|
||||
|
||||
public string NoConceptoP { get; set; }
|
||||
public string ConceptoP { get; set; }
|
||||
public string LabelValorP { get; set; }
|
||||
public int CveConceptoP { get; set; }
|
||||
public double ImporteP { get; set; }
|
||||
public double ValorP { get; set; }
|
||||
public int EstatusP { get; set; }
|
||||
public bool isEditedP { get; set; }
|
||||
|
||||
|
||||
public string NoConceptoD { get; set; }
|
||||
public string ConceptoD { get; set; }
|
||||
public string LabelValorD { get; set; }
|
||||
public int CveConceptoD { get; set; }
|
||||
public double ImporteD { get; set; }
|
||||
public double ValorD { get; set; }
|
||||
public int EstatusD { get; set; }
|
||||
public bool isEditedD { get; set; }
|
||||
}
|
||||
|
||||
private class ConceptosPersonal
|
||||
{
|
||||
public ConceptosPersonal()
|
||||
{
|
||||
Concepto = "";
|
||||
ConceptoD = "";
|
||||
CveConcepto = 0;
|
||||
CveConceptoD = 0;
|
||||
Estatus = 0;
|
||||
Estatus = 0;
|
||||
}
|
||||
public string Concepto { get; set; }
|
||||
public int CveConcepto { get; set; }
|
||||
public decimal Importe { get; set; }
|
||||
public int Estatus { get; set; }
|
||||
|
||||
public string ConceptoD { get; set; }
|
||||
public int CveConceptoD { get; set; }
|
||||
public decimal ImporteD { get; set; }
|
||||
public int EstatusD { get; set; }
|
||||
}
|
||||
#region Propiedades
|
||||
private int CvePersonal
|
||||
{
|
||||
get { return ViewState["CvePersonal"] != null ? ViewState["CvePersonal"].ToString().ToEntero() : 0; }
|
||||
set { ViewState["CvePersonal"] = value; }
|
||||
}
|
||||
private int CveTipoPeriodo
|
||||
{
|
||||
get { return ViewState["CveTipoPeriodo"] != null ? ViewState["CveTipoPeriodo"].ToString().ToEntero() : 0; }
|
||||
set
|
||||
{
|
||||
ViewState["CveTipoPeriodo"] = value;
|
||||
}
|
||||
}
|
||||
private int CvePeriodoFiniquito
|
||||
{
|
||||
get { return ViewState["CvePeriodoFiniquito"] != null ? ViewState["CvePeriodoFiniquito"].ToString().ToEntero() : 0; }
|
||||
set { ViewState["CvePeriodoFiniquito"] = value; }
|
||||
}
|
||||
|
||||
private int GCEstatus
|
||||
{
|
||||
get { return ViewState["GCEstatus"] != null ? ViewState["GCEstatus"].ToString().ToEntero() : 0; }
|
||||
set { ViewState["GCEstatus"] = value; }
|
||||
}
|
||||
private int GCCveConcepto
|
||||
{
|
||||
get { return ViewState["GCCveConcepto"] != null ? ViewState["GCCveConcepto"].ToString().ToEntero() : 0; }
|
||||
set { ViewState["GCCveConcepto"] = value; }
|
||||
}
|
||||
private decimal GCImporte
|
||||
{
|
||||
get { return ViewState["GCImporte"] != null ? ViewState["GCImporte"].ToString().ToDecimal() : 0; }
|
||||
set { ViewState["GCImporte"] = value; }
|
||||
}
|
||||
|
||||
|
||||
private DataTable DTConceptosPersonal
|
||||
{
|
||||
get { return ViewState["DTConceptosPersonal"] != null ? (DataTable)ViewState["DTConceptosPersonal"] : null; }
|
||||
set { ViewState["DTConceptosPersonal"] = value; }
|
||||
}
|
||||
private DataTable DTConceptos
|
||||
{
|
||||
get { return ViewState["DTConceptos"] != null ? (DataTable)ViewState["DTConceptos"] : null; }
|
||||
set { ViewState["DTConceptos"] = value; }
|
||||
}
|
||||
private bool esLiquidacion
|
||||
{
|
||||
get { return ViewState["esLiquidacion"] != null ? System.Convert.ToBoolean(ViewState["esLiquidacion"]) : false; }
|
||||
set { ViewState["esLiquidacion"] = value; }
|
||||
}
|
||||
#endregion
|
||||
|
||||
private List<ConceptosPersonal> ConceptsPersonas
|
||||
{
|
||||
get
|
||||
{
|
||||
List<ConceptosPersonal> listaconceptos = new List<ConceptosPersonal>();
|
||||
decimal TotalP = 0;
|
||||
decimal TotalD = 0;
|
||||
if ((!Information.IsNothing(DTConceptosPersonal) && DTConceptosPersonal.Rows.Count > 0))
|
||||
{
|
||||
DataTable dtP = DTConceptosPersonal.FiltraParametros("Tipo=1");
|
||||
DataTable dtD = DTConceptosPersonal.FiltraParametros("Tipo=2");
|
||||
var noP = dtP.Rows.Count;
|
||||
var noD = dtD.Rows.Count;
|
||||
var max = noP > noD ? noP : noD;
|
||||
TotalP = dtP.SUM("Importe").ToString().ToDecimal();
|
||||
TotalD = dtD.SUM("Importe").ToString().ToDecimal();
|
||||
for (int index = 0; index <= max; index++)
|
||||
{
|
||||
ConceptosPersonal obj = new ConceptosPersonal();
|
||||
if (index < noP)
|
||||
{
|
||||
obj.Importe = dtP.Rows[index]["Importe"].ToString().ToDecimal();
|
||||
obj.CveConcepto = dtP.Rows[index]["CveConcepto"].ToString().ToEntero();
|
||||
obj.Concepto = dtP.Rows[index]["Concepto"].ToString();
|
||||
obj.Estatus = dtP.Rows[index]["Estatus"].ToString().ToEntero();
|
||||
}
|
||||
else if (index == noP)
|
||||
{
|
||||
obj.Estatus = -1;
|
||||
obj.Concepto = "Agregar";
|
||||
}
|
||||
if (index < noD)
|
||||
{
|
||||
obj.ImporteD = dtD.Rows[index]["Importe"].ToString().ToDecimal();
|
||||
obj.CveConceptoD = dtD.Rows[index]["CveConcepto"].ToString().ToEntero();
|
||||
obj.ConceptoD = dtD.Rows[index]["Concepto"].ToString();
|
||||
obj.EstatusD = dtD.Rows[index]["Estatus"].ToString().ToEntero();
|
||||
}
|
||||
else if (index == noD)
|
||||
{
|
||||
obj.EstatusD = -1;
|
||||
obj.ConceptoD = "Agregar";
|
||||
}
|
||||
listaconceptos.Add(obj);
|
||||
}
|
||||
}
|
||||
listaconceptos.Add(new ConceptosPersonal());
|
||||
|
||||
|
||||
ConceptosPersonal objST = new ConceptosPersonal();
|
||||
objST.Importe = TotalP;
|
||||
objST.CveConcepto = 0;
|
||||
objST.Concepto = "Total Percepciones";
|
||||
objST.Estatus = -2;
|
||||
objST.ImporteD = TotalD;
|
||||
objST.CveConceptoD = 0;
|
||||
objST.ConceptoD = "Total Deducciones";
|
||||
objST.EstatusD = -2;
|
||||
|
||||
listaconceptos.Add(objST);
|
||||
|
||||
ConceptosPersonal objT = new ConceptosPersonal();
|
||||
|
||||
objT.CveConcepto = 0;
|
||||
objT.Concepto = "";
|
||||
objT.Estatus = -3;
|
||||
objT.ImporteD = objST.Importe + objST.ImporteD;
|
||||
objT.CveConceptoD = 0;
|
||||
objT.ConceptoD = "Total";
|
||||
objT.EstatusD = -3;
|
||||
listaconceptos.Add(objT);
|
||||
return listaconceptos;
|
||||
}
|
||||
}
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
CargaDdlPersonal();
|
||||
CargaMotivoBaja();
|
||||
CvePeriodoFiniquito = 0;
|
||||
if (Request["CvePersonal"] != null && Request["CvePersonal"].ToString().ToEntero() > 0)
|
||||
{
|
||||
CvePersonal = Request["CvePersonal"].ToString().ToEntero();
|
||||
}
|
||||
else
|
||||
{
|
||||
CvePersonal = -1;
|
||||
}
|
||||
if (!CargaDatosFiniquito())
|
||||
{
|
||||
}
|
||||
RegistraScript("$('#ModalEmpleados').modal();");
|
||||
}
|
||||
|
||||
if (CvePersonal > 0 & CvePeriodoFiniquito > 0)
|
||||
{
|
||||
LtlEmpleadoCancelar.Visible = true;
|
||||
}
|
||||
}
|
||||
|
||||
private void CargaMotivoBaja()
|
||||
{
|
||||
DdlMotivoBaja.DataSource = GlobalDTMotivoBaja.FiltraParametros("CveEmpresa = " + UsuarioActual.CveEmpresa);
|
||||
DdlMotivoBaja.DataBind();
|
||||
}
|
||||
private void CargaDdlPersonal()
|
||||
{
|
||||
ClsRH ObjPersonal = new ClsRH();
|
||||
if (ObjPersonal.GetPersonal(-1, UsuarioActual.CveEmpresa))
|
||||
{
|
||||
DdlPersonal.DataSource = ObjPersonal.DtResultados;
|
||||
DdlPersonal.DataBind();
|
||||
}
|
||||
ObjPersonal.Dispose();
|
||||
}
|
||||
|
||||
private bool CargaDatosFiniquito()
|
||||
{
|
||||
bool retorno = true;
|
||||
if (CvePersonal > 0)
|
||||
{
|
||||
DdlPersonal.SelectedValueExist(CvePersonal.ToString());
|
||||
string Nombre = "";
|
||||
string FechaBaja = "";
|
||||
string EstatusPersonal = "";
|
||||
CvePeriodoFiniquito = 0;
|
||||
CveTipoPeriodo = 0;
|
||||
esLiquidacion = false;
|
||||
pnlupValoresFiniquito.Visible = false;
|
||||
DdlMotivoBaja.SelectedValue = "-1";
|
||||
using (ClsRH ObjPersonal = new ClsRH())
|
||||
{
|
||||
if (ObjPersonal.GetPersonal(CvePersonal, UsuarioActual.CveEmpresa) && ObjPersonal.DtResultados.Rows.Count > 0)
|
||||
{
|
||||
DataRow prow = ObjPersonal.DtResultados.Rows[0];
|
||||
Nombre = prow["Nombre"].ToString();
|
||||
FechaBaja = string.Format("{0:dd/MM/yyyy}", ObjPersonal.FechaBaja);
|
||||
EstatusPersonal = string.Format("{0}", prow["EstatusPersonal"]);
|
||||
CveTipoPeriodo = prow["CveTipoPeriodo"].ToString().ToEntero();
|
||||
}
|
||||
if (ObjPersonal.GetPersonalAltas(CvePersonal) && ObjPersonal.DtResultados.Rows.Count > 0)
|
||||
{
|
||||
DataRow prow = ObjPersonal.DtResultados.Rows[0];
|
||||
CvePeriodoFiniquito = prow["CvePeriodoFiniquito"].ToString().ToEntero();
|
||||
FechaBaja = string.Format("{0:dd/MM/yyyy}", prow["FechaFin"]);
|
||||
DdlMotivoBaja.SelectedValueExist(prow["CveMotivoBaja"].ToString().ToEntero());
|
||||
var stringesliquidacion = prow["esLiquidacion"].ToString();
|
||||
esLiquidacion = (stringesliquidacion == "True" || stringesliquidacion == "1");
|
||||
ChkesLiquidacion.Checked = esLiquidacion;
|
||||
}
|
||||
}
|
||||
if (DdlMotivoBaja.SelectedValue.ToEntero() > 0)
|
||||
LblMotivoBaja.Text = DdlMotivoBaja.SelectedItem.Text;
|
||||
else
|
||||
LblMotivoBaja.Text = "";
|
||||
HypEmpleado.Text = Nombre;
|
||||
HypEmpleado.NavigateUrl = string.Format("/RH/Personal.aspx?CvePersonal={0}", CvePersonal);
|
||||
LblFechaBaja.Text = FechaBaja;
|
||||
LblEstatus.Text = EstatusPersonal;
|
||||
TxtFechaBaja.Text = FechaBaja;
|
||||
DdlTipoPeriodo_SelectedIndexChanged(null, null);
|
||||
LblPerido.Text = DdlPeriodo.SelectedItem.Text;
|
||||
if (CvePeriodoFiniquito <= 0)
|
||||
retorno = false;
|
||||
pnlupValoresFiniquito.Visible = true;
|
||||
using (ClsNominas ObjNom = new ClsNominas())
|
||||
{
|
||||
if (ObjNom.GetFiniquitosPersonal(CvePersonal, UsuarioActual.CveEmpresa))
|
||||
{
|
||||
DataRow finrow = ObjNom.DtResultados.Rows[0];
|
||||
TxtAntiguedad.Text = $"{finrow["Antiguedad"]}";
|
||||
TxtdiasVacaciones.Text = $"{finrow["Diasvacaciones"]}";
|
||||
TxtDiasLaborados.Text = $"{finrow["diaslaborados"]}";
|
||||
TxtDiasProporcion.Text = $"{finrow["diasProporcion"]}";
|
||||
|
||||
TxtVaciones.Text = $"{finrow["Vacaciones"]}";
|
||||
TxtDiasPago.Text = $"{finrow["Diasvacaciones"]}";
|
||||
TxtDiasPendientes.Text = $"{finrow["diasporpagar"]}";
|
||||
TxtVacacionesporPagar.Text = $"{finrow["VacacionesporPagar"]}";
|
||||
|
||||
TxtPorcentjePrima.Text = $"{finrow["PrimaPorcentaje"]}";
|
||||
TxtPrimaVacacional.Text = $"{finrow["PrimaVacacional"]}";
|
||||
TxtPrimaPagada.Text = $"{finrow["PrimaPagada"]}";
|
||||
TxtPrimaPorPagar.Text = $"{finrow["PrimaVacacionalPorPagar"]}";
|
||||
}
|
||||
if (ObjNom.DTSetResultados.Tables.Count > 5)
|
||||
{
|
||||
DataTable dtconceptos = ObjNom.DTSetResultados.Tables[1];
|
||||
DataTable dtconpersonal = ObjNom.DTSetResultados.Tables[5];
|
||||
|
||||
int maxFila = dtconpersonal.MAX("Fila", "Tipo<3").ToEntero();
|
||||
List<NConcepto> lfin = new List<NConcepto>();
|
||||
|
||||
if (maxFila > 0)
|
||||
{
|
||||
DataRow conPerrow;
|
||||
DataRow conrow;
|
||||
NConcepto sr;
|
||||
|
||||
for (int i = 1; i <= maxFila; i++)
|
||||
{
|
||||
sr = new NConcepto();
|
||||
conPerrow = dtconpersonal.FiltroPrimero(string.Format("Tipo=1 AND Fila ={0}", i));
|
||||
if (conPerrow != null)
|
||||
{
|
||||
sr.CveConceptoP = conPerrow["CveConcepto"].ToString().ToEntero();
|
||||
conrow = dtconceptos.FiltroPrimero(string.Format("CveConcepto ={0}", sr.CveConceptoP));
|
||||
sr.ConceptoP = conrow["Concepto"].ToString();
|
||||
sr.ValorP = conPerrow["Valor"].ToString().ToDouble();
|
||||
sr.ImporteP = conPerrow["Importe"].ToString().ToDouble();
|
||||
sr.NoConceptoP = conrow["Codigo"].ToString();
|
||||
}
|
||||
|
||||
|
||||
conPerrow = dtconpersonal.FiltroPrimero(string.Format("Tipo=2 AND Fila ={0}", i));
|
||||
if (conPerrow != null)
|
||||
{
|
||||
sr.CveConceptoD = conPerrow["CveConcepto"].ToString().ToEntero();
|
||||
conrow = dtconceptos.FiltroPrimero(string.Format("CveConcepto ={0}", sr.CveConceptoD));
|
||||
sr.ConceptoD = conrow["Concepto"].ToString();
|
||||
sr.ValorD= conPerrow["Valor"].ToString().ToDouble();
|
||||
sr.ImporteD = conPerrow["Importe"].ToString().ToDouble();
|
||||
sr.NoConceptoD = conrow["Codigo"].ToString();
|
||||
}
|
||||
|
||||
|
||||
|
||||
lfin.Add(sr);
|
||||
}
|
||||
}
|
||||
GvConceptos.DataSource = lfin;
|
||||
GvConceptos.DataBind();
|
||||
}
|
||||
}
|
||||
//GvConceptos.DataSource = ConceptsPersonas;
|
||||
//GvConceptos.DataBind();
|
||||
}
|
||||
else
|
||||
retorno = false;
|
||||
return retorno;
|
||||
}
|
||||
|
||||
|
||||
protected void LnkCampiarEmpleado_Click(object sender, EventArgs e)
|
||||
{
|
||||
CvePersonal = DdlPersonal.SelectedValue.ToEntero();
|
||||
|
||||
|
||||
using (ClsRH ObjPersonal = new ClsRH())
|
||||
{
|
||||
if (ObjPersonal.UpPersonalAltas(CvePersonal, "", TxtFechaBaja.Text.ToDateTime().ToString("yyyy/MM/dd"), DdlPeriodo.SelectedValue.ToEntero(), DdlMotivoBaja.SelectedValue.ToEntero(), ChkesLiquidacion.Checked) && ObjPersonal.DtResultados.Rows.Count > 0)
|
||||
{
|
||||
}
|
||||
}
|
||||
if (pnlupValoresFiniquito.Visible)
|
||||
{
|
||||
}
|
||||
if (!CargaDatosFiniquito())
|
||||
RegistraScript("$('#ModalEmpleados').modal('hide');");
|
||||
upDatos.Update();
|
||||
}
|
||||
protected void LnkCalcular_Click(object sender, EventArgs e)
|
||||
{
|
||||
}
|
||||
protected void LnkAutorizar_Click(object sender, EventArgs e)
|
||||
{
|
||||
}
|
||||
protected void LnkTimbrar_Click(object sender, EventArgs e)
|
||||
{
|
||||
}
|
||||
protected void LnkFormatoRenuncia_Click(object sender, EventArgs e)
|
||||
{
|
||||
}
|
||||
protected void DdlPersonal_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
Response.Redirect($"/Nomina/Finiquito.aspx?CvePersonal={DdlPersonal.SelectedValue}");
|
||||
}
|
||||
protected void DdlTipoPeriodo_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
int CveTipoPeriodoactual = DdlTipoPeriodo.SelectedValue.ToEntero() > 0 ? DdlTipoPeriodo.SelectedValue.ToEntero() : CveTipoPeriodo;
|
||||
string fechabaja = TxtFechaBaja.Text;
|
||||
DataTable dtperiodos = new DataTable();
|
||||
ClsNominas ObjPeriodos = new ClsNominas();
|
||||
if (ObjPeriodos.GetPeriodos(-1, UsuarioActual.CveEmpresa, -1, -1, -1))
|
||||
{
|
||||
dtperiodos = ObjPeriodos.DtResultados;
|
||||
if (Information.IsNothing(sender) && CvePeriodoFiniquito > 0)
|
||||
{
|
||||
DataRow row = dtperiodos.FiltroPrimero(string.Format("CvePeriodo={0} ", CvePeriodoFiniquito));
|
||||
if (!Information.IsNothing(row))
|
||||
{
|
||||
CveTipoPeriodoactual = row["CveTipoPeriodo"].ToString().ToEntero();
|
||||
DdlTipoPeriodo.SelectedValueExist(CveTipoPeriodoactual == 6 ? "6" : "-1");
|
||||
}
|
||||
}
|
||||
dtperiodos = ObjPeriodos.DtResultados.FiltraParametros(string.Format("(Estatus IN (1,2,3,4) AND CveTipoPeriodo={0}) ", CveTipoPeriodoactual));
|
||||
// FechaInicio, P.FechaFin
|
||||
DdlPeriodo.Items.Clear();
|
||||
DdlPeriodo.Items.Add(new ListItem("Seleccione", "-1"));
|
||||
DdlPeriodo.SelectedValue = "-1";
|
||||
DdlPeriodo.DataSource = dtperiodos;
|
||||
}
|
||||
else
|
||||
DdlPeriodo.DataSource = null;
|
||||
ObjPeriodos.Dispose();
|
||||
DdlPeriodo.DataBind();
|
||||
if (fechabaja.Length > 0 && dtperiodos.Rows.Count > 0)
|
||||
{
|
||||
if ((CvePeriodoFiniquito > 0) && Information.IsNothing(sender))
|
||||
DdlPeriodo.SelectedValueExist(CvePeriodoFiniquito);
|
||||
else
|
||||
{
|
||||
DataRow row = dtperiodos.FiltroPrimero(string.Format("(FechaInicio<='{0:yyyy/MM/dd}' AND FechaFin>='{0:yyyy/MM/dd}') ", fechabaja.ToDate()));
|
||||
if (!Information.IsNothing(row))
|
||||
DdlPeriodo.SelectedValueExist(row["CvePeriodo"]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void GvConceptos_RowDataBound(object sender, GridViewRowEventArgs e)
|
||||
{
|
||||
if (e.Row.RowType == DataControlRowType.DataRow)
|
||||
{
|
||||
// Datakeys
|
||||
// Concepto,CveConcepto,Importe,Estatus,ConceptoD,CveConceptoD,ImporteD,EstatusD
|
||||
int CveConcepto = e.Row.DataKey("CveConceptoP").ToEntero();
|
||||
int CveConceptoD = e.Row.DataKey("CveConceptoD").ToEntero();
|
||||
// Dim Importe As Decimal = e.Row.DataKey("Importe").ToDecimal()
|
||||
// Dim ImporteD As Decimal = e.Row.DataKey("ImporteD").ToDecimal()
|
||||
int Estatus = e.Row.DataKey("EstatusP").ToEntero();
|
||||
int EstatusD = e.Row.DataKey("EstatusD").ToEntero();
|
||||
|
||||
// Controles
|
||||
Label LtlConcepto = e.Row.FCLabel("LtlConcepto");
|
||||
LinkButton LnkConcepto = e.Row.FCLinkButton("LnkConcepto");
|
||||
Label LtlConceptoD = e.Row.FCLabel("LtlConceptoD");
|
||||
LinkButton LnkConceptoD = e.Row.FCLinkButton("LnkConceptod");
|
||||
Label LtlImporte = e.Row.FCLabel("LtlImporte");
|
||||
LinkButton LnkImporte = e.Row.FCLinkButton("LnkImporte");
|
||||
Label LtlImporteD = e.Row.FCLabel("LtlImporteD");
|
||||
LinkButton LnkImporteD = e.Row.FCLinkButton("LnkImporteD");
|
||||
|
||||
if (Estatus < -1 | EstatusD < -1)
|
||||
e.Row.CssClass = "ConceptosTotales";
|
||||
if (CveConcepto == 0 && (Estatus == 0 || Estatus == -1 || Estatus == -3))
|
||||
LtlImporte.Text = "";
|
||||
|
||||
if (CveConceptoD == 0 && (EstatusD == 0 || EstatusD == -1))
|
||||
LtlImporteD.Text = "";
|
||||
|
||||
if (Estatus == -1)
|
||||
LtlConcepto.Visible = false;
|
||||
else if (Estatus > 0)
|
||||
LtlImporte.Visible = false;
|
||||
|
||||
if (EstatusD == -1)
|
||||
LtlConceptoD.Visible = false;
|
||||
else if (EstatusD > 0)
|
||||
LtlImporteD.Visible = false;
|
||||
|
||||
|
||||
LnkConcepto.Visible = !LtlConcepto.Visible;
|
||||
LnkConceptoD.Visible = !LtlConceptoD.Visible;
|
||||
LnkImporte.Visible = !LtlImporte.Visible;
|
||||
LnkImporteD.Visible = !LtlImporteD.Visible;
|
||||
}
|
||||
}
|
||||
|
||||
protected void LnkConcepto_Click(object sender, EventArgs e)
|
||||
{
|
||||
GridViewRow gvRow = (GridViewRow)((LinkButton)sender).NamingContainer;
|
||||
GCEstatus = gvRow.DataKey("Estatus").ToEntero();
|
||||
GCCveConcepto = gvRow.DataKey("CveConcepto").ToEntero();
|
||||
GCImporte = gvRow.DataKey("Importe").ToDecimal();
|
||||
OpenModalConceptos(1);
|
||||
}
|
||||
protected void LnkConceptoD_Click(object sender, EventArgs e)
|
||||
{
|
||||
GridViewRow gvRow = (GridViewRow)((LinkButton)sender).NamingContainer;
|
||||
GCEstatus = gvRow.DataKey("Estatus").ToEntero();
|
||||
GCCveConcepto = gvRow.DataKey("CveConcepto").ToEntero();
|
||||
GCImporte = gvRow.DataKey("Importe").ToDecimal();
|
||||
OpenModalConceptos(2);
|
||||
}
|
||||
|
||||
private void OpenModalConceptos(int Tipo)
|
||||
{
|
||||
if (GCEstatus == -1)
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
RegistraScript("$('#ModalConceptos').modal();");
|
||||
}
|
||||
|
||||
protected void LnkAceptarConceptos_Click(object sender, EventArgs e)
|
||||
{
|
||||
RegistraScript("$('#ModalConceptos').modal('hide');");
|
||||
}
|
||||
}
|
||||
@@ -229,7 +229,7 @@ Partial Class Nomina_Nomina
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
If UsuarioActual.CveEmpresa = 80 OrElse UsuarioActual.CveEmpresa = 72 OrElse UsuarioActual.CveEmpresa = 119 Then
|
||||
If UsuarioActual.CveEmpresa.Contiene(1, 80, 72, 119, 153, 158) Then
|
||||
Response.Redirect("/Nomina/Nomina2.aspx")
|
||||
End If
|
||||
CargaTiposPeriodo()
|
||||
|
||||
@@ -8,6 +8,13 @@
|
||||
color: #5b9bd1;
|
||||
}
|
||||
|
||||
.txtgridsimula {
|
||||
width: 100% !important;
|
||||
min-width: 60px;
|
||||
max-width: 80px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
a.sline {
|
||||
white-space: nowrap;
|
||||
}
|
||||
@@ -60,10 +67,13 @@
|
||||
.isOnlyBisibleP td:nth-child(-n+3) a {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
|
||||
.isOnlyBisibleD td:nth-last-child(-n+3) a {
|
||||
color: #999;
|
||||
}
|
||||
.isOnlyBisibleO td:nth-last-child(-n+3) a {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.GvConceptos {
|
||||
border: 1px solid #E87E04;
|
||||
@@ -1087,7 +1097,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body">
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
@@ -1098,7 +1108,7 @@
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtvacFechaPago" CssClass="form-control input-sm ADSMaskDate" Style="width: 118px" runat="server"></asp:TextBox>
|
||||
@@ -1127,7 +1137,7 @@
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtvacFechaFin" CssClass="form-control input-sm ADSMaskDate" Style="width: 118px" runat="server"></asp:TextBox>
|
||||
<ajax:MaskedEditExtender ID="MeeVacFechaFin" runat="server" TargetControlID="TxtvacFechaFin" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
@@ -1613,7 +1623,7 @@
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
<div id="DSimulador" class="modal ADS fade" role="dialog">
|
||||
<asp:UpdatePanel ID="UpSimulador" class="modal-dialog" tabindex="-1" runat="server" UpdateMode="Conditional">
|
||||
<asp:UpdatePanel ID="UpSimulador" class="modal-dialog modal-lg" tabindex="-1" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-content rowpadding">
|
||||
<div class="modal-header">
|
||||
@@ -1650,6 +1660,76 @@
|
||||
|
||||
</table>--%>
|
||||
<asp:GridView ID="GvConceptossimulador" runat="server" AutoGenerateColumns="False" CssClass="table table-striped table-hover Widthall GvConceptossimulador"
|
||||
Style="text-align: center;" GridLines="None" OnRowDataBound="GvConceptos_RowDataBound" ShowHeaderWhenEmpty="true"
|
||||
DataKeyNames="ConceptoP,CveConceptoP,ImporteP,ValorP,EstatusP,ConceptoD,CveConceptoD,ImporteD,EstatusD,ValorD,isOnlyBisibleD,isOnlyBisibleP,isEditedD,isEditedP">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Concepto">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtlConcepto" runat="server" Text='<%# Eval("ConceptoP") %>' Style="word-break: break-all;"></asp:Label>
|
||||
<asp:LinkButton ID="LnkConcepto" OnClick="LnkConcepto_Click" runat="server" Text='<%# Eval("ConceptoP") %>'></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" Width="23.33%" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Valor">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtlValorP" runat="server" Text='<%# Eval("ValorP", "{0:##,###.##}") %>' ></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right" Width="5%" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Importe">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtlImporte" runat="server" Text='<%# Eval("ImporteP", "${0:N}") %>' ></asp:Label>
|
||||
<asp:LinkButton ID="LnkImporte" OnClick="LnkConcepto_Click" runat="server" Text='<%# Eval("ImporteP", "${0:N}") %>'></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right" Width="5%" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Concepto">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtlConceptoD" runat="server" Text='<%# Eval("ConceptoD") %>' Style="word-break: break-all;"></asp:Label>
|
||||
<asp:LinkButton ID="LnkConceptoD" OnClick="LnkConceptoD_Click" runat="server" Text='<%# Eval("ConceptoD") %>'></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" Width="23.33%" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Valor">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtlValorD" runat="server" Text='<%# Eval("ValorD", "{0:##,###.##}") %>' ></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right" Width="5%" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Importe">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtlImporteD" runat="server" Text='<%# Eval("ImporteD", "${0:N}") %>' ></asp:Label>
|
||||
<asp:LinkButton ID="LnkImporteD" OnClick="LnkConceptoD_Click" runat="server" Text='<%# Eval("ImporteD", "${0:N}") %>'></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right" Width="5%" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Concepto">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtlConceptoO" runat="server" Text='<%# Eval("ConceptoO") %>' Style="word-break: break-all;"></asp:Label>
|
||||
<asp:LinkButton ID="LnkConceptoO" runat="server" Text='<%# Eval("ConceptoO") %>'></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" Width="23.33%" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Valor">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtlValorO" runat="server" Text='<%# Eval("ValorO", "{0:##,###.##}") %>' ></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right" Width="5%" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Importe">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtlImporteO" runat="server" Text='<%# Eval("ImporteO", "${0:N}") %>' ></asp:Label>
|
||||
<asp:LinkButton ID="LnkImporteO" OnClick="LnkConceptoD_Click" runat="server" Text='<%# Eval("ImporteO", "${0:N}") %>'></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right" Width="5%" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<HeaderStyle CssClass="SearchADHeader" />
|
||||
</asp:GridView>
|
||||
|
||||
|
||||
|
||||
<asp:GridView ID="GVConceptosSimuladorObligaciones" runat="server" AutoGenerateColumns="False" CssClass="table table-striped table-hover Widthall GvConceptossimulador"
|
||||
Style="text-align: center;" GridLines="None" OnRowDataBound="GvConceptos_RowDataBound" ShowHeaderWhenEmpty="true"
|
||||
DataKeyNames="ConceptoP,CveConceptoP,ImporteP,ValorP,EstatusP,ConceptoD,CveConceptoD,ImporteD,EstatusD,ValorD,isOnlyBisibleD,isOnlyBisibleP,isEditedD,isEditedP">
|
||||
<Columns>
|
||||
@@ -1673,7 +1753,7 @@
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right" Width="13%" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Concepto">
|
||||
<%--<asp:TemplateField HeaderText="Concepto">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtlConceptoD" runat="server" Text='<%# Eval("ConceptoD") %>' Style="word-break: break-all;"></asp:Label>
|
||||
<asp:LinkButton ID="LnkConceptoD" OnClick="LnkConceptoD_Click" runat="server" Text='<%# Eval("ConceptoD") %>'></asp:LinkButton>
|
||||
@@ -1692,7 +1772,7 @@
|
||||
<asp:LinkButton ID="LnkImporteD" OnClick="LnkConceptoD_Click" runat="server" Text='<%# Eval("ImporteD", "${0:N}") %>'></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right" Width="13%" />
|
||||
</asp:TemplateField>
|
||||
</asp:TemplateField>--%>
|
||||
</Columns>
|
||||
<HeaderStyle CssClass="SearchADHeader" />
|
||||
</asp:GridView>
|
||||
@@ -1709,7 +1789,8 @@
|
||||
<tr id="trnetoapagar">
|
||||
<td colspan="5" class="text-left">Neto a pagar</td>
|
||||
<td colspan="1">
|
||||
<asp:TextBox ID="TxtNetoaPagar" CssClass="maskedmoney" runat="server"></asp:TextBox></td>
|
||||
<asp:TextBox ID="TxtNetoaPagar" CssClass="maskedmoney txtgridsimula" runat="server"></asp:TextBox></td>
|
||||
<td colspan="3"></td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
@@ -2060,7 +2141,7 @@
|
||||
$('.GvConceptos').prepend("<tr class=\"thTituloConcepto\"> <th scope=\"col\" colspan=\"3\">Percepciones</th><th scope=\"col\" colspan=\"3\">Deducciones</th> </tr>");
|
||||
}
|
||||
if ($('.GvConceptossimulador .thTituloConcepto').length == 0) {
|
||||
$('.GvConceptossimulador').prepend("<tr class=\"thTituloConcepto\"> <th scope=\"col\" colspan=\"3\">Percepciones</th><th scope=\"col\" colspan=\"3\">Deducciones</th> </tr>");
|
||||
$('.GvConceptossimulador').prepend("<tr class=\"thTituloConcepto\"> <th scope=\"col\" colspan=\"3\">Percepciones</th><th scope=\"col\" colspan=\"3\">Deducciones</th> <th scope=\"col\" colspan=\"3\">Obligaciones</th> </tr>");
|
||||
}
|
||||
//$('.GvConceptossimulador').append($('#Totalesperdeduccion'));
|
||||
$('.GvConceptossimulador').append($('#trnetoapagar'));
|
||||
|
||||
@@ -1924,6 +1924,20 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
public int EstatusD { get; set; }
|
||||
public int isEditedD { get; set; }
|
||||
public int isOnlyBisibleD { get; set; }
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public string NoConceptoO { get; set; }
|
||||
public string ConceptoO { get; set; }
|
||||
public string LabelValorO { get; set; }
|
||||
public int CveConceptoO { get; set; }
|
||||
public double ImporteO { get; set; }
|
||||
public double ValorO { get; set; }
|
||||
public int EstatusO { get; set; }
|
||||
public int isEditedO { get; set; }
|
||||
public int isOnlyBisibleO { get; set; }
|
||||
}
|
||||
|
||||
int CveConceptoPolgvc, CveConceptoDolgvc;
|
||||
@@ -1958,6 +1972,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
LinkButton LnkImporte = e.Row.FCLinkButton("LnkImporte");
|
||||
Label LtlImporteD = e.Row.FCLabel("LtlImporteD");
|
||||
LinkButton LnkImporteD = e.Row.FCLinkButton("LnkImporteD");
|
||||
|
||||
//isEditedD
|
||||
if (isOnlyBisibleP == 1)
|
||||
{
|
||||
@@ -2009,6 +2024,22 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
LnkImporte.Visible = !LtlImporte.Visible;
|
||||
LnkImporteD.Visible = !LtlImporteD.Visible;
|
||||
|
||||
LinkButton LnkConceptoO = e.Row.FCLinkButton("LnkConceptoO");
|
||||
LinkButton LnkImporteO = e.Row.FCLinkButton("LnkImporteO");
|
||||
if (LnkConceptoO != null)
|
||||
{
|
||||
LnkConceptoO.Visible = false;
|
||||
LnkImporteO.Visible = false;
|
||||
if (e.Row.DBCampo("ImporteO").ToDecimal() == 0)
|
||||
{
|
||||
e.Row.FCLabel("LtlConceptoO").Visible = false;
|
||||
e.Row.FCLabel("LtlImporteO").Visible = false;
|
||||
if (e.Row.DataKey("isOnlyBisibleO").ToEntero() == 1)
|
||||
{
|
||||
e.Row.CssClass = string.Format("{0} isOnlyBisibleO", e.Row.CssClass);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
CveConceptoPolgvc = CveConcepto;
|
||||
CveConceptoDolgvc = CveConceptoD;
|
||||
@@ -3772,6 +3803,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
int CvePersonal = 0;
|
||||
int CveNomina = 0;
|
||||
int CveMetodoPago = 0;
|
||||
double SubTotal = 0;
|
||||
double Total = 0;
|
||||
int CveMoneda = 1;
|
||||
#endregion
|
||||
@@ -3789,7 +3821,10 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
CveNomina = 0;
|
||||
CvePersonal = rtemp["CvePersonal"].ToString().ToEntero();
|
||||
CveMetodoPago = rtemp["CveMetodoPago"].ToString().ToEntero();
|
||||
SubTotal = 0;//cambiar reparar
|
||||
Total = 0;//cambiar reparar
|
||||
SubTotal = rtemp["SumaPercepciones"].ToString().ToDouble();
|
||||
Total = rtemp["Total"].ToString().ToDouble();
|
||||
if (CvePersonal > 0)
|
||||
{
|
||||
|
||||
@@ -3797,13 +3832,14 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
{
|
||||
if (objNomina.GetNom_Nominas(-1, CvePersonal, CvePeriodoSeleccionado, -1, UsuarioActual.CveEmpresa))
|
||||
{
|
||||
|
||||
if (objNomina.DtResultados.Rows.Count > 0)
|
||||
{
|
||||
CveNomina = objNomina.CveNomina;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (objNomina.AddNom_Nominas(-1, 1, CvePersonal, CvePeriodoSeleccionado, Total, 0, 0, Total, CveMoneda, 1, CveMetodoPago, DateTime.Now, "Deducciones nómina",
|
||||
if (objNomina.AddNom_Nominas(-1, 1, CvePersonal, CvePeriodoSeleccionado, SubTotal, 0, 0, Total, CveMoneda, 1, CveMetodoPago, DateTime.Now, "Deducciones nómina",
|
||||
"", "", "", "", 0, 0, 0, new DateTime(), new DateTime(), new DateTime(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa))
|
||||
{
|
||||
CveNomina = objNomina.CveNomina;
|
||||
@@ -4094,8 +4130,10 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
{
|
||||
DataTable dtper = dtConceptos.FiltraParametros("Tipo IN ('P') AND EsPadre = 1 ");
|
||||
DataTable dtded = dtConceptos.FiltraParametros("Tipo IN ('D') AND EsPadre = 1 ");
|
||||
DataTable dtObl = dtConceptos.FiltraParametros("Tipo IN ('O') AND EsPadre = 1 ");
|
||||
dtper.Columns.Add("BorradoLogico", typeof(int));
|
||||
dtded.Columns.Add("BorradoLogico", typeof(int));
|
||||
dtObl.Columns.Add("BorradoLogico", typeof(int));
|
||||
|
||||
foreach (DataRow row in dtper.Rows)
|
||||
{
|
||||
@@ -4119,13 +4157,26 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
row["BorradoLogico"] = BorradoLogico;
|
||||
}
|
||||
dtded.AcceptChanges();
|
||||
foreach (DataRow row in dtObl.Rows)
|
||||
{
|
||||
int BorradoLogico = 0;
|
||||
int CveConcepto = row["CveConcepto"].ToString().ToEntero();
|
||||
if (!(dtempleados.SUM(string.Format("[V_{0}]", CveConcepto)) > 0))
|
||||
{
|
||||
BorradoLogico = 1;
|
||||
}
|
||||
row["BorradoLogico"] = BorradoLogico;
|
||||
}
|
||||
dtObl.AcceptChanges();
|
||||
dtper = dtper.FiltraParametros("BorradoLogico=0");
|
||||
dtded = dtded.FiltraParametros("BorradoLogico=0");
|
||||
dtObl = dtObl.FiltraParametros("BorradoLogico=0");
|
||||
int maxper = dtper.Rows.Count;
|
||||
int maxded = dtded.Rows.Count;
|
||||
int maxObl = dtObl.Rows.Count;
|
||||
int i = 0;
|
||||
List<NConcepto> lconc = new List<NConcepto>();
|
||||
for (i = 0; i < maxper || i < maxded; i++)
|
||||
for (i = 0; i < maxper || i < maxded || i < maxObl; i++)
|
||||
{
|
||||
NConcepto nConcepto = new NConcepto();
|
||||
DataRow row;
|
||||
@@ -4157,6 +4208,20 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
nConcepto.ImporteD = Importe;
|
||||
nConcepto.ValorD = dtempleados.SUM(string.Format("[VAL_{0}]", CveConcepto), string.Format("CvePersonal = {0}", 1));
|
||||
}
|
||||
if (maxObl > i)
|
||||
{
|
||||
row = dtObl.Rows[i];
|
||||
int CveConcepto = row["CveConcepto"].ToString().ToEntero();
|
||||
string Concepto = row["Concepto"].ToString();
|
||||
string Codigo = row["Codigo"].ToString();
|
||||
//bool visible = (dtempleados.SUM(string.Format("[V_{0}]", CveConcepto)) > 0);
|
||||
double Importe = dtempleados.SUM(string.Format("[V_{0}]", CveConcepto), string.Format("CvePersonal = {0}", 1));
|
||||
nConcepto.CveConceptoO = CveConcepto;
|
||||
nConcepto.ConceptoO = Concepto;
|
||||
nConcepto.NoConceptoO = Codigo;
|
||||
nConcepto.ImporteO = Importe;
|
||||
nConcepto.ValorO = dtempleados.SUM(string.Format("[VAL_{0}]", CveConcepto), string.Format("CvePersonal = {0}", 1));
|
||||
}
|
||||
lconc.Add(nConcepto);
|
||||
}
|
||||
|
||||
@@ -4173,6 +4238,11 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
SubTotales.ConceptoD = "Total Deducciones";
|
||||
SubTotales.EstatusD = -2;
|
||||
SubTotales.ImporteD = dtempleados.SUM("SumaDeducciones", string.Format("CvePersonal = {0}", 1));
|
||||
SubTotales.CveConceptoD = 0;
|
||||
|
||||
SubTotales.ConceptoO = "Total Obligaciones";
|
||||
SubTotales.EstatusO = -2;
|
||||
SubTotales.ImporteO = dtempleados.SUM("SumaObligaciones", string.Format("CvePersonal = {0}", 1));
|
||||
|
||||
//NConcepto Totales = new NConcepto();
|
||||
//Totales.CveConceptoD = 0;
|
||||
|
||||
@@ -227,6 +227,8 @@ Partial Class Nomina_ReportePTU
|
||||
End If
|
||||
GVCalcularUtilidades.DataSource = dt
|
||||
GVCalcularUtilidades.DataBind()
|
||||
upDatosPA_N.Update()
|
||||
|
||||
End Sub
|
||||
Protected Sub GVTipoPeriodo_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
@@ -136,47 +136,51 @@ Partial Class CatSubProyectos
|
||||
|
||||
Private Sub CargaSegmentosNegocio()
|
||||
DdlSegmentoNegocio.Items.Clear()
|
||||
Dim Cuenta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
|
||||
If Cuenta.GetSegmentosNegocio(-1, "-1") Then
|
||||
|
||||
DtSegmentosNegocio = Cuenta.DtResultados.FiltraParametros("Id > 0")
|
||||
DtSegmentosNegocio.Rows.Add(New Object() {0, 0, " - ", "", ""})
|
||||
|
||||
Dim dataView As New DataView(DtSegmentosNegocio)
|
||||
dataView.Sort = "Id ASC"
|
||||
|
||||
DtSegmentosNegocio = dataView.ToTable
|
||||
|
||||
If UsuarioActual.Empresa.UsaContabilidad Then
|
||||
|
||||
Dim Cuenta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
|
||||
If Cuenta.GetSegmentosNegocio(-1, "-1") Then
|
||||
|
||||
DtSegmentosNegocio = Cuenta.DtResultados.FiltraParametros("Id > 0")
|
||||
DtSegmentosNegocio.Rows.Add(New Object() {0, 0, " - ", "", ""})
|
||||
|
||||
Dim dataView As New DataView(DtSegmentosNegocio)
|
||||
dataView.Sort = "Id ASC"
|
||||
|
||||
DtSegmentosNegocio = dataView.ToTable
|
||||
|
||||
End If
|
||||
Cuenta.Dispose()
|
||||
DdlSegmentoNegocio.DataSource = DtSegmentosNegocio : DdlSegmentoNegocio.DataBind()
|
||||
DdlSegmentoNegocio.Items.Insert(0, New ListItem("-", "-1"))
|
||||
|
||||
End If
|
||||
Cuenta.Dispose()
|
||||
DdlSegmentoNegocio.DataSource = DtSegmentosNegocio : DdlSegmentoNegocio.DataBind()
|
||||
DdlSegmentoNegocio.Items.Insert(0, New ListItem("-", "-1"))
|
||||
|
||||
For Each Gvr As GridViewRow In GvDatos.Rows
|
||||
'If Gvr.DataKey("IdSegNeg").ToEntero > 0 Then
|
||||
'For Each Gvr As GridViewRow In GvDatos.Rows
|
||||
' 'If Gvr.DataKey("IdSegNeg").ToEntero > 0 Then
|
||||
|
||||
' 'COMENTADO PORQUE TRUENA | IPP - 17 AGOSTO 2017
|
||||
' 'Dim Cuenta2 As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
' 'If Cuenta2.GetSegmentosNegocio(Gvr.DataKey("IdSegNeg").ToEntero, "-1") Then
|
||||
' ' Dim DRES2 As DataRow
|
||||
' ' DRES2 = Cuenta2.DtResultados(0)
|
||||
' ' Gvr.Cells(1).Text = DRES2("Nombre").ToString
|
||||
' 'Else
|
||||
' ' Gvr.Cells(1).Text = "-"
|
||||
' 'End If
|
||||
' 'Cuenta2.Dispose()
|
||||
' ' 'COMENTADO PORQUE TRUENA | IPP - 17 AGOSTO 2017
|
||||
' ' 'Dim Cuenta2 As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
' ' 'If Cuenta2.GetSegmentosNegocio(Gvr.DataKey("IdSegNeg").ToEntero, "-1") Then
|
||||
' ' ' Dim DRES2 As DataRow
|
||||
' ' ' DRES2 = Cuenta2.DtResultados(0)
|
||||
' ' ' Gvr.Cells(1).Text = DRES2("Nombre").ToString
|
||||
' ' 'Else
|
||||
' ' ' Gvr.Cells(1).Text = "-"
|
||||
' ' 'End If
|
||||
' ' 'Cuenta2.Dispose()
|
||||
|
||||
' 'If DtSegmentosNegocio IsNot Nothing AndAlso DtSegmentosNegocio.Rows.Count > 0 Then
|
||||
' ' Dim dr As DataRow
|
||||
' ' dr = DtSegmentosNegocio.FiltroPrimero(String.Format("Id ={0}", Gvr.DataKey("IdSegNeg")))
|
||||
' ' Gvr.Cells(1).Text = dr("Nombre").ToString
|
||||
' 'End If
|
||||
' ' 'If DtSegmentosNegocio IsNot Nothing AndAlso DtSegmentosNegocio.Rows.Count > 0 Then
|
||||
' ' ' Dim dr As DataRow
|
||||
' ' ' dr = DtSegmentosNegocio.FiltroPrimero(String.Format("Id ={0}", Gvr.DataKey("IdSegNeg")))
|
||||
' ' ' Gvr.Cells(1).Text = dr("Nombre").ToString
|
||||
' ' 'End If
|
||||
|
||||
'Else
|
||||
' Gvr.Cells(1).Text = "0"
|
||||
'End If
|
||||
Next
|
||||
' 'Else
|
||||
' ' Gvr.Cells(1).Text = "0"
|
||||
' 'End If
|
||||
'Next
|
||||
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
@@ -474,7 +474,7 @@
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList Width ="100%" ID="DdlTipoContrato" runat="server" AppendDataBoundItems="True" DataTextField="txtoddl" DataValueField="CveTipoContrato" CssClass="form-control input-sm select2me" ValidationGroup="GrpGuardar">
|
||||
<asp:DropDownList Width ="100%" ID="DdlTipoContrato" runat="server" AppendDataBoundItems="True" DataTextField="TipoContrato" DataValueField="CveTipoContrato" CssClass="form-control input-sm select2me" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
|
||||
@@ -4711,7 +4711,7 @@
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input">
|
||||
<asp:TextBox ID="TxtSalarioDiarioImSS" Enabled="true" CssClass="form-control" runat="server"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtSalarioDiarioImSS" Enabled="false" CssClass="form-control" runat="server"></asp:TextBox>
|
||||
<asp:Label runat="server" AssociatedControlID="TxtSalarioDiarioImSS">Salario diario(IMSS):</asp:Label>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1001,10 +1001,9 @@ Partial Class RH_Personal
|
||||
End Sub
|
||||
|
||||
Private Sub CargaTiposContrato()
|
||||
Dim dt As DataTable = GlobalDTTiposContrato
|
||||
'dt.Columns.Add("txtoddl", GetType(String), "CodigoTipoContrato + ' ' + TipoContrato")
|
||||
'DdlTipoContrato.DataSource = dt
|
||||
'DdlTipoContrato.DataBind()
|
||||
Dim dt As DataTable = GlobalDTTiposContrato
|
||||
DdlTipoContrato.DataSource = dt
|
||||
DdlTipoContrato.DataBind()
|
||||
End Sub
|
||||
|
||||
Private Sub CargaTurno()
|
||||
@@ -6208,7 +6207,12 @@ Partial Class RH_Personal
|
||||
Alert("Se actualizo el calculo de fonacot")
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub LnkCalcularFactor_Click(sender As Object, e As EventArgs)
|
||||
Protected Sub LnkCalcularFactor_Click(sender As Object, e As EventArgs)
|
||||
getdatosFI()
|
||||
RegistraScript("$('#DmodalFactordeIntegraccion').modal()")
|
||||
End Sub
|
||||
Private Sub getdatosFI()
|
||||
|
||||
If TxtFIAguinaldo.Text = "0" Or TxtFIAguinaldo.Text = "" Or TxtFIAguinaldo.Text = "-1" Then
|
||||
TxtFIAguinaldo.Text = "15"
|
||||
End If
|
||||
@@ -6237,10 +6241,8 @@ Partial Class RH_Personal
|
||||
End If
|
||||
End If
|
||||
End Using
|
||||
End If
|
||||
|
||||
RegistraScript("$('#DmodalFactordeIntegraccion').modal()")
|
||||
UpFactordeintegracion.Update()
|
||||
End If
|
||||
UpFactordeintegracion.Update()
|
||||
End Sub
|
||||
Private Sub calcularSDI()
|
||||
Dim SD As Decimal = TxtFISalariodiario.Text.ToDecimal()
|
||||
@@ -6282,15 +6284,25 @@ Partial Class RH_Personal
|
||||
End If
|
||||
End Using
|
||||
End Sub
|
||||
Protected Sub LnkModificarSalarioGuardar_Click(sender As Object, e As EventArgs)
|
||||
|
||||
Protected Sub LnkModificarSalarioGuardar_Click(sender As Object, e As EventArgs)
|
||||
|
||||
getdatosFI()
|
||||
|
||||
TxtFISalariodiario.Text = TxtSalarioDiarioM.Text
|
||||
calcularSDI()
|
||||
TxtSalarioDiarioImSS.Text = TxtFISalarioDiarioIntegrado.Text
|
||||
TxtSalarioDiarioIntegrado.Text = TxtFISalarioDiarioIntegrado.Text
|
||||
Using ObjPersonal As ClsRH = New ClsRH()
|
||||
If ObjPersonal.UpdateSalarios(CvePersonal, TxtFechamodSalario.Text.ToDate().ToString("yyyy/MM/dd"), UsuarioActual.CveEmpresa, TxtSalarioDiarioM.Text.ToDecimal(), TxtSalarioDiarioIntegrado.Text.ToDecimal(), TxtSalarioDiarioImSS.Text.ToDecimal(), TxtSalarioDiarioPago.Text.ToDecimal()) Then
|
||||
If ObjPersonal.UpdateSalarios(CvePersonal, TxtFechamodSalario.Text.ToDate().ToString("yyyy/MM/dd"), UsuarioActual.CveEmpresa, TxtSalarioDiarioM.Text.ToDecimal(), TxtFISalarioDiarioIntegrado.Text.ToDecimal(), TxtFISalarioDiarioIntegrado.Text.ToDecimal(), TxtSalarioDiarioM.Text.ToDecimal()) Then
|
||||
|
||||
|
||||
TxtSalarioDiario.Text = TxtSalarioDiarioM.Text
|
||||
TxtFISalariodiario.Text = TxtSalarioDiarioM.Text
|
||||
TxtSalarioCotizado.Text = TxtSalarioDiarioImSS.Text
|
||||
TxtSDI.Text = TxtSalarioDiarioIntegrado.Text
|
||||
TxtFISalarioDiarioIntegrado.Text = TxtSalarioDiarioIntegrado.Text
|
||||
TxtFISalarioDiarioIntegrado.Text = TxtSalarioDiarioIntegrado.Text
|
||||
|
||||
UpModSalario.Update()
|
||||
UpDatos.Update()
|
||||
Alert("Se ha actualizado el salario", TipoMensaje.ToastInformacion)
|
||||
End If
|
||||
|
||||
@@ -869,15 +869,20 @@
|
||||
//
|
||||
function ShowToast(text, header, type, footer, sound,persistencia,coords) {
|
||||
var snd = new Audio("/Sonidos/" + sound);
|
||||
let playPromise;
|
||||
snd.onended=function(){
|
||||
if (persistencia) {
|
||||
snd.play();
|
||||
|
||||
playPromise = snd.play();
|
||||
|
||||
|
||||
snd.currentTime = 0;
|
||||
}
|
||||
};
|
||||
toastr.options = {
|
||||
"closeButton": true,
|
||||
"onHidden": function(){ persistencia = false; snd.pause(); snd.currentTime = 0; },
|
||||
"onHidden": function () { persistencia = false; if (playPromise !== undefined) { playPromise.then(_ => { snd.pause(); }).catch(error => { }); } snd.currentTime = 0; },
|
||||
"debug": false,
|
||||
"newestOnTop": true,
|
||||
"progressBar": false,
|
||||
@@ -914,6 +919,9 @@
|
||||
snd.play();
|
||||
snd.currentTime = 0;
|
||||
}
|
||||
|
||||
var Cves= <%= If(UsuarioActual IsNot Nothing, UsuarioActual.CveUsuario, -1) %>;
|
||||
|
||||
function UpdateNotificacion(CveNotificacionBitacora) {
|
||||
var request = {
|
||||
Metodo: "UpdateNotificacion",
|
||||
@@ -965,7 +973,7 @@
|
||||
|
||||
var notificationHub = $.connection.myGPSHub;
|
||||
|
||||
notificationHub.client.addLatestNotification = function (data, user, header, tipo, options, sound, Cve,Persistencia,Coords) {
|
||||
notificationHub.client.addLatestNotification = function (data, user, header, tipo, options, sound, Cve, Persistencia, Coords) {
|
||||
var tipoNotificacion = "success";
|
||||
switch (tipo) {
|
||||
case 0:
|
||||
@@ -980,8 +988,12 @@
|
||||
default:
|
||||
tipoNotificacion = "success";
|
||||
}
|
||||
notificationHub.server.disparaNotificacionUsuario(user, data, header, tipoNotificacion, options, sound, $.connection.hub.id, Cve,Persistencia,Coords);
|
||||
//notificationHub.server.disparaNotificacionUsuario(user, data, header, tipoNotificacion, options, sound, $.connection.hub.id, Cve,Persistencia,Coords);
|
||||
console.log("change1");
|
||||
if (Cves == user) {
|
||||
ShowToast(data, header, tipoNotificacion, options, sound, Persistencia, Coords);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
notificationHub.client.mostrarNotificacion = function (data, header, type, options, sound, Cve,Persistencia,coords) {
|
||||
|
||||
@@ -4592,7 +4592,7 @@ Partial Class Ventas
|
||||
End If
|
||||
End If
|
||||
|
||||
DdlVendedor.SelectedValue = DbRowVenta("CveVendedor").ToString()
|
||||
DdlVendedor.SelectedValue = If(DbRowVenta("CveVendedor").ToString = "", "0", DbRowVenta("CveVendedor").ToString) 'si viene dbnull, que ponga cero.
|
||||
DdlTipoComprobante.Enabled = False
|
||||
'TxtDocto.Enabled = False
|
||||
|
||||
@@ -7695,6 +7695,7 @@ Partial Class Ventas
|
||||
'CONTABILIDAD AUTOMATICA Y AC
|
||||
If UsuarioActual.Empresa.UsaAC OrElse UsuarioActual.Empresa.Funcionalidad(200) = "1" Then
|
||||
ObjContPaq = New ClsContPAQi(UsuarioActual.Empresa)
|
||||
ObjContPaq.IniciaTransacSQL()
|
||||
End If
|
||||
|
||||
'VERIFICA QUE EL FOLIO NO SEA IGUAL AL DE LA FACTURA ANTERIOR
|
||||
@@ -12874,7 +12875,7 @@ Partial Class Ventas
|
||||
|
||||
If ObjInventario.GetMovimientosDetalle(CveMovimientoInventario, UsuarioActual.CveEmpresa) Then
|
||||
DtCostos = ObjInventario.DtResultados
|
||||
TotalCosto = DtCostos.SUMD("Total").RoundSQL
|
||||
TotalCosto = DtCostos.SUMD("Total").RoundAD
|
||||
Dim tmpCostos As DataTable = DtCostos.FiltraParametros("", "", {"CveClasificacion"})
|
||||
Dim IdCtaContable As Integer = 0
|
||||
Dim CveCuenta As Integer = 0
|
||||
@@ -12883,7 +12884,7 @@ Partial Class Ventas
|
||||
Dim cont As Integer = 1
|
||||
'Se agrega movimiento separado por la cuenta de ventas (ER)
|
||||
For Each RowInv As DataRow In tmpCostos.Rows
|
||||
ValorInventario = DtCostos.SUMD("Total", $"CveClasificacion = {RowInv("CveClasificacion")}").RoundSQL
|
||||
ValorInventario = DtCostos.SUMD("Total", $"CveClasificacion = {RowInv("CveClasificacion")}").RoundAD
|
||||
TotalCostoAcumulado += ValorInventario
|
||||
|
||||
'cuando es el último movimiento y hay diferencias en los importes
|
||||
@@ -12893,23 +12894,23 @@ Partial Class Ventas
|
||||
|
||||
'Concepto = String.Format("{0} - {1}", Row2("Clasificacion").ToString(), Row2("SubProyecto").ToString())
|
||||
IdCtaContable = GlobalDTClasificaciones(factura.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero()
|
||||
CveCuenta = GlobalDTClasificaciones(factura.CveEmpresa).FiltroPrimeroValor("IdCuentaGastoSIG", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero()
|
||||
If ValorInventario <> 0 Then
|
||||
'CveCuenta = GlobalDTClasificaciones(factura.CveEmpresa).FiltroPrimeroValor("IdCuentaGastoSIG", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero()
|
||||
'If ValorInventario <> 0 Then
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(factura.CvePrePoliza, TipoMovto69, ValorInventario, factura.SerieFolio, 69, factura.SerieFolio, factura.Fecha, IdCtaContable, -1, CveVenta:=factura.CveVenta, CveCliente:=factura.CveCliente, CveSubProyecto:=factura.CveSubProyecto, CveClasificacion:=RowInv("CveClasificacion").ToString().ToEntero(), CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=ValorInventario, CveCuenta:=CveCuenta) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(factura.CvePrePoliza, TipoMovto69, ValorInventario, factura.SerieFolio, 69, factura.SerieFolio, factura.Fecha, IdCtaContable, -1, CveVenta:=factura.CveVenta, CveCliente:=factura.CveCliente, CveSubProyecto:=factura.CveSubProyecto, CveClasificacion:=RowInv("CveClasificacion").ToString().ToEntero(), CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=ValorInventario, CveCuenta:=CveCuenta) Then
|
||||
OcurrioError = True
|
||||
End If
|
||||
End If
|
||||
'End If
|
||||
cont += 1
|
||||
Next
|
||||
End If
|
||||
IdCtaContable = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", CveAlmacen)).ToEntero()
|
||||
|
||||
If TotalCosto <> 0 Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(factura.CvePrePoliza, TipoMovto68, TotalCosto, factura.SerieFolio, 68, factura.SerieFolio, factura.Fecha, IdCtaContable, -1, CveVenta:=factura.CveVenta, CveCliente:=factura.CveCliente, CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=TotalCosto, CveCuenta:=CveCuenta, CveSubProyecto:=factura.CveSubProyecto) Then
|
||||
'If TotalCosto <> 0 Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(factura.CvePrePoliza, TipoMovto68, TotalCosto, factura.SerieFolio, 68, factura.SerieFolio, factura.Fecha, IdCtaContable, -1, CveVenta:=factura.CveVenta, CveCliente:=factura.CveCliente, CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=TotalCosto, CveCuenta:=CveCuenta, CveSubProyecto:=factura.CveSubProyecto) Then
|
||||
OcurrioError = True
|
||||
End If
|
||||
End If
|
||||
'End If
|
||||
|
||||
Else
|
||||
OcurrioError = True
|
||||
@@ -13532,7 +13533,7 @@ Partial Class Ventas
|
||||
divAmortizacionTipoRelacion.Visible = True
|
||||
End If
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(1, 72, 80) Then
|
||||
If UsuarioActual.CveEmpresa.Contiene(1, 72, 80, 146) Then
|
||||
If Not DdlTipoAmortizacionAnticipo.Items.Cast(Of ListItem).Any(Function(x) x.Value = "3") Then
|
||||
DdlTipoAmortizacionAnticipo.Items.Add(New ListItem("Amortización anticipo sobre factura en cero", "3"))
|
||||
End If
|
||||
@@ -18249,10 +18250,10 @@ Partial Class Ventas
|
||||
Dim ValorInventario As Decimal
|
||||
Dim TotalCostoAcumulado As Decimal = 0D
|
||||
Dim Cont As Integer = 1
|
||||
Dim TotalCosto As Decimal = DtCostos.SUMD("Total").RoundSQL
|
||||
Dim TotalCosto As Decimal = DtCostos.SUMD("Total").RoundAD
|
||||
|
||||
For Each RowInv As DataRow In DtCostosDistinct.Rows
|
||||
ValorInventario = DtCostos.SUMD("Total", String.Format("CveClasificacion = {0}", RowInv("CveClasificacion"))).RoundSQL
|
||||
ValorInventario = DtCostos.SUMD("Total", String.Format("CveClasificacion = {0}", RowInv("CveClasificacion"))).RoundAD
|
||||
IdCtaContable = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero()
|
||||
CveCuenta = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaGastoSIG", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero()
|
||||
TotalCostoAcumulado += ValorInventario
|
||||
|
||||
@@ -154,6 +154,10 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user