Merge branch 'master' of http://jperez@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -4627,7 +4627,8 @@ Public Class ClsContabilidad
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function AddCuenta(CvePadre As Integer, Codigo As String, Nombre As String, Tipo As String, CtaMayor As Integer, CveMoneda As Integer, Optional DigAgrupador As Integer = -1, Optional CveAgrupadorSAT As Integer = -1, Optional NomIdioma As String = "") As Integer
|
||||
Public Function AddCuenta(CvePadre As Integer, Codigo As String, Nombre As String, Tipo As String, CtaMayor As Integer, CveMoneda As Integer, Optional DigAgrupador As Integer = -1,
|
||||
Optional CveAgrupadorSAT As Integer = -1, Optional NomIdioma As String = "", Optional CveEmpresaParam As Integer = -1) As Integer
|
||||
Dim Retorno As Integer = 0
|
||||
DataAdapter("PA_Conta_AddCuentas")
|
||||
|
||||
@@ -4641,6 +4642,7 @@ Public Class ClsContabilidad
|
||||
.Add("@DigAgrupador", SqlDbType.Int).Value = DigAgrupador
|
||||
.Add("@NomIdioma", SqlDbType.VarChar).Value = NomIdioma
|
||||
.Add("@CveAgrupadorSAT", SqlDbType.Int).Value = CveAgrupadorSAT
|
||||
.Add("@CveEmpresaParam", SqlDbType.Int).Value = CveEmpresaParam
|
||||
'.Add("@CveCuenta", SqlDbType.Int).Value = 0
|
||||
'.Add("@Error", SqlDbType.VarChar).Value = ""
|
||||
'.Add("@Error", SqlDbType.VarChar).Direction = ParameterDirection.Output
|
||||
|
||||
@@ -171,6 +171,32 @@ Public Class ClsNominas
|
||||
#End Region
|
||||
|
||||
#Region "ClsNominas_Nominas"
|
||||
Public Function AddComprobantesEmitidos(ByVal cveEmpresa As Integer, ByVal folioFiscal As String, ByVal tipoDocto As String, ByVal importeTotal As Decimal, ByVal estatus As Integer, ByVal fecha As String, ByVal moneda As String, ByVal rFCReceptor As String, ByVal rutaXml As String, ByVal rFCEmisor As String, ByVal serie As String, ByVal folio As String) As Boolean
|
||||
Dim retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_Sat_ComprobantesAdd", CommandType.StoredProcedure)
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@cveEmpresa", SqlDbType.Int).Value = cveEmpresa
|
||||
.Add("@folioFiscal", SqlDbType.VarChar).Value = folioFiscal
|
||||
.Add("@tipoDocto", SqlDbType.VarChar).Value = tipoDocto
|
||||
.Add("@importeTotal", SqlDbType.Decimal).Value = importeTotal
|
||||
.Add("@estatus", SqlDbType.Int).Value = estatus
|
||||
.Add("@fecha", SqlDbType.VarChar).Value = fecha
|
||||
.Add("@moneda", SqlDbType.VarChar).Value = moneda
|
||||
.Add("@rFCReceptor", SqlDbType.VarChar).Value = rFCReceptor
|
||||
.Add("@rFCEmisor", SqlDbType.VarChar).Value = rFCEmisor
|
||||
.Add("@rutaXml", SqlDbType.VarChar).Value = rutaXml
|
||||
.Add("@serie", SqlDbType.VarChar).Value = serie
|
||||
.Add("@folio", SqlDbType.VarChar).Value = folio
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al Realizar el calculo del Aguinaldo.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
Return retorno
|
||||
|
||||
End Function
|
||||
|
||||
Public Function GetCalculoAguinaldo(ejercicio As Int32, cveEmpresa As Int32, importe As Double, CveTipoPeriodo As Integer, CvePeriodo As Integer) As Boolean
|
||||
Dim retorno As Boolean = False
|
||||
@@ -1835,7 +1861,32 @@ Public Class ClsNominas
|
||||
#End Region
|
||||
|
||||
|
||||
Public Function AddUPNom_NominasDetalles(CveNomina As Integer, CvePeriodo As Integer, CvePersonal As Integer, CveConcepto As Integer, Importe As Decimal, ImporteGravado As Decimal, ImporteExento As Decimal, CveUsuario As Integer) As Boolean
|
||||
Public Function GetInversionNomina(CveEmpresa As Integer, Optional FechaInicio As String = "", Optional FechaFin As String = "",
|
||||
Optional CveProyecto As Integer = -1, Optional CveSubProyecto As Integer = -1,
|
||||
Optional Cve1 As Integer = -1, Optional Cve2 As Integer = -1,
|
||||
Optional CveStr1 As String = "-1", Optional CveStr2 As String = "-1") As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Nom_InversionNominaGET")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("FechaInicio", SqlDbType.Int).Value = FechaInicio
|
||||
.Add("FechaFin", SqlDbType.Int).Value = FechaFin
|
||||
.Add("CveProyecto", SqlDbType.Int).Value = CveProyecto
|
||||
.Add("CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||
.Add("Cve1", SqlDbType.Int).Value = Cve1
|
||||
.Add("Cve2", SqlDbType.Int).Value = Cve2
|
||||
.Add("CveStr1", SqlDbType.Int).Value = CveStr1
|
||||
.Add("CveStr2", SqlDbType.Int).Value = CveStr2
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch Ex1 As SqlException
|
||||
Me.OnError("Ocurrió un error al obtener el reporte de inversión de nomina.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function AddUPNom_NominasDetalles(CveNomina As Integer, CvePeriodo As Integer, CvePersonal As Integer, CveConcepto As Integer, Importe As Decimal, ImporteGravado As Decimal, ImporteExento As Decimal, CveUsuario As Integer, Optional IsEdited As Boolean = False) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Nom_NominasDetallesAddUP")
|
||||
@@ -1849,6 +1900,7 @@ Public Class ClsNominas
|
||||
.Add("ImporteGravado", SqlDbType.Float).Value = ImporteGravado
|
||||
.Add("ImporteExento", SqlDbType.Float).Value = ImporteExento
|
||||
.Add("CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("IsEdited", SqlDbType.Bit).Value = IsEdited
|
||||
End With
|
||||
|
||||
Try
|
||||
@@ -1902,10 +1954,10 @@ Public Class ClsNominas
|
||||
retorno = True
|
||||
Catch sqEx As SqlException
|
||||
retorno = False
|
||||
OnError("Ocurrió un error al obtener las tablas.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
OnError("Ocurrió un error al obtener las tablas de nomina.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
Catch ex As Exception
|
||||
retorno = False
|
||||
OnError("Ocurrió un error al obtener las tablas.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
OnError("Ocurrió un error al obtener las tablas de nomina.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
Return retorno
|
||||
End Function
|
||||
|
||||
@@ -5933,7 +5933,7 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al Consultar el catalogo de Uniformes.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
OnError("Ocurrió un error al agregar permiso.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
|
||||
@@ -110,14 +110,17 @@
|
||||
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<div runat="server" id="divLabelTotal" style="width:100%;text-align:right;font-size:1.5em" visible="false">
|
||||
<asp:label runat="server">Importe seleccionado: $</asp:label><asp:label runat="server" ID="lblValorTotal">00.00</asp:label>
|
||||
</div>
|
||||
<br />
|
||||
<asp:GridView ID="GvFacturas" runat="server" AutoGenerateColumns="False" DataKeyNames="CveVenta, CvePrePoliza, CveIE, TipoCambio, CveMoneda, CveCliente, IdCtaContableBancos, IdCtaContClientes, Importe" CssClass="table detallerow table-hover" Style="text-align: center; float: right; width: 100%; font-size: medium;" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="ChkFactura" runat="server" Checked="false" Enabled="True" />
|
||||
<asp:CheckBox ID="ChkFactura" OnCheckedChanged="ChkFactura_Click" runat="server" Checked="false" Enabled="True" AutoPostBack="True"/>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Factura">
|
||||
|
||||
@@ -48,6 +48,7 @@ Partial Class Bancos_DepositosCaja
|
||||
|
||||
UpGvFacturas.Update()
|
||||
GvFacturas.DataBind()
|
||||
divLabelTotal.Visible = True
|
||||
End Sub
|
||||
|
||||
Private Sub BtnDepositar_Click(sender As Object, e As EventArgs) Handles BtnDepositar.Click
|
||||
@@ -157,4 +158,20 @@ Partial Class Bancos_DepositosCaja
|
||||
ObjContabilidad.Dispose()
|
||||
End Sub
|
||||
|
||||
Private Sub ObtenerTotalImporta()
|
||||
|
||||
Dim Total As Double = 0
|
||||
For Each Gvr As GridViewRow In GvFacturas.Rows
|
||||
If Gvr.FCCheckBox("ChkFactura").Checked Then
|
||||
Total += Gvr.DataKey("Importe").ToDouble
|
||||
End If
|
||||
Next
|
||||
lblValorTotal.Text = Total.ToString
|
||||
UpGvFacturas.Update()
|
||||
End Sub
|
||||
|
||||
Public Sub ChkFactura_Click(sender As Object, e As EventArgs)
|
||||
ObtenerTotalImporta()
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
Binary file not shown.
BIN
Empresas/80/Formatos/RH_FormatoVacaciones.docx
Normal file
BIN
Empresas/80/Formatos/RH_FormatoVacaciones.docx
Normal file
Binary file not shown.
@@ -15,11 +15,14 @@
|
||||
<Width>1.67447cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>6.57043cm</Width>
|
||||
<Width>2.82586cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>1.94532cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>2.89687cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>5.49064cm</Width>
|
||||
</TablixColumn>
|
||||
@@ -225,7 +228,7 @@
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Textbox22">
|
||||
<Textbox Name="Textbox15">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
@@ -244,6 +247,42 @@
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox15</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Color>LightGrey</Color>
|
||||
<Style>Solid</Style>
|
||||
</Border>
|
||||
<BackgroundColor>Silver</BackgroundColor>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Textbox22">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Código Producto/Servicio</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Center</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox22</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
@@ -578,7 +617,6 @@
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<rd:Selected>true</rd:Selected>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
@@ -616,6 +654,40 @@
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="PS">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Fields!PS.Value</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontWeight>=iif(Fields!CveVenta.Value = "", "Bold", "Normal")</FontWeight>
|
||||
<Color>=iif(Fields!CveVenta.Value = "",IIf(Fields!Gpo.Value = "","White","#67809F"), "Black")</Color>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>PS</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<BackgroundColor>=iif(Fields!CveVenta.Value = "",IIf(Fields!Gpo.Value = "","#67809F","#cccccc"), "Transparent")</BackgroundColor>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="CodigoPS">
|
||||
@@ -851,6 +923,7 @@
|
||||
<TablixMember />
|
||||
<TablixMember />
|
||||
<TablixMember />
|
||||
<TablixMember />
|
||||
</TablixMembers>
|
||||
</TablixColumnHierarchy>
|
||||
<TablixRowHierarchy>
|
||||
@@ -866,7 +939,7 @@
|
||||
<DataSetName>DataSet1</DataSetName>
|
||||
<Left>0.06614cm</Left>
|
||||
<Height>0.90467cm</Height>
|
||||
<Width>28.36649cm</Width>
|
||||
<Width>27.51879cm</Width>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
@@ -877,7 +950,7 @@
|
||||
<Height>0.59228in</Height>
|
||||
<Style />
|
||||
</Body>
|
||||
<Width>11.21478in</Width>
|
||||
<Width>10.86021in</Width>
|
||||
<Page>
|
||||
<PageHeader>
|
||||
<Height>2.91154cm</Height>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -585,7 +585,35 @@ Partial Class General_SaldosIniciales
|
||||
If Not dt.Columns(11).ColumnName = "Clave Unidad" Then
|
||||
Alert("El nombre de la diescisieteava columna debe ser 'Clave Unidad'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
|
||||
ElseIf RblFormato.SelectedValue = "9" Then
|
||||
|
||||
If Not dt.Columns(0).ColumnName = "Cuenta" Then
|
||||
Alert("El nombre de la primera columna debe ser 'Cuenta'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If Not dt.Columns(1).ColumnName = "NombreCuenta" Then
|
||||
Alert("El nombre de la segunda columna debe ser 'NombreCuenta'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If Not dt.Columns(2).ColumnName = "TipoCuenta" Then
|
||||
Alert("El nombre de la tercera columna debe ser 'TipoCuenta'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If Not dt.Columns(3).ColumnName = "CuentaPadre" Then
|
||||
Alert("El nombre de la cuarta columna debe ser 'CuentaPadre'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If Not dt.Columns(5).ColumnName = "AgrupadorSAT" Then
|
||||
Alert("El nombre de la quinta columna debe ser 'AgrupadorSAT'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
ElseIf RblFormato.SelectedValue = "12" Then
|
||||
If Not dt.Columns(0).ColumnName = "CodigoPS" Then
|
||||
Alert("El nombre de la primera columna debe ser 'CodigoPS'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||
@@ -1777,7 +1805,7 @@ Partial Class General_SaldosIniciales
|
||||
Dim AgrupadorSAT As String = Row("AgrupadorSAT").ToString
|
||||
Dim CveCuentaPadre As Integer = -1
|
||||
|
||||
If Not CuentaPadre = "NULL" Then
|
||||
If Not CuentaPadre = "" Then
|
||||
If ObjConta.GetCuentas(-1, CuentaPadre.Replace("-", ""), -1, UsuarioActual.CveEmpresa) Then
|
||||
If ObjConta.DtResultados.Rows.Count > 0 Then
|
||||
CveCuentaPadre = ObjConta.DtResultados().FiltroPrimeroValor("Id").ToEntero
|
||||
@@ -1793,7 +1821,7 @@ Partial Class General_SaldosIniciales
|
||||
CveCuentaPadre = -2
|
||||
End If
|
||||
|
||||
Dim IdNew = ObjConta.AddCuenta(CveCuentaPadre, Cuenta.Replace("-", ""), NombreCuenta, TipoCuenta, 1, 1)
|
||||
Dim IdNew = ObjConta.AddCuenta(CveCuentaPadre, Cuenta.Replace("-", ""), NombreCuenta, TipoCuenta, 1, 1, CveEmpresaParam:=UsuarioActual.CveEmpresa)
|
||||
If IdNew > 0 Then
|
||||
ContadorUpdate = ContadorUpdate + 1
|
||||
Else
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
<div class="row">
|
||||
<label class="col-md-1" style="width: 60px !important;">Ejercicio: </label>
|
||||
<div class="col-md-2" style="width: 140px !important;">
|
||||
<asp:DropDownList ID="DdlEjercicios" DataTextField="Ejercicio" DataValueField="Ejercicio" runat="server" width="100%" CssClass="select2me"></asp:DropDownList>
|
||||
<asp:DropDownList ID="DdlEjercicios" DataTextField="Ejercicio" DataValueField="Ejercicio" runat="server" Width="100%" CssClass="select2me"></asp:DropDownList>
|
||||
</div>
|
||||
<label class="col-md-1" style="width: 120px !important;">Tipo Período: </label>
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
</asp:DropDownList>
|
||||
|
||||
</div>
|
||||
<label class="col-md-1" style="width: 60px !important;"> </label>
|
||||
<label class="col-md-1" style="width: 60px !important;"></label>
|
||||
<div class="col-md-2">
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
@@ -55,18 +55,33 @@
|
||||
<div class="dashboard-stat blue">
|
||||
<div class="visual"><i class="fa fa-sort-numeric-desc"></i></div>
|
||||
<div class="details">
|
||||
<div class="number"> <asp:Literal ID="LtlTotal" runat="server"></asp:Literal> </div>
|
||||
<div class="number">
|
||||
<asp:Literal ID="LtlTotal" runat="server"></asp:Literal>
|
||||
</div>
|
||||
<div class="desc">
|
||||
Total Aguinaldo
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3 col-md-offset-2">
|
||||
<div class="col-md-3 col-md-offset-1">
|
||||
<div class="dashboard-stat green">
|
||||
<div class="visual"><i class="fa fa-line-chart"></i></div>
|
||||
<div class="details">
|
||||
<div class="number"> <asp:Literal ID="LtldiasEjercicio" runat="server"></asp:Literal></div>
|
||||
<div class="number">
|
||||
<asp:Literal ID="LtlAutorizado" runat="server"></asp:Literal></div>
|
||||
<div class="desc">
|
||||
Autorizado
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3 col-md-offset-1">
|
||||
<div class="dashboard-stat green">
|
||||
<div class="visual"><i class="fa fa-line-chart"></i></div>
|
||||
<div class="details">
|
||||
<div class="number">
|
||||
<asp:Literal ID="LtldiasEjercicio" runat="server"></asp:Literal></div>
|
||||
<div class="desc">
|
||||
Días ejercicio
|
||||
</div>
|
||||
@@ -75,7 +90,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<asp:GridView ID="GVCalcularAguinaldo" runat="server" GridLines="None" CssClass="table table-hover table-striped ScrollAD Widthall GVCalcularUtilidades" AutoGenerateColumns="False"
|
||||
DataKeyNames="Nombre,CvePersonal">
|
||||
DataKeyNames="Nombre,CvePersonal" OnRowDataBound="GVCalcularAguinaldo_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Nombre ">
|
||||
<ItemTemplate>
|
||||
@@ -86,43 +101,43 @@
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lbldiasLaborados" runat="server" Text='<%# Eval("DiasLaborados")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign ="Right" />
|
||||
<ItemStyle HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Días Aguinaldo">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lbldiasAguinaldo" runat="server" Text='<%# Eval("NumDiasAguinaldo")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign ="Right" />
|
||||
<ItemStyle HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Salario Diario">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblsueldoDiario" runat="server" Text='<%# Eval("SalarioDiario", "${0:N2}")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign ="Right" />
|
||||
<ItemStyle HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Aguinaldo Completo">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblsueldoAguinaldoCompleto" runat="server" Text='<%# Eval("AguinaldoCompleto", "${0:N2}")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign ="Right" />
|
||||
<ItemStyle HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Aguinaldo">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblAguinaldo" runat="server" Text='<%# Eval("Aguinaldo", "${0:N2}")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign ="Right" />
|
||||
<ItemStyle HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Aguinaldo Gravado">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblAguinaldoGravado" runat="server" Text='<%# Eval("AguinaldoGravado", "${0:N2}")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign ="Right" />
|
||||
<ItemStyle HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Impuesto">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblAguinaldo" runat="server" Text='<%# Eval("ISR", "${0:N2}")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign ="Right" />
|
||||
<ItemStyle HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="">
|
||||
<ItemTemplate>
|
||||
@@ -148,6 +163,47 @@
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
<div id="ModalAutorizar" class="modal ADS fade" role="dialog">
|
||||
|
||||
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpModalAutorizar" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header ">
|
||||
<h4 class="modal-title">Autorizar</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<label class="col-md-4 ">Tipo Período:</label>
|
||||
<div class="col-md-8">
|
||||
<asp:DropDownList ID="DdlTipoPeriodoB" runat="server" CssClass="select2me" AutoPostBack="true" OnSelectedIndexChanged="DdlTipoPeriodoB_SelectedIndexChanged"
|
||||
DataTextField="TipoPeriodo" DataValueField="CveTipoPeriodo" Style="width: 100% !important;">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="col-md-4 ">Período:</label>
|
||||
<div class="col-md-8">
|
||||
<asp:DropDownList ID="DdlPeriodo" runat="server" CssClass="select2me" DataTextField="NominaEstatus" DataValueField="CvePeriodo" Style="width: 100% !important;" >
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="modal-footer">
|
||||
<asp:LinkButton ID="LnkAutorizar" runat="server" CssClass="btn btn-primary" ValidationGroup="GrpUpDatosFiel" OnClick="LnkAutorizar_Click"> <i class='material-icons'>done_all</i> Actualizar</asp:LinkButton>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
@@ -34,7 +34,7 @@ public partial class Nomina_Aguinaldo : ClsPaginas
|
||||
}
|
||||
DdlEjercicios.DataBind();
|
||||
|
||||
DdlTipoPeriodo.DataSource = GlobalDTTipoPeriodo.FiltraParametros("Estatus = 'Activo'");
|
||||
DdlTipoPeriodo.DataSource = GlobalDTTipoPeriodo.FiltraParametros("Estatus = 'Activo' AND CveTipoPeriodo <>-1");
|
||||
DdlTipoPeriodo.DataBind();
|
||||
DdlTipoPeriodo.Items.Insert(0, new ListItem("Seleccione", "-1"));
|
||||
if (DdlTipoPeriodo.Items.Count > 0)
|
||||
@@ -58,16 +58,204 @@ public partial class Nomina_Aguinaldo : ClsPaginas
|
||||
DTAguinaldos = objnom.DtResultados;
|
||||
GVCalcularAguinaldo.DataSource = DTAguinaldos;
|
||||
LtlTotal.Text = string.Format("{0:N2}", DTAguinaldos.SUM("Aguinaldo"));
|
||||
LtlAutorizado.Text = string.Format("{0:N2}", DTAguinaldos.SUM("Aguinaldo","CveNomina>0"));
|
||||
|
||||
LtldiasEjercicio.Text = string.Format("{0}/12/31", ejercicio).ToDate().DayOfYear.ToString();
|
||||
}
|
||||
|
||||
GVCalcularAguinaldo.DataBind();
|
||||
GVCalcularAguinaldo.DataBind();
|
||||
LnkAutorizarModal.Visible = true;
|
||||
upDatosPA_N.Update();
|
||||
}
|
||||
private void CargaPeriodos()
|
||||
{
|
||||
DataTable dtPeriodos = null;
|
||||
using (ClsNominas ObjPeriodos = new ClsNominas())
|
||||
{
|
||||
if (ObjPeriodos.GetPeriodos(-1, UsuarioActual.CveEmpresa, DdlEjercicios.SelectedValue.ToEntero(), -1, -1))
|
||||
{
|
||||
dtPeriodos = ObjPeriodos.DtResultados.FiltraParametros("Estatus IN (0,1)");
|
||||
}
|
||||
ObjPeriodos.Dispose();
|
||||
}
|
||||
|
||||
if (dtPeriodos != null && dtPeriodos.Rows.Count > 0)
|
||||
{
|
||||
DdlPeriodo.DataSource = dtPeriodos.FiltraParametros(string.Format(" CveTipoPeriodo={0}", DdlTipoPeriodoB.SelectedValue));
|
||||
}
|
||||
DdlPeriodo.DataBind();
|
||||
DdlPeriodo.Items.Insert(0, new ListItem("Seleccione", "-1"));
|
||||
UpModalAutorizar.Update();
|
||||
}
|
||||
protected void LnkAutorizarModal_Click(object sender, EventArgs e)
|
||||
{
|
||||
DdlTipoPeriodoB.ClearSelection();
|
||||
DdlTipoPeriodoB.Items.Clear();
|
||||
DdlTipoPeriodoB.DataSource = GlobalDTTipoPeriodo.FiltraParametros(string.Format("CveTipoPeriodo=6 OR CveTipoPeriodo={0}", DdlTipoPeriodo.SelectedValue));
|
||||
DdlTipoPeriodoB.DataBind();
|
||||
|
||||
CargaPeriodos();
|
||||
RegistraScript("$('#ModalAutorizar').modal();");
|
||||
}
|
||||
|
||||
protected void LnkAutorizar_Click(object sender, EventArgs e)
|
||||
{
|
||||
bool continuar = true;
|
||||
string mensaje = "";
|
||||
//int DiasLaborados;
|
||||
decimal Importe;
|
||||
int CveMoneda = 1;
|
||||
var CvePeriodoSeleccionado = DdlPeriodo.SelectedValue.ToEntero();
|
||||
int ejercicio = DdlEjercicios.SelectedValue.ToEntero();
|
||||
int CvePersonal;
|
||||
int CvePeriodo;
|
||||
decimal ImporteGravado = 0;
|
||||
decimal ImporteExento = 0;
|
||||
//string NombrePersonal = "";
|
||||
int CveMetodoPago = 0;
|
||||
int CveNomina = 0;
|
||||
int CveConcepto = 0;
|
||||
if (continuar)
|
||||
{
|
||||
using (ClsNominas objNomina = new ClsNominas())
|
||||
{
|
||||
objNomina.IniciaTransacSQL();
|
||||
if (continuar)
|
||||
{
|
||||
//continuar = objNomina.UpADDdUtilidadesEjercicio(UsuarioActual.CveEmpresa, ejercicio, utilimporte, utilimporteAnt, false);
|
||||
//if (continuar)
|
||||
//{
|
||||
// if (objNomina.DtResultados.Rows.Count < 0 || objNomina.DtResultados.Rows[0]["CONTimbrado"].ToString() == "1")
|
||||
// continuar = false;
|
||||
//}
|
||||
}
|
||||
if (continuar)
|
||||
{
|
||||
continuar = objNomina.GetConceptos(UsuarioActual.CveEmpresa);
|
||||
}
|
||||
if (continuar)
|
||||
{
|
||||
DataRow rowc = objNomina.DtResultados.FiltroPrimero("CveSistema=5");
|
||||
if ((rowc != null))
|
||||
{
|
||||
CveConcepto = rowc["CveConcepto"].ToString().ToEntero();
|
||||
}
|
||||
//else
|
||||
//{
|
||||
// CveConcepto = objNomina.AddConcepto("PTU", "Utilidades", "P", "", true, true, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, false, -1, -1, -1, 0, -1, 0, 0, 0, 0, 0);
|
||||
//}
|
||||
if (CveConcepto < 1)
|
||||
{
|
||||
continuar = false;
|
||||
Alert("debe agregar un concepto para el calculo del aguinaldo", ModExtensiones.TipoMensaje.ToastAdventencia);
|
||||
}
|
||||
}
|
||||
if (continuar)
|
||||
{
|
||||
foreach (DataRow row in DTAguinaldos.Rows)
|
||||
{
|
||||
//DiasLaborados = row["DiasLaborados"].ToString().ToEntero();
|
||||
CvePeriodo = CvePeriodoSeleccionado;
|
||||
/*
|
||||
if (continuar)
|
||||
{CveNomina
|
||||
continuar = objNomina.AddUtilidad(CvePersonal, Importe, CvePeriodo, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, ejercicio, DiasLaborados, SueldoTotal);
|
||||
}*/
|
||||
CveNomina = 0;
|
||||
CvePersonal = row["CvePersonal"].ToString().ToEntero();
|
||||
CveMetodoPago = row["CveMetodoPago"].ToString().ToEntero();
|
||||
Importe = row["Aguinaldo"].ToString().ToDecimal();
|
||||
ImporteGravado = row["AguinaldoGravado"].ToString().ToDecimal();
|
||||
ImporteExento = Importe - ImporteGravado;
|
||||
|
||||
if (CvePersonal > 0 && Importe>0 && row["CveNomina"].ToString().ToEntero()==0)
|
||||
{
|
||||
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, Importe.ToString().ToDouble(), 0, 0, Importe.ToString().ToDouble(), CveMoneda, 1, CveMetodoPago, DateTime.Now, "Deducciones nómina",
|
||||
"", "", "", "", 0, 0, 0, new DateTime(), new DateTime(), new DateTime(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa))
|
||||
{
|
||||
CveNomina = objNomina.CveNomina;
|
||||
}
|
||||
else
|
||||
{
|
||||
continuar = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
continuar = false;
|
||||
}
|
||||
if (CveNomina > 0)
|
||||
{
|
||||
|
||||
if (!objNomina.AddUPNom_NominasDetalles(objNomina.CveNomina, CvePeriodoSeleccionado, CvePersonal, CveConcepto, Importe, ImporteGravado, ImporteExento, UsuarioActual.CveUsuario))
|
||||
{
|
||||
continuar = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
continuar = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (!continuar)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
//if (continuar & CvePeriodoSeleccionado > 0)
|
||||
//{
|
||||
// continuar = objNomina.CambiaEstatusPeriodo(CvePeriodoSeleccionado, (int)enumNominasEstatus.Activa, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa);
|
||||
//}
|
||||
if (continuar)
|
||||
{
|
||||
objNomina.Commit();
|
||||
}
|
||||
else
|
||||
{
|
||||
objNomina.RollBack();
|
||||
}
|
||||
objNomina.Dispose();
|
||||
}
|
||||
}
|
||||
if (mensaje.Length > 0)
|
||||
{
|
||||
Alert(mensaje, ModExtensiones.TipoMensaje.MsgAdvertencia);
|
||||
continuar = false;
|
||||
}
|
||||
if (continuar)
|
||||
{
|
||||
RegistraScript("$('#ModalAutorizar').modal('hide');");
|
||||
Alert("Se ha generado el aguinaldo");
|
||||
BtnCalcular_Click(null, null);
|
||||
}
|
||||
}
|
||||
|
||||
protected void DdlTipoPeriodoB_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
CargaPeriodos();
|
||||
}
|
||||
|
||||
protected void GVCalcularAguinaldo_RowDataBound(object sender, GridViewRowEventArgs e)
|
||||
{
|
||||
|
||||
if (e.Row.RowType == DataControlRowType.DataRow)
|
||||
{
|
||||
int CveNomina = e.Row.DBCampo("CveNomina").ToString().ToEntero();
|
||||
if (CveNomina > 0)
|
||||
{
|
||||
e.Row.CssClass = "success";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -283,9 +283,15 @@ Partial Class Nomina_Finiquito
|
||||
pnlupValoresFiniquito.Visible = True
|
||||
End If
|
||||
Using ObjNom As New ClsNominas()
|
||||
If ObjNom.GetFiniquitosPersonal(CvePersonal, UsuarioActual.CveEmpresa) Then
|
||||
DTConceptosPersonal = ObjNom.DtResultados
|
||||
End If
|
||||
'If ObjNom.GetFiniquitosPersonal(CvePersonal, UsuarioActual.CveEmpresa) Then
|
||||
' DTConceptosPersonal = ObjNom.DtResultados
|
||||
'Autoriza nomina
|
||||
'Finiquita Liquidación
|
||||
'Rep Nomina
|
||||
'RepInversion de nomina
|
||||
'Alertas Altas /Bajas
|
||||
'
|
||||
'End If
|
||||
End Using
|
||||
GvConceptos.DataSource = ConceptsPersonas
|
||||
GvConceptos.DataBind()
|
||||
|
||||
@@ -71,6 +71,9 @@
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkVerTablas" OnClick="LnkVerTablas_Click" runat="server">Tablas</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkAutorizar" OnClick="LnkAutorizar_Click" runat="server"><i class="fa fa-thumbs-up" aria-hidden="true"></i>Autorizar</asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
@@ -551,7 +551,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
GvNominas.DataBind();
|
||||
}
|
||||
|
||||
try
|
||||
if (dtPeriodo != null && dtPeriodo.Rows.Count > 0)
|
||||
{
|
||||
|
||||
DateTime FechaInicio = (DateTime)dtPeriodo.Rows[0]["FechaInicio"];
|
||||
@@ -596,11 +596,6 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
gvasistencia.Append("</table>");
|
||||
ltlGvAsistencia.Text = gvasistencia.ToString();
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
throw;
|
||||
}
|
||||
|
||||
#endregion
|
||||
UpDatos.Update();
|
||||
@@ -845,7 +840,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
{
|
||||
if (!dontsaveconcepto)//el usuario definira si desea actualizar o no el concepto en el periodo
|
||||
{
|
||||
if (!objNomina.AddUPNom_NominasDetalles(objNomina.CveNomina, CvePeriodoSeleccionado, CvePersonal, CveConcepto, Importe, ImporteGravado, ImporteExento, UsuarioActual.CveUsuario))
|
||||
if (!objNomina.AddUPNom_NominasDetalles(objNomina.CveNomina, CvePeriodoSeleccionado, CvePersonal, CveConcepto, Importe, ImporteGravado, ImporteExento, UsuarioActual.CveUsuario,true))
|
||||
{
|
||||
rollback = true;
|
||||
}
|
||||
@@ -1052,7 +1047,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
|
||||
|
||||
|
||||
frow = objper.DtResultados.FiltroPrimero("CveSistema =4");
|
||||
frow = objper.DtResultados.FiltroPrimero("CveSistema =4");
|
||||
TxtFonValor.Text = "";
|
||||
DdlFonTipoAplicacion.SelectedValueExist("-1");
|
||||
TxtFonDescripcion.Text = "";
|
||||
@@ -2957,7 +2952,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
double valor = TxtValor.Text.ToDouble();
|
||||
int vecesAplicar = TxtVecesAplicar.Text.ToEntero();
|
||||
decimal montoLimite = TxtMontoLimite.Text.ToDecimal();
|
||||
string fechaInicioAplicacion = TxtFechaAplicacion.Text.ToDate().ToString("yyyy/MM/dd");
|
||||
string fechaInicioAplicacion = TxtFechaAplicacion.Text.ToDate().ToString("yyyy/MM/dd");
|
||||
bool estatus = ChkEstatus.Checked;
|
||||
bool Continuar;
|
||||
using (ClsNominas ObjMovt = new ClsNominas())
|
||||
@@ -2983,7 +2978,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
double valor = TxtValor.Text.ToDouble();
|
||||
int vecesAplicar = TxtVecesAplicar.Text.ToEntero();
|
||||
decimal montoLimite = TxtMontoLimite.Text.ToDecimal();
|
||||
string fechaInicioAplicacion = TxtFechaAplicacion.Text.ToDate().ToString("yyyy/MM/dd");
|
||||
string fechaInicioAplicacion = TxtFechaAplicacion.Text.ToDate().ToString("yyyy/MM/dd");
|
||||
bool estatus = ChkEstatus.Checked;
|
||||
bool Continuar;
|
||||
using (ClsNominas ObjMovt = new ClsNominas())
|
||||
@@ -3078,4 +3073,111 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
protected void LnkAutorizar_Click(object sender, EventArgs e)
|
||||
{
|
||||
autorizarNomina(-1);
|
||||
}
|
||||
|
||||
private void autorizarNomina(int FiltroCvePersonal)
|
||||
{
|
||||
|
||||
bool continuar = true;
|
||||
DataTable dtr = dtempleados.FiltraParametros(string.Format("CvePersonal={0} OR {0}=-1", FiltroCvePersonal));
|
||||
DataTable dtconp = null;
|
||||
int CvePeriodoSeleccionado = DdlPeriodo.SelectedValue.ToEntero();//cambiar reparar
|
||||
#region PropNomina
|
||||
int CvePersonal = 0;
|
||||
int CveNomina = 0;
|
||||
int CveMetodoPago = 0;
|
||||
double Total = 0;
|
||||
int CveMoneda = 1;
|
||||
#endregion
|
||||
#region PropNominaDetalle
|
||||
int CveConcepto=0;
|
||||
decimal ImporteConcepto=0, ImporteGravadoConcepto=0, ImporteExentoConcepto = 0;
|
||||
#endregion
|
||||
|
||||
|
||||
using (ClsNominas objNomina = new ClsNominas())
|
||||
{
|
||||
objNomina.IniciaTransacSQL();
|
||||
foreach (DataRow rtemp in dtr.Rows)
|
||||
{
|
||||
CveNomina = 0;
|
||||
CvePersonal = rtemp["CvePersonal"].ToString().ToEntero();
|
||||
CveMetodoPago = rtemp["CveMetodoPago"].ToString().ToEntero();
|
||||
Total = 0;//cambiar reparar
|
||||
|
||||
if (continuar)
|
||||
{
|
||||
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",
|
||||
"", "", "", "", 0, 0, 0, new DateTime(), new DateTime(), new DateTime(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa))
|
||||
{
|
||||
CveNomina = objNomina.CveNomina;
|
||||
}
|
||||
else
|
||||
{
|
||||
continuar = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (CveNomina == 0)
|
||||
{
|
||||
continuar = false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (continuar)
|
||||
{
|
||||
dtconp = dtempleadosConceptos.FiltraParametros(string.Format("CvePersonal={0}", CvePersonal));
|
||||
foreach (DataRow rcon in dtconp.Rows)
|
||||
{
|
||||
|
||||
CveConcepto =rcon["CveConcepto"].ToString().ToEntero();
|
||||
ImporteConcepto =rcon["ImporteConcepto"].ToString().ToDecimal();
|
||||
ImporteGravadoConcepto =rcon["ImporteGravadoConcepto"].ToString().ToDecimal();
|
||||
ImporteExentoConcepto = ImporteConcepto -ImporteGravadoConcepto ;
|
||||
if (continuar)
|
||||
{
|
||||
|
||||
if (!objNomina.AddUPNom_NominasDetalles(CveNomina, CvePeriodoSeleccionado, CvePersonal, CveConcepto, ImporteConcepto, ImporteGravadoConcepto, ImporteExentoConcepto, UsuarioActual.CveUsuario))
|
||||
{
|
||||
continuar = false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
if (continuar)
|
||||
{
|
||||
objNomina.Commit();
|
||||
}
|
||||
else
|
||||
{
|
||||
objNomina.RollBack();
|
||||
|
||||
}
|
||||
}
|
||||
dtr.Dispose();
|
||||
dtconp.Dispose();
|
||||
Alert("Termine");
|
||||
}
|
||||
}
|
||||
@@ -71,7 +71,7 @@ Partial Class Nomina_ReportePTU
|
||||
|
||||
Private Sub CargaPeriodos()
|
||||
Dim ObjPeriodos As New ClsNominas()
|
||||
If ObjPeriodos.GetPeriodos(-1, UsuarioActual.CveEmpresa, DdlEjercicios.SelectedValue.ToEntero, -1, -1) Then
|
||||
If ObjPeriodos.GetPeriodos(-1, UsuarioActual.CveEmpresa, DdlEjercicios.SelectedValue.ToEntero(), -1, -1) Then
|
||||
dtPeriodos = ObjPeriodos.DtResultados.FiltraParametros("Estatus IN (0,1)")
|
||||
End If
|
||||
ObjPeriodos.Dispose()
|
||||
@@ -86,7 +86,7 @@ Partial Class Nomina_ReportePTU
|
||||
GVTipoPeriodo.DataSource = GlobalDTTipoPeriodo.FiltraParametros($"Estatus = 'Activo' AND CveTipoPeriodo IN({listaCveTipoPeriodo.ToString()})")
|
||||
GVTipoPeriodo.DataBind()
|
||||
|
||||
If (Not IsNothing(dtPeriodos) AndAlso dtPeriodos.Rows.Count()) Then
|
||||
If (Not IsNothing(dtPeriodos) AndAlso dtPeriodos.Rows.Count() > 0) Then
|
||||
DdlPeriodo.DataSource = dtPeriodos.FiltraParametros("CveTipoPeriodo=6")
|
||||
|
||||
End If
|
||||
@@ -97,6 +97,7 @@ Partial Class Nomina_ReportePTU
|
||||
|
||||
Protected Sub DdlPeriodo_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
PnlTipoPeriodos.Visible = (DdlPeriodo.SelectedValue.ToEntero() <= 0)
|
||||
UpModalAutorizar.Update()
|
||||
End Sub
|
||||
'Protected Sub DdlTipoPeriodo_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
' CargaPeriodos()
|
||||
|
||||
@@ -531,7 +531,7 @@
|
||||
<asp:UpdatePanel ID="UpGvVacaciones" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvVacaciones" Width="100%" runat="server" GridLines="None" BorderWidth="0" data-heighterror="330" data-freezecols="0" data-freezerows="1"
|
||||
DataKeyNames="CvePersonalVacaciones,Periodo,FechaIng,Estatus,CveAutoriza,Autoriza,Dias,Usuario,SEstatus,Folio,FechaInicio,FechaFin,Documento"
|
||||
DataKeyNames="CvePersonalVacaciones,Periodo,FechaIng,Estatus,CveAutoriza,Autoriza,Dias,Usuario,SEstatus,Folio,FechaInicio,FechaFin,Documento,Motivo"
|
||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD GvVacaciones" data-sort="true" data-height="300" ShowHeader="True" EmptyDataText="No se encontraron resultados." ShowHeaderWhenEmpty="true"
|
||||
AutoGenerateColumns="False" AllowPaging="False" ShowFooter="False">
|
||||
<Columns>
|
||||
@@ -590,7 +590,7 @@
|
||||
</div>
|
||||
<asp:UpdatePanel ID="UpGvPermisos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvPermisos" Width="100%" runat="server" GridLines="None" DataKeyNames="CvePermiso,CvePersonal,Descripcion,FechaInicio,FechaFin,HoraEntrada,HoraSalida, GoceSueldo, Estatus" BorderWidth="0" data-heighterror="330" data-freezecols="0" data-freezerows="1"
|
||||
<asp:GridView ID="GvPermisos" Width="100%" runat="server" GridLines="None" DataKeyNames="CvePermiso,CvePersonal,Descripcion,Motivo,FechaInicio,FechaFin,HoraEntrada,HoraSalida,GoceSueldo,Estatus" BorderWidth="0" data-heighterror="330" data-freezecols="0" data-freezerows="1"
|
||||
CssClass=" table table-striped table-advance table-hover Widthall" ShowHeader="True" EmptyDataText="No se encontraron resultados." ShowHeaderWhenEmpty="true"
|
||||
AutoGenerateColumns="False" AllowPaging="False" ShowFooter="False">
|
||||
<Columns>
|
||||
|
||||
@@ -450,13 +450,22 @@ Partial Class RH_MiPerfil
|
||||
|
||||
Dim jefeCve As Integer = If(ObjPersonal.CvePersonalPadre = ObjPersonal.CvePersonal, "0", If(ObjPersonal.CvePersonalPadre.ToString = "0", "-1", ObjPersonal.CvePersonalPadre.ToString))
|
||||
Dim expressionJefe As String = String.Format("CvePersonal = {0}", jefeCve)
|
||||
Dim resultad As DataRow() = DTOrganigrama.Select(expressionJefe)
|
||||
JefeInmediato = resultad(0).Item("NombreCompleto")
|
||||
Dim resultad As DataRow = DTOrganigrama.FiltroPrimero(expressionJefe)
|
||||
If (Not IsNothing(resultad)) Then
|
||||
JefeInmediato = resultad.Item("NombreCompleto").ToString()
|
||||
Else
|
||||
JefeInmediato = ""
|
||||
End If
|
||||
|
||||
Dim puestosAux As DataTable = GlobalDTRHPuestos(UsuarioActual.CveEmpresa)
|
||||
Dim expressionPuesto As String = String.Format("CvePuesto = {0}", ObjPersonal.CvePuesto.ToString)
|
||||
Dim resultadoPuesto As DataRow() = puestosAux.Select(expressionPuesto)
|
||||
puestoProp = resultad(0).Item("Puesto")
|
||||
Dim resultadoPuesto As DataRow = puestosAux.FiltroPrimero(expressionPuesto)
|
||||
|
||||
If (Not IsNothing(resultad)) Then
|
||||
puestoProp = resultadoPuesto.Item("Puesto")
|
||||
Else
|
||||
puestoProp = ""
|
||||
End If
|
||||
|
||||
If File.Exists(AppDomain.CurrentDomain.BaseDirectory & "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal\" & ObjPersonal.URL) Then
|
||||
ImgPersonal.ImageUrl = $"/Empresas/{UsuarioActual.CveEmpresa}/RH/Personal/{ObjPersonal.URL}"
|
||||
@@ -975,7 +984,7 @@ Partial Class RH_MiPerfil
|
||||
'Dim Folio As Integer = GvRow.DataKey("Folio").ToEntero
|
||||
|
||||
'DescarSolicitudVacaciones(Folio)
|
||||
Dim RutaFormato As String = String.Format("{0}Formatos\RH_FormatoVacaciones.docx", UsuarioActual.Empresa.Ruta)
|
||||
Dim RutaFormato As String = String.Format("{0}Formatos\PermisoSolicitud.docx", UsuarioActual.Empresa.Ruta)
|
||||
|
||||
Dim NombreEmpleado As String = String.Format("{0} {1} {2}", TxtAPaterno.Text, TxtAMaterno.Text, TxtNombres.Text)
|
||||
Dim Codigo As String = TxtCodigo.Text
|
||||
@@ -983,8 +992,9 @@ Partial Class RH_MiPerfil
|
||||
Dim JefeInmediatoAux As String = JefeInmediato
|
||||
Dim FechaInicio As String = GvRow.DataKey("FechaInicio").ToDateTime().ToString("dd/MM/yyyy")
|
||||
Dim FechaFin As String = GvRow.DataKey("FechaFin").ToDateTime().ToString("dd/MM/yyyy")
|
||||
Dim diasPermiso As String = $"{(GvRow.DataKey("FechaInicio").ToDate() - GvRow.DataKey("FechaInicio").ToDate()).Days}"
|
||||
Dim MotivoPermiso As String = GvRow.DataKey("Descripcion")
|
||||
Dim diasPermiso As String = $"{(GvRow.DataKey("FechaFin").ToDate() - GvRow.DataKey("FechaInicio").ToDate()).Days}"
|
||||
Dim HorasPermiso As String = "" 'String.Format("{0}", ((GvRow.DataKey("FechaInicio").ToDateTime() - GvRow.DataKey("FechaFin").ToDateTime()).Hours))
|
||||
Dim MotivoPermiso As String = String.Format("{0},{1}", GvRow.DataKey("Descripcion"), GvRow.DataKey("Motivo"))
|
||||
If File.Exists(RutaFormato) Then
|
||||
|
||||
Dim objGemDocument As New clsGemBoxDocument(RutaFormato)
|
||||
@@ -999,6 +1009,7 @@ Partial Class RH_MiPerfil
|
||||
ListaTags.Add(New TagsDocumentos("{FechaInicio}", FechaInicio))
|
||||
ListaTags.Add(New TagsDocumentos("{FechaFin}", FechaFin))
|
||||
ListaTags.Add(New TagsDocumentos("{diasPermiso}", diasPermiso))
|
||||
ListaTags.Add(New TagsDocumentos("{HorasPermiso}", HorasPermiso))
|
||||
ListaTags.Add(New TagsDocumentos("{MotivoPermiso}", MotivoPermiso))
|
||||
|
||||
objGemDocument.SustituirTags(ListaTags)
|
||||
@@ -1014,7 +1025,8 @@ Partial Class RH_MiPerfil
|
||||
Response.AddHeader("content-disposition", "attachment; filename=" & CvePersonal & "_Solicituddepermiso_" & Now.ToString("yyyyMMddhhmmss") & ".pdf")
|
||||
Response.BinaryWrite(bytesInStream)
|
||||
Response.End()
|
||||
|
||||
Else
|
||||
Alert("No se encontro el formato de Permisos", TipoMensaje.ToastAdventencia)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -2330,7 +2330,7 @@
|
||||
</div>
|
||||
<asp:UpdatePanel ID="UpGvPermisos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvPermisos" Width="100%" runat="server" GridLines="None" DataKeyNames="CvePermiso,CvePersonal,Descripcion,FechaInicio,FechaFin,HoraEntrada,HoraSalida, GoceSueldo, Estatus" BorderWidth="0" data-heighterror="330" data-freezecols="0" data-freezerows="1"
|
||||
<asp:GridView ID="GvPermisos" Width="100%" runat="server" GridLines="None" DataKeyNames="CvePermiso,CvePersonal,Descripcion,Motivo,FechaInicio,FechaFin,HoraEntrada,HoraSalida,GoceSueldo,Estatus" BorderWidth="0" data-heighterror="330" data-freezecols="0" data-freezerows="1"
|
||||
CssClass=" table table-striped table-advance table-hover Widthall" ShowHeader="True" EmptyDataText="No se encontraron resultados." ShowHeaderWhenEmpty="true"
|
||||
AutoGenerateColumns="False" AllowPaging="False" ShowFooter="False">
|
||||
<Columns>
|
||||
|
||||
@@ -4542,53 +4542,52 @@ Partial Class RH_Personal
|
||||
End Sub
|
||||
|
||||
Public Sub DownLoad_ClickSolicitudPermiso(sender As Object, e As EventArgs)
|
||||
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
|
||||
'Dim Folio As Integer = GvRow.DataKey("Folio").ToEntero
|
||||
|
||||
'DescarSolicitudVacaciones(Folio)
|
||||
Dim RutaFormato As String = String.Format("{0}Formatos\RH_FormatoVacaciones.docx", UsuarioActual.Empresa.Ruta)
|
||||
|
||||
Dim NombreEmpleado As String = String.Format("{0} {1} {2}", TxtAPaterno.Text, TxtAMaterno.Text, TxtNombres.Text)
|
||||
Dim Codigo As String = TxtCodigo.Text
|
||||
Dim Departamento As String = DdlDepartamento.SelectedItem.Text
|
||||
Dim JefeInmediato As String = DdlSupervisorOrganigrama.SelectedItem.Text
|
||||
Dim FechaInicio As String = GvRow.DataKey("FechaInicio").ToDateTime().ToString("dd/MM/yyyy")
|
||||
Dim FechaFin As String = GvRow.DataKey("FechaFin").ToDateTime().ToString("dd/MM/yyyy")
|
||||
Dim diasPermiso As String = $"{(GvRow.DataKey("FechaInicio").ToDate() - GvRow.DataKey("FechaInicio").ToDate()).Days}"
|
||||
Dim MotivoPermiso As String = GvRow.DataKey("Descripcion")
|
||||
If File.Exists(RutaFormato) Then
|
||||
|
||||
Dim objGemDocument As New clsGemBoxDocument(RutaFormato)
|
||||
Dim ListaTags As New List(Of TagsDocumentos)
|
||||
|
||||
ListaTags = GetDatosTagsDocumentos()
|
||||
|
||||
ListaTags.Add(New TagsDocumentos("{NombreEmpleado}", NombreEmpleado))
|
||||
ListaTags.Add(New TagsDocumentos("{Codigo}", Codigo))
|
||||
ListaTags.Add(New TagsDocumentos("{Departamento}", Departamento))
|
||||
ListaTags.Add(New TagsDocumentos("{JefeInmediato}", JefeInmediato))
|
||||
ListaTags.Add(New TagsDocumentos("{FechaInicio}", FechaInicio))
|
||||
ListaTags.Add(New TagsDocumentos("{FechaFin}", FechaFin))
|
||||
ListaTags.Add(New TagsDocumentos("{diasPermiso}", diasPermiso))
|
||||
ListaTags.Add(New TagsDocumentos("{MotivoPermiso}", MotivoPermiso))
|
||||
|
||||
objGemDocument.SustituirTags(ListaTags)
|
||||
|
||||
'objGemDocument.GuardarStream()
|
||||
objGemDocument.GuardarStreamPDF()
|
||||
Dim bytesInStream As Byte() = objGemDocument.GetBytesDocumento()
|
||||
'Dim bytesInStream As Byte() = objGemDocument.memoryStream.ToArray
|
||||
objGemDocument.Dispose()
|
||||
|
||||
Response.Clear()
|
||||
Response.ContentType = "application/force-download"
|
||||
Response.AddHeader("content-disposition", "attachment; filename=" & CvePersonal & "_Solicituddepermiso_" & Now.ToString("yyyyMMddhhmmss") & ".pdf")
|
||||
Response.BinaryWrite(bytesInStream)
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
'Dim Folio As Integer = GvRow.DataKey("Folio").ToEntero
|
||||
'DescarSolicitudVacaciones(Folio)
|
||||
Dim RutaFormato As String = String.Format("{0}Formatos\PermisoSolicitud.docx", UsuarioActual.Empresa.Ruta)
|
||||
|
||||
Dim NombreEmpleado As String = String.Format("{0} {1} {2}", TxtAPaterno.Text, TxtAMaterno.Text, TxtNombres.Text)
|
||||
Dim Codigo As String = TxtCodigo.Text
|
||||
Dim Departamento As String = DdlDepartamento.SelectedItem.Text
|
||||
Dim JefeInmediato As String = DdlSupervisorOrganigrama.SelectedItem.Text
|
||||
Dim FechaInicio As String = GvRow.DataKey("FechaInicio").ToDateTime().ToString("dd/MM/yyyy")
|
||||
Dim FechaFin As String = GvRow.DataKey("FechaFin").ToDateTime().ToString("dd/MM/yyyy")
|
||||
Dim diasPermiso As String = $"{(GvRow.DataKey("FechaFin").ToDate() - GvRow.DataKey("FechaInicio").ToDate()).Days}"
|
||||
Dim HorasPermiso As String = "" 'String.Format("{0}", ((GvRow.DataKey("FechaInicio").ToDateTime() - GvRow.DataKey("FechaFin").ToDateTime()).Hours))
|
||||
Dim MotivoPermiso As String = String.Format("{0},{1}", GvRow.DataKey("Descripcion"), GvRow.DataKey("Motivo"))
|
||||
If File.Exists(RutaFormato) Then
|
||||
|
||||
Dim objGemDocument As New clsGemBoxDocument(RutaFormato)
|
||||
Dim ListaTags As New List(Of TagsDocumentos)
|
||||
|
||||
ListaTags = GetDatosTagsDocumentos()
|
||||
|
||||
ListaTags.Add(New TagsDocumentos("{NombreEmpleado}", NombreEmpleado))
|
||||
ListaTags.Add(New TagsDocumentos("{Codigo}", Codigo))
|
||||
ListaTags.Add(New TagsDocumentos("{Departamento}", Departamento))
|
||||
ListaTags.Add(New TagsDocumentos("{JefeInmediato}", JefeInmediato))
|
||||
ListaTags.Add(New TagsDocumentos("{FechaInicio}", FechaInicio))
|
||||
ListaTags.Add(New TagsDocumentos("{FechaFin}", FechaFin))
|
||||
ListaTags.Add(New TagsDocumentos("{diasPermiso}", diasPermiso))
|
||||
ListaTags.Add(New TagsDocumentos("{HorasPermiso}", HorasPermiso))
|
||||
ListaTags.Add(New TagsDocumentos("{MotivoPermiso}", MotivoPermiso))
|
||||
|
||||
objGemDocument.SustituirTags(ListaTags)
|
||||
|
||||
'objGemDocument.GuardarStream()
|
||||
objGemDocument.GuardarStreamPDF()
|
||||
Dim bytesInStream As Byte() = objGemDocument.GetBytesDocumento()
|
||||
'Dim bytesInStream As Byte() = objGemDocument.memoryStream.ToArray
|
||||
objGemDocument.Dispose()
|
||||
|
||||
Response.Clear()
|
||||
Response.ContentType = "application/force-download"
|
||||
Response.AddHeader("content-disposition", "attachment; filename=" & CvePersonal & "_Solicituddepermiso_" & Now.ToString("yyyyMMddhhmmss") & ".pdf")
|
||||
Response.BinaryWrite(bytesInStream)
|
||||
Response.End()
|
||||
Else
|
||||
Alert("No se encontro el Formato, favor de revisarlo con soporte tecnico.", TipoMensaje.MsgAdvertencia)
|
||||
Alert("No se encontro el formato de Permisos", TipoMensaje.ToastAdventencia)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -124,7 +124,8 @@
|
||||
<asp:BoundField runat="server" DataField="Cantidad" HeaderText="Cantidad" DataFormatString="{0:###,###}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField runat="server" DataField="Departamento" HeaderText="Departamento" />
|
||||
<asp:BoundField runat="server" DataField="SubProyecto" HeaderText="Sucursal" />
|
||||
|
||||
<asp:BoundField runat="server" DataField="Precio" DataFormatString="${0:N2}" HeaderText="Total" />
|
||||
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
Reference in New Issue
Block a user