diff --git a/App_Code/ClsContabilidad.vb b/App_Code/ClsContabilidad.vb
index e9b5be573..ddcd598c7 100644
--- a/App_Code/ClsContabilidad.vb
+++ b/App_Code/ClsContabilidad.vb
@@ -4237,7 +4237,7 @@ Public Class ClsContabilidad
Return Retorno
End Function
- Public Function GetAnexoCatalagoCC(CveCuenta As Integer, Ejercicio As Integer, CveSubproyecto As Integer, CveEmpresa As Integer, Divisor As Integer, Periodo As Integer, CveUsuario As Integer ) As Boolean
+ Public Function GetAnexoCatalagoCC(CveCuenta As Integer, Ejercicio As Integer, CveSubproyecto As Integer, CveEmpresa As Integer, Divisor As Integer, Periodo As Integer, CveUsuario As Integer) As Boolean
Dim Retorno = False
DataAdapter("PA_Conta_AnexoCatalogoCCGet")
@@ -5551,6 +5551,7 @@ Public Class ClsContabilidad
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@TipoCambio", SqlDbType.Int).Value = TipoCambio
.Add("@TCEspecifico", SqlDbType.Float).Value = TCEspecifico
+ .Add("@Cuenta", SqlDbType.NVarChar).Value = Cuenta
End With
Try
SqlAdapter.Fill(Data)
diff --git a/App_Code/ClsContratos.vb b/App_Code/ClsContratos.vb
index 88cfc8e83..4aa1fc0a5 100644
--- a/App_Code/ClsContratos.vb
+++ b/App_Code/ClsContratos.vb
@@ -687,6 +687,94 @@ Public Class ClsContratos
#End Region
+#Region "ESTIMACION OBRA"
+
+ Public Function GetContratosObraRepAvances(FechaI As Date, FechaF As Date, CveCliente As Integer, CveContrato As Integer, CveEmpresa As Integer) As Boolean
+ Dim Retorno = False
+
+ DataAdapter("PA_Con_ContratosObraRepAvancesGet")
+ With SqlAdapter.SelectCommand.Parameters
+ .Add("@FechaI", SqlDbType.Date).Value = FechaI
+ .Add("@FechaF", SqlDbType.Date).Value = FechaF
+ .Add("@CveCliente", SqlDbType.Int).Value = CveCliente
+ .Add("@CveContrato", SqlDbType.Int).Value = CveContrato
+ .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
+ End With
+
+ Try
+ SqlAdapter.Fill(Data)
+ Retorno = True
+ Catch ex As Exception
+ OnError("Ocurrió un error al consultar el avance de contratos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ End Try
+
+ Return Retorno
+ End Function
+
+
+ Public Function GetContratosObraRepAvancesDetalle(CveContrato As Integer, CveEmpresa As Integer) As Boolean
+ Dim Retorno = False
+
+ DataAdapter("PA_Con_ContratosObraRepAvancesDetalleGet")
+ With SqlAdapter.SelectCommand.Parameters
+ .Add("@CveContrato", SqlDbType.Int).Value = CveContrato
+ .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
+ End With
+
+ Try
+ SqlAdapter.Fill(Data)
+ Retorno = True
+ Catch ex As Exception
+ OnError("Ocurrió un error al consultar el detalle del avance.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ End Try
+
+ Return Retorno
+ End Function
+
+
+ Public Function GetContratosObraRepAvancesPartida(CveEstimacion As Integer, CveEmpresa As Integer) As Boolean
+ Dim Retorno = False
+
+ DataAdapter("PA_Con_ContratosObraRepAvancesPartidaGet")
+ With SqlAdapter.SelectCommand.Parameters
+ .Add("@CveEstimacion", SqlDbType.Int).Value = CveEstimacion
+ .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
+ End With
+
+ Try
+ SqlAdapter.Fill(Data)
+ Retorno = True
+ Catch ex As Exception
+ OnError("Ocurrió un error al consultar las partidas.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ End Try
+
+ Return Retorno
+ End Function
+
+ Public Function GetContratosObraRepAvancesPartida(FechaI As Date, FechaF As Date, CveCliente As Integer, CveContrato As Integer, CveEmpresa As Integer) As Boolean
+ Dim Retorno = False
+
+ DataAdapter("PA_Con_ContratosObraRepAvancesPartidaGet")
+ With SqlAdapter.SelectCommand.Parameters
+ .Add("@FechaI", SqlDbType.Date).Value = FechaI
+ .Add("@FechaF", SqlDbType.Date).Value = FechaF
+ .Add("@CveCliente", SqlDbType.Int).Value = CveCliente
+ .Add("@CveContrato", SqlDbType.Int).Value = CveContrato
+ .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
+ End With
+
+ Try
+ SqlAdapter.Fill(Data)
+ Retorno = True
+ Catch ex As Exception
+ OnError("Ocurrió un error al consultar el avance de partida.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ End Try
+
+ Return Retorno
+ End Function
+
+#End Region
+
#Region "C I C L O C O M E R C I A L"
Public Function CicloComercialAdd(CveContrato As Integer, CveCotizacion As Integer, CveCliente As Integer, FueFacturado As Boolean, CveFactura As Integer, Estatus As Integer, CveEmpresa As Integer, FechaVenc As Date) As Boolean
Dim Retorno As Boolean = False
@@ -1066,14 +1154,15 @@ Public Class ClsContratos
Return Retorno
End Function
- Public Function GetContratosAvanceAnexos(CveContratoDetalle As Integer, fecha As String, CveUsuario As Integer) As Boolean
+ Public Function GetContratosAvanceAnexos(CveContratoDetalle As Integer, fecha As String, CveUsuario As Integer, Optional CveEstimacion As Integer = -1) As Boolean
Dim Retorno = False
DataAdapter("PA_Con_ContratosAvanceAnexos")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveContratoDetalle", SqlDbType.Int).Value = CveContratoDetalle
.Add("@Fecha", SqlDbType.Date).Value = fecha
- .Add("@CveUsuario", SqlDbType.Float).Value = CveUsuario
+ .Add("@CveUsuario", SqlDbType.Float).Value = CveUsuario
+ .Add("@CveEstimacion", SqlDbType.Float).Value = CveEstimacion
End With
Try
diff --git a/App_Code/ClsMovimientos.vb b/App_Code/ClsMovimientos.vb
index 836be534b..6ea168a78 100644
--- a/App_Code/ClsMovimientos.vb
+++ b/App_Code/ClsMovimientos.vb
@@ -155,7 +155,7 @@ Public Class ClsMovimientos
Return Retorno
End Function
- Public Function GetCxCCliente(CveCliente As Integer, FechaI As String, FechaF As String, CveMoneda As Integer, CveSubProyecto As Integer, CveUsuarioRegistro As Integer, CveEmpresa As Integer, Optional TipoAgrupador As Integer = 1, Optional CveUsuarioConsulta As Integer = -1) As Boolean
+ Public Function GetCxCCliente(CveCliente As Integer, FechaI As String, FechaF As String, CveMoneda As Integer, CveSubProyecto As Integer, CveUsuarioRegistro As Integer, CveEmpresa As Integer, Optional TipoAgrupador As Integer = 1, Optional CveUsuarioConsulta As Integer = -1, Optional Cuenta As String = "-1") As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Banc_Clientes")
@@ -169,6 +169,7 @@ Public Class ClsMovimientos
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@TipoAgrupador", SqlDbType.Int).Value = TipoAgrupador
.Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta
+ .Add("@Cuenta", SqlDbType.NVarChar).Value = Cuenta
End With
diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb
index 82bb1cb39..18fa76558 100644
--- a/App_Code/ClsPaginas.vb
+++ b/App_Code/ClsPaginas.vb
@@ -4981,13 +4981,12 @@ Public Class ClsPaginas
PaginaDict.Add("/PV/PVRepVentasCompras.aspx".ToUpper(), 273)
PaginaDict.Add("/Contratos/ContratoObra.aspx".ToUpper(), -1)
-
-
-
+ PaginaDict.Add("/Contratos/RepContratosObraAvances.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Contratos/RepContratosObraAvancesDetalle.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Contratos/RepContratosObraAvancesPartida.aspx".ToUpper(), -1)
'Orden Produccion'
-
'RMA
PaginaDict.Add("/RMA/Garantias.aspx".ToUpper(), 175)
diff --git a/Bancos/RepCxCCliente.aspx b/Bancos/RepCxCCliente.aspx
index 271a7965a..6148a08dc 100644
--- a/Bancos/RepCxCCliente.aspx
+++ b/Bancos/RepCxCCliente.aspx
@@ -120,6 +120,9 @@
+
Cuenta:
+
+
diff --git a/Bancos/RepCxCCliente.aspx.vb b/Bancos/RepCxCCliente.aspx.vb
index c10e276d1..f9e979d4c 100644
--- a/Bancos/RepCxCCliente.aspx.vb
+++ b/Bancos/RepCxCCliente.aspx.vb
@@ -55,7 +55,9 @@ Partial Class Bancos_RepCxCCliente
If txtFechaI.Text <> "" Then FechaI = txtFechaI.Text Else FechaI = "-1"
If txtFechaF.Text <> "" Then FechaF = txtFechaF.Text Else FechaF = "-1"
- If Mov.GetCxCCliente(CveCliente, FechaI, FechaF, DdlMoneda.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, -1, UsuarioActual.CveEmpresa, DdlAgrupador.SelectedValue.ToEntero, UsuarioActual.CveUsuario) Then
+ Dim Cuenta As String = If(TxtCuenta.Text = "", "-1", TxtCuenta.Text)
+
+ If Mov.GetCxCCliente(CveCliente, FechaI, FechaF, DdlMoneda.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, -1, UsuarioActual.CveEmpresa, DdlAgrupador.SelectedValue.ToEntero, UsuarioActual.CveUsuario, Cuenta:=Cuenta) Then
GvCxC.DataSource = Mov.DtResultados
End If
UsuarioActual.Sesion("CobroCliente-Sucursal") = DdlSubProyecto.SelectedValue
@@ -138,7 +140,7 @@ Partial Class Bancos_RepCxCCliente
If txtFechaF.Text <> "" Then FechaF = txtFechaF.Text Else FechaF = "-1"
Dim CveCliente = If(DdlClientesWS.SelectedValue.ToEntero > 0, DdlClientesWS.SelectedValue.ToEntero, -1)
- If ObjMovtos.GetCxCCliente(CveCliente, FechaI, FechaF, DdlMoneda.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, -1, UsuarioActual.CveEmpresa) Then
+ If ObjMovtos.GetCxCCliente(CveCliente, FechaI, FechaF, DdlMoneda.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, -1, UsuarioActual.CveEmpresa, Cuenta:=TxtCuenta.Text) Then
DTpp = ObjMovtos.DtResultados
Else
DTpp = Nothing
diff --git a/Contabilidad/RepIVA.aspx b/Contabilidad/RepIVA.aspx
index df71f1fcc..a86f38ed6 100644
--- a/Contabilidad/RepIVA.aspx
+++ b/Contabilidad/RepIVA.aspx
@@ -3,12 +3,12 @@
-
@@ -16,21 +16,21 @@
Reporte de Impuestos
-
+
PDF
- Excel
+ Excel
-
+
Ver Dlls en pesos
-
+
-
- Generar DIOT
-
+
+ Generar DIOT
+
@@ -38,14 +38,14 @@
- Generales del proveedor
+ Generales del proveedor
+
+
+
+
+
+
+
+
diff --git a/Contratos/RepContratosObraAvances.aspx.vb b/Contratos/RepContratosObraAvances.aspx.vb
new file mode 100644
index 000000000..6215f5a5a
--- /dev/null
+++ b/Contratos/RepContratosObraAvances.aspx.vb
@@ -0,0 +1,80 @@
+Imports Extensiones
+Imports System.Data
+
+Partial Class RepContratosObraAvances
+ Inherits ClsPaginas
+
+
+
+ Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
+ If Not Page.IsPostBack Then
+
+ CargaClientes()
+ CargaContratos()
+ 'CargaDatos()
+
+ End If
+ End Sub
+
+
+ Private Sub CargaDatos()
+
+ Dim Con As New ClsContratos
+
+ If Con.GetContratosObraRepAvances(txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, DdlCliente.SelectedValue.ToEntero, DdlContrato.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
+ GVDatos.DataSource = Con.DtResultados
+ Else
+ GVDatos.DataSource = Nothing
+ End If
+
+ Con.Dispose()
+
+ GVDatos.DataBind()
+ UpDatos.Update()
+
+ End Sub
+
+#Region "C O M B O S"
+
+
+ Private Sub CargaContratos()
+ DdlContrato.DataSource = GlobalDTContratos.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa} AND CveContratoTipo IN(30,31) ")
+ DdlContrato.DataBind()
+ DdlContrato.Items.Insert(0, New System.Web.UI.WebControls.ListItem("Todos", "-1"))
+ End Sub
+
+ Private Sub CargaClientes()
+ Dim dt As DataTable = Nothing
+ Dim Cli As New ClsClientes
+ If Cli.GetClientes(-1, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa) Then
+ dt = Cli.DtResultados
+ End If
+ Cli.Dispose()
+ DdlCliente.DataSource = dt
+ DdlCliente.DataBind()
+ DdlCliente.Items.Insert(0, New ListItem("Todos", "-1"))
+ End Sub
+
+#End Region
+
+ Protected Sub GV_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GVDatos.RowDataBound
+
+ If e.Row.RowType = DataControlRowType.DataRow Then
+
+ Dim HplContratado As HyperLink = e.Row.FCHyperLink("HplContratado")
+
+ HplContratado.NavigateUrl = $"./RepContratosObraAvancesDetalle.aspx?CveContrato={e.Row.DataKey("CveContrato")}&NumeroContrato={e.Row.DataKey("NumeroContrato")}"
+
+
+ End If
+
+ End Sub
+
+ Protected Sub CmdConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click
+ CargaDatos()
+ End Sub
+
+
+
+
+End Class
diff --git a/Contratos/RepContratosObraAvancesDetalle.aspx b/Contratos/RepContratosObraAvancesDetalle.aspx
new file mode 100644
index 000000000..9a193cfdc
--- /dev/null
+++ b/Contratos/RepContratosObraAvancesDetalle.aspx
@@ -0,0 +1,179 @@
+<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepContratosObraAvancesDetalle.aspx.vb" Inherits="RepContratosObraAvancesDetalle" %>
+
+<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
+
+
+
+
+
+
+
+ Reporte Contratos Avance Detalle
+
+
+
+
+
+<%--
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Contratos/RepContratosObraAvancesDetalle.aspx.vb b/Contratos/RepContratosObraAvancesDetalle.aspx.vb
new file mode 100644
index 000000000..d17028e61
--- /dev/null
+++ b/Contratos/RepContratosObraAvancesDetalle.aspx.vb
@@ -0,0 +1,100 @@
+Imports Extensiones
+Imports System.Data
+
+Partial Class RepContratosObraAvancesDetalle
+ Inherits ClsPaginas
+
+
+ Property CveContrato As Integer
+
+ Get
+ If ViewState("CveContrato") Is Nothing Then
+ Return -1
+ Else
+ Return ViewState("CveContrato").ToString.ToEntero
+ End If
+ End Get
+ Set(value As Integer)
+ ViewState("CveContrato") = value
+ End Set
+
+
+ End Property
+
+ Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
+
+ If Not Page.IsPostBack Then
+
+ CveContrato = If(Request("CveContrato") IsNot Nothing AndAlso Request("CveContrato").ToString.ToEntero > 0, Request("CveContrato").ToString.ToEntero, -1)
+ LblNumeroContrato.Text = If(Request("NumeroContrato") IsNot Nothing AndAlso Request("NumeroContrato").ToString.Length > 0, $"Numero Contrato: {Request("NumeroContrato").ToString}", "")
+
+ If CveContrato > 0 Then
+ CargaDatos()
+ End If
+ End If
+ End Sub
+
+
+ Private Sub CargaDatos()
+
+ Dim Con As New ClsContratos
+
+ If Con.GetContratosObraRepAvancesDetalle(CveContrato, UsuarioActual.CveEmpresa) Then
+ GVDatos.DataSource = Con.DtResultados
+
+ If Con.DtResultados.Rows.Count = 0 Then
+ Alert("No se encontraron estimaciones.", TipoMensaje.MsgAdvertencia)
+ End If
+ Else
+ GVDatos.DataSource = Nothing
+
+ End If
+
+ Con.Dispose()
+
+ GVDatos.DataBind()
+ UpDatos.Update()
+
+ End Sub
+
+ '#Region "C O M B O S"
+
+
+ ' Private Sub CargaContratos()
+ ' DdlContrato.DataSource = GlobalDTContratos.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa} AND CveContratoTipo IN(30,31) ")
+ ' DdlContrato.DataBind()
+ ' DdlContrato.Items.Insert(0, New System.Web.UI.WebControls.ListItem("Todos", "-1"))
+ ' End Sub
+
+ ' Private Sub CargaClientes()
+ ' Dim dt As DataTable = Nothing
+ ' Dim Cli As New ClsClientes
+ ' If Cli.GetClientes(-1, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa) Then
+ ' dt = Cli.DtResultados
+ ' End If
+ ' Cli.Dispose()
+ ' DdlCliente.DataSource = dt
+ ' DdlCliente.DataBind()
+ ' DdlCliente.Items.Insert(0, New ListItem("Todos", "-1"))
+ ' End Sub
+
+ '#End Region
+
+ Protected Sub GV_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GVDatos.RowDataBound
+
+ If e.Row.RowType = DataControlRowType.DataRow Then
+
+ Dim HplNumeroEstimacion As HyperLink = e.Row.FCHyperLink("HplNumeroEstimacion")
+ HplNumeroEstimacion.NavigateUrl = $"./RepContratosObraAvancesPartida.aspx?CveEstimacion={e.Row.DataKey("CveEstimacion")}&NumeroEstimacion={ e.Row.DataKey("NumeroEstimacion")}&CveContrato={ CveContrato }"
+
+ ' NavigateUrl='<%# Eval("CveEstimacion", "RepContratosObraAvancesPartida.aspx?CveEstimacion={0}")%>'
+ End If
+
+ End Sub
+
+ 'Protected Sub CmdConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click
+ ' CargaDatos()
+ 'End Sub
+
+
+End Class
\ No newline at end of file
diff --git a/Contratos/RepContratosObraAvancesPartida.aspx b/Contratos/RepContratosObraAvancesPartida.aspx
new file mode 100644
index 000000000..31ffcfad3
--- /dev/null
+++ b/Contratos/RepContratosObraAvancesPartida.aspx
@@ -0,0 +1,213 @@
+<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepContratosObraAvancesPartida.aspx.vb" Inherits="RepContratosObraAvancesPartida" %>
+
+<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
+
+
+
+
+
+
+
+ Reporte Contratos Avance por partida
+
+
+
+
+
+
+<%--
+
+
+