This commit is contained in:
Oscar Irigoyen
2023-01-23 12:02:53 -07:00
15 changed files with 281 additions and 710 deletions

View File

@@ -1016,22 +1016,24 @@ Public Class ClsContabilidad
If ex1.Message.Contains("50015;") Then
OnError("No se puede registrar una póliza en un ejercicio Cerrado", ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
ElseIf ex1.Message.Contains("50024; La Cuenta no fue detectada") Then
Dim Strr As String = ""
If HttpContext.Current.Application("GlobalDTContaConceptosContables") IsNot Nothing Then
Dim dr As Data.DataRow = DirectCast(HttpContext.Current.Application("GlobalDTContaConceptosContables"), DataTable).FiltroPrimero(String.Format("CveConceptoContable = {0}", CveConceptoContable))
Strr = dr("ConceptoContable").ToString
'If dr("AplicaClasificacion").ToString <> "No" Then
' Strr = Strr + " - Clasificación: " + DirectCast(HttpContext.Current.Application("GlobalDTContaConceptosContables"), DataTable).FiltroPrimeroValor("", "")
'End If
Dim dtt As DataTable = ClsPaginas.GlobalDTContaConceptosContables(CveConceptoContable)
Dim StrMsg As String = ""
If dtt IsNot Nothing Then
Dim dr As Data.DataRow = dtt.FiltroPrimero("")
If dr IsNot Nothing Then
StrMsg = dr("ConceptoContable").ToString
If dr("AplicaClasificacion").ToString = "True" Then
StrMsg = StrMsg + " - Clasificación: " + ClsPaginas.GlobalDTClasificaciones(CType(HttpContext.Current.Session("UsuarioSIG"), Usuario).CveEmpresa, CveClasificacion:=CveClasificacion).FiltroPrimeroValor("Clasificacion", "")
End If
End If
End If
OnError(String.Format("El concepto '{0}' no tiene especificada la cuenta. Favor de especificarla en la asignación de cuentas.", Strr), ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
OnError(String.Format("El concepto '{0}' no tiene especificada la cuenta. Favor de especificarla en la asignación de cuentas.", StrMsg), ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
ElseIf ex1.Message.Contains("Vw_Val_Conta_CuentasResultados_SubProyectos") Then
Dim Concepto2 As String = DirectCast(HttpContext.Current.Application("GlobalDTContaConceptosContables"), DataTable).FiltroPrimeroValor("ConceptoContable", String.Format("CveConceptoContable = {0}", CveConceptoContable))
OnError(String.Format("El concepto '{0}' requiere centro de costo", Concepto2), ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
Dim Concepto2 As String = ClsPaginas.GlobalDTContaConceptosContables(CveConceptoContable).FiltroPrimeroValor("ConceptoContable")
OnError(String.Format("El concepto '{0}' requiere centro de costo", Concepto2), ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
ElseIf ex1.Message.Contains("UK_Vw_Val_Conta_CuentasResultados_SubProyectos") Then
Dim Concepto3 As String = DirectCast(HttpContext.Current.Application("GlobalDTContaConceptosContables"), DataTable).FiltroPrimeroValor("ConceptoContable", String.Format("CveConceptoContable = {0}", CveConceptoContable))
OnError(String.Format("El concepto '{0}' requiere centro de costo", Concepto3), ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
Dim Concepto3 As String = ClsPaginas.GlobalDTContaConceptosContables(CveConceptoContable).FiltroPrimeroValor("ConceptoContable")
OnError(String.Format("El concepto '{0}' requiere centro de costo", Concepto3), ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
ElseIf ex1.Message.Contains("50025;") Then
OnError("La empresa no tiene un formato de cuenta asignado.", ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
ElseIf ex1.Message.Contains("50026;") Then

View File

@@ -872,14 +872,13 @@ Public Class ClsPaginas
#End Region
Property GlobalDTClasificaciones(Optional CveEmpresa As Integer = -1, Optional CveCategoria As Integer = -1, Optional UsoClasificacion As Integer = -1, Optional CveClasificacion As Integer = -1) As DataTable
Public Shared Property GlobalDTClasificaciones(Optional CveEmpresa As Integer = -1, Optional CveCategoria As Integer = -1, Optional UsoClasificacion As Integer = -1, Optional CveClasificacion As Integer = -1) As DataTable
Get
Dim AppNombre As String = String.Format("GlobalDTClasificaciones-{0}", CveEmpresa)
'sino existe, recarga los datos
If Application(AppNombre) Is Nothing Then
If HttpContext.Current.Application(AppNombre) Is Nothing Then
Dim ObjClasificaciones As New ClsClasificaciones
If ObjClasificaciones.GetClasificaciones(CveEmpresa) Then Application(AppNombre) = ObjClasificaciones.DtResultados
If ObjClasificaciones.GetClasificaciones(CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjClasificaciones.DtResultados
ObjClasificaciones.Dispose()
End If
If CveEmpresa <> -1 Then
@@ -888,25 +887,20 @@ Public Class ClsPaginas
If CveCategoria <> -1 Then Str.AppendFormat(" AND CveCategoria = {0}", CveCategoria)
If UsoClasificacion <> -1 Then Str.AppendFormat(" AND UsoClasificacion IN ({0},3) ", UsoClasificacion)
If CveClasificacion <> -1 Then Str.AppendFormat(" AND CveClasificacion = {0}", CveClasificacion)
Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), Str.ToString(), "", DataViewRowState.CurrentRows)
Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), Str.ToString(), "", DataViewRowState.CurrentRows)
GlobalDTClasificaciones = Dv.ToTable
Dv.Dispose()
Else
GlobalDTClasificaciones = DirectCast(Application(AppNombre), DataTable)
GlobalDTClasificaciones = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
End If
End Get
Set(value As DataTable)
Dim AppNombre As String = String.Format("GlobalDTClasificaciones-{0}", CveEmpresa)
Application(AppNombre) = value
HttpContext.Current.Application(AppNombre) = value
End Set
End Property
Property GlobalDTRHActividades(CveEmpresa As Integer) As DataTable
Get
Dim AppNombre As String = String.Format("GlobalDTRHActividades-{0}", CveEmpresa)
@@ -3542,28 +3536,26 @@ Public Class ClsPaginas
Property GlobalDTContaConceptosContables(CveConceptoContable As Integer) As DataTable
Public Shared Property GlobalDTContaConceptosContables(CveConceptoContable As Integer) As DataTable
Get
Dim AppNombre As String = String.Format("GlobalDTContaConceptosContables")
'sino existe, recarga los datos
If Application(AppNombre) Is Nothing Then
If HttpContext.Current.Application(AppNombre) Is Nothing Then
Using ObjContabilidad As New ClsContabilidad
If ObjContabilidad.GetConta_ConceptosContables() Then Application(AppNombre) = ObjContabilidad.DtResultados Else Application(AppNombre) = Nothing
If ObjContabilidad.GetConta_ConceptosContables() Then HttpContext.Current.Application(AppNombre) = ObjContabilidad.DtResultados Else HttpContext.Current.Application(AppNombre) = Nothing
End Using
End If
If CveConceptoContable <> -1 Then
Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), String.Format("CveConceptoContable = {0}", CveConceptoContable), "", DataViewRowState.CurrentRows)
Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), String.Format("CveConceptoContable = {0}", CveConceptoContable), "", DataViewRowState.CurrentRows)
GlobalDTContaConceptosContables = Dv.ToTable
Dv.Dispose()
Else
GlobalDTContaConceptosContables = DirectCast(Application(AppNombre), DataTable)
GlobalDTContaConceptosContables = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
End If
End Get
Set(value As DataTable)
Dim AppNombre As String = String.Format("GlobalDTContaConceptosContables")
Application(AppNombre) = value
HttpContext.Current.Application(AppNombre) = value
End Set
End Property
#End Region

View File

@@ -1650,25 +1650,22 @@ Namespace Extensiones
End Function
<Runtime.CompilerServices.Extension()>
Public Function GetColumn(ByVal gv As GridView, ByVal name As String) As Integer
Dim index As Integer = 0
Dim found As Boolean = False
For Each c As DataControlField In gv.Columns
If TypeOf c Is BoundField Then
Dim field As BoundField = CType(c, BoundField)
If name = field.DataField OrElse name = field.SortExpression OrElse name = field.HeaderText Then
found = True
Exit For
Public Function FBColumn(gv As GridView, name As String) As DataControlField
name = name.ToLower
For Each col As DataControlField In gv.Columns
If TypeOf col Is BoundField Then
Dim field As BoundField = CType(col, BoundField)
If field.DataField.ToLower = name OrElse field.SortExpression.ToLower = name OrElse field.HeaderText.Trim.ToLower = name Then
Return col
End If
ElseIf TypeOf col Is HyperLinkField Then
Dim field As HyperLinkField = CType(col, HyperLinkField)
If field.DataTextField.ToLower = name OrElse field.SortExpression.ToLower = name OrElse field.HeaderText.Trim.ToLower = name Then
Return col
End If
End If
index += 1
Next
Return If(found, index, -1)
Return Nothing
End Function
<Runtime.CompilerServices.Extension()>

View File

@@ -8,6 +8,9 @@
max-width:600px;
width:600px;
}
.margenbound {
text-align: right;
}
</style>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="E" Runat="Server">
@@ -16,12 +19,20 @@
<asp:Content ID="Content4" ContentPlaceHolderID="HB" Runat="Server">
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
<li>
<asp:LinkButton ID="LinkPDF" runat="server"><i class="fa fa-ad-pdf"></i> Generar PDF</asp:LinkButton>
</li>
<li>
<asp:LinkButton ID="LnkExportar" runat="server"><i class="fa fa-ad-excel"></i> Generar Excel</asp:LinkButton>
</li>
<asp:UpdatePanel ID="UPAcciones" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<li>
<asp:LinkButton ID="LinkPDF" runat="server"><i class="fa fa-ad-pdf"></i> Generar PDF</asp:LinkButton>
</li>
<li>
<asp:LinkButton ID="LnkExportar" runat="server"><i class="fa fa-ad-excel"></i> Generar Excel</asp:LinkButton>
</li>
<li>
<asp:HyperLink NavigateUrl="#" data-toggle="modal" data-target="#DivPersonalizar" ID="ImgPersonalizar" runat="server"> <i class="fa fa-pencil"></i> Personalizar</asp:HyperLink>
</li>
<li>
<asp:LinkButton ID="LnkExcelPersonalizado" runat="server" Visible="false"><i class="fa fa-ad-excel"></i> Excel Personalizado</asp:LinkButton>
</li>
<li>
<asp:HyperLink NavigateUrl="javascript:;" data-toggle="modal" data-target="#DivTipoCambio" ID="ImgTipoCambio" runat="server"> <i class="fa fa-money"></i> Ver Dlls en pesos</asp:HyperLink>
</li>
@@ -29,6 +40,13 @@
<%-- <a target="_blank" href="../Documentacion/DocumentacionCompras.aspx#RepComprasAF2"><i class="fa fa-question-circle" aria-hidden="true">&nbsp;Ayuda</i></a>--%>
<a target="_blank" class="ayuda" href="../Documentacion/DocumentacionCompras.aspx#RepComprasAF2">&nbsp</a>
</li>
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="LinkPDF" />
<asp:PostBackTrigger ControlID="LnkExportar" />
<asp:PostBackTrigger ControlID="LnkExcelPersonalizado" />
</Triggers>
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="HA" Runat="Server">
</asp:Content>
@@ -150,13 +168,9 @@
<div class="row ">
<div class="col-md-1"><asp:Label ID="LblProyecto" runat="server">Proyecto:</asp:Label></div>
<div class="col-md-2">
<asp:DropDownList ID="DdlProyecto" CssClass=" form-control input-sm select2me" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Proyecto" DataValueField="CveProyecto" Width="95%">
<asp:ListItem Selected="true" Text="Todos" Value="-1"></asp:ListItem>
</asp:DropDownList>
</div>
@@ -164,7 +178,6 @@
<asp:Label runat="server" ID="LblSubProyecto" CssClass="col-md-1">SubProyecto:</asp:Label>
<div class="col-md-2">
<asp:DropDownList ID="DdlSubProyecto" AppendDataBoundItems="true" CssClass="form-control input-sm select2me" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="95%" AutoPostBack="True">
<asp:ListItem Selected="true" Text="Todos" Value="-1"></asp:ListItem>
</asp:DropDownList>
</div>
@@ -212,153 +225,31 @@
<div class="col-md-12">
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="GvDatos" runat="server" data-sort="true" DataKeyNames="Cantidad,Total,Moneda" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros con los filtros especificados" ToolTip="Listado de Ventas" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" GridLines="None">
<Columns>
<asp:TemplateField>
<HeaderTemplate>
Factura
</HeaderTemplate>
<ItemTemplate>
<asp:Label ID="LblFactura" runat="server" Text='<%# Eval("SerieFolio") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>
SubProyecto
</HeaderTemplate>
<ItemTemplate>
<asp:Label ID="LblSubProyecto" CssClass="ML Truncate" runat="server" Text='<%# Eval("SubProyecto") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>
ActivoFijo
</HeaderTemplate>
<ItemTemplate>
<%--<asp:Label ID="LblActivoFijo" CssClass="ML Truncate" runat="server" Text='<%# Eval("Descripcion") %>'></asp:Label>--%>
<asp:Label ID="LblActivoFijo" CssClass="ML Truncate" runat="server" Text='<%# Eval("CodigoAF") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false">
<HeaderTemplate>
No. Serie
</HeaderTemplate>
<ItemTemplate>
<asp:Label ID="LblNoSerie" CssClass="ML Truncate" runat="server" Text='<%# Eval("NoSerie") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>
Producto
</HeaderTemplate>
<ItemTemplate>
<asp:Label ID="LblPS" runat="server" CssClass="ML Truncate" Text='<%# Eval("CodigoPS") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>
Responsable
</HeaderTemplate>
<ItemTemplate>
<asp:Label ID="LblResponsable" runat="server" CssClass="ML Truncate" Text='<%# Eval("NombreCompleto") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>
Horometro/Odometro
</HeaderTemplate>
<ItemTemplate>
<asp:Label ID="LblHorometroOdometro" runat="server" CssClass="ML Truncate" Text='<%# Eval("AFMedida") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>
Tipo Mantenimiento
</HeaderTemplate>
<ItemTemplate>
<asp:Label ID="LblAFTipoMantenimientoStr" runat="server" CssClass="ML Truncate" Text='<%# Eval("AFTipoMantenimientoStr") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>
Clasificación 2
</HeaderTemplate>
<ItemTemplate>
<asp:Label ID="LblClasificacion2" runat="server" CssClass="ML Truncate" Text='<%# Eval("Clasificacion2") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Left">
<HeaderTemplate>
Unidad de Medida
</HeaderTemplate>
<ItemTemplate>
<asp:Label Id="LtlPU" runat="server" Text='<%# Eval("UnidadMedida") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Right">
<HeaderTemplate>
Cantidad
</HeaderTemplate>
<ItemTemplate>
<asp:Label Id="LtlCantidad" runat="server" Text='<%# Eval("Cantidad", "{0:N0}") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Right">
<HeaderTemplate>
PU
</HeaderTemplate>
<ItemTemplate>
<asp:Label Id="LtlPU" runat="server" Text='<%# Eval("PU", "{0:N2}") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Right">
<HeaderTemplate>
Total
</HeaderTemplate>
<ItemTemplate>
<asp:Label ID="LblCantidad" style="margin-right:15px" runat="server" Text='<%# Eval("Total", "{0:N2}") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Left" ItemStyle-Width="100px">
<HeaderTemplate>
Cuenta
</HeaderTemplate>
<ItemTemplate>
<asp:Label Id="LtlPU" runat="server" Text='<%# Eval("CuentaContable") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:GridView ID="GvDatos" runat="server" data-sort="true" DataKeyNames="Cantidad,Total,Moneda" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros con los filtros especificados" ToolTip="Listado de Ventas" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" GridLines="None">
<Columns>
<asp:BoundField DataField="SerieFolio" HeaderText="Factura" />
<asp:BoundField DataField="SubProyecto" ItemStyle-CssClass="ML Truncate" HeaderText="SubProyecto" />
<asp:BoundField DataField="CodigoAF" ItemStyle-CssClass="ML Truncate" HeaderText="Activo Fijo" />
<asp:BoundField DataField="NoSerie" ItemStyle-CssClass="ML Truncate" HeaderText="No. Serie" Visible="false"/>
<asp:BoundField DataField="CodigoPS" ItemStyle-CssClass="ML Truncate" HeaderText="Producto" />
<asp:BoundField DataField="NombreCompleto" ItemStyle-CssClass="ML Truncate" HeaderText="Responsable" />
<asp:BoundField DataField="AFMedida" ItemStyle-CssClass="ML Truncate" HeaderText="Horómetro/Odómetro" />
<asp:BoundField DataField="AFTipoMantenimientoStr" ItemStyle-CssClass="ML Truncate" HeaderText="Tipo Mantenimiento" />
<asp:BoundField DataField="TipoActivoFijo" ItemStyle-CssClass="ML Truncate" HeaderText="Tipo AF" />
<asp:BoundField DataField="SubTipoActivoFijo" ItemStyle-CssClass="ML Truncate" HeaderText="SubTipo AF" />
<asp:BoundField DataField="Clasificacion" ItemStyle-CssClass="ML Truncate" HeaderText="Clasificación" />
<asp:BoundField DataField="Clasificacion2" ItemStyle-CssClass="ML Truncate" HeaderText="Clasificación 2" />
<asp:BoundField DataField="UnidadMedida" HeaderText="Unidad de Medida" />
<asp:BoundField DataFormatString="{0:N0}" DataField="Cantidad" ItemStyle-CssClass="margenbound" HeaderText="Cantidad" />
<asp:BoundField DataFormatString="{0:C2}" DataField="PU" ItemStyle-CssClass="margenbound" HeaderText="PU" />
<asp:BoundField DataFormatString="{0:C2}" DataField="Total" ItemStyle-CssClass="margenbound" HeaderText="Total" />
<asp:BoundField DataField="CuentaContable" HeaderText="Cuenta" ItemStyle-Width="100px" />
</Columns>
<%--<RowStyle CssClass="Texto" />
<HeaderStyle CssClass="Titulos" />--%>
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
</div>
<asp:UpdatePanel runat="server" ID="UpTipoCambio" UpdateMode="Conditional">
<ContentTemplate>
<div id="DivTipoCambio" class="modal fade" role="dialog">
@@ -397,6 +288,80 @@
</div>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdatePanel runat="server" ID="UPPersonalizar" UpdateMode="Conditional">
<ContentTemplate>
<div id="DivPersonalizar" class="modal fade" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h4 class="modal-title">
<asp:Label ID="Label2" runat="server" ClientIDMode="Static" Text="Personalizar Columnas"></asp:Label></h4>
</div>
<div class="modal-body">
<table style="width: 100%" class="table table-striped table-advance table-hover">
<tr>
<td>
<asp:CheckBox ID="ChkFactura" runat="server" Text="Factura" Checked="true"/></td>
<td>
<asp:CheckBox ID="ChkSubProyecto" runat="server" Text="SubProyecto" Checked="true"/></td>
<td>
<asp:CheckBox ID="ChkAF" runat="server" Text="Activo Fijo" Checked="true"/></td>
</tr>
<tr>
<td>
<asp:CheckBox ID="ChkPS" runat="server" Text="Producto" Checked="true"/></td>
<td>
<asp:CheckBox ID="ChkResp" runat="server" Text="Responsable" Checked="true"/></td>
<td><td>
</tr>
<tr>
<td>
<asp:CheckBox ID="ChkNS" runat="server" Text="No. Serie"/></td>
<td>
<asp:CheckBox ID="ChkTipoAF" runat="server" Text="Tipo"/></td>
<td>
<asp:CheckBox ID="ChkSubTipoAF" runat="server" Text="SubTipo"/></td>
</tr>
<tr>
<td>
<asp:CheckBox ID="ChkClasif" runat="server" Text="Clasificación"/></td>
<td>
<asp:CheckBox ID="ChkClasif2" runat="server" Text="Clasificación 2" Checked="true"/></td>
<td>
<asp:CheckBox ID="ChkUM" runat="server" Text="Unidad de Medida" Checked="true"/></td>
</tr>
<tr>
<td>
<asp:CheckBox ID="ChkCant" runat="server" Text="Cantidad" Checked="true" /></td>
<td>
<asp:CheckBox ID="ChkPU" runat="server" Text="Precio Unitario" Checked="true" /></td>
<td>
<asp:CheckBox ID="ChkTotal" runat="server" Text="Total" Checked="true" /></td>
</tr>
<tr>
<td>
<asp:CheckBox ID="ChkCuenta" runat="server" Text="Cuenta" Checked="true" /></td>
<td>
<asp:CheckBox ID="ChkMedidaAF" runat="server" Text="Tipo de Medida" /></td>
<td>
<asp:CheckBox ID="ChkTipoMant" runat="server" Text="Tipo de Mantenimiento" /></td>
</td>
</tr>
</table>
</div>
<div class="modal-footer">
<asp:Button ID="BtnPersonalizar" runat="server" Text="Personalizar" class="btn btn-primary" />
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
</div>
</div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content8" ContentPlaceHolderID="JS" Runat="Server">

View File

@@ -82,12 +82,13 @@ Partial Class Compras_RepComprasAFDetalle
#End Region
Private Personalizado As Boolean = False
Private Sub Compras_RepComprasAFDetalle_Load(sender As Object, e As EventArgs) Handles Me.Load
If Not IsPostBack Then
CargaCombos()
'ImgPersonalizar.Attributes.Add("onclick", "javascript:$('#DivPersonalizar').show(1000); PosicionaObjeto(this.id,'DivPersonalizar');")
GvDatos.DataBind(True)
Try
Dim Fecha, FechaI, FechaF As String
@@ -163,9 +164,11 @@ Partial Class Compras_RepComprasAFDetalle
End If
If UsuarioActual.CveEmpresa = 72 Then
GvDatos.Columns(3).Visible = True
GvDatos.FBColumn("NoSerie").Visible = True
End If
UPDatos.Update()
End If
End Sub
@@ -226,31 +229,7 @@ Partial Class Compras_RepComprasAFDetalle
DdlPS.ddl.Items.Add(New ListItem("*** Actualizar listado de Productos o Servicios ***", "-2"))
End If
If UsuarioActual.Empresa.Tipo_CentroCosto = 1 Then
DdlProyecto.Visible = False
LblSubProyecto.Text = "Sucursal"
LblProyecto.Visible = False
DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1)
DdlSubProyecto.DataBind()
DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1"))
ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 2 Then
DdlProyecto.Visible = False
LblSubProyecto.Text = "Proyecto"
LblProyecto.Visible = False
DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1)
DdlSubProyecto.DataBind()
DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1"))
ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 3 Or UsuarioActual.Empresa.Tipo_CentroCosto = 0 Then
LblProyecto.Text = "Proyecto"
ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 4 Then
LblProyecto.Text = "Sucursal"
LblSubProyecto.Text = "Proyecto"
ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 5 Then
LblProyecto.Text = "Proyecto"
LblSubProyecto.Text = "Sucursal"
End If
CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, Nothing, LblSubProyecto)
End Sub
@@ -264,15 +243,19 @@ Partial Class Compras_RepComprasAFDetalle
End Sub
Protected Sub DdlProyecto_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlProyecto.SelectedIndexChanged
CargaSubProyecto()
If DdlProyecto.SelectedValue = "-1" Then
DdlProyecto.Items.Clear()
DdlSubProyecto.Items.Clear()
CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, Nothing, LblSubProyecto)
Else
CargaSubProyecto()
End If
End Sub
Private Sub CargaSubProyecto()
DdlSubProyecto.Items.Clear()
DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1)
DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1).FiltraParametros(String.Format("CveProyecto = {0}", DdlProyecto.SelectedValue), "SubProyecto")
DdlSubProyecto.DataBind()
DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1"))
End Sub
Protected Sub BtnConsultar_Click(sender As Object, e As System.EventArgs) Handles BtnConsultar.Click
CargaDatos()
@@ -304,18 +287,12 @@ Partial Class Compras_RepComprasAFDetalle
CvePS, Anio.ToEntero, Mes.ToEntero, AnioMes, CveUsuarioConsulta:=UsuarioActual.CveUsuario, CveClasificacion2:=DdlClasificacion2.SelectedValue.ToEntero) Then
DTDatos = ObjCompras.DtResultados
GvDatos.DataSource = ObjCompras.DtResultados
Else
GvDatos.DataSource = Nothing
DTDatos = Nothing
GvDatos.DataSource = DTDatos
End If
ObjCompras.Dispose()
GvDatos.DataBind()
GvDatos.DataBind(True)
UPDatos.Update()
End Sub
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
@@ -360,6 +337,9 @@ Partial Class Compras_RepComprasAFDetalle
Private Sub LinkPDF_Click(sender As Object, e As EventArgs) Handles LinkPDF.Click
GenerarPDF()
End Sub
Private Sub LnkExcelPersonalizado_Click(sender As Object, e As EventArgs) Handles LnkExcelPersonalizado.Click
GvDatos.ExportToExcel("ComprasDetalle_" + DdlPS.txtValue.Value + Now.ToShortDateString)
End Sub
Private Sub GenerarPDF(Optional Formato As String = "PDF")
Dim ObjTareas As New ClsOIEventos
@@ -372,12 +352,8 @@ Partial Class Compras_RepComprasAFDetalle
End If
Dim params As New List(Of ReportParameter)
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
Dim FechaI, FechaF As String
FechaI = If(txtFechaI.Text = "" Or txtFechaI.Text = "__/__/____", "-1", txtFechaI.Text)
FechaF = If(txtFechaF.Text = "" Or txtFechaF.Text = "__/__/____", "-1", txtFechaF.Text)
@@ -390,7 +366,6 @@ Partial Class Compras_RepComprasAFDetalle
params.Add(New ReportParameter("FechaFin", FechaF))
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString))
params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
ImprimirPDF(RutaPDF, DTDatos, params, "ReporteComprasAFDetalle_" & Now.ToString("yyyyMMddmmss"), Formato:=Formato)
@@ -502,4 +477,38 @@ Partial Class Compras_RepComprasAFDetalle
End If
End Sub
Protected Sub PersonalizarColumnas()
GvDatos.FBColumn("SerieFolio").Visible = ChkFactura.Checked
GvDatos.FBColumn("SubProyecto").Visible = ChkSubProyecto.Checked
GvDatos.FBColumn("CodigoAF").Visible = ChkAF.Checked
GvDatos.FBColumn("NoSerie").Visible = ChkNS.Checked
GvDatos.FBColumn("CodigoPS").Visible = ChkPS.Checked
GvDatos.FBColumn("NombreCompleto").Visible = ChkResp.Checked
GvDatos.FBColumn("AFMedida").Visible = ChkMedidaAF.Checked
GvDatos.FBColumn("AFTipoMantenimientoStr").Visible = ChkTipoMant.Checked
GvDatos.FBColumn("TipoActivoFijo").Visible = ChkTipoAF.Checked
GvDatos.FBColumn("SubTipoActivoFijo").Visible = ChkSubTipoAF.Checked
GvDatos.FBColumn("Clasificacion").Visible = ChkClasif.Checked
GvDatos.FBColumn("Clasificacion2").Visible = ChkClasif2.Checked
GvDatos.FBColumn("UnidadMedida").Visible = ChkUM.Checked
GvDatos.FBColumn("Cantidad").Visible = ChkCant.Checked
GvDatos.FBColumn("PU").Visible = ChkPU.Checked
GvDatos.FBColumn("Total").Visible = ChkTotal.Checked
GvDatos.FBColumn("Cuenta").Visible = ChkCuenta.Checked
UPDatos.Update()
If Personalizado Then
LnkExcelPersonalizado.Visible = True
Else
LnkExcelPersonalizado.Visible = False
End If
UPAcciones.Update()
End Sub
Protected Sub BtnPersonalizar_Click(sender As Object, e As System.EventArgs) Handles BtnPersonalizar.Click
Personalizado = True
PersonalizarColumnas()
End Sub
End Class

View File

@@ -1,437 +0,0 @@
Option Explicit On
Option Strict On
Imports Microsoft.Reporting.WebForms
Imports Extensiones
Imports System.Data
Partial Class Compras_RepProductosServiciosDetalle
Inherits ClsPaginas
#Region "PROPIEDADES"
Private Property DtDatos As DataTable
Get
Return CType(ViewState("DtDatos"), DataTable)
End Get
Set(value As DataTable)
ViewState("DtDatos") = value
End Set
End Property
Private Property CveMoneda As Integer
Get
Return ViewState("CveMoneda").ToString.ToEntero
End Get
Set(value As Integer)
ViewState("CveMoneda") = value
End Set
End Property
#End Region
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
If UsuarioActual.CveEmpresa = 2 AndAlso UsuarioActual.CveUsuario.Contiene(77, 21) Then Response.Redirect("/Inicio.aspx")
CargaCombos()
CargaTipoCentroCosto()
Dim Grupo, Proyecto, SubProyecto, Categoria, Clasificacion, PS, Proveedor, Estatus, Usuario, Familia, SubFamilia, TipoActivoFijo, SubTipoActivoFijo, ActivoFijo, TipoGasto As String
Dim Anio, Mes, AnioMes, Fecha, FechaI, FechaF As String
Grupo = If(Request("GPO") IsNot Nothing AndAlso Request("GPO").ToEntero() > 0, Request("GPO").ToEntero(), -1).ToString
Proyecto = If(Request("CveProyecto") IsNot Nothing AndAlso Request("CveProyecto").ToEntero() > 0, Request("CveProyecto").ToEntero(), -1).ToString
SubProyecto = If(Request("CveSubProyecto") IsNot Nothing AndAlso Request("CveSubProyecto").ToEntero() > 0, Request("CveSubProyecto").ToEntero(), -1).ToString
SubProyecto = If(Request("CveSubProyecto") IsNot Nothing AndAlso Request("CveSubProyecto").ToEntero() = -2, "-2", SubProyecto)
Categoria = If(Request("CveCategoria") IsNot Nothing AndAlso Request("CveCategoria").ToEntero() > 0, Request("CveCategoria").ToEntero(), -1).ToString
Clasificacion = If(Request("CveClasificacion") IsNot Nothing AndAlso Request("CveClasificacion").ToEntero() > 0, Request("CveClasificacion").ToEntero(), -1).ToString
PS = If(Request("CvePS") IsNot Nothing AndAlso Request("CvePS").ToEntero() > 0, Request("CvePS").ToEntero(), -1).ToString
Proveedor = If(Request("CveProveedor") IsNot Nothing AndAlso Request("CveProveedor").ToEntero() > 0, Request("CveProveedor").ToEntero(), -1).ToString
Estatus = If(Request("CveEstatusFactura") IsNot Nothing AndAlso Request("CveEstatusFactura").ToEntero() > 0, Request("CveEstatusFactura").ToEntero(), -1).ToString
Usuario = If(Request("CveUsuario") IsNot Nothing AndAlso Request("CveUsuario").ToEntero() > 0, Request("CveUsuario").ToEntero(), -1).ToString
Familia = If(Request("CveFamilia") IsNot Nothing AndAlso Request("CveFamilia").ToEntero() > -3, Request("CveFamilia").ToEntero(), -1).ToString
SubFamilia = If(Request("CveSubFamilia") IsNot Nothing AndAlso Request("CveSubFamilia").ToEntero() > -3, Request("CveSubFamilia").ToEntero(), -1).ToString
TipoActivoFijo = If(Request("CveTipoAF") IsNot Nothing AndAlso Request("CveTipoAF").ToEntero() > 0, Request("CveTipoAF").ToEntero(), -1).ToString
SubTipoActivoFijo = If(Request("CveSubTipoAF") IsNot Nothing AndAlso Request("CveSubTipoAF").ToEntero() > 0, Request("CveSubTipoAF").ToEntero(), -1).ToString
ActivoFijo = If(Request("CveAF") IsNot Nothing AndAlso Request("CveAF").ToEntero() > 0, Request("CveAF").ToEntero(), -1).ToString
CveMoneda = If(Request("CveMoneda") IsNot Nothing AndAlso Request("CveMoneda").ToEntero() > 0, Request("CveMoneda").ToEntero(), -1).ToString.ToEntero
TipoGasto = If(Request("CveTipoGasto") IsNot Nothing AndAlso Request("CveTipoGasto").ToEntero > 0, Request("CveTipoGasto").ToEntero(), -1).ToString
Anio = If(Request("Anio") IsNot Nothing, Request("Anio").ToString, "-1").ToString
Mes = If(Request("Mes") IsNot Nothing, Request("Mes").ToString, "-1").ToString
AnioMes = If(Request("AnioMes") IsNot Nothing, Request("AnioMes").ToString, "-1").ToString
Fecha = If(Request("Fecha") IsNot Nothing, Request("Fecha").ToString, "-1").ToString
FechaI = If(Request("FechaI") IsNot Nothing, Request("FechaI").ToString, "-1").ToString
FechaF = If(Request("FechaF") IsNot Nothing, Request("FechaF").ToString, "-1").ToString
txtFechaI.Text = If(Anio <> "-1", String.Format("01/01/{0}", Anio), txtFechaI.Text)
txtFechaI.Text = If(Mes <> "-1", String.Format("01/{0}/0001", Mes), txtFechaI.Text)
txtFechaI.Text = If(AnioMes <> "-1", String.Format("01/{0}/{1}", AnioMes.Substring(5, 1).PadLeft(2, "0"c), AnioMes.Substring(0, 4)), txtFechaI.Text)
If Fecha <> "-1" Then
txtFechaI.Text = Fecha
txtFechaF.Text = Fecha
Else
If FechaI <> "-1" Then
txtFechaI.Text = FechaI
End If
If FechaF <> "-1" Then
txtFechaF.Text = FechaF
End If
End If
DdlCategoria.SelectedValue = Categoria
If Clasificacion.ToEntero > 0 Then
CargaClasificaciones(DdlCategoria.SelectedValue.ToEntero)
DdlClasificacion.SelectedValueExist(Clasificacion)
End If
DdlPS.SelectedValue = PS
DdlProyecto.SelectedValue = Proyecto
DdlSubProyecto.SelectedValue = SubProyecto
DdlFamilia.SelectedValue = Familia
DdlSubFamilia.SelectedValue = SubFamilia
DdlProveedor.SelectedValue = Proveedor
DdlEstatus.SelectedValue = Estatus
DdlUsuario.SelectedValue = Usuario
DdlTipoAF.SelectedValue = TipoActivoFijo
DdlTipoGasto.SelectedValueExist(TipoGasto)
DdlSubTipoAF.SelectedValue = SubTipoActivoFijo
DdlAF.SelectedValue = ActivoFijo
CargaDatos(Proyecto.ToEntero, SubProyecto.ToEntero, Categoria.ToEntero, Clasificacion.ToEntero, PS.ToEntero, Proveedor.ToEntero, Usuario.ToEntero, Estatus.ToEntero, Grupo.ToEntero, Familia.ToEntero, SubFamilia.ToEntero, TipoActivoFijo.ToEntero, SubTipoActivoFijo.ToEntero, ActivoFijo.ToEntero, TipoGasto.ToEntero)
End If
End Sub
Private Sub CargaTipoCentroCosto()
If UsuarioActual.Empresa.Tipo_CentroCosto = 1 Then
DdlSubProyecto.Items.Clear()
TdProyecto.Visible = False
TdProyecto2.Visible = False
LtSubProyecto.Text = "Sucursal:"
DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1)
DdlSubProyecto.Items.Insert(0, New ListItem("Todos", "-1"))
DdlSubProyecto.DataBind()
ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 2 Then
DdlSubProyecto.Items.Clear()
TdProyecto.Visible = False
TdProyecto2.Visible = False
LtSubProyecto.Text = "Proyecto:"
DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1)
DdlSubProyecto.Items.Insert(0, New ListItem("Todos", "-1"))
DdlSubProyecto.DataBind()
ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 4 Then
TdProyecto.InnerText = "Sucursal:"
LtSubProyecto.Text = "Proyecto:"
ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 5 Then
TdProyecto.InnerText = "Proyecto:"
LtSubProyecto.Text = "Sucursal:"
End If
End Sub
Private Sub CargaCombos()
'Cargo Proyectos
DdlProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa)
DdlProyecto.DataBind()
'Cargo Categorias
DdlCategoria.DataSource = GlobalDTGralCategorias(UsuarioActual.CveEmpresa)
DdlCategoria.DataBind()
DdlTipoGasto.DataSource = GlobalDTTiposGastos(UsuarioActual.CveEmpresa)
DdlTipoGasto.DataBind()
'CargaProveedor
DdlProveedor.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
DdlProveedor.DataBind()
'CargaUsuarios
DdlUsuario.DataSource = GlobalDTUsuarios.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
DdlUsuario.DataBind()
'CargaEstatus
DdlEstatus.DataSource = GlobalDTCompEstatusFactura
DdlEstatus.DataBind()
'CARGA COSTOS
If UsuarioActual.CveEmpresa = 66 Then
'COSTOS PROYECTO
RowCostos.Visible = True
'Carga Familias
DdlFamilia.DataSource = GlobalDTFamilias(66)
DdlFamilia.DataBind()
'Carga SubFamilias
DdlSubFamilia.DataSource = GlobalDTSubFamilias(66)
DdlSubFamilia.DataBind()
'COSTOS AF
RowActivoFijo.Visible = True
'Carga Tipos AF
DdlTipoAF.DataSource = GlobalDTTipoActivoFijo(66)
DdlTipoAF.DataBind()
'Carga SubTipos AF
DdlSubTipoAF.DataSource = GlobalDTSubTipoActivoFijo(66)
DdlSubTipoAF.DataBind()
'Carga AF
'DdlAF.DataSource = GlobalDTActivoFijos().FiltraParametros(String.Format("CveEmpresa = {0}", UsuarioActual.CveEmpresa))
'DdlAF.DataBind()
End If
If UsuarioActual.Empresa.GralSoloProyecto Then
TdProyecto.Visible = False
TdProyecto2.Visible = False
LtSubProyecto.Text = "Proyecto"
DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa)
DdlSubProyecto.DataBind()
End If
End Sub
Protected Sub BtnConsultar_Click(sender As Object, e As System.EventArgs) Handles BtnConsultar.Click
CargaDatos()
End Sub
Private Sub CargaDatos()
Dim ObjCompras As New ClsCompras()
Dim FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim().ToDate, MinFecha)
Dim FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim().ToDate, MaxFecha)
Dim TCEspecifico = If(TxtEspecifico.Text.Trim = "", -1, TxtEspecifico.Text.ToEntero)
If ObjCompras.GetRepProductosServiciosDetalle(DdlProyecto.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, DdlCategoria.SelectedValue.ToEntero, DdlClasificacion.SelectedValue.ToEntero,
DdlPS.SelectedValue.ToEntero, FechaI, FechaF, DdlProveedor.SelectedValue.ToEntero, DdlUsuario.SelectedValue.ToEntero, DdlEstatus.SelectedValue.ToEntero,
UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero, DdlFamilia.SelectedValue.ToEntero, DdlSubFamilia.SelectedValue.ToEntero, DdlTipoAF.SelectedValue.ToEntero, DdlSubTipoAF.SelectedValue.ToEntero, DdlAF.SelectedValue.ToEntero, CveMoneda, RblTipoCambio.SelectedValue.ToEntero, TCEspecifico:=TCEspecifico, TipoGasto:=DdlTipoGasto.SelectedValue.ToEntero, CveUsuarioConsulta:=UsuarioActual.CveUsuario) Then
DtDatos = ObjCompras.DtResultados
Else
DtDatos = Nothing
End If
ObjCompras.Dispose()
CargaGrid("")
End Sub
Private Sub CargaDatos(Proyecto As Integer, SubProyecto As Integer, Categoria As Integer, Clasificacion As Integer, PS As Integer, Proveedor As Integer, Usuario As Integer, Estatus As Integer, Grupo As Integer, Familia As Integer, SubFamilia As Integer, TipoActivoFijo As Integer, SubTipoActivoFijo As Integer, ActivoFijo As Integer, TipoGasto As Integer)
Dim ObjCompras As New ClsCompras()
Dim FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim().ToDate, MinFecha)
Dim FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim().ToDate, MaxFecha)
Dim TCEspecifico = If(TxtEspecifico.Text.Trim = "", -1, TxtEspecifico.Text.ToEntero)
If ObjCompras.GetRepProductosServiciosDetalle(Proyecto, SubProyecto, Categoria, Clasificacion, PS, FechaI, FechaF, Proveedor, Usuario, Estatus, UsuarioActual.CveEmpresa, Grupo, Familia, SubFamilia, TipoActivoFijo, SubTipoActivoFijo, ActivoFijo, CveMoneda, RblTipoCambio.SelectedValue.ToEntero, TCEspecifico:=TCEspecifico, TipoGasto:=TipoGasto, CveUsuarioConsulta:=UsuarioActual.CveUsuario) Then
DtDatos = ObjCompras.DtResultados
Else
DtDatos = Nothing
End If
ObjCompras.Dispose()
CargaGrid("")
End Sub
#Region " D R O P - D O W N S | SELECT INDEX CHANGED"
Protected Sub DdlProyecto_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlProyecto.SelectedIndexChanged
DdlSubProyecto.Items.Clear()
If DdlProyecto.SelectedValue <> "-1" Then
DdlSubProyecto.DataSource = GlobalDTSubProyectos(DdlProyecto.SelectedValue.ToEntero)
DdlSubProyecto.DataBind()
End If
DdlSubProyecto.Items.Insert(0, New ListItem("Todos", "-1"))
End Sub
Protected Sub DdlCategoria_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlCategoria.SelectedIndexChanged
CargaClasificaciones(DdlCategoria.SelectedValue.ToEntero)
End Sub
Private Sub CargaClasificaciones(CveCategoria As Integer)
DdlClasificacion.Items.Clear()
If DdlCategoria.SelectedValue <> "-1" Then
DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa, CveCategoria:=CveCategoria)
DdlClasificacion.DataBind()
End If
DdlClasificacion.Items.Insert(0, New ListItem("Todas", "-1"))
End Sub
Protected Sub DdlClasificacion_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlClasificacion.SelectedIndexChanged
DdlPS.Items.Clear()
If DdlClasificacion.SelectedValue <> "-1" Then
DdlPS.DataSource = GlobalDTProductosServicios(UsuarioActual.CveEmpresa)
DdlPS.DataBind()
End If
DdlSubFamilia.Items.Insert(0, New ListItem("Sin Asignar", "-2"))
DdlPS.Items.Insert(0, New ListItem("Todos", "-1"))
End Sub
Protected Sub DdlFamilia_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlFamilia.SelectedIndexChanged
DdlSubFamilia.Items.Clear()
If DdlFamilia.SelectedValue <> "-1" Then
DdlSubFamilia.DataSource = GlobalDTSubFamilias(UsuarioActual.CveEmpresa, DdlFamilia.SelectedValue.ToEntero)
DdlSubFamilia.DataBind()
Else
DdlSubFamilia.DataSource = GlobalDTSubFamilias(UsuarioActual.CveEmpresa)
DdlSubFamilia.DataBind()
End If
DdlSubFamilia.Items.Insert(0, New ListItem("Todas", "-1"))
End Sub
Protected Sub DdlTipoAF_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlTipoAF.SelectedIndexChanged
DdlSubTipoAF.Items.Clear()
If DdlTipoAF.SelectedValue <> "-1" Then
DdlSubTipoAF.DataSource = GlobalDTSubTipoActivoFijo(66).FiltraParametros(String.Format("CveTipoActivoFijo = {0}", DdlTipoAF.SelectedValue.ToEntero))
DdlSubTipoAF.DataBind()
Else
DdlSubTipoAF.DataSource = GlobalDTSubTipoActivoFijo(66)
DdlSubTipoAF.DataBind()
End If
DdlSubTipoAF.Items.Insert(0, New ListItem("Todas", "-1"))
End Sub
Protected Sub DdlSubTipoAF_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlSubTipoAF.SelectedIndexChanged
DdlAF.Items.Clear()
If DdlSubTipoAF.SelectedValue <> "-1" Then
DdlAF.DataSource = GlobalDTActivoFijos(UsuarioActual.CveEmpresa, DdlSubTipoAF.SelectedValue.ToEntero)
DdlAF.DataBind()
'Else
' DdlAF.DataSource = GlobalDTSubTipoActivoFijo(66)
' DdlAF.DataBind()
End If
DdlAF.Items.Insert(0, New ListItem("Todas", "-1"))
End Sub
#End Region
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.DBCampo("Orden") = "" AndAlso e.Row.DBCampo("RazonSocial") = "" Then
e.Row.CssClass = "Totales"
End If
e.Row.Cells(6).Width = Unit.Pixel(100)
e.Row.Cells(3).Width = Unit.Pixel(80)
End If
End Sub
#Region "tipo Cambio"
Private Sub RblTipoCambio_SelectedIndexChanged(sender As Object, e As EventArgs) Handles RblTipoCambio.SelectedIndexChanged
If RblTipoCambio.SelectedValue.ToEntero = 3 Then
Dim TipoCambio As Double
LiEspecifico.Visible = True
TipoCambio = GlobalTipoCambio(Now)
TxtEspecifico.Text = TipoCambio.ToString
Else
LiEspecifico.Visible = False
End If
UpBodyTipoCambio.Update()
End Sub
Private Sub BtnTipoCambio_Click(sender As Object, e As EventArgs) Handles BtnTipoCambio.Click
CargaDatos()
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivTipoCambio"))
UPDatos.Update()
End Sub
#End Region
#Region "O R D E N A M I E N T O"
Protected Sub LbOrden_Click(ByVal sender As Object, ByVal e As EventArgs)
Dim Orden As String = ""
Dim Campo As String = ""
Dim Literal As Literal = Nothing
Const OrdenInicial As String = ""
Dim Arg(2) As String
Arg = CType(sender, LinkButton).CommandArgument().ToString.Split(";"c)
Campo = Arg(0)
Literal = CType(CType(sender, LinkButton).NamingContainer.FindControl("Img" & Campo.Replace(",", "_")), Literal)
If ViewState(String.Format("O{0}", Campo)) IsNot Nothing AndAlso ViewState(String.Format("O{0}", Campo)).ToString = String.Format("{0} DESC", Campo) Then
ViewState(String.Format("O{0}", Campo)) = String.Format("{0} ASC", Campo)
Literal.Text = String.Format("<i class='fa fa-sort-asc' style='color:#999' ></i>")
Else
ViewState(String.Format("O{0}", Campo)) = String.Format("{0} DESC", Campo)
Literal.Text = String.Format("<i class='fa fa-sort-desc' style='color:#999' ></i>")
End If
Orden = OrdenInicial & ViewState(String.Format("O{0}", Campo)).ToString
ViewState("Orden") = Orden
CargaGrid(Orden)
End Sub
Protected Sub CargaGrid(Orden As String)
Dim DV As DataView = Nothing
DV = New DataView(DtDatos, "", Orden, DataViewRowState.CurrentRows)
If Orden <> String.Empty Then
GvDatos.DataSource = DV.ToTable()
Else
GvDatos.DataSource = DtDatos
End If
GvDatos.DataBind()
UPDatos.Update()
DV.Dispose()
End Sub
#End Region
#Region " IMPRESION - NUEVO "
Protected Sub ImgExcel_Click(sender As Object, e As System.EventArgs) Handles ImgExcel.Click
GenerarPDF("EXCEL")
End Sub
Private Sub ImgImprimir_Click(sender As Object, e As EventArgs) Handles ImgImprimir.Click
GenerarPDF()
End Sub
Private Sub GenerarPDF(Optional Formato As String = "PDF")
Dim FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim().ToDate, MinFecha)
Dim FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim().ToDate, MaxFecha)
If txtFechaI.Text = "" Then FechaI = "-1".ToDate
If txtFechaF.Text = "" Then FechaF = "-1".ToDate
Dim Grupo = If(DdlGrupo.SelectedValue = "-1", "", $"&emsp;<b>Grupo:</b> {DdlGrupo.SelectedItem.Text}")
Dim Proyecto = If(DdlProyecto.SelectedValue = "-1", "", $"&emsp;<b>Proyecto:</b> {DdlProyecto.SelectedItem.Text}")
Dim SubProyecto = If(DdlSubProyecto.SelectedValue = "-1", "", $"&emsp;<b>SubProyecto:</b> {DdlSubProyecto.SelectedItem.Text}")
Dim Categoria = If(DdlCategoria.SelectedValue = "-1", "", $"&emsp;<b>Categoria:</b> {DdlCategoria.SelectedItem.Text}")
Dim Clasificacion = If(DdlClasificacion.SelectedValue = "-1", "", $"&emsp;<b>Clasificación:</b> {DdlClasificacion.SelectedItem.Text}")
Dim PS = If(DdlPS.SelectedValue = "-1", "", $"&emsp;<b>P.S:</b> {DdlPS.SelectedItem.Text}")
Dim Proveedor = If(DdlProveedor.SelectedValue = "-1", "", $"&emsp;<b>Proveedor:</b> {DdlProveedor.SelectedItem.Text}")
Dim Estatus = If(DdlEstatus.SelectedValue = "-1", "", $"&emsp;<b>Estatus:</b> {DdlEstatus.SelectedItem.Text}")
Dim TipoAF = If(DdlTipoAF.SelectedValue = "-1", "", $"&emsp;<b>Tipo AF:</b> {DdlTipoAF.SelectedItem.Text}")
Dim FechaIn As String = $"&emsp;<b>Fecha Inicio:</b> {txtFechaI.Text}"
Dim FechaFn As String = $"&emsp;<b>Fecha Fin:</b> {txtFechaF.Text}"
If txtFechaI.Text = "" Then FechaIn = ""
If txtFechaF.Text = "" Then FechaFn = ""
Dim TCEspecifico = If(TxtEspecifico.Text.Trim = "", -1, TxtEspecifico.Text.ToEntero)
If DtDatos.Rows.Count > 0 Then
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
Dim params As New List(Of ReportParameter)
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
'params.Add(New ReportParameter("FechaInicio", FechaI))
'params.Add(New ReportParameter("FechaFin", FechaF))
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString))
params.Add(New ReportParameter("AgrupoPor", $"{Grupo}{Proyecto}{SubProyecto}{Categoria}{Clasificacion}{PS}{Proveedor}{Estatus}{TipoAF}{FechaIn}{FechaFn}"))
If Imagen.Exists Then
params.Add(New ReportParameter("LogoPath", $"file://{Imagen.FullName}"))
Else
params.Add(New ReportParameter("LogoPath", ""))
End If
ImprimirPDF("Empresas/Grales/Formatos/RepProductosServiciosDetalleCompra.rdlc", DtDatos, params, "ReportePSDetalle", Formato)
Else
Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia)
End If
End Sub
#End Region
End Class

View File

@@ -50,10 +50,11 @@ Partial Class General_RepIndicadorResumen
Dim ObjCompras As New ClsCompras
Dim ObjMovtos As New ClsMovimientos
Dim ObjCitrus As New ClsCGame
Dim Grupo As Integer = 28 'Clasificación - PS
If ObjVentas.GetRepProductosServicios(-1, DdlSubProyecto.SelectedValue.ToEntero, -1, -1, -1, TxtFechaI.Text.Trim(), TxtFechaF.Text.Trim(), MinFecha, MaxFecha, -1,
-1, -1, -1, -1, "-1", UsuarioActual.CveEmpresa, 5, CveUsuarioConsulta:=UsuarioActual.CveUsuario, TipoDocto:="Ing", TipoCambio:=1) Then
GvVxP.DataSource = ObjVentas.DtResultados.FiltraParametros("", "CveMoneda,SubTotal DESC")
-1, -1, -1, -1, "-1", UsuarioActual.CveEmpresa, Grupo, CveUsuarioConsulta:=UsuarioActual.CveUsuario, TipoDocto:="Ing", TipoCambio:=1) Then
GvVxP.DataSource = ObjVentas.DtResultados
End If
If ObjCitrus.GetIndicadores(UsuarioActual.CveEmpresa, TxtFechaI.Text, TxtFechaF.Text, UsuarioActual.CveUsuario, DdlSubProyecto.SelectedValue.ToEntero) Then
@@ -88,8 +89,8 @@ Partial Class General_RepIndicadorResumen
'Mostrar gráficos y totales en portlets solo si hay datos en su respectiva tabla
If GvVxP.Rows.Count > 0 Then
UPGraficaVxP.Visible = True
PLVxPTot.InnerHtml = "<span style=""font-weight:800"">" + "Cantidad: " + "</span>" + String.Format("{0:n} Kg", CType(GvVxP.DataSource, DataTable).SUM("Cantidad", "Orden IS NOT NULL")) _
+ "<span style=""font-weight:800; margin-left:1em"">" + "Total: " + "</span>" + String.Format("{0:c} MXN", CType(GvVxP.DataSource, DataTable).SUM("SubTotalMN", "Orden IS NOT NULL"))
PLVxPTot.InnerHtml = "<span style=""font-weight:800"">" + "Cantidad: " + "</span>" + String.Format("{0:n} Kg", CType(GvVxP.DataSource, DataTable).SUM("Cantidad", "CodigoPS <> ''")) _
+ "<span style=""font-weight:800; margin-left:1em"">" + "Total: " + "</span>" + String.Format("{0:c} MXN", CType(GvVxP.DataSource, DataTable).SUM("SubTotalMN", "CodigoPS <> ''"))
Else
UPGraficaVxP.Visible = False
PLVxPTot.InnerHtml = Nothing
@@ -159,6 +160,10 @@ Partial Class General_RepIndicadorResumen
If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.DBCampo("Orden") = "" Then
e.Row.CssClass = "Totales"
Else
If e.Row.DBCampo("CodigoPS") = "" Then
e.Row.CssClass = "SubTotales"
End If
End If
End If
End Sub
@@ -253,7 +258,7 @@ Partial Class General_RepIndicadorResumen
DtVxP.Columns.Add("Unidad")
'RowColorIndex = 0
For Each Dr As DataRow In CType(GvVxP.DataSource, DataTable).FiltraParametros("", "SubTotalMN DESC").Rows
If Not Dr("Orden").ToString = "" Then
If Not Dr("CodigoPS").ToString = "" Then
Dim Row = DtVxP.NewRow()
Row("Texto") = Dr("GPO").ToString
Row("Valor") = Dr("SubTotalMN").ToString.FormatoNumero

View File

@@ -345,7 +345,7 @@ Partial Class Inventarios_ReporteEntradasSalidas
ImprimiReporte("EXCEL")
End Sub
Private Sub LnkExcelPersonalizado_Click(sender As Object, e As EventArgs) Handles LnkExcelPersonalizado.Click
GvM.ExportToExcel("EntradasSalidas_" + Now.ToShortDateString + ".xls")
GvM.ExportToExcel("EntradasSalidas_" + Now.ToShortDateString)
End Sub
Private Sub LnkImprimir_Click(sender As Object, e As EventArgs) Handles LnkImprimir.Click
ImprimiReporte()

View File

@@ -3392,7 +3392,7 @@
<div id="DmodalNetos" class="modal ADS fade" role="dialog">
<asp:UpdatePanel ID="UpdatePanel4" class="modal-dialog" tabindex="-1" runat="server" UpdateMode="Conditional">
<asp:UpdatePanel ID="uppanelnetos" class="modal-dialog" tabindex="-1" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="modal-content rowpadding">
<div class="modal-header">
@@ -3422,6 +3422,13 @@
</div>
</div>
<div class="portlet-body rowpadding ">
<div class=" row">
<div class="col-md-3">Concepto</div>
<div class="col-md-6">
<asp:DropDownList ID="ddlConceptocomisionNeto" runat="server" DataTextField="CodigoConcepto" DataValueField="CveConcepto" Class="form-control input-sm select2me" Width="100%" ValidationGroup="GrpGuardar"></asp:DropDownList>
</div>
</div>
<asp:TextBox ID="TxtCargarNetos" CssClass="ADSdropzone hidden" runat="server"></asp:TextBox>
</div>
</div>
@@ -3430,7 +3437,7 @@
<div class="modal-footer">
<asp:UpdatePanel runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:LinkButton ID="LnkCargarNominaNetos" OnClick="LnkCargarNomina_Click" CssClass="btn btn-primary" runat="server">Procesar</asp:LinkButton>
<asp:LinkButton ID="LnkCargarNominaNetos" OnClick="LnkCargarNominaNetos_Click" CssClass="btn btn-primary" runat="server">Procesar</asp:LinkButton>
</ContentTemplate>
</asp:UpdatePanel>
</div>

View File

@@ -1,4 +1,6 @@
using Extensiones;

using AjaxControlToolkit.HtmlEditor.ToolbarButtons;
using Extensiones;
using iTextSharp.text.pdf;
using System;
using System.Collections.Generic;
@@ -493,7 +495,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
HypPDFSTimbrados.Attributes.Add("onclick", string.Format("GETPDF({0},{1})", -1, FiltCvePeriodo));
cargaDatos();
int empleados = 0;
if(dtempleados != null && dtempleados.Rows.Count>0)
if (dtempleados != null && dtempleados.Rows.Count > 0)
{
empleados = dtempleados.COUNT("CvePersonal", " CvePersonal >0 ");
}
@@ -1750,10 +1752,25 @@ public partial class Nomina_Nomina2 : ClsPaginas
}
protected void LnkCargaNetos_Click(object sender, EventArgs e)
{
using (ClsNominas onom = new ClsNominas())
{
if (onom.GetConceptos(UsuarioActual.CveEmpresa))
{
ddlConceptocomisionNeto.DataSource = onom.DtResultados.FiltraParametros("CveSATConcepto=56");
ddlConceptocomisionNeto.DataBind();
ddlConceptocomisionNeto.SelectedValueExist(onom.DtResultados.FiltroPrimeroValor("CveConcepto", "CveSistema=-2"));
}
}
uppanelnetos.Update();
RegistraScript("$('#DmodalNetos').modal();");
}
protected void LnkFormatoNetos_Click(object sender, EventArgs e)
protected void LnkCargarNominaNetos_Click(object sender, EventArgs e)
{
LnkCargarNomina_Click(sender, e);
}
protected void LnkFormatoNetos_Click(object sender, EventArgs e)
{
try
{
@@ -1767,7 +1784,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
GVConceptosPlantilla.DataBind();
foreach (DataRow gvrow in ObjNomina.DtResultados.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa} AND CveSistema =-1").Rows)
{
if (gvrow["CveConcepto"].ToEntero() > 0 )
if (gvrow["CveConcepto"].ToEntero() > 0)
{
str.AppendFormat(",{0}", gvrow["CveConcepto"]);
continuar = true;
@@ -2087,9 +2104,17 @@ public partial class Nomina_Nomina2 : ClsPaginas
int chkImporte = 1;
int chkImporteGravado = 0;
List<Archivo> Filesgral = TxtArchivoNomina.getfiles().Archivos;
if(((LinkButton)sender).ID == LnkCargarNominaNetos.ID)
if (((LinkButton)sender).ID == LnkCargarNominaNetos.ID)
{
Filesgral = TxtCargarNetos.getfiles().Archivos;
using (ClsClaseBase objbase = new ClsClaseBase())
{
if (objbase.runQuerystr(string.Format("UPDATE C SET C.CveSistema = C.CveSistemaOLD FROM Nom_Conceptos C WHERE CveEmpresa ={0} AND CveSistema =-2; UPDATE C SET C.CveSistemaOLD = C.CveSistema FROM Nom_Conceptos C WHERE CveConcepto ={1};UPDATE C SET C.CveSistema =-2 FROM Nom_Conceptos C WHERE CveConcepto ={1};", UsuarioActual.CveEmpresa, ddlConceptocomisionNeto.SelectedValue.ToEntero())))
{
}
}
}
bool continuar = Filesgral.Count > 0;

View File

@@ -5,6 +5,7 @@
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
Finiquitos
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
</asp:Content>
@@ -41,13 +42,13 @@
<div class="col-md-2">
<div style="display: inline-block; vertical-align: text-bottom;">
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px;">
<asp:TextBox ID="TxtFechaIFinContrato" runat="server" CssClass="form-control" CausesValidation="true" Style="width: 118px" MaxLength="10"></asp:TextBox>
<asp:TextBox ID="TxtFechaInicio" runat="server" CssClass="form-control" CausesValidation="true" Style="width: 118px" MaxLength="10"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="ImgFechaFinContrato" class="btn default" Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
<ajax:MaskedEditExtender ID="MEEFechaFinContrato" runat="server" TargetControlID="TxtFechaIFinContrato" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CEFechaFinContrato" TargetControlID="TxtFechaIFinContrato" PopupButtonID="ImgFechaFinContrato" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:CompareValidator ID="CVFechaFinContrato" runat="server" ControlToValidate="TxtFechaIFinContrato" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Fin Contrato''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar"></asp:CompareValidator>
<ajax:MaskedEditExtender ID="MEEFechaFinContrato" runat="server" TargetControlID="TxtFechaInicio" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CEFechaFinContrato" TargetControlID="TxtFechaInicio" PopupButtonID="ImgFechaFinContrato" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:CompareValidator ID="CVFechaFinContrato" runat="server" ControlToValidate="TxtFechaInicio" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Fin Contrato''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="VCOFechaFinContrato2" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaFinContrato" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
</div>
@@ -56,13 +57,13 @@
<div class="col-md-2">
<div style="display: inline-block; vertical-align: text-bottom;">
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px;">
<asp:TextBox ID="TxtFechaFFinContrato" runat="server" CssClass="form-control" CausesValidation="true" Style="width: 118px" MaxLength="10"></asp:TextBox>
<asp:TextBox ID="TxtFechaFin" runat="server" CssClass="form-control" CausesValidation="true" Style="width: 118px" MaxLength="10"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="ImgFechaFFinContrato" class="btn default" Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
<ajax:MaskedEditExtender ID="MEEFechaFFinContrato" runat="server" TargetControlID="TxtFechaFFinContrato" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CEFechaFFinContrato" TargetControlID="TxtFechaFFinContrato" PopupButtonID="ImgFechaFinContrato" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:CompareValidator ID="CVFechaFFinContrato" runat="server" ControlToValidate="TxtFechaFFinContrato" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Fin Contrato''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar"></asp:CompareValidator>
<ajax:MaskedEditExtender ID="MEEFechaFFinContrato" runat="server" TargetControlID="TxtFechaFin" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CEFechaFFinContrato" TargetControlID="TxtFechaFin" PopupButtonID="ImgFechaFFinContrato" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:CompareValidator ID="CVFechaFFinContrato" runat="server" ControlToValidate="TxtFechaFin" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Fin Contrato''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="VCOFechaFFinContrato2" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaFinContrato" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
</div>

View File

@@ -25,6 +25,10 @@ public partial class Nomina_RepFiniquito : ClsPaginas
{
if (!IsPostBack)
{
DateTime dnow = DateTime.Now;
int diafin = DateTime.DaysInMonth(dnow.Year, dnow.Month);
TxtFechaInicio.Text = string.Format("01/{0:MM/yyyy}", dnow);
TxtFechaFin.Text = string.Format("{1}/{0:MM/yyyy}", dnow,diafin);
RcveEstatusFiniquito = Request["cveEstatusFiniquito"] == null ? 0 : Request["cveEstatusFiniquito"].ToString().ToEntero();
RcveSubProyecto = Request["cveSubProyecto"] == null ? 0 : Request["cveSubProyecto"].ToString().ToEntero();
@@ -34,9 +38,9 @@ public partial class Nomina_RepFiniquito : ClsPaginas
}
protected void CargaRepFiniquitos()
{
{
ClsNominas ObjRepF = new ClsNominas();
ObjRepF.RepFiniquitos(RcveSubProyecto, RcveEstatusFiniquito, UsuarioActual.CveEmpresa, "","");
ObjRepF.RepFiniquitos(RcveSubProyecto, RcveEstatusFiniquito, UsuarioActual.CveEmpresa,(TxtFechaInicio.Text==""?"": TxtFechaInicio.Text.ToDateTime().ToString("yyyy/MM/dd")), (TxtFechaFin.Text == "" ? "" : TxtFechaFin.Text.ToDateTime().ToString("yyyy/MM/dd")));
GVRepFiniquitos.DataSource = ObjRepF.DtResultados;
ObjRepF.Dispose();
GVRepFiniquitos.DataBind();

View File

@@ -6834,7 +6834,7 @@ Partial Class RH_Personal
TxtFactordeIntegracion.Text = ""
TxtFISalarioDiarioIntegrado.Text = ""
If UsuarioActual.CveEmpresa.Contiene(72, 80) Then
TxtFIDiasVacaciones.Text = "6"
TxtFIDiasVacaciones.Text = "12"
Else
Using objRH As New ClsRH
If objRH.VacacionesResumenGet(CvePersonal, UsuarioActual.Empresa.CveEmpresa) Then
@@ -6844,7 +6844,7 @@ Partial Class RH_Personal
Dim diasvaca As Integer = objRH.DtResultados(0)("Dias").ToString().ToEntero()
TxtFIDiasVacaciones.Text = If(diasvaca > 5, diasvaca, 6).ToString()
Else
TxtFIDiasVacaciones.Text = "6"
TxtFIDiasVacaciones.Text = "12"
End If
Else

View File

@@ -379,6 +379,7 @@ namespace ADSNetLibraryzd.Helpers.Conexiones.SIGAPI
}
}
catch (Exception e) {
string val = e.Message;
//ModExtensiones.GuardaLog(string.Format("{0}{1}{2}{1}{3}{1}{4}{1}", tituloLog, ModVars.NewLine, route, e, strjsonreq), ModVars.ADSNetLibraryLog);
}

View File

@@ -8552,7 +8552,7 @@ Partial Class PV
DdlRegimenFiscalCliente.DataBind()
Else
Dim dt As DataTable = GlobalDTRegimenesFiscales(RdTipoPersona.SelectedValue.ToEntero).FiltraParametros("", "CodigoRegimenFiscal")
Dim Val As String
Dim Val As String = ""
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
'verifico que sino existe el valor. lo limpie