This commit is contained in:
2022-04-07 00:07:27 -07:00
8 changed files with 195 additions and 80 deletions

View File

@@ -587,18 +587,30 @@ Partial Class AC2_SituacionFinanciera
Private Sub ImprimirReporte(Optional Formato As String = "PDF")
Dim FechaI = String.Format("01/{0}/{1}", DdlPeriodo.SelectedValue.PadLeft(2, CChar("0")), DdlEjercicio.SelectedValue)
Dim FechaF = DateAdd(DateInterval.Day, -1, DateAdd(DateInterval.Month, 1, CDate(FechaI))).ToString("dd/MM/yyyy")
'nombre del archivo a generar
Dim fileName As String = "EdoSituacionFinanciera"
'ubicacion del rdlc
Dim reportpath As String = "Contabilidad2/Reportes/RepSituacionFinanciera.rdlc"
'parametros a enviar al reporte
Dim params As New List(Of ReportParameter)
params.Add(New ReportParameter("pEmp", UsuarioActual.Empresa.Empresa))
params.Add(New ReportParameter("pImg", New Uri(Server.MapPath(String.Format("~/Empresas/{0}/Logo.png", UsuarioActual.CveEmpresa))).AbsoluteUri))
Dim ImgLogoInfo As New IO.FileInfo($"{UsuarioActual.Empresa.Ruta}\Logo.png")
If ImgLogoInfo.Exists Then
params.Add(New ReportParameter("pImg", $"file://{ImgLogoInfo.FullName}"))
Else
params.Add(New ReportParameter("pImg", ""))
End If
params.Add(New ReportParameter("pFirma1", If(ChkFirma.Checked, String.Format("{0}", vbCrLf), "")))
params.Add(New ReportParameter("pFirma2", If(ChkFirma.Checked, String.Format("{0}l", vbCrLf), "")))
params.Add(New ReportParameter("pFechaFin", FechaF))
params.Add(New ReportParameter("periodo", String.Format("de {0} {1}", DdlPeriodo.SelectedItem.ToString, DdlEjercicio.SelectedItem.ToString)))
ImprimirPDF(reportpath, DtDatos, params, fileName, Formato)
End Sub

View File

@@ -3048,16 +3048,17 @@
<Value>=Sum(Microsoft.VisualBasic.Interaction.iif(Fields!Sup.Value = "CAPITAL" , Fields!ImporteActual.Value, 0),"DataSet1")</Value>
</Variable>
<Variable Name="TotalPatrimonioHActual">
<Value>=Sum(Microsoft.VisualBasic.Interaction.iif(Fields!Sup.Value = "CAPITAL CONTABLE" , Fields!ImporteActual.Value, 0),"DataSet1")</Value>
<Value>=Sum(Microsoft.VisualBasic.Interaction.iif(Fields!Sup.Value = "CAPITAL" , Fields!ImporteActual.Value, 0),"DataSet1")</Value>
</Variable>
<Variable Name="TotalPatrimonioCAnterior">
<Value>=Sum(Microsoft.VisualBasic.Interaction.iif(Fields!Sup.Value = "CAPITAL CONTABLE" , Fields!ImporteAnterior.Value, 0),"DataSet1")</Value>
<Value>=Sum(Microsoft.VisualBasic.Interaction.iif(Fields!Sup.Value = "CAPITAL" , Fields!ImporteAnterior.Value, 0),"DataSet1")</Value>
</Variable>
<Variable Name="TotalPatrimonioHAnterior">
<Value>=Sum(Microsoft.VisualBasic.Interaction.iif(Fields!Sup.Value = "CAPITAL CONTABLE" , Fields!ImporteActual.Value, 0),"DataSet1")</Value>
<Value>=Sum(Microsoft.VisualBasic.Interaction.iif(Fields!Sup.Value = "CAPITAL" , Fields!ImporteActual.Value, 0),"DataSet1")</Value>
</Variable>
<Variable Name="TotalpasivoYHaciendaActual">
<Value>=Variables!TotalPasivoActual.Value+Variables!TotalPatrimonioHActual.Value</Value>
<Writable>true</Writable>
</Variable>
<Variable Name="TotalpasivoYHaciendaAnterior">
<Value>=Variables!TotalPatrimonioHAnterior.Value+ Variables!TotalPasivoAnterior.Value</Value>

View File

@@ -890,6 +890,8 @@
<asp:GridView ID="GvD" runat="server" AutoGenerateColumns="False" GridLines=" none" BorderColor="Transparent" CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn"
DataKeyNames="SubProyecto, Cantidad, Importe, Descuento, CveOrdenCompra, CveUnidadMedida, CvePresupuestoEgreso, PS,CveClasificacion, CvePS, CveSubProyecto, CveActivoFijo, CodigoAF, TipoDato, Observacion, CveOrdenCompraDetalle,CveCompra,IVAPorcentaje,RetIVAPorcentaje,RetISRPorcentaje,IEPSPSPorcentaje,IEPSPSIVAPorcentaje,CantidadNoEditable,CveCultivoCuadroDetalle" data-tableheader=".GVDHeader" ShowHeader="false" data-rows="0">
<Columns>
<%-- 0 --%>
<asp:TemplateField>
<EditItemTemplate>
<asp:TextBox ID="TxtCantEdit" runat="server" Text='<%# Eval("Cantidad", "{0:#,###.######}")%>' Width="45px" Height="24px"></asp:TextBox>
@@ -904,6 +906,7 @@
<asp:Label ID="LtlCantidad" runat="server" Text='<%# Eval("Cantidad", "{0:#,###.######}")%>' Style="width: 100%"></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<%-- 1 --%>
<asp:TemplateField>
<ItemTemplate>
<span style="border-bottom: 1px solid gray;">
@@ -924,6 +927,7 @@
<ajax:ValidatorCalloutExtender ID="VCOPSEdit" runat="server" HighlightCssClass="vco" TargetControlID="RFVPSEdit" Width="300px"></ajax:ValidatorCalloutExtender>
</EditItemTemplate>
</asp:TemplateField>
<%-- 2 --%>
<asp:TemplateField>
<EditItemTemplate>
<%--DataTextField--%>
@@ -935,6 +939,7 @@
<asp:Literal ID="LA" runat="server" Text='<%# Bind("UM") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<%-- 3 --%>
<asp:TemplateField>
<ItemTemplate>
<asp:Literal ID="LtlObsPS" runat="server" Text='<%# Eval("Observacion")%>'></asp:Literal>
@@ -943,6 +948,7 @@
<asp:TextBox ID="TxtObsPS" CssClass="txtobs" runat="server" Rows="2" Text='<%# Eval("Observacion") %>' TextMode="MultiLine" MaxLength="750" Style=""></asp:TextBox>
</EditItemTemplate>
</asp:TemplateField>
<%-- 4 --%>
<asp:TemplateField>
<ItemTemplate>
@@ -972,28 +978,22 @@
</EditItemTemplate>
</asp:TemplateField>
<%-- 5 --%>
<asp:TemplateField>
<EditItemTemplate>
<asp:HiddenField ID="HdnCveActivoFijo" Value="-1" runat="server" />
<asp:HiddenField ID="HdnCodigoAF" Value="-1" runat="server" />
<asp:TextBox ID="LblEditCodigo" runat="server" Text='<%# Bind("CodigoAF")%>' Width="40px"></asp:TextBox>
<asp:HyperLink ID="HplMaq" runat="server" ClientIDMode="Static">
<%--<img runat="server" id="ImgAF" alt="Activo Fijo" width="20" height="20" src="/Imagenes/Maquinaria.jpg" style="cursor:pointer;"/>--%>
<asp:HyperLink ID="HplMaq" runat="server" ClientIDMode="Static">
<asp:Image runat="server" ID="ImgAF" AlternateText="Activo Fijo" Width="20" Height="20" ImageUrl="/Imagenes/Maquinaria.jpg" Style="cursor: pointer;" />
</asp:HyperLink>
<%--<asp:HyperLink ID="HplMaq" runat="server" ClientIDMode="Static"><img alt="Maquinaria" width="20px" height="20px" src="/Imagenes/Maquinaria.jpg" style="cursor:pointer;" onclick="$get('divActivosFijos').style.display='';PosicionaObjeto('HplMaq','divActivosFijos');"/></asp:HyperLink>--%>
</asp:HyperLink>
</EditItemTemplate>
<ItemTemplate>
<asp:Literal ID="LitMaq" runat="server" Text='<%# Bind("CodigoAF")%>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<%-- <asp:TemplateField Visible="False">
<ItemTemplate>
<asp:LinkButton ID="CvePOA2" ClientIDMode="Static" runat="server" CssClass="Texto" Text='<%# Bind("CvePresupuestoEgreso")%>' ToolTip="Error al cargar los datos del Programa Operativo"></asp:LinkButton>
</ItemTemplate>
<ItemStyle Width="45px" />
</asp:TemplateField>--%>
<%-- 6 --%>
<asp:TemplateField>
<ItemTemplate>
<asp:Label ToolTip='<%# If(Not IsDBNull(Eval("Importe")) AndAlso CDbl(Eval("Importe").ToString) <> -1, Eval("Importe"), "")%>' ID="LtlImporte" runat="server" Text='<%# If(Not IsDBNull(Eval("Importe")) AndAlso CDbl(Eval("Importe").ToString) <> -1, Eval("Importe", "{0:#,##0.00####}"), "")%>'></asp:Label>
@@ -1007,6 +1007,8 @@
</EditItemTemplate>
<ItemStyle HorizontalAlign="Right" />
</asp:TemplateField>
<%-- 7 --%>
<asp:TemplateField Visible="false">
<ItemTemplate>
<asp:Literal ID="LtlDescuento" runat="server" Text='<%# Eval("Descuento", "{0:N2}")%>'></asp:Literal>
@@ -1020,7 +1022,7 @@
<ItemStyle HorizontalAlign="Right" />
</asp:TemplateField>
<%-- 8 --%>
<asp:TemplateField>
<ItemTemplate>
<asp:Literal ID="LtlIva" runat="server" Text='<%# If(Not IsDBNull(Eval("IVA")), If(Eval("IVA").ToString <> "0", String.Concat(Eval("IVA", "{0:#,##0.00####}"), "<br>", Eval("IVAPorcentaje", "{0:0.### %}")), ""), "") %>'></asp:Literal>
@@ -1028,18 +1030,18 @@
<ItemStyle HorizontalAlign="Right" />
</asp:TemplateField>
<%-- 9 --%>
<asp:TemplateField>
<ItemTemplate>
<asp:Literal ID="LtlTotal" runat="server" Text='<%# If(Not IsDBNull(Eval("Importe")) AndAlso CDbl(Eval("Importe").ToString) <> -1, Eval("Total", "{0:#,##0.00####}"), "") %>'></asp:Literal>
</ItemTemplate>
<ItemStyle HorizontalAlign="Right" />
</asp:TemplateField>
<%-- 10 --%>
<asp:TemplateField>
<EditItemTemplate>
<%--<asp:ImageButton ID="ImgUpdate" runat="server" CausesValidation="True" CommandName="Update" ImageUrl="/Imagenes/Btn_Update.png" Text="Update" />&nbsp;<asp:ImageButton ID="ImgCancel" runat="server" CausesValidation="False" CommandName="Cancel" ImageUrl="/Imagenes/Btn_Cancel.png" Text="Cancel" />--%>
<EditItemTemplate>
<div>
<asp:LinkButton ID="imgU" runat="server" AlternateText="Actualizar" CausesValidation="false" CommandName="Update"
ValidationGroup="grpEditar" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-check'></i>" />
@@ -1054,27 +1056,30 @@
<asp:LinkButton ID="imgD" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete"
CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="confirmar" data-btn-ok-label="si" />
</div>
<%-- <asp:ImageButton ID="ImgEdit" runat="server" CausesValidation="False" CommandName="Edit" ImageUrl="/Imagenes/Btn_Edit.png" Text="Edit" />
<asp:ImageButton ID="ImgDelete" runat="server" CausesValidation="False" OnClientClick="return confirm('Está seguro que desea eliminar el movimiento?')" CommandName="Delete" ImageUrl="/Imagenes/Btn_Delete.png" Text="Edit" />--%>
</ItemTemplate>
</asp:TemplateField>
<%-- 11 --%>
<asp:TemplateField Visible="false">
<ItemTemplate>
<%--<asp:HyperLink ID="HLLiga" runat="server" Text="" CssClass="Texto" />--%>
<ItemTemplate>
<asp:Literal ID="LtlLiga" runat="server"></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<%-- 12 --%>
<asp:TemplateField Visible="false">
<ItemTemplate>
<asp:Literal ID="LtlCompra" runat="server" Visible='<%# Eval("CveCompra").ToString <> "" %>'></asp:Literal>
<asp:LinkButton OnClick="LnkCompra_Click" ID="LnkCompra" Visible="false" runat="server"> Ver</asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
<%-- 13 --%>
<asp:TemplateField HeaderText="Clasificación" Visible="False" ShowHeader="true">
<ItemTemplate>
<asp:DropDownList runat="server" ID="DdlAC5" CssClass="form-control input-sm select2me" AutoPostBack="true" DataTextField="CodigoClasificacion" DataValueField="CveClasificacion" Width="150px" OnSelectedIndexChanged="CompruebaSaldoAC"></asp:DropDownList>
</ItemTemplate>
</asp:TemplateField>
<%-- 14 --%>
<asp:TemplateField HeaderText="Programa Operativo" Visible="False" ShowHeader="true">
<ItemTemplate>
<asp:HiddenField runat="server" ID="HdnCvePresupuestoEgreso" Value="-1" />
@@ -1085,27 +1090,29 @@
<asp:DropDownList runat="server" ID="DdlAC1" CssClass="form-control input-sm select2me" AutoPostBack="true" DataTextField="ProgramaOperativo" DataValueField="CveProgramaOperativo" Width="150px" OnSelectedIndexChanged="CompruebaSaldoAC"></asp:DropDownList>
</ItemTemplate>
</asp:TemplateField>
<%-- 15 --%>
<asp:TemplateField HeaderText="Unidad Administrativa" Visible="False" ShowHeader="true">
<ItemTemplate>
<asp:DropDownList runat="server" ID="DdlAC2" CssClass="form-control input-sm select2me" AutoPostBack="true" DataTextField="UnidadAdministrativa" DataValueField="CveUnidadAdministrativa" Width="150px" OnSelectedIndexChanged="CompruebaSaldoAC"></asp:DropDownList>
</ItemTemplate>
</asp:TemplateField>
<%-- 16 --%>
<asp:TemplateField HeaderText="Fuente Financiamiento" Visible="False" ShowHeader="true">
<ItemTemplate>
<asp:DropDownList runat="server" ID="DdlAC3" CssClass="form-control input-sm select2me" AutoPostBack="true" DataTextField="FuenteFinanciamiento" DataValueField="CveFuenteFinanciamiento" Width="150px" OnSelectedIndexChanged="CompruebaSaldoAC"></asp:DropDownList>
</ItemTemplate>
</asp:TemplateField>
<%-- 17 --%>
<asp:TemplateField HeaderText="Tipo Gasto" Visible="False" ShowHeader="true">
<ItemTemplate>
<asp:DropDownList runat="server" ID="DdlAC4" CssClass="form-control input-sm select2me" AutoPostBack="true" DataTextField="TipoGasto" DataValueField="CveTipoGasto" Width="100px" OnSelectedIndexChanged="CompruebaSaldoAC"></asp:DropDownList>
</ItemTemplate>
</asp:TemplateField>
<%--<asp:TemplateField></asp:TemplateField>
<asp:TemplateField></asp:TemplateField>--%>
</Columns>
<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
<%--<RowStyle CssClass="Texto" />
<AlternatingRowStyle CssClass="TextoAlterno" />--%>
</asp:GridView>
<asp:UpdatePanel ID="UpIvas" runat="server" class="text-right" UpdateMode="Conditional">

View File

@@ -862,7 +862,7 @@ Partial Class OC
If (UsuarioActual.TienePermisoProceso(203)) AndAlso Dr("TipoTermino").ToString.ToEntero = 3 AndAlso Dr("Tipo").ToString = "OC" Then
CargaClasificaciones()
If Not UsuarioActual.TienePermisoProceso(131) Then DesHabilitar()
GvD.Columns(9).Visible = True
GvD.Columns(10).Visible = True
LbAgregar.Enabled = True
txtPrecioUnitario.Enabled = True
DdlProyecto.Enabled = True
@@ -1599,7 +1599,7 @@ Partial Class OC
SubProyectosNoAutorizados.Add(Row("SubProyecto").ToString)
CboE.BackColor = Drawing.Color.Silver
CboE.Enabled = False
GvD.Columns(9).Visible = False 'No permitir la edicion
GvD.Columns(10).Visible = False 'No permitir la edicion
'GvD.Columns(9).Visible = True
ChkCotizacion.Enabled = False
TxtDescrip.Enabled = False
@@ -1635,7 +1635,7 @@ Partial Class OC
'EDICION
'CUANDO EL LA REGISRO Y TIENE ACCESO A ESE ESTATUS
If objOC.CveUsuario = UsuarioActual.CveUsuario AndAlso (DtEstatusUsuarios.FiltraParametros(String.Format(" CveEstatus = {0}", CveEstatus)).Rows.Count >= 1 Or CveEstatus = 0) Then
GvD.Columns(9).Visible = True 'No permitir la edicion
GvD.Columns(10).Visible = True 'No permitir la edicion
If ChkCotizacion.Checked AndAlso UsuarioActual.Empresa.Funcionalidad(565) = "1" Then
ChkCotizacion.Enabled = False
Else
@@ -1720,7 +1720,7 @@ Partial Class OC
If EditarOC Then
CboE.Enabled = True
GvD.Columns(9).Visible = True 'Permitir la edicion
GvD.Columns(10).Visible = True 'Permitir la edicion
ChkCotizacion.Enabled = True
TxtDescrip.Enabled = True
TxtJustificacion.Enabled = True
@@ -3684,11 +3684,11 @@ Partial Class OC
'If DtEstatusUsuarios.FiltraParametros(String.Format("CveSubProyecto = {0}", e.Row.DBCampo("CveSubProyecto"))).Rows.Count = 0 Then e.Row.FCImageButton("ImgEdit").Visible = False : e.Row.FCImageButton("ImgDelete").Visible = False
If TipoOC = "OC" AndAlso Not IsDBNull(e.Row.DBCampo("CveOrdenCompraPadre")) AndAlso IsNumeric(e.Row.DBCampo("CveOrdenCompraPadre")) Then
GvD.Columns(10).Visible = True
GvD.Columns(11).Visible = True
lblTipoPadreHijo.Visible = True
e.Row.FCLiteral("LtlLiga").Text = String.Format("<a class='Texto' href='/OC/OC.aspx?OC={0}'>{1}</a>", e.Row.DBCampo("CveOrdenCompraPadre"), e.Row.DBCampo("FolioOrdenCompraPadre"))
ElseIf TipoOC = "REQ" AndAlso Not IsDBNull(e.Row.DBCampo("CveOrdenCompraHija")) AndAlso IsNumeric(e.Row.DBCampo("CveOrdenCompraHija")) Then
GvD.Columns(10).Visible = True
GvD.Columns(11).Visible = True
lblTipoPadreHijo.Visible = True
e.Row.FCLiteral("LtlLiga").Text = String.Format("<a class='Texto' href='/OC/OC.aspx?OC={0}'>{1}</a>", e.Row.DBCampo("CveOrdenCompraHija"), e.Row.DBCampo("FolioOrdenCompraHija"))
End If
@@ -3702,7 +3702,7 @@ Partial Class OC
If ObjOC.DtResultados.Rows.Count = 1 Then
e.Row.FCLiteral("LtlCompra").Text = String.Format("<a class='Texto' target='_blank' href='../Compras/Compras.aspx?CveCompra={0}'>{1}</a>", ObjOC.DtResultados.FiltroPrimeroValor("CveCompra"), e.Row.DBCampo("FolioCompra"))
LblCompra.Visible = True
GvD.Columns(11).Visible = True
GvD.Columns(12).Visible = True
ElseIf ObjOC.DtResultados.Rows.Count > 1 Then
LblCompra.Visible = True
e.Row.FCLiteral("LtlCompra").Visible = False
@@ -3711,7 +3711,7 @@ Partial Class OC
'e.Row.FCLinkButton("LnkCompra").CausesValidation = False
'e.Row.FCLinkButton("LnkCompra").OnClientClick = "return true;" 'return true;
e.Row.FCLinkButton("LnkCompra").CommandArgument = e.Row.DBCampo("CveOrdenCompraDetalle")
GvD.Columns(11).Visible = True
GvD.Columns(12).Visible = True
Else
e.Row.FCLiteral("LtlCompra").Text = ""
LblCompra.Visible = True
@@ -4134,8 +4134,8 @@ Partial Class OC
DdlProveedorSucursal.Enabled = False
DdlProveedorContacto.Enabled = False
GvD.Columns(9).Visible = False
GvD.Columns(10).Visible = True
GvD.Columns(10).Visible = False
GvD.Columns(11).Visible = True
If Not (BtnCancelarPrevio.Enabled And (CveEstatus <> CveEstatusFinalError OrElse CveEstatus <> CveEstatusFinalOK OrElse UsuarioActual.TienePermisoProceso(148).ToEntero > 0)) Then
BtnCancelarPrevio.Enabled = False
@@ -4299,11 +4299,11 @@ Partial Class OC
'Seccion Grid
If VerificaPresupuesto Then
GvD.Width = 1750
GvD.Columns(12).Visible = True
GvD.Columns(13).Visible = True
GvD.Columns(14).Visible = True
GvD.Columns(15).Visible = True
GvD.Columns(16).Visible = True
GvD.Columns(17).Visible = True
'Panel General
UpPresupuestosAC.Visible = True
@@ -4330,11 +4330,11 @@ Partial Class OC
Else
'GvD.Width = Width.ToEntero
GvD.Columns(12).Visible = False
GvD.Columns(13).Visible = False
GvD.Columns(14).Visible = False
GvD.Columns(15).Visible = False
GvD.Columns(16).Visible = False
GvD.Columns(17).Visible = False
UpPresupuestosAC.Visible = False
End If
@@ -6685,11 +6685,11 @@ Partial Class OC
CboE_SelectedIndexChanged(CboE, EventArgs.Empty)
GvD.Columns(9).Visible = True 'Permitir la edicion
GvD.Columns(10).Visible = True 'Permitir la edicion
lblTipoPadreHijo.Visible = False
GvD.Columns(10).Visible = False
LblCompra.Visible = False
GvD.Columns(11).Visible = False
LblCompra.Visible = False
GvD.Columns(12).Visible = False
ChkCotizacion.Visible = True
ChkCotizacion.Enabled = True
@@ -6818,7 +6818,7 @@ Partial Class OC
ScriptManager.RegisterStartupScript(Me, GetType(Page), "anioactual", script, True)
VerificaPresupuesto = False
RVSubProyecto.Enabled = If(RequiereSubProyecto = True, True, False)
GvD.Columns(10).Visible = False
GvD.Columns(11).Visible = False
CargaComboCFDI()
CargaMonedas()
'CargaClasificaciones()

View File

@@ -4119,7 +4119,7 @@
<span class="caption-subject bold">Agregar</span>
</div>--%>
<asp:HyperLink ID="ImgAddObs" CssClass="caption-subject bold" data-toggle="modal" data-target="#ModalBitacora" runat="server" Text=" <i class='fa fa-commenting font-green'></i><span class='caption-subject bold'>Agregar</span>" Style="font-weight: 700 !important; cursor: pointer;" ToolTip="Observaciones"></asp:HyperLink><br />
<asp:HyperLink ID="HlEvento" CssClass="thickbox caption-subject bold" runat="server" Text=" <i class='fa fa-calendar-plus-o font-green'></i>Agendar" Visible="false" Style="font-weight: 700 !important; cursor: pointer;" ToolTip="Agendar"></asp:HyperLink><br />
<asp:HyperLink ID="HlEvento" CssClass="thickbox font-green caption-subject bold" runat="server" Text=" <i class='fa fa-calendar-plus-o font-green'></i>Agendar" Visible="false" Style="font-weight: 700 !important; cursor: pointer;" ToolTip="Agendar"></asp:HyperLink><br />
<asp:Literal ID="LtlTareaNueva" runat="server"></asp:Literal>
<UserControl:TareaNueva runat="server" ID="TareaNueva" />
</div>

View File

@@ -41,18 +41,19 @@
white-space: nowrap;
}
.reporte1 .GVSolicitudTimbreNominaGral tr th:nth-child(2),
.reporte1 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(2) {
.reporte1 .GVSolicitudTimbreNominaGral tr th:nth-child(2)
/*,.reporte1 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(2) */
{
background-color: #900;
color: #FFF;
}
.reporte1 .GVSolicitudTimbreNominaGral tr th:nth-child(3),
.reporte1 .GVSolicitudTimbreNominaGral tr th:nth-child(4),
.reporte1 .GVSolicitudTimbreNominaGral tr th:nth-child(5),
.reporte1 .GVSolicitudTimbreNominaGral tr th:nth-child(5)/*,
.reporte1 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(3),
.reporte1 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(4),
.reporte1 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(5) {
.reporte1 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(5)*/ {
background-color: #3598dc;
color: #FFF;
}
@@ -66,14 +67,14 @@
white-space: nowrap;
}
.reporte2 .GVSolicitudTimbreNominaGral tr th:nth-child(2),
.reporte2 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(2) {
.reporte2 .GVSolicitudTimbreNominaGral tr th:nth-child(2)/*,
.reporte2 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(2)*/ {
background-color: #900;
color: #FFF;
}
.reporte2 .GVSolicitudTimbreNominaGral tr th:nth-child(n+3):not(:nth-child(7)),
.reporte2 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(n+3):not(:nth-child(7)){
.reporte2 .GVSolicitudTimbreNominaGral tr th:nth-child(n+3):not(:nth-child(7))/*,
.reporte2 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(n+3):not(:nth-child(7))*/{
background-color: #3598dc;
color: #FFF;
}
@@ -93,17 +94,17 @@
}
.reporte3 .GVSolicitudTimbreNominaGral tr th:nth-child(2),
.reporte3 .GVSolicitudTimbreNominaGral tr th:nth-child(n+20),
.reporte3 .GVSolicitudTimbreNominaGral tr th:nth-child(n+20)/*,
.reporte3 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(2),
.reporte3 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(n+20){
.reporte3 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(n+20)*/{
background-color: #900;
color: #FFF;
}
.reporte3 .GVSolicitudTimbreNominaGral tr th:nth-child(1),
.reporte3 .GVSolicitudTimbreNominaGral tr th:nth-child(n+3):not(:nth-child(n+20)),
.reporte3 .GVSolicitudTimbreNominaGral tr th:nth-child(n+3):not(:nth-child(n+20))/*,
.reporte3 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(1),
.reporte3 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(n+3):not(:nth-child(n+20)) {
.reporte3 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(n+3):not(:nth-child(n+20))*/ {
background-color: #3598dc;
color: #FFF;
}
@@ -115,39 +116,82 @@
white-space: nowrap;
}
.reporte4 .GVSolicitudTimbreNominaGral tr th:nth-child(2),
.reporte4 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(2) {
.reporte4 .GVSolicitudTimbreNominaGral tr th:nth-child(2)/*,
.reporte4 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(2)*/ {
background-color: #900;
color: #FFF;
}
.reporte4 .GVSolicitudTimbreNominaGral tr th:nth-child(n+3),
.reporte4 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(n+3) {
.reporte4 .GVSolicitudTimbreNominaGral tr th:nth-child(n+3):not(:nth-child(n+6))/*,
.reporte4 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(n+3)*/ {
background-color: #3598dc;
color: #FFF;
}
.reporte5 .GVSolicitudTimbreNominaGral tr th:nth-child(2)/*,
.reporte5 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(2)*/ {
background-color: #900;
color: #FFF;
}
.reporte5 .GVSolicitudTimbreNominaGral tr th:nth-child(3)/*,
.reporte5 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(3)*/ {
background-color: #3598dc;
color: #FFF;
}
.reporte6 .GVSolicitudTimbreNominaGral tr td:nth-child(n) {
white-space: nowrap;
}
.reporte6 .GVSolicitudTimbreNominaGral tr td:nth-child(n+3),
.reporte6 .GVSolicitudTimbreNominaGral tr th:nth-child(n+3) {
.reporte6 .GVSolicitudTimbreNominaGral tr td:nth-child(n+4),
.reporte6 .GVSolicitudTimbreNominaGral tr th:nth-child(n+4) {
text-align: right !important;
}
.reporte6 .GVSolicitudTimbreNominaGral tr th:nth-child(n+3):not(:nth-child(n+6)) {
.reporte6 .GVSolicitudTimbreNominaGral tr th:nth-child(n+4):not(:nth-child(n+7)) {
background-color: #900;
color: #FFF;
}
.reporte6 .GVSolicitudTimbreNominaGral tr th:nth-child(n+6) {
.reporte6 .GVSolicitudTimbreNominaGral tr th:nth-child(n+7):not(:nth-child(n+10)) {
background-color: #3598dc;
color: #FFF;
}
.reporte7 .GVSolicitudTimbreNominaGral tr td:nth-child(n+3),
.reporte7 .GVSolicitudTimbreNominaGral tr th:nth-child(n+3) {
text-align: right !important;
}
.reporte7 .GVSolicitudTimbreNominaGral tr th:nth-child(n+3):not(:nth-child(n+6)) {
background-color: #900;
color: #FFF;
}
.reporte7 .GVSolicitudTimbreNominaGral tr th:nth-child(n+6):not(:nth-child(n+9)) {
background-color: #3598dc;
color: #FFF;
}
.reporte8 .GVSolicitudTimbreNominaGral tr td:nth-child(n+6),
.reporte8 .GVSolicitudTimbreNominaGral tr th:nth-child(n+6) {
text-align: right !important;
}
.reporte8 .GVSolicitudTimbreNominaGral tr th:nth-child(n+6):not(:nth-child(n+9)) {
background-color: #900;
color: #FFF;
}
.reporte8 .GVSolicitudTimbreNominaGral tr th:nth-child(n+9):not(:nth-child(n+12)) {
background-color: #3598dc;
color: #FFF;
}
.reporte9 .GVSolicitudTimbreNominaGral tr td:nth-child(1),
.reporte9 .GVSolicitudTimbreNominaGral tr td:nth-child(4) {
white-space: nowrap;
@@ -161,7 +205,7 @@
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
<li>
<asp:LinkButton ID="LnkDownloadExcel" OnClick="LnkDownloadExcel_Click" runat="server"><i class="fa fa-excel"></i>Descargar</asp:LinkButton>
<asp:LinkButton ID="LnkDownloadExcel" OnClick="LnkDownloadExcel_Click" runat="server"><i class="fa fa-download"></i>Descargar</asp:LinkButton>
</li>
<asp:UpdatePanel ID="UpAcciones" runat="server" UpdateMode="Conditional">
<ContentTemplate>
@@ -181,21 +225,22 @@
<div class="portlet-title portlet-filterT smalltitle">
<div class="titlefiltros caption">
<div class="row">
<label class="col-md-1">Reporte: </label>
<label class="col-md-1">Agrupador: </label>
<div class="col-md-2">
<asp:DropDownList ID="DdlReporte" runat="server" Style="width: 100% !important;" CssClass="select2me" DataValueField="CveUsuario" DataTextField="Nombre">
<asp:ListItem Value="1" Text="Conciliacion ISR mensual"></asp:ListItem>
<asp:ListItem Value="2" Text="Conciliacion ISR por concepto"></asp:ListItem>
<asp:ListItem Value="3" Text="Conciliacion ISR por recibo"></asp:ListItem>
<asp:ListItem Value="4" Text="Anual sueldos y salarios resumen general"></asp:ListItem>
<asp:ListItem Value="5" Text="Anual sueldos y salarios global por conceptos"></asp:ListItem>
<asp:ListItem Value="6" Text="Anual sueldos y salarios por clave SAT"></asp:ListItem>
<asp:ListItem Value="7" Text="Anual sueldos y salarios por empleado"></asp:ListItem>
<asp:ListItem Value="8" Text="Anual sueldos y salarios por concepto"></asp:ListItem>
<asp:ListItem Value="4" Text="Anual sueldos y salarios "></asp:ListItem>
<asp:ListItem Value="5" Text="Anual sueldos y salarios resumen general"></asp:ListItem>
<asp:ListItem Value="6" Text="Anual sueldos y salarios global por empleado"></asp:ListItem>
<asp:ListItem Value="7" Text="Anual sueldos y salarios por clave SAT"></asp:ListItem>
<asp:ListItem Value="8" Text="Anual sueldos y salarios por empleado y concepto"></asp:ListItem>
<%--<asp:ListItem Value="8" Text="Anual sueldos y salarios por concepto"></asp:ListItem>--%>
<asp:ListItem Value="9" Text="Anual sueldos y salarios por recibo"></asp:ListItem>
</asp:DropDownList>
</div>
<label class="col-md-1 mediocol">del:</label>
<label class="col-md-1 mediocol">Fecha inicio:</label>
<div class="col-md-1">
<%--<asp:TextBox ID="TxtPeriodoInicio" Text="0" CssClass="form-control" runat="server"></asp:TextBox>--%>
@@ -210,7 +255,7 @@
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco" TargetControlID="rfvRpdFechaInicio"></ajax:ValidatorCalloutExtender>
</div>
</div>
<label class="col-md-1 mediocol">al:</label>
<label class="col-md-1 mediocol">Fecha fin:</label>
<div class="col-md-1">
<%--<asp:TextBox ID="TxtPeriodoFin" Text="99" CssClass="form-control" runat="server"></asp:TextBox>--%>
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 138px !important; padding: 0px; margin-bottom: -10px;">

View File

@@ -58,8 +58,56 @@ public partial class SAT_SolicitudesNominaSat : ClsPaginas
nom.SATSolicitudTimbreNominaGral(DdlReporte.SelectedValue.ToString().ToEntero(), UsuarioActual.CveEmpresa, fechaInicio, fechaFin);
ClosedXML.Excel.XLWorkbook wb = new ClosedXML.Excel.XLWorkbook();
var libro = wb.AddWorksheet(nom.DtResultados , "Nomina");
var libro = wb.AddWorksheet(nom.DtResultados , "Nomina");
libro.ColumnsUsed().AdjustToContents();
libro.Range(1, 1, 1, nom.DtResultados.Columns.Count).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(153, 153, 153));
switch (DdlReporte.SelectedValue.ToString().ToEntero())
{
case 1:
libro.Range(1, 2, 1, 2).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(153,0,0));
libro.Range(1, 3, 1, 5).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(53, 152, 220));
break;
case 2:
libro.Range(1, 2, 1, 2).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(153, 0, 0));
libro.Range(1, 3, 1, 6).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(53, 152, 220));
libro.Range(1, 8, 1, 11).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(53, 152, 220));
break;
case 3:
libro.Range(1, 1, 1, 10).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(53, 152, 220));
libro.Range(1, 11, 1, nom.DtResultados.Columns.Count).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(153, 0, 0));
break;
case 4:
libro.Range(1, 2, 1, 2).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(153, 0, 0));
libro.Range(1, 3, 1, 5).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(53, 152, 220));
break;
case 5:
libro.Range(1, 2, 1, 2).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(153, 0, 0));
libro.Range(1, 3, 1, 3).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(53, 152, 220));
break;
case 6:
libro.Range(1, 4, 1, 6).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(153, 0, 0));
libro.Range(1, 7, 1, 9).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(53, 152, 220));
break;
case 7:
libro.Range(1, 3, 1, 5).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(153, 0, 0));
libro.Range(1, 6, 1, 8).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(53, 152, 220));
break;
case 8:
libro.Range(1, 6, 1, 8).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(153, 0, 0));
libro.Range(1, 9, 1, 12).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(53, 152, 220));
break;
case 9:
break;
default:
break;
}
libro.Row(1).InsertRowsAbove(4);
libro.Range(1, 2, 1, 6).Merge().Value = UsuarioActual.Empresa.Empresa;
libro.Range(2, 2, 2, 6).Merge().Value = $"Reporte de {DdlReporte.SelectedItem.Text }";
libro.Range(3, 2, 3, 6).Merge().Value = $"del {fechaInicio.ToDateTime():dd/MM/yyyy} al {fechaFin.ToDateTime():dd/MM/yyyy}";
libro.Range(2, 7, 2, 9).Merge().Value = $"Fecha:{DateTime.Now:dd/MM/yyyy}";
libro.Range(3, 7, 3, 9).Merge().Value = $"Hora:{DateTime.Now:HH:mm}";
System.IO.Stream fs = new System.IO.MemoryStream();
wb.SaveAs(fs);
fs.Position = 0;
@@ -75,7 +123,7 @@ public partial class SAT_SolicitudesNominaSat : ClsPaginas
Response.Buffer = true;
Response.ContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
Response.AddHeader("content-disposition", string.Format("attachment;filename={0}.xlsx", "Visor nómina "));
Response.AddHeader("content-disposition", string.Format("attachment;filename={0}.xlsx", $"Visor nómina ( Reporte :{DdlReporte.SelectedValue}) "));
Response.BinaryWrite(memoryStream.ToArray());
Response.End();
}

View File

@@ -464,6 +464,8 @@