This commit is contained in:
2024-07-02 14:20:36 -07:00
9 changed files with 152 additions and 122 deletions

View File

@@ -2344,6 +2344,31 @@ Public Class ClsPaginas
HttpContext.Current.Application(AppNombre) = value
End Set
End Property
Public Shared Property GlobalDTClientesTodosSucursales(CveEmpresa As Integer, Optional CveCliente As Integer = -1) As DataTable
Get
Dim AppNombre As String = $"GlobalDTClientesTodosSucursales-{CveEmpresa}"
If HttpContext.Current.Application(AppNombre) Is Nothing Then
Dim ObjClientes As New ClsClientes
If ObjClientes.GetClienteSucursales(-1, CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjClientes.DtResultados.Copy()
ObjClientes.Dispose()
End If
Dim filtros As New List(Of String)
If CveCliente >= 0 Then filtros.Add($"CveCliente = {CveCliente}")
If filtros.Count > 0 Then
Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), String.Join(" AND ", filtros), "", DataViewRowState.CurrentRows)
GlobalDTClientesTodosSucursales = Dv.ToTable
Dv.Dispose()
Else
GlobalDTClientesTodosSucursales = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
End If
End Get
Set(value As DataTable)
Dim AppNombre As String = $"GlobalDTClientesTodosSucursales-{CveEmpresa}"
HttpContext.Current.Application(AppNombre) = value
End Set
End Property
Public Shared Property GlobalDTEstatusOrdenServicios(CveEmpresa As Integer) As DataTable
Get
Dim AppNombre As String = $"GlobalDTEstatusOrdenServicios-{CveEmpresa}"

View File

@@ -80,7 +80,7 @@
</asp:DropDownList>
</div>
<div class="col-md-1">
F.I.:
F.Inicio.:
</div>
<div class="col-md-2">
@@ -98,7 +98,7 @@
</div>
</div>
<div class="col-md-1 ">
F.F.:
F.Fin.:
</div>
<div class="col-md-2">

View File

@@ -329,11 +329,10 @@
<table class="table Widthall ">
<tr>
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 20%; border-right: 3px solid white;">Agrupador</td>
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 10%; border-right: 3px solid white;">Autorizado</td>
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 20%; border-right: 3px solid white;" runat="server" id="thComprometido" visible="false">En proceso de compra</td>
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 12.5%; border-right: 3px solid white;">Autorizado</td>
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 20%; border-right: 3px solid white;"><asp:Literal ID="LtlthEjercido" runat="server" Text="Ejercido"></asp:Literal></td>
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 20%; border-right: 3px solid white;">Por Ejercer</td>
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 15%; border-right: 3px solid white;">Pagado</td>
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 12.5%; border-right: 3px solid white;">Pagado</td>
</tr>
</table>
<div class="row">
@@ -342,13 +341,12 @@
<Columns>
<%--<asp:HyperLinkField HeaderText="Descripcion" DataTextField="Agrupador" ItemStyle-Width="20%"--%>
<asp:BoundField HeaderText="Descripción" DataField="Agrupador" ItemStyle-Width="20%" />
<asp:BoundField HeaderText="Importe" DataField="Autorizado" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="10%" />
<asp:BoundField HeaderText="Importe" DataField="Comprometido" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="20%" Visible="false" />
<asp:BoundField HeaderText="Importe" DataField="Autorizado" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="12.5%" />
<asp:BoundField HeaderText="Importe" DataField="Ejercido" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="15%" />
<asp:BoundField HeaderText="%" DataField="EjercidoPorcentaje" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="5%" ItemStyle-Font-Size="7pt" ItemStyle-Font-Italic="true" />
<asp:BoundField HeaderText="Importe" DataField="PorEjercer" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="15%" />
<asp:BoundField HeaderText="%" DataField="PorEjercerPorcentaje" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="5%" ItemStyle-Font-Size="7pt" ItemStyle-Font-Italic="true" />
<asp:BoundField HeaderText="Importe" DataField="Pagado" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="15%" />
<asp:BoundField HeaderText="Importe" DataField="Pagado" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="12.5%" />
</Columns>
</asp:GridView>
</div>

View File

@@ -62,7 +62,7 @@ Partial Class Contratos_RepPresupuestos
DdlProyecto.Items.Insert(0, New ListItem("Todos", "-1"))
DdlProyecto.DataBind()
If UsuarioActual.CveEmpresa.Contiene(13, 83) Then UsaComprometido = True
If UsuarioActual.Empresa.Funcionalidad(532) = "2" Then UsaComprometido = True
CargaSubProyecto()
UpFiltros.Update()
@@ -92,9 +92,7 @@ Partial Class Contratos_RepPresupuestos
Dim TieneDatos As Boolean = False
If UsaComprometido Then
thComprometido.Visible = True
GvDatos.Columns(2).Visible = True
LtlthEjercido.Text = "Facturado"
LtlthEjercido.Text = "En proceso de compra"
End If
If Not EsMensual Then
@@ -104,10 +102,14 @@ Partial Class Contratos_RepPresupuestos
If ObjPresupuestos.DtResultados IsNot Nothing AndAlso ObjPresupuestos.DtResultados.Rows.Count > 0 Then
TieneDatos = True
End If
DtPresupuestos = ObjPresupuestos.DtResultados
DtPresupuestos = ObjPresupuestos.DtResultados
If UsaComprometido Then
DtPresupuestos.Columns.Remove("ejercido") : DtPresupuestos.Columns("comprometido").ColumnName = "ejercido"
DtPresupuestos.Columns.Remove("EjercidoPorcentaje") : DtPresupuestos.Columns("comprometidoPorcentaje").ColumnName = "EjercidoPorcentaje"
DtPresupuestos.Columns.Remove("PorEjercer") : DtPresupuestos.Columns("PorEjercercomprometido").ColumnName = "PorEjercer"
DtPresupuestos.Columns.Remove("PorEjercerPorcentaje") : DtPresupuestos.Columns("PorEjercerPorcentajecomprometido").ColumnName = "PorEjercerPorcentaje"
End If
GvDatos.DataSource = DtPresupuestos
End If
ObjPresupuestos.Dispose()
@@ -131,8 +133,6 @@ Partial Class Contratos_RepPresupuestos
If ObjPresupuestos.DtResultados IsNot Nothing AndAlso ObjPresupuestos.DtResultados.Rows.Count > 0 Then
TieneDatos = True
End If
DtPresupuestos = ObjPresupuestos.DtResultados
GvDatosMensual.DataSource = DtPresupuestos
End If
ObjPresupuestos.Dispose()
@@ -329,12 +329,10 @@ Partial Class Contratos_RepPresupuestos
Dim PorEjercerPorcentaje = DrPresupuesto("PorEjercerPorcentaje").ToString.ToDecimal
If UsaComprometido Then
Ejercido = DrPresupuesto("Comprometido").ToString.ToDecimal
' Ejercido = DrPresupuesto("Comprometido").ToString.ToDecimal
PorEjercer = Autorizado - Ejercido
EjercidoPorcentaje = If(Autorizado > 0, Ejercido / Autorizado * 100, 0)
PorEjercerPorcentaje = If(Autorizado > 0, PorEjercer / Autorizado * 100, 0)
thComprometido.Visible = True
GvDatos.Columns(2).Visible = True
End If
LtlAutorizado.Text = Autorizado.FormatoNumero
@@ -342,15 +340,15 @@ Partial Class Contratos_RepPresupuestos
LtlPorEjercer.Text = PorEjercer.FormatoNumero
PBEjercido.Style.Remove("width")
PBEjercido.Style.Add("width", $"{EjercidoPorcentaje.ToString}%")
PBEjercido.Style.Add("width", $"{EjercidoPorcentaje.ToString}%")
PBPorEjercer.Style.Remove("width")
PBPorEjercer.Style.Add("width", $"{PorEjercerPorcentaje.ToString}%")
PBPorEjercer.Style.Remove("width")
PBPorEjercer.Style.Add("width", $"{PorEjercerPorcentaje.ToString}%")
LtlPorcentajeEjercido.Text = EjercidoPorcentaje.FormatoNumero + " %"
LtlPorcentajePorEjercer.Text = PorEjercerPorcentaje.FormatoNumero + " %"
LtlPorcentajeEjercido.Text = EjercidoPorcentaje.FormatoNumero + " %"
LtlPorcentajePorEjercer.Text = PorEjercerPorcentaje.FormatoNumero + " %"
Dim json = New JArray(
Dim json = New JArray(
From dr In DtDatos
Select New JObject(
New JProperty("Agrupador", dr("Agrupador").ToString()),
@@ -362,11 +360,11 @@ Partial Class Contratos_RepPresupuestos
New JProperty("PorEjercerProporcion", dr("PorEjercerPorcentaje").ToString().ToDecimal()))
)
HdnJsonProyecto.Value = json.ToString
End If
HdnJsonProyecto.Value = json.ToString
End If
Else
Else
LtlAutorizado.Text = ""
LtlEjercido.Text = ""
LtlPorEjercer.Text = ""
@@ -385,24 +383,21 @@ Partial Class Contratos_RepPresupuestos
End Select
If e.Row.DBCampo("Autorizado").ToDecimal = 0 Then
e.Row.Cells(1).Text = "-"
End If
If e.Row.DBCampo("Comprometido").ToDecimal = 0 Then
End If
If e.Row.DBCampo("Ejercido").ToDecimal = 0 Then
e.Row.Cells(2).Text = "-"
End If
If e.Row.DBCampo("Ejercido").ToDecimal = 0 Then
If e.Row.DBCampo("EjercidoPorcentaje").ToDecimal = 0 Then
e.Row.Cells(3).Text = "-"
End If
If e.Row.DBCampo("EjercidoPorcentaje").ToDecimal = 0 Then
If e.Row.DBCampo("PorEjercer").ToDecimal = 0 Then
e.Row.Cells(4).Text = "-"
End If
If e.Row.DBCampo("PorEjercer").ToDecimal = 0 Then
If e.Row.DBCampo("PorEjercerPorcentaje").ToDecimal = 0 Then
e.Row.Cells(5).Text = "-"
End If
If e.Row.DBCampo("PorEjercerPorcentaje").ToDecimal = 0 Then
e.Row.Cells(6).Text = "-"
End If
If e.Row.DBCampo("Pagado").ToDecimal = 0 Then
e.Row.Cells(7).Text = "-"
e.Row.Cells(6).Text = "-"
End If
If e.Row.RowIndex > 0 Then
@@ -607,16 +602,13 @@ Partial Class Contratos_RepPresupuestos
params.Add(New ReportParameter("PorEjercer", LtlPorEjercer.Text.FormatoNumero()))
params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
If UsuarioActual.Empresa.Funcionalidad(532) = "2" Then
Dim DrPresupuesto = DtPresupuestos.FiltroPrimero("Tipo = 0 AND CveAgrupador IS NULL")
Dim Comprometido = DrPresupuesto("Comprometido").ToString.ToDecimal
params.Add(New ReportParameter("Ejercido", Comprometido.ToString.FormatoNumero()))
Else
params.Add(New ReportParameter("Ejercido", LtlEjercido.Text.FormatoNumero()))
End If
'If UsuarioActual.Empresa.Funcionalidad(532) = "2" Then
' Dim DrPresupuesto = DtPresupuestos.FiltroPrimero("Tipo = 0 AND CveAgrupador IS NULL")
' 'Dim Comprometido = DrPresupuesto("Comprometido").ToString.ToDecimal
' params.Add(New ReportParameter("Ejercido", Comprometido.ToString.FormatoNumero()))
'Else
params.Add(New ReportParameter("Ejercido", LtlEjercido.Text.FormatoNumero()))
'End If
params.Add(New ReportParameter("PresupuestoRestrictivo", UsuarioActual.Empresa.Funcionalidad(532)))

View File

@@ -246,12 +246,11 @@
<div id="DivRepDatos" runat="server" visible="false">
<table class="table Widthall ">
<tr>
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 20%; border-right: 3px solid white;">Agrupador</td>
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 10%; border-right: 3px solid white;">Autorizado</td>
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 10%; border-right: 3px solid white;">Comprometido</td>
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 25%; border-right: 3px solid white;">Ejercido</td>
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 25%; border-right: 3px solid white;">Agrupador</td>
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 12.5%; border-right: 3px solid white;">Autorizado</td>
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 25%; border-right: 3px solid white;"><asp:Literal ID="LtlthEjercido" runat="server" Text="Ejercido"></asp:Literal></td>
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 25%; border-right: 3px solid white;">Por Ejercer</td>
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 15%; border-right: 3px solid white;">Pagado</td>
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 12.5%; border-right: 3px solid white;">Pagado</td>
</tr>
</table>
<div class="row">
@@ -259,14 +258,13 @@
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" EmptyDataText="Sin resultados" ShowHeaderWhenEmpty="true" CssClass="table table-striped table-hover Widthall ScrollAD" GridLines="None" data-sort="true">
<Columns>
<%--<asp:HyperLinkField HeaderText="Descripcion" DataTextField="Agrupador" ItemStyle-Width="20%"--%>
<asp:BoundField HeaderText="Descripción" DataField="Agrupador" ItemStyle-Width="20%" />
<asp:BoundField HeaderText="Importe" DataField="Autorizado" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="10%" />
<asp:BoundField HeaderText="Importe" DataField="Comprometido" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="10%" />
<asp:BoundField HeaderText="Descripción" DataField="Agrupador" ItemStyle-Width="25%" />
<asp:BoundField HeaderText="Importe" DataField="Autorizado" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="12.5%" />
<asp:BoundField HeaderText="Importe" DataField="Ejercido" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="15%" />
<asp:BoundField HeaderText="%" DataField="EjercidoPorcentaje" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" />
<asp:BoundField HeaderText="Importe" DataField="PorEjercer" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="15%" />
<asp:BoundField HeaderText="%" DataField="PorEjercerPorcentaje" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" />
<asp:BoundField HeaderText="Importe" DataField="Pagado" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="15%" />
<asp:BoundField HeaderText="Importe" DataField="Pagado" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="12.5%" />
</Columns>
</asp:GridView>
</div>

View File

@@ -25,10 +25,18 @@ Partial Class Contratos_RepPresupuestosDetalle
Set(ByVal value As DataTable)
ViewState("DtPresupuestos") = value
End Set
End Property
End Property
Public Property UsaComprometido() As Boolean
Get
Return DirectCast(ViewState("UsaComprometido"), Boolean)
End Get
Set(ByVal value As Boolean)
ViewState("UsaComprometido") = 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
@@ -37,10 +45,12 @@ Partial Class Contratos_RepPresupuestosDetalle
CargaDatos()
End If
End Sub
End Sub
#Region " INICIALIZA VALORES "
Private Sub InicializaValores()
Private Sub InicializaValores()
If UsuarioActual.Empresa.Funcionalidad(532) = "2" Then UsaComprometido = True Else UsaComprometido = False
TxtFiltrosFechaInicio.Text = $"01/09/{NowADS().Year - 1}"
TxtFiltrosFechaFin.Text = $"31/08/{NowADS().Year}"
@@ -61,8 +71,9 @@ Partial Class Contratos_RepPresupuestosDetalle
DdlProyecto.Items.Insert(0, New ListItem("Todos", "-1"))
DdlProyecto.DataBind()
CargaSubProyecto()
CargaSubProyecto()
UpFiltros.Update()
End Sub
@@ -110,10 +121,10 @@ Partial Class Contratos_RepPresupuestosDetalle
TxtFiltrosFechaInicio.Text = FechaInicio
TxtFiltrosFechaFin.Text = FechaFin
ChkMensual.Checked = Mensual
End Sub
End Sub
#End Region
#Region " CARGA DATOS "
Protected Sub BtnConsultarFiltros_Click(sender As Object, e As EventArgs)
CargaDatos()
@@ -131,9 +142,17 @@ Partial Class Contratos_RepPresupuestosDetalle
GvDatosMensual.DataBind()
Else
Dim ObjPresupuestos As New ClsContratos
If ObjPresupuestos.GetPresupuestosRep(-1, DdlTipoGasto.SelectedValue.ToEntero, DdlAgrupador.SelectedValue.ToEntero, TxtFiltrosFechaInicio.Text.ToDate, TxtFiltrosFechaFin.Text.ToDate, UsuarioActual.CveEmpresa, DdlProyecto.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, UsuarioActual.CveUsuario, DdlClasificacion.SelectedValue.ToEntero) Then
GvDatos.DataSource = ObjPresupuestos.DtResultados
DtPresupuestos = ObjPresupuestos.DtResultados
If ObjPresupuestos.GetPresupuestosRep(-1, DdlTipoGasto.SelectedValue.ToEntero, DdlAgrupador.SelectedValue.ToEntero, TxtFiltrosFechaInicio.Text.ToDate, TxtFiltrosFechaFin.Text.ToDate, UsuarioActual.CveEmpresa, DdlProyecto.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, UsuarioActual.CveUsuario, DdlClasificacion.SelectedValue.ToEntero) Then
DtPresupuestos = ObjPresupuestos.DtResultados
If UsaComprometido Then
LtlthEjercido.Text = "En proceso de compra"
DtPresupuestos.Columns.Remove("ejercido") : DtPresupuestos.Columns("comprometido").ColumnName = "ejercido"
DtPresupuestos.Columns.Remove("EjercidoPorcentaje") : DtPresupuestos.Columns("comprometidoPorcentaje").ColumnName = "EjercidoPorcentaje"
DtPresupuestos.Columns.Remove("PorEjercer") : DtPresupuestos.Columns("PorEjercercomprometido").ColumnName = "PorEjercer"
DtPresupuestos.Columns.Remove("PorEjercerPorcentaje") : DtPresupuestos.Columns("PorEjercerPorcentajecomprometido").ColumnName = "PorEjercerPorcentaje"
End If
GvDatos.DataSource = ObjPresupuestos.DtResultados
End If
ObjPresupuestos.Dispose()
DivDatosMensual.Visible = False
@@ -142,10 +161,10 @@ Partial Class Contratos_RepPresupuestosDetalle
End If
UpDatos.Update()
UpDatosMensual.Update()
End Sub
End Sub
#End Region
Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
@@ -159,19 +178,19 @@ Partial Class Contratos_RepPresupuestosDetalle
e.Row.Cells(1).Text = "-"
End If
If e.Row.DBCampo("Ejercido").ToDecimal = 0 Then
e.Row.Cells(3).Text = "-"
e.Row.Cells(2).Text = "-"
End If
If e.Row.DBCampo("EjercidoPorcentaje").ToDecimal = 0 Then
e.Row.Cells(4).Text = "-"
e.Row.Cells(3).Text = "-"
End If
If e.Row.DBCampo("PorEjercer").ToDecimal = 0 Then
e.Row.Cells(5).Text = "-"
e.Row.Cells(4).Text = "-"
End If
If e.Row.DBCampo("PorEjercerPorcentaje").ToDecimal = 0 Then
e.Row.Cells(6).Text = "-"
e.Row.Cells(5).Text = "-"
End If
If e.Row.DBCampo("Pagado").ToDecimal = 0 Then
e.Row.Cells(7).Text = "-"
e.Row.Cells(6).Text = "-"
End If
If e.Row.RowIndex > 0 Then
Dim CveAgrupador = e.Row.DBCampo("CveAgrupador").ToEntero
@@ -188,11 +207,11 @@ Partial Class Contratos_RepPresupuestosDetalle
End If
Dim Css = "Texto"
Dim Liga = $"/Contratos/RepPresupuestosDetalleCompras.aspx?&CveAgrupador={CveAgrupador}&CveClasificacion={e.Row.DBCampo("CveClasificacionFiltro")}&CveConceptoContableNom={e.Row.DBCampo("CveConceptoContableNomFiltro")}&CveProyecto={e.Row.DBCampo("CveProyectoFiltro")}&CveSubProyecto={e.Row.DBCampo("CveSubProyectoFiltro")}&CveTipoGasto={e.Row.DBCampo("CveTipoGastoFiltro")}&Agrupador={e.Row.DBCampo("AgrupadorFiltro")}&Mensual={False}&EsProyecto={EsProyecto}&FechaFin={FechaFin}&FechaInicio={FechaInicio}"
e.Row.Cells(0).Text = "<a class=" + "" + Css + "" + " href=" + "" + Liga + "" + ">" + e.Row.Cells(0).Text + "</a>"
'Dim Liga = $"/Contratos/RepPresupuestosDetalleCompras.aspx?&CveAgrupador={CveAgrupador}&CveClasificacion={e.Row.DBCampo("CveClasificacionFiltro")}&CveConceptoContableNom={e.Row.DBCampo("CveConceptoContableNomFiltro")}&CveProyecto={e.Row.DBCampo("CveProyectoFiltro")}&CveSubProyecto={e.Row.DBCampo("CveSubProyectoFiltro")}&CveTipoGasto={e.Row.DBCampo("CveTipoGastoFiltro")}&Agrupador={e.Row.DBCampo("AgrupadorFiltro")}&Mensual={False}&EsProyecto={EsProyecto}&FechaFin={FechaFin}&FechaInicio={FechaInicio}"
'e.Row.Cells(0).Text = "<a class=" + "" + Css + "" + " href=" + "" + Liga + "" + ">" + e.Row.Cells(0).Text + "</a>"
Dim LigaComprometido = $"/Contratos/RepPresupuestosDetalleCompras.aspx?&CveAgrupador={CveAgrupador}&CveClasificacion={e.Row.DBCampo("CveClasificacionFiltro")}&CveConceptoContableNom={e.Row.DBCampo("CveConceptoContableNomFiltro")}&CveProyecto={e.Row.DBCampo("CveProyectoFiltro")}&CveSubProyecto={e.Row.DBCampo("CveSubProyectoFiltro")}&CveTipoGasto={e.Row.DBCampo("CveTipoGastoFiltro")}&Agrupador={e.Row.DBCampo("AgrupadorFiltro")}&Mensual={False}&EsProyecto={EsProyecto}&FechaFin={FechaFin}&FechaInicio={FechaInicio}&Comprometido=1"
e.Row.Cells(2).Text = "<a class=" + "" + Css + "" + " href=" + "" + LigaComprometido + "" + ">" + e.Row.Cells(2).Text + "</a>"
Dim Liga = $"/Contratos/RepPresupuestosDetalleCompras.aspx?&CveAgrupador={CveAgrupador}&CveClasificacion={e.Row.DBCampo("CveClasificacionFiltro")}&CveConceptoContableNom={e.Row.DBCampo("CveConceptoContableNomFiltro")}&CveProyecto={e.Row.DBCampo("CveProyectoFiltro")}&CveSubProyecto={e.Row.DBCampo("CveSubProyectoFiltro")}&CveTipoGasto={e.Row.DBCampo("CveTipoGastoFiltro")}&Agrupador={e.Row.DBCampo("AgrupadorFiltro")}&Mensual={False}&EsProyecto={EsProyecto}&FechaFin={FechaFin}&FechaInicio={FechaInicio}&Comprometido={If(UsaComprometido, "1", "0")}"
e.Row.Cells(2).Text = "<a class=" + "" + Css + "" + " href=" + "" + Liga + "" + ">" + e.Row.Cells(2).Text + "</a>"
End If
End If
End Sub

View File

@@ -153,6 +153,7 @@
<TextRun>
<Value>Descripcion</Value>
<Style>
<FontSize>9pt</FontSize>
<Color>White</Color>
</Style>
</TextRun>
@@ -203,7 +204,7 @@
</TablixColumns>
<TablixRows>
<TablixRow>
<Height>0.6cm</Height>
<Height>0.38833cm</Height>
<TablixCells>
<TablixCell>
<CellContents>
@@ -216,6 +217,7 @@
<TextRun>
<Value>=iif(CDec(Fields!Autorizado.Value)=0,"-",Fields!Autorizado.Value)</Value>
<Style>
<FontSize>8pt</FontSize>
<Format>#,0</Format>
<Color>=IIf(Fields!Tipo.Value = 0, "White","Black")</Color>
</Style>
@@ -234,8 +236,7 @@
<BackgroundColor>=IIf(Fields!Tipo.Value = 0, "#67809F",IIf(Fields!Tipo.Value = 1,"LightSteelBlue","Transparent"))</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
<PaddingTop>1pt</PaddingTop>
</Style>
</Textbox>
</CellContents>
@@ -251,6 +252,7 @@
<TextRun>
<Value>= IIF( Parameters!PresupuestoRestrictivo.Value = "2", iif(CDec(Fields!Comprometido.Value)=0,"-",Fields!Comprometido.Value), iif(CDec(Fields!Ejercido.Value)=0,"-",Fields!Ejercido.Value))</Value>
<Style>
<FontSize>8pt</FontSize>
<Format>#,0.00</Format>
<Color>=IIf(Fields!Tipo.Value = 0, "White","Black")</Color>
</Style>
@@ -269,8 +271,7 @@
<BackgroundColor>=IIf(Fields!Tipo.Value = 0, "#67809F",IIf(Fields!Tipo.Value = 1,"LightSteelBlue","Transparent"))</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
<PaddingTop>1pt</PaddingTop>
</Style>
</Textbox>
</CellContents>
@@ -286,6 +287,7 @@
<TextRun>
<Value>=iif(CDec(Fields!EjercidoPorcentaje.Value)=0,"-",Fields!EjercidoPorcentaje.Value)</Value>
<Style>
<FontSize>8pt</FontSize>
<Format>#,0.00</Format>
<Color>=IIf(Fields!Tipo.Value = 0, "White","Black")</Color>
</Style>
@@ -304,8 +306,7 @@
<BackgroundColor>=IIf(Fields!Tipo.Value = 0, "#67809F",IIf(Fields!Tipo.Value = 1,"LightSteelBlue","Transparent"))</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
<PaddingTop>1pt</PaddingTop>
</Style>
</Textbox>
</CellContents>
@@ -321,6 +322,7 @@
<TextRun>
<Value>=iif(CDec(Fields!PorEjercer.Value)=0,"-",Fields!PorEjercer.Value)</Value>
<Style>
<FontSize>8pt</FontSize>
<Format>#,0.00</Format>
<Color>=IIf(Fields!Tipo.Value = 0, "White","Black")</Color>
</Style>
@@ -339,8 +341,7 @@
<BackgroundColor>=IIf(Fields!Tipo.Value = 0, "#67809F",IIf(Fields!Tipo.Value = 1,"LightSteelBlue","Transparent"))</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
<PaddingTop>1pt</PaddingTop>
</Style>
</Textbox>
</CellContents>
@@ -356,6 +357,7 @@
<TextRun>
<Value>=iif(CDec(Fields!PorEjercerPorcentaje.Value)=0,"-",Fields!PorEjercerPorcentaje.Value)</Value>
<Style>
<FontSize>8pt</FontSize>
<Format>#,0.00</Format>
<Color>=IIf(Fields!Tipo.Value = 0, "White","Black")</Color>
</Style>
@@ -374,8 +376,7 @@
<BackgroundColor>=IIf(Fields!Tipo.Value = 0, "#67809F",IIf(Fields!Tipo.Value = 1,"LightSteelBlue","Transparent"))</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
<PaddingTop>1pt</PaddingTop>
</Style>
</Textbox>
</CellContents>
@@ -397,8 +398,9 @@
<Paragraph>
<TextRuns>
<TextRun>
<Value>Importe</Value>
<Value>Autorizado</Value>
<Style>
<FontSize>9pt</FontSize>
<Color>White</Color>
</Style>
</TextRun>
@@ -435,8 +437,9 @@
<Paragraph>
<TextRuns>
<TextRun>
<Value>Importe</Value>
<Value>=IIF(Parameters!PresupuestoRestrictivo.Value = "2","En Proceso","Ejercido")</Value>
<Style>
<FontSize>9pt</FontSize>
<Color>White</Color>
</Style>
</TextRun>
@@ -475,6 +478,7 @@
<TextRun>
<Value>%</Value>
<Style>
<FontSize>9pt</FontSize>
<Color>White</Color>
</Style>
</TextRun>
@@ -511,8 +515,9 @@
<Paragraph>
<TextRuns>
<TextRun>
<Value>Importe</Value>
<Value>Por Ejercer</Value>
<Style>
<FontSize>9pt</FontSize>
<Color>White</Color>
</Style>
</TextRun>
@@ -551,6 +556,7 @@
<TextRun>
<Value>%</Value>
<Style>
<FontSize>9pt</FontSize>
<Color>White</Color>
</Style>
</TextRun>
@@ -594,6 +600,7 @@
<TextRun>
<Value>=Fields!Agrupador.Value</Value>
<Style>
<FontSize>8pt</FontSize>
<Color>=IIf(Fields!Tipo.Value = 0, "White","Black")</Color>
</Style>
</TextRun>
@@ -611,8 +618,7 @@
<BackgroundColor>=IIf(Fields!Tipo.Value = 0, "#67809F",IIf(Fields!Tipo.Value = 1,"LightSteelBlue","Transparent"))</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
<PaddingTop>1pt</PaddingTop>
</Style>
</Textbox>
</CellContents>
@@ -625,7 +631,7 @@
<DataSetName>DataSet1</DataSetName>
<Top>3.39562cm</Top>
<Left>0.17167cm</Left>
<Height>1.2cm</Height>
<Height>0.98833cm</Height>
<Width>19.81203cm</Width>
<ZIndex>1</ZIndex>
<Style>
@@ -663,7 +669,7 @@
<Paragraph>
<TextRuns>
<TextRun>
<Value>EJERCIDO</Value>
<Value>=IIF(Parameters!PresupuestoRestrictivo.Value = "2","En Proceso","Ejercido")</Value>
<Style>
<FontWeight>Bold</FontWeight>
<Color>Blue</Color>

View File

@@ -2309,6 +2309,7 @@ Partial Class Ventas_ClientesAbonar
If gr.FCCheckBox("Chk").Checked Then
Dim PorcentajePago As Decimal = gr.DataKey("Saldo").ToDecimal / gr.DataKey("Original").ToDecimal
Dim Saldo As Decimal = gr.DataKey("Saldo").ToDecimal
Dim SaldoMN As Decimal = gr.DataKey("Saldo").ToDecimal
Dim RETIVA As Decimal = gr.DataKey("RetIVA").ToDecimal
Dim SubTotal As Decimal = PorcentajePago * (gr.DataKey("SubTotal").ToDecimal.RoundSQL - gr.DataKey("Descuento").ToDecimal.RoundSQL).RoundSQL
Dim IVA As Decimal = PorcentajePago * gr.DataKey("IVA").ToDecimal.RoundSQL
@@ -2339,9 +2340,9 @@ Partial Class Ventas_ClientesAbonar
'If CveConceptoDeduccion = 263 Then IdCuentaContableNoDeducible = UsuarioActual.Empresa.Funcionalidad(537).ToEntero
'If CveConceptoDeduccion = 252 Then IdCuentaContableNoDeducible = UsuarioActual.Empresa.Funcionalidad(581).ToEntero
If UsuarioActual.CveEmpresa.Contiene(4, 7, 11, 12, 122) Then
If UsuarioActual.CveEmpresa.Contiene(4, 7, 11, 12, 122, 145) Then
ClienteMovto = False : Saldo = Saldo * -1
ClienteMovto = False : SaldoMN = Saldo : Saldo = Saldo * -1
ImpuestosMovto = True : IVA = IVA * -1
RETIVA = ((SubTotal * RETIVA / gr.DataKey("SubTotal").ToDecimal.RoundSQL) * -1).RoundSQL(2)
CveConceptoCliente = 1
@@ -2356,7 +2357,7 @@ Partial Class Ventas_ClientesAbonar
If MsgError = "" Then
Dim ConPreP As ConceptosTipoSaldo = ClsPaginas.ObtenerCveConceptoPrePoliza(6, tCveMoneda, True, 1)
'normal
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, ClienteMovto, Saldo, Saldo, ConPreP.CveConcepto, gr.DataKey("SerieFolio").ToString, ConceptoPartida, CveCliente:=gr.DataKey("CveCliente").ToEntero, CveVenta:=gr.DataKey("CveVenta").ToEntero, TipoCambio:=TCVenta, TipoCambioPago:=TCPago) Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, ClienteMovto, SaldoMN, Saldo, ConPreP.CveConcepto, gr.DataKey("SerieFolio").ToString, ConceptoPartida, CveCliente:=gr.DataKey("CveCliente").ToEntero, CveVenta:=gr.DataKey("CveVenta").ToEntero, TipoCambio:=TCVenta, TipoCambioPago:=TCPago) Then
MsgError = "Ocurrio un error al saldar el movimiento"
End If

View File

@@ -7858,7 +7858,7 @@ Partial Class Ventas
DdlTipoAutorizacion.SelectedValueExist("1")
If Not UsuarioActual.TienePermisoProceso(268) AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Rem", "PA") Then
Dim Autorizacion As Integer = 0
Dim Autorizacion As Integer = 0
Dim ObjVentas As New ClsVentas
If ObjVentas.GetAutorizacionLimite(UsuarioActual.CveEmpresa, CveCliente, DdlVendedor.SelectedValue.ToEntero, "Ing", CveEstatus:=1) Then
@@ -7878,12 +7878,12 @@ Partial Class Ventas
'SI NO TIENE AUTORIZACION, MANTIENE EL BLOQUEO POR CONDICIONES DE CREDITO
If Autorizacion <= 0 Then
BtnEmitirImprimir.Visible = False
TieneBloqueoPorCreditoVencimiento = 1
End If
BtnEmitirImprimir.Visible = False
TieneBloqueoPorCreditoVencimiento = 1
End If
End If
Case Else 'SI NO TIENE NINGUN TIPO DE AUTORIZACION CONFIGURADO
'VERIFICAR CANDADOS DE VENTA
If DdlTipoComprobante.SelectedValue = "Cot" AndAlso CveVenta > 0 Then
@@ -9346,7 +9346,8 @@ Partial Class Ventas
e.Row.CssClass = "SubTotales"
End If
Else
e.Row.FCLiteral("LtlPS").Text = String.Format("<a Class='Texto' target='_blank' href='/Inventarios/Kardex.aspx?CvePS={0}&CveAlmacen={1}&FechaI={2}&FechaF={3}'> {4}</a>", e.Row.DBCampo("CvePS"), e.Row.DBCampo("CveAlmacen"), e.Row.DBCampo("Fecha").ToDate.AddDays(-7).ToShortDateString, e.Row.DBCampo("Fecha").ToDate.AddDays(7).ToShortDateString, e.Row.DBCampo("PS"))
Dim tFecha As Date = If(e.Row.DBCampo("Fecha") <> "", e.Row.DBCampo("Fecha").ToDate, NowADS())
e.Row.FCLiteral("LtlPS").Text = String.Format("<a Class='Texto' target='_blank' href='/Inventarios/Kardex.aspx?CvePS={0}&CveAlmacen={1}&FechaI={2}&FechaF={3}'> {4}</a>", e.Row.DBCampo("CvePS"), e.Row.DBCampo("CveAlmacen"), tFecha.AddDays(-7).ToShortDateString, tFecha.AddDays(7).ToShortDateString, e.Row.DBCampo("PS"))
e.Row.Cells(3).HorizontalAlign = HorizontalAlign.Left
e.Row.FCCheckBox("cbInv").Visible = True
@@ -25159,13 +25160,9 @@ Partial Class Ventas
Else
DdlPS_SelectedIndexChanged(Nothing, Nothing)
End If
End Sub
Protected Sub OrdenarGvPS(ByVal sender As Object, ByVal e As EventArgs)
For Each row As GridViewRow In GvPS.Rows
Dim drr As DataRow = GlobalDTClientesSucursales(UsuarioActual.CveEmpresa, CveCliente).FiltroPrimero($"CveClienteSucursal={DdlSucursalCliente.SelectedValue}")
TmpDT.Rows(row.RowIndex)("Orden") = row.FCTextBox("TxtOrden").Text.ToEntero()
Next
Next
Dim resultados = From OrdenDT In TmpDT
Order By OrdenDT("Orden").ToString().ToEntero()
@@ -37659,7 +37656,6 @@ Partial Class Ventas
End Sub
Private Sub CargaDdlClientesSucursal()
DdlClienteSucursal.DataSource = GlobalDTClientesSucursales(UsuarioActual.CveEmpresa)
@@ -37669,22 +37665,18 @@ Partial Class Ventas
Dim EsWS As Boolean = If(UsuarioActual.Empresa.Funcionalidad(105) = "1" Or UsuarioActual.Empresa.Funcionalidad(141) = "1", True, False)
If EsWS Then
DdlClientesModal.setEsWebService(True)
Else
DdlClientesModal.setEsWebService(False)
DdlClientesModal.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1)
DdlClientesModal.DataBind()
DdlClientesModal.ddl.Items.Insert(0, New ListItem("Seleccione Uno", "-1"))
End If
End Sub
Protected Sub ChkRequiereTecnico_CheckedChanged(sender As Object, e As EventArgs)
TdFechaOS1.Visible = ChkRequiereTecnico.Checked
UpCliente.Update()
End Sub
@@ -37700,7 +37692,6 @@ Partial Class Ventas
ChkRequiereTecnicoModal.Checked = True
ChkRequiereTecnicoModal.Enabled = True
DvModalRequiereOSFecha.Visible = True
'If CveCliente > 0 Then
' CargaSucursalesModal(CveCliente)
'End If