This commit is contained in:
@@ -174,6 +174,46 @@ Public Class ClsNominas
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
Public Function AutorizaCalculoAnual(CveEmpresa As Integer, CveUsuario As Integer, PersonalXml As String) As Boolean
|
||||
Dim retorno As Boolean = False
|
||||
DataAdapter("PA_Nom_AutorizaCalculoAnual", CommandType.StoredProcedure)
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@PersonalXml", SqlDbType.Xml).Value = If(String.IsNullOrEmpty(PersonalXml), DBNull.Value, DirectCast(PersonalXml, Object))
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
retorno = True
|
||||
Catch Ex1 As SqlException
|
||||
|
||||
Me.OnError("Ocurrió un error al aplicar calculo anual.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al obtener los agro departamentos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
Return retorno
|
||||
End Function
|
||||
Public Function PersonalAplicaCalculoAnual(CveEmpresa As Integer, CveUsuario As Integer, CvePersonal As Integer, Aplica As Integer, motivo As String) As Boolean
|
||||
Dim retorno As Boolean = False
|
||||
DataAdapter("PA_Nom_PersonalAplicaCalculoAnual", CommandType.StoredProcedure)
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@Aplica", SqlDbType.Int).Value = Aplica
|
||||
.Add("@Motivo", SqlDbType.VarChar).Value = motivo
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
retorno = True
|
||||
Catch Ex1 As SqlException
|
||||
|
||||
Me.OnError("Ocurrió un error al aplicar calculo anual.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al obtener los agro departamentos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
Return retorno
|
||||
End Function
|
||||
#Region "ClsNominas_Nominas"
|
||||
|
||||
Public Function NominaUpMetododepago(cveEmpresa As Integer, CvePersonal As Integer, CvePeriodo As Integer, MetodoPagoFijo As Boolean,
|
||||
|
||||
@@ -329,8 +329,8 @@
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<div class="row" style="margin-right: 10px; margin-top: 18px;" align="right">
|
||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvBitacora.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvBitacora.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
|
||||
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
|
||||
|
||||
@@ -194,7 +194,8 @@ Partial Class PopUpVerFactura
|
||||
If UrlParametros("OP") IsNot Nothing AndAlso UrlParametros("OP").ToString <> "" Then
|
||||
SeleccionaReporte(UrlParametros)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
If Request("onlyPrint") IsNot Nothing Then
|
||||
If Request("onlyPrint").ToString() = "Pallet" Then
|
||||
imprimirpallet2(Request("CvePallet").ToString.ToEntero())
|
||||
@@ -216,6 +217,16 @@ Partial Class PopUpVerFactura
|
||||
Dim SubProyecto As String = ""
|
||||
Dim AgenciaAduanalUSA As String = ""
|
||||
Dim AgenciaAduanalMEX As String = ""
|
||||
Dim Temperatura As String = ""
|
||||
Dim Hora As String = ""
|
||||
Dim Chofer As String = ""
|
||||
Dim CamPlaca As String = ""
|
||||
Dim Camion As String = ""
|
||||
Dim Rem1Placa As String = ""
|
||||
Dim Remolque1 As String = ""
|
||||
Dim NoPallets As String = ""
|
||||
Dim NoBultos As String = ""
|
||||
Dim NoKgManifiesto As String = ""
|
||||
Dim tablaReporte As New DataTable
|
||||
|
||||
'Envase = "1 1/9"
|
||||
@@ -227,13 +238,34 @@ Partial Class PopUpVerFactura
|
||||
If objnom.PA_AGRO_Embarque_ManifiestoGet(-1, -1, -1, cveEmbarqueManifiesto) And objnom.DtResultados.Rows.Count > 0 Then
|
||||
Dim row As DataRow = objnom.DtResultados.Rows(0)
|
||||
NoEmbarque = row("NoEmbarque").ToString()
|
||||
Fecha = row("Fecha").ToString()
|
||||
Fecha = String.Format("{0:dd/MM/yyyy}", row("Fecha"))
|
||||
SubProyecto = row("SubProyecto").ToString()
|
||||
AgenciaAduanalUSA = row("AgenciaAduanalUSA").ToString()
|
||||
AgenciaAduanalMEX = row("AgenciaAduanalMEX").ToString()
|
||||
Temperatura = row("Temperatura").ToString()
|
||||
Hora = String.Format("{0:hh }:{0:mm }:{0:ss tt}:", row("FechaIng"))
|
||||
Chofer = row("Chofer").ToString()
|
||||
CamPlaca = row("CamPlaca").ToString()
|
||||
Camion = String.Format("{0} {1}", row("CamAnio"), row("CamEspecificacion"))
|
||||
Rem1Placa = row("Rem1Placa").ToString()
|
||||
Remolque1 = String.Format("{0} {1}", row("Rem1Anio"), row("Rem1Especificacion"))
|
||||
If row("CveCamionRemolque1").ToString() = "1" Then
|
||||
Rem1Placa = "12-TF-5E"
|
||||
Remolque1 = "Remolque 1"
|
||||
Else
|
||||
Rem1Placa = "15-TF-7f"
|
||||
Remolque1 = "Remolque 2"
|
||||
|
||||
End If
|
||||
|
||||
If objnom.PA_Agro_Embarque_PalletGet(-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, cveEmbarqueManifiesto, -1) And objnom.DtResultados.Rows.Count > 0 Then
|
||||
NoPallets = objnom.DtResultados.Rows.Count.ToString()
|
||||
NoKgManifiesto = objnom.DtResultados.SUM("Peso").ToString("N2")
|
||||
NoBultos = objnom.DtResultados.SUM("NoCajas").ToString("N0")
|
||||
tablaReporte = objnom.DtResultados
|
||||
End If
|
||||
End If
|
||||
|
||||
'Remolque 1 12-TF-5E' }, { cveCamion: 2, placa: 'Remolque 2 15-TF-7f
|
||||
End Using
|
||||
Dim params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("NoEmbarque", NoEmbarque))
|
||||
@@ -241,9 +273,18 @@ Partial Class PopUpVerFactura
|
||||
params.Add(New ReportParameter("SubProyecto", SubProyecto))
|
||||
params.Add(New ReportParameter("AgenciaAduanalUSA", AgenciaAduanalUSA))
|
||||
params.Add(New ReportParameter("AgenciaAduanalMEX", AgenciaAduanalMEX))
|
||||
params.Add(New ReportParameter("Temperatura", "45"))
|
||||
params.Add(New ReportParameter("Temperatura", Temperatura))
|
||||
params.Add(New ReportParameter("Hora", Hora))
|
||||
params.Add(New ReportParameter("Chofer", Chofer))
|
||||
params.Add(New ReportParameter("CamPlaca", CamPlaca))
|
||||
params.Add(New ReportParameter("Camion", Camion))
|
||||
params.Add(New ReportParameter("Rem1Placa", Rem1Placa))
|
||||
params.Add(New ReportParameter("Remolque1", Remolque1))
|
||||
|
||||
|
||||
params.Add(New ReportParameter("NoBultos", NoBultos))
|
||||
params.Add(New ReportParameter("NoPallets", NoPallets))
|
||||
params.Add(New ReportParameter("NoKgManifiesto", NoKgManifiesto))
|
||||
|
||||
|
||||
|
||||
@@ -1609,7 +1650,7 @@ Partial Class PopUpVerFactura
|
||||
Timbre.Comprobante.FormadePago = Obj.FormaPagoSAT33
|
||||
Timbre.Comprobante.CondicionesdePago = Obj.FormaPago33
|
||||
Timbre.Comprobante.MetodoPago = Obj.ClaveMetodoPagoSAT
|
||||
Timbre.Comprobante.Subtotal = Obj.SubTotal
|
||||
Timbre.Comprobante.SubTotal = Obj.SubTotal
|
||||
Timbre.Comprobante.Descuentos = Obj.Descuento
|
||||
Timbre.Comprobante.Moneda = Obj.MonedaSAT
|
||||
Timbre.Comprobante.TipoCambio = If(Obj.CveMoneda = 1, "1", Obj.TipoCambio.ToString)
|
||||
|
||||
@@ -303,7 +303,7 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>06:44:07 p. m.</Value>
|
||||
<Value>=Parameters!Hora.Value</Value>
|
||||
<Style />
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
@@ -488,14 +488,14 @@
|
||||
<TablixCells>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Textbox496">
|
||||
<Textbox Name="Textbox4">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>826</Value>
|
||||
<Value>=Parameters!NoBultos.Value</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
</Style>
|
||||
@@ -506,7 +506,7 @@
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox496</rd:DefaultName>
|
||||
<rd:DefaultName>Textbox4</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
@@ -614,14 +614,14 @@
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Textbox499">
|
||||
<Textbox Name="Textbox8">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>18,172.00</Value>
|
||||
<Value>=Parameters!NoKgManifiesto.Value</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
</Style>
|
||||
@@ -632,7 +632,7 @@
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox499</rd:DefaultName>
|
||||
<rd:DefaultName>Textbox8</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
@@ -874,14 +874,14 @@
|
||||
<TablixCells>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Textbox508">
|
||||
<Textbox Name="Textbox6">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>20</Value>
|
||||
<Value>=Parameters!NoPallets.Value</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
</Style>
|
||||
@@ -892,7 +892,7 @@
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox508</rd:DefaultName>
|
||||
<rd:DefaultName>Textbox6</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
@@ -2768,7 +2768,7 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value />
|
||||
<Value>=Parameters!Chofer.Value</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
</Style>
|
||||
@@ -3188,7 +3188,13 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>45 °F</Value>
|
||||
<Value>=Parameters!Temperatura.Value</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value>°F</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
</Style>
|
||||
@@ -3327,7 +3333,7 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value />
|
||||
<Value>=Parameters!CamPlaca.Value</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
</Style>
|
||||
@@ -3389,7 +3395,7 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value />
|
||||
<Value>=Parameters!Camion.Value</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
</Style>
|
||||
@@ -3475,14 +3481,14 @@
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Textbox157">
|
||||
<Textbox Name="Textbox9">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>LCT-03</Value>
|
||||
<Value>=Parameters!Remolque1.Value</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
</Style>
|
||||
@@ -3493,7 +3499,7 @@
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox157</rd:DefaultName>
|
||||
<rd:DefaultName>Textbox9</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
@@ -3541,14 +3547,14 @@
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Textbox222">
|
||||
<Textbox Name="Textbox10">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>67-UA-1Z</Value>
|
||||
<Value>=Parameters!Rem1Placa.Value</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
</Style>
|
||||
@@ -3559,7 +3565,7 @@
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox222</rd:DefaultName>
|
||||
<rd:DefaultName>Textbox10</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
@@ -5364,7 +5370,7 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Parameters!AgenciaAduanalUSA.Value</Value>
|
||||
<Value>=Parameters!AgenciaAduanalMEX.Value</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
</Style>
|
||||
@@ -5470,7 +5476,7 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Parameters!AgenciaAduanalMEX.Value</Value>
|
||||
<Value>=Parameters!AgenciaAduanalUSA.Value</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
</Style>
|
||||
@@ -7167,21 +7173,21 @@
|
||||
<TablixCells>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Textbox527">
|
||||
<Textbox Name="NoPallets">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value />
|
||||
<Value>=Fields!NoPallets.Value</Value>
|
||||
<Style />
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox527</rd:DefaultName>
|
||||
<rd:DefaultName>NoPallets</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Color>LightGrey</Color>
|
||||
@@ -7197,21 +7203,21 @@
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Textbox529">
|
||||
<Textbox Name="NoCajas">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value />
|
||||
<Value>=Fields!NoCajas.Value</Value>
|
||||
<Style />
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox529</rd:DefaultName>
|
||||
<rd:DefaultName>NoCajas</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Color>LightGrey</Color>
|
||||
@@ -7227,21 +7233,52 @@
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Textbox531">
|
||||
<Textbox Name="Cultivo">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value />
|
||||
<Value>=Fields!Cultivo.Value & " " & Fields!CultivoVariedad.Value</Value>
|
||||
<Style />
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox531</rd:DefaultName>
|
||||
<rd:DefaultName>Cultivo</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Color>LightGrey</Color>
|
||||
<Style>Solid</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<rd:Selected>true</rd:Selected>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Etiqueta">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Fields!Etiqueta.Value</Value>
|
||||
<Style />
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Etiqueta</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Color>LightGrey</Color>
|
||||
@@ -7257,51 +7294,21 @@
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Textbox3">
|
||||
<Textbox Name="Envase">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>GROWER</Value>
|
||||
<Value>=Fields!Envase.Value</Value>
|
||||
<Style />
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox3</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Color>LightGrey</Color>
|
||||
<Style>Solid</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Textbox533">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>1 1/9 GROWER</Value>
|
||||
<Style />
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox533</rd:DefaultName>
|
||||
<rd:DefaultName>Envase</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Color>LightGrey</Color>
|
||||
@@ -7338,6 +7345,7 @@
|
||||
</TablixMember>
|
||||
</TablixMembers>
|
||||
</TablixRowHierarchy>
|
||||
<DataSetName>DataSet1</DataSetName>
|
||||
<Top>17.30058cm</Top>
|
||||
<Left>0.25008cm</Left>
|
||||
<Height>1.2cm</Height>
|
||||
@@ -7381,40 +7389,32 @@
|
||||
<CommandText>/* Local Query */</CommandText>
|
||||
</Query>
|
||||
<Fields>
|
||||
<Field Name="TipoTransaccionAbrev">
|
||||
<DataField>TipoTransaccionAbrev</DataField>
|
||||
<Field Name="NoPallets">
|
||||
<DataField>NoPallets</DataField>
|
||||
<rd:TypeName>System.Int</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="NoCajas">
|
||||
<DataField>NoCajas</DataField>
|
||||
<rd:TypeName>System.Int</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="Peso">
|
||||
<DataField>Peso</DataField>
|
||||
<rd:TypeName>System.Decimal</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="Etiqueta">
|
||||
<DataField>Etiqueta</DataField>
|
||||
<rd:TypeName>System.String</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="Folio">
|
||||
<DataField>Folio</DataField>
|
||||
<Field Name="Envase">
|
||||
<DataField>Envase</DataField>
|
||||
<rd:TypeName>System.String</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="FechaDocumento">
|
||||
<DataField>FechaDocumento</DataField>
|
||||
<Field Name="Cultivo">
|
||||
<DataField>Cultivo</DataField>
|
||||
<rd:TypeName>System.String</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="PagueseA">
|
||||
<DataField>PagueseA</DataField>
|
||||
<rd:TypeName>System.String</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="Observaciones">
|
||||
<DataField>Observaciones</DataField>
|
||||
<rd:TypeName>System.String</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="Cargo">
|
||||
<DataField>Cargo</DataField>
|
||||
<rd:TypeName>System.String</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="Abono">
|
||||
<DataField>Abono</DataField>
|
||||
<rd:TypeName>System.String</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="EstatusIE">
|
||||
<DataField>EstatusIE</DataField>
|
||||
<rd:TypeName>System.String</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="Acumulado">
|
||||
<DataField>Acumulado</DataField>
|
||||
<Field Name="CultivoVariedad">
|
||||
<DataField>CultivoVariedad</DataField>
|
||||
<rd:TypeName>System.String</rd:TypeName>
|
||||
</Field>
|
||||
</Fields>
|
||||
@@ -7441,6 +7441,12 @@
|
||||
<AllowBlank>true</AllowBlank>
|
||||
<Prompt>ReportParameter1</Prompt>
|
||||
</ReportParameter>
|
||||
<ReportParameter Name="Hora">
|
||||
<DataType>String</DataType>
|
||||
<Nullable>true</Nullable>
|
||||
<AllowBlank>true</AllowBlank>
|
||||
<Prompt>ReportParameter1</Prompt>
|
||||
</ReportParameter>
|
||||
<ReportParameter Name="SubProyecto">
|
||||
<DataType>String</DataType>
|
||||
<Nullable>true</Nullable>
|
||||
@@ -7465,6 +7471,54 @@
|
||||
<AllowBlank>true</AllowBlank>
|
||||
<Prompt>ReportParameter1</Prompt>
|
||||
</ReportParameter>
|
||||
<ReportParameter Name="Chofer">
|
||||
<DataType>String</DataType>
|
||||
<Nullable>true</Nullable>
|
||||
<AllowBlank>true</AllowBlank>
|
||||
<Prompt>ReportParameter1</Prompt>
|
||||
</ReportParameter>
|
||||
<ReportParameter Name="CamPlaca">
|
||||
<DataType>String</DataType>
|
||||
<Nullable>true</Nullable>
|
||||
<AllowBlank>true</AllowBlank>
|
||||
<Prompt>ReportParameter1</Prompt>
|
||||
</ReportParameter>
|
||||
<ReportParameter Name="Camion">
|
||||
<DataType>String</DataType>
|
||||
<Nullable>true</Nullable>
|
||||
<AllowBlank>true</AllowBlank>
|
||||
<Prompt>ReportParameter1</Prompt>
|
||||
</ReportParameter>
|
||||
<ReportParameter Name="Rem1Placa">
|
||||
<DataType>String</DataType>
|
||||
<Nullable>true</Nullable>
|
||||
<AllowBlank>true</AllowBlank>
|
||||
<Prompt>ReportParameter1</Prompt>
|
||||
</ReportParameter>
|
||||
<ReportParameter Name="Remolque1">
|
||||
<DataType>String</DataType>
|
||||
<Nullable>true</Nullable>
|
||||
<AllowBlank>true</AllowBlank>
|
||||
<Prompt>ReportParameter1</Prompt>
|
||||
</ReportParameter>
|
||||
<ReportParameter Name="NoPallets">
|
||||
<DataType>String</DataType>
|
||||
<Nullable>true</Nullable>
|
||||
<AllowBlank>true</AllowBlank>
|
||||
<Prompt>ReportParameter1</Prompt>
|
||||
</ReportParameter>
|
||||
<ReportParameter Name="NoBultos">
|
||||
<DataType>String</DataType>
|
||||
<Nullable>true</Nullable>
|
||||
<AllowBlank>true</AllowBlank>
|
||||
<Prompt>ReportParameter1</Prompt>
|
||||
</ReportParameter>
|
||||
<ReportParameter Name="NoKgManifiesto">
|
||||
<DataType>String</DataType>
|
||||
<Nullable>true</Nullable>
|
||||
<AllowBlank>true</AllowBlank>
|
||||
<Prompt>ReportParameter1</Prompt>
|
||||
</ReportParameter>
|
||||
</ReportParameters>
|
||||
<EmbeddedImages>
|
||||
<EmbeddedImage Name="logojam">
|
||||
|
||||
@@ -1,33 +1,87 @@
|
||||
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="CalculoISRAnual.aspx.cs" Inherits="Nomina_CalculoISRAnual" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" Runat="Server">
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" Runat="Server">
|
||||
<style >
|
||||
.GVCalculoISRAnual tr td:nth-child(n+4){
|
||||
text-align :right;
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
.GVCalculoISRAnual tr td:nth-child(n+6) {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.btn.btn-circle.btn-sm {
|
||||
font-size: 9px;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" Runat="Server">
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
Calculo ISR anual
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" Runat="Server">
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" Runat="Server">
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkdownExcel" OnClick="LnkdownExcel_Click" runat="server"><i class="fa fa-download" aria-hidden="true"></i>Excel</asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkdownExcel" OnClick="LnkdownExcel_Click" runat="server"><i class="fa fa-download" aria-hidden="true"></i>Excel</asp:LinkButton>
|
||||
</li>
|
||||
</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" >
|
||||
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GVCalculoISRAnual" runat="server" GridLines="None" CssClass ="table table-hover table-striped ScrollAD GVCalculoISRAnual Widthall" AutoGenerateColumns="False"
|
||||
datakeynames="CvePersonal,Codigo,NombreCompleto,TipoIngreso,FechaInicio,IngresosTotales,BaseGravada,Deducciones,ISRRetenido,Art152,SubsCorrespondiente,LimiteInferior,LimiteSuperior,CuotaFija,Porcentaje,ImpuestoAnual,Acargo,Acompensar">
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkOpenModalAutoriza" OnClick="LnkOpenModalAutoriza_Click" runat="server"><i class="fa fa-check" aria-hidden="true"></i> Autoriza</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="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle">
|
||||
<div class="titlefiltros caption">
|
||||
<div class="row">
|
||||
<label class="col-md-1">Ejercicio: </label>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlEjercicios" runat="server" Style="width: 100% !important;" CssClass="select2me" DataValueField="Ejercicio" DataTextField="Ejercicio"></asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
<asp:LinkButton ID="LnkConsultar" OnClick="LnkConsultar_Click" runat="server" Text="Calcular" class="btn btn-primary" />
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="tools">
|
||||
<%--<a href="javascript:;" class="expand" data-original-title="" title=""></a>--%>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body" style="display: none">
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<asp:UpdatePanel ID="upDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GVCalculoISRAnual" runat="server" GridLines="None" CssClass="table table-hover table-striped ScrollAD GVCalculoISRAnual Widthall" AutoGenerateColumns="False"
|
||||
DataKeyNames="CvePersonal,Codigo,NombreCompleto,TipoIngreso,FechaInicio,IngresosTotales,BaseGravada,Deducciones,ISRRetenido,Art152,SubsCorrespondiente,LimiteInferior,LimiteSuperior,CuotaFija,Porcentaje,ImpuestoAnual,Acargo,Acompensar">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Aplica">
|
||||
<ItemTemplate>
|
||||
<%# Eval("Aplica").ToString() =="1" ?"✓" :"✘" %>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkAplicar" Visible='<%# Eval("Aplica").ToString() =="0"%>' OnClick="LnkAplicar_Click" CssClass="btn btn-circle btn-sm green " runat="server" data-toggle="confirmation" data-popout="true" data-original-title="AgregarEmpleado al calculo anual" data-btn-ok-label="si"> +</asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkCancelar" Visible='<%# Eval("Aplica").ToString() =="1"%>' OnClick="LnkCancelar_Click" CssClass="btn btn-circle btn-sm red " runat="server"> -</asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Causa">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("Causa")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Código">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblcodigo" runat="server" Text='<%# Eval("Codigo")%>'> </asp:Label>
|
||||
@@ -38,47 +92,52 @@
|
||||
<asp:Label ID="lblnombreCompleto" runat="server" Text='<%# Eval("NombreCompleto")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Tipo Ingreso">
|
||||
<asp:TemplateField HeaderText="Tipo ingreso">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblfechaInicio" runat="server" Text='<%# string.Format("{0} - {1:dd/MM/yyyy}",Eval("TipoIngreso"), Eval("FechaInicio"))%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Ingresos Totales">
|
||||
<asp:TemplateField HeaderText="Ingresos totales">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblingresosTotales" runat="server" Text='<%# Eval("IngresosTotales","{0:N2}")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Base Gravada">
|
||||
<asp:TemplateField HeaderText="Base gravada">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblbaseGravada" runat="server" Text='<%# Eval("BaseGravada","{0:N2}")%>'> </asp:Label>
|
||||
<asp:Label runat="server" Text='<%# Eval("BaseGravada","{0:N2}")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="ISRRetenido">
|
||||
<asp:TemplateField HeaderText="Base exenta">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("BaseExcenta","{0:N2}")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="ISR retenido">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lbliSRRetenido" runat="server" Text='<%# Eval("ISRRetenido","{0:N2}")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Art152">
|
||||
<asp:TemplateField HeaderText="Art 152">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblart152" runat="server" Text='<%# Eval("Art152","{0:N2}")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Subs Correspondiente">
|
||||
<asp:TemplateField HeaderText="Subs. correspondiente">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblsubsCorrespondiente" runat="server" Text='<%# Eval("SubsCorrespondiente","{0:N2}")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Impuesto Anual">
|
||||
<asp:TemplateField HeaderText="Impuesto anual">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblimpuestoAnual" runat="server" Text='<%# Eval("ImpuestoAnual","{0:N2}")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Acargo">
|
||||
<asp:TemplateField HeaderText="A cargo">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblacargo" runat="server" Text='<%# Eval("Acargo","{0:N2}")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Acompensar">
|
||||
<asp:TemplateField HeaderText="A compensar">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblacompensar" runat="server" Text='<%# Eval("Acompensar","{0:N2}")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
@@ -89,7 +148,72 @@
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
<div id="DModalcancelarEmpleado" class="modal ADS fade" role="dialog">
|
||||
<asp:UpdatePanel ID="UpModalPersonalAplica" class="modal-dialog" tabindex="-1" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-content rowpadding">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title" runat="server" style="text-align: left">Omitir empleado</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox CssClass="form-control" ID="TxtMotivo" runat="server" Text=""></asp:TextBox>
|
||||
<asp:Label runat="server" AssociatedControlID="TxtMotivo" Text="Motivo"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<asp:UpdatePanel runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:LinkButton ID="LnkGuardarCancelarAplica" OnClick="LnkGuardarCancelarAplica_Click" CssClass="btn btn-primary" runat="server">Guardar</asp:LinkButton>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
<div id="DModalAutoriza" class="modal ADS fade" role="dialog">
|
||||
<asp:UpdatePanel ID="UpAutorizaCalculo" class="modal-dialog" tabindex="-1" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-content rowpadding">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title" runat="server" style="text-align: left">Autoriza calculo anual</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:Label runat="server" Text="Concepto a cargo:" AssociatedControlID=""></asp:Label>
|
||||
<asp:DropDownList ID="DdlConceptoCargo" runat="server" DataTextField="CodigoConcepto" DataValueField="CveConcepto" Class="form-control input-sm select2me" Width="100%" ValidationGroup="GrpGuardar"></asp:DropDownList>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:Label runat="server" Text="Concepto a compensar:" AssociatedControlID=""></asp:Label>
|
||||
<asp:DropDownList ID="DdlConceptoCompensar" runat="server" DataTextField="CodigoConcepto" DataValueField="CveConcepto" Class="form-control input-sm select2me" Width="100%" ValidationGroup="GrpGuardar"></asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<asp:UpdatePanel runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:LinkButton ID="LnkAutoriza" OnClick="LnkAutoriza_Click" CssClass="btn btn-primary" runat="server">Autorizar</asp:LinkButton>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" Runat="Server">
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
|
||||
@@ -1,25 +1,57 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Xml.Linq;
|
||||
using Extensiones;
|
||||
|
||||
public partial class Nomina_CalculoISRAnual : ClsPaginas
|
||||
{
|
||||
|
||||
protected int CvePersonal
|
||||
{
|
||||
get
|
||||
{
|
||||
if (ViewState["CvePersonal"] == null) { return 0; }
|
||||
else { return ViewState["CvePersonal"].ToString().ToEntero(); }
|
||||
}
|
||||
|
||||
set { ViewState["CvePersonal"] = value; }
|
||||
}
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
cargaddls();
|
||||
CargaCalculoISRAnual();
|
||||
}
|
||||
}
|
||||
public void cargaddls()
|
||||
{
|
||||
|
||||
DataTable dtejercicio = new DataTable();
|
||||
using (ClsNominas objnom = new ClsNominas())
|
||||
{
|
||||
if (objnom.GetEjercicios(UsuarioActual.CveEmpresa))
|
||||
{
|
||||
dtejercicio = objnom.DtResultados;
|
||||
}
|
||||
}
|
||||
DdlEjercicios.DataSource = dtejercicio;
|
||||
DdlEjercicios.DataBind();
|
||||
string anio = DateTime.Now.Year.ToString();
|
||||
DdlEjercicios.SelectedValueExistInsert(anio, anio);
|
||||
}
|
||||
|
||||
protected void CargaCalculoISRAnual()
|
||||
{
|
||||
using (ClsNominas onom = new ClsNominas())
|
||||
{
|
||||
onom.CalculoISRAnual(2021, UsuarioActual.Empresa.CveEmpresa);
|
||||
onom.CalculoISRAnual(DdlEjercicios.SelectedValue.ToEntero(), UsuarioActual.Empresa.CveEmpresa);
|
||||
GVCalculoISRAnual.DataSource = onom.DtResultados;
|
||||
|
||||
}
|
||||
@@ -27,8 +59,185 @@ public partial class Nomina_CalculoISRAnual : ClsPaginas
|
||||
upDatos.Update();
|
||||
}
|
||||
|
||||
protected void LnkConsultar_Click(object sender, EventArgs e)
|
||||
{
|
||||
CargaCalculoISRAnual();
|
||||
}
|
||||
protected void LnkdownExcel_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
|
||||
//DataTable dtCon = generateTable("\r\n");
|
||||
|
||||
|
||||
ClosedXML.Excel.XLWorkbook wb = new ClosedXML.Excel.XLWorkbook();
|
||||
var libro = wb.AddWorksheet("Asistencia");
|
||||
int column = 1;
|
||||
|
||||
int row = 1;
|
||||
|
||||
libro.Cell(row, column++).Value = "Aplica";
|
||||
libro.Cell(row, column++).Value = "Causa";
|
||||
libro.Cell(row, column++).Value = "Código";
|
||||
libro.Cell(row, column++).Value = "Nombre";
|
||||
libro.Cell(row, column++).Value = "Tipo ingreso";
|
||||
libro.Cell(row, column++).Value = "Ingresos totales";
|
||||
libro.Cell(row, column++).Value = "Base gravada";
|
||||
libro.Cell(row, column++).Value = "Base exenta";
|
||||
libro.Cell(row, column++).Value = "ISR retenido";
|
||||
libro.Cell(row, column++).Value = "Art 152";
|
||||
libro.Cell(row, column++).Value = "Subs. Correspondiente";
|
||||
libro.Cell(row, column++).Value = "Impuesto anual";
|
||||
libro.Cell(row, column++).Value = "A cargo";
|
||||
libro.Cell(row, column++).Value = "A compensar";
|
||||
libro.Range(row, 1, row, column - 1).CellsUsed().Style.Font.FontColor = ClosedXML.Excel.XLColor.White;
|
||||
libro.Range(row, 1, row, column - 1).CellsUsed().Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(79, 129, 189));
|
||||
row++;
|
||||
using (ClsNominas onom = new ClsNominas())
|
||||
{
|
||||
if (onom.CalculoISRAnual(DdlEjercicios.SelectedValue.ToEntero(), UsuarioActual.Empresa.CveEmpresa) && onom.DtResultados.Rows.Count > 0)
|
||||
{
|
||||
foreach (DataRow drow in onom.DtResultados.Rows)
|
||||
{
|
||||
|
||||
column = 1;
|
||||
libro.Cell(row, column++).Value = drow["Aplica"].ToString()=="1"?"Si":"No";
|
||||
libro.Cell(row, column++).Value = drow["causa"];
|
||||
libro.Cell(row, column++).Value = drow["Codigo"];
|
||||
libro.Cell(row, column++).Value = drow["NombreCompleto"];
|
||||
libro.Cell(row, column++).Value = string.Format("{0} - {1:dd/MM/yyyy}", drow["TipoIngreso"], drow["FechaInicio"]);
|
||||
libro.Cell(row, column++).Value = drow["IngresosTotales"];
|
||||
libro.Cell(row, column++).Value = drow["BaseGravada"];
|
||||
libro.Cell(row, column++).Value = drow["BaseExcenta"];
|
||||
libro.Cell(row, column++).Value = drow["ISRRetenido"];
|
||||
libro.Cell(row, column++).Value = drow["Art152"];
|
||||
libro.Cell(row, column++).Value = drow["SubsCorrespondiente"];
|
||||
libro.Cell(row, column++).Value = drow["ImpuestoAnual"];
|
||||
libro.Cell(row, column++).Value = drow["Acargo"];
|
||||
libro.Cell(row, column++).Value = drow["Acompensar"];
|
||||
row++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
libro.SheetView.Freeze(1, 4);
|
||||
libro.ColumnsUsed().AdjustToContents();
|
||||
libro.Range(1, 6, 1, column).Style.Alignment.Horizontal = ClosedXML.Excel.XLAlignmentHorizontalValues.Center;
|
||||
libro.Range(2, 6, row, column).Style.Alignment.Horizontal = ClosedXML.Excel.XLAlignmentHorizontalValues.Right;
|
||||
libro.Range(2, 6, row, column).SetDataType(ClosedXML.Excel.XLDataType.Number);
|
||||
libro.Range(2, 6, row, column).Style.NumberFormat.Format = "$#,###,###,###,###,###,0.00";
|
||||
|
||||
|
||||
System.IO.Stream fs = new System.IO.MemoryStream();
|
||||
wb.SaveAs(fs);
|
||||
fs.Position = 0;
|
||||
System.IO.MemoryStream memoryStream = new System.IO.MemoryStream();
|
||||
using (System.IO.Stream input = fs)
|
||||
|
||||
{
|
||||
input.CopyTo(memoryStream);
|
||||
}
|
||||
memoryStream.Position = 0;
|
||||
|
||||
Response.Clear();
|
||||
Response.Buffer = true;
|
||||
|
||||
Response.ContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
|
||||
Response.AddHeader("content-disposition", string.Format("attachment;filename={0}.xlsx", "Calculo Anual"));
|
||||
Response.BinaryWrite(memoryStream.ToArray());
|
||||
Response.End();
|
||||
}
|
||||
|
||||
|
||||
protected void LnkAplicar_Click(object sender, EventArgs e)
|
||||
{
|
||||
GridViewRow gvrow = (GridViewRow)(((LinkButton)sender).NamingContainer);
|
||||
CvePersonal = gvrow.DataKey("CvePersonal").ToString().ToEntero();
|
||||
using (ClsNominas onom = new ClsNominas())
|
||||
{
|
||||
if (onom.PersonalAplicaCalculoAnual(UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, CvePersonal, 1, ""))
|
||||
{
|
||||
Alert("El empleado sera incluido al calculo anual");
|
||||
CargaCalculoISRAnual();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void LnkCancelar_Click(object sender, EventArgs e)
|
||||
{
|
||||
GridViewRow gvrow = (GridViewRow)(((LinkButton)sender).NamingContainer);
|
||||
CvePersonal = gvrow.DataKey("CvePersonal").ToString().ToEntero();
|
||||
RegistraScript("$('#DModalcancelarEmpleado').modal();");
|
||||
}
|
||||
|
||||
protected void LnkGuardarCancelarAplica_Click(object sender, EventArgs e)
|
||||
{
|
||||
using (ClsNominas onom = new ClsNominas())
|
||||
{
|
||||
if(onom.PersonalAplicaCalculoAnual(UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, CvePersonal, 0, TxtMotivo.Text))
|
||||
{
|
||||
Alert("El empleado sera omitido del calculo anual");
|
||||
RegistraScript("$('#DModalcancelarEmpleado').modal('hide');");
|
||||
CargaCalculoISRAnual();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void LnkOpenModalAutoriza_Click(object sender, EventArgs e)
|
||||
{
|
||||
using(ClsNominas onom = new ClsNominas())
|
||||
{
|
||||
if (onom.GetConceptos(UsuarioActual.CveEmpresa, "-1", -1, -1, -1))
|
||||
{
|
||||
DdlConceptoCargo.DataSource = onom.DtResultados;
|
||||
DdlConceptoCompensar.DataSource = onom.DtResultados;
|
||||
DdlConceptoCargo.DataBind();
|
||||
DdlConceptoCompensar.DataBind();
|
||||
DataRow drow = onom.DtResultados.FiltroPrimero(string.Format("CveSistema ={0}",46));
|
||||
if (drow != null)
|
||||
{
|
||||
DdlConceptoCargo.SelectedValueExist(drow["CveConcepto"]);
|
||||
}
|
||||
drow = null; drow = onom.DtResultados.FiltroPrimero(string.Format("CveSistema ={0}", 49));
|
||||
if (drow != null)
|
||||
{
|
||||
DdlConceptoCompensar.SelectedValueExist(drow["CveConcepto"]);
|
||||
}
|
||||
}
|
||||
}
|
||||
RegistraScript("$('#DModalAutoriza').modal();");
|
||||
UpAutorizaCalculo.Update();
|
||||
}
|
||||
|
||||
protected void LnkAutoriza_Click(object sender, EventArgs e)
|
||||
{
|
||||
bool continuar = true;
|
||||
|
||||
|
||||
System.Xml.Linq.XDocument xmlarchivos = new System.Xml.Linq.XDocument();
|
||||
XElement xfolder = new XElement("personal");
|
||||
foreach (GridViewRow item in GVCalculoISRAnual.Rows )
|
||||
{
|
||||
XElement xempleado = new XElement("empleado");
|
||||
xempleado.SetAttributeValue("CvePersonal", item.DataKey("CvePersonal"));
|
||||
xempleado.SetAttributeValue("ACarago", item.DataKey("Acargo"));
|
||||
xempleado.SetAttributeValue("ACompensar", item.DataKey("Acompensar"));
|
||||
|
||||
xfolder.Add(xempleado);
|
||||
}
|
||||
xmlarchivos.Add(xfolder);
|
||||
string xmlpeople= xmlarchivos.ToString();
|
||||
|
||||
using (ClsNominas onom = new ClsNominas())
|
||||
{
|
||||
continuar = onom.AutorizaCalculoAnual(UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, xmlpeople);
|
||||
}
|
||||
if (continuar)
|
||||
{
|
||||
Alert("El calculo a sido autorizado");
|
||||
RegistraScript("$('#DModalAutoriza').modal('hide');");
|
||||
}
|
||||
|
||||
RegistraScript(string.Format("console.log('{0}');debugger", xmlpeople));
|
||||
}
|
||||
}
|
||||
@@ -154,7 +154,8 @@ public partial class RH_CalculoSBC : ClsPaginas
|
||||
double SalarioDiarioSSNuevo = Math.Round(item.DataKey("SalarioDiarioSSNuevo").ToDouble(), 2);
|
||||
double SalarioVariableNuevo = item.DataKey("SalarioVariableNuevo").ToDouble();
|
||||
double SalarioDiarioSS = Math.Round(item.DataKey("SalarioDiarioSS").ToDouble(), 2);
|
||||
if (continuar && SalarioDiarioSSNuevo != SalarioDiarioSS && (continuar = objrh.UpdateSalarios(CvePersonal, fecha, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, SalarioDiario, SDINuevo, SalarioDiarioSSNuevo, SalarioDiario)))
|
||||
if (continuar && SalarioDiarioSSNuevo != SalarioDiarioSS &&
|
||||
(continuar = objrh.UpdateSalarios(CvePersonal, fecha, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, SalarioDiario, SDINuevo, SalarioDiarioSSNuevo, SalarioDiario)))
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@@ -384,6 +384,12 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user