|
|
|
|
@@ -9,8 +9,8 @@ Imports System.Globalization
|
|
|
|
|
Imports GemBox.Spreadsheet
|
|
|
|
|
|
|
|
|
|
Partial Class Contratos_Default
|
|
|
|
|
Inherits ClsPaginas
|
|
|
|
|
|
|
|
|
|
Inherits ClsPaginas
|
|
|
|
|
|
|
|
|
|
#Region " PROPIEDADES "
|
|
|
|
|
Private Property CveContrato As Integer
|
|
|
|
|
Get
|
|
|
|
|
@@ -340,10 +340,10 @@ Partial Class Contratos_Default
|
|
|
|
|
Set(ByVal value As DataSet)
|
|
|
|
|
ViewState("DsDatosPedDev") = value
|
|
|
|
|
End Set
|
|
|
|
|
End Property
|
|
|
|
|
|
|
|
|
|
End Property
|
|
|
|
|
|
|
|
|
|
#End Region
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
|
|
|
|
If Not IsPostBack Then
|
|
|
|
|
CargaValoresIniciales()
|
|
|
|
|
@@ -449,8 +449,8 @@ Partial Class Contratos_Default
|
|
|
|
|
|
|
|
|
|
End If
|
|
|
|
|
|
|
|
|
|
End Sub
|
|
|
|
|
|
|
|
|
|
End Sub
|
|
|
|
|
|
|
|
|
|
#Region " CARGA VALORES INICIALES "
|
|
|
|
|
Private Sub CargaValoresIniciales()
|
|
|
|
|
CveContrato = -1
|
|
|
|
|
@@ -574,11 +574,11 @@ Partial Class Contratos_Default
|
|
|
|
|
CargaGVPresupuestos(TmpDT)
|
|
|
|
|
CargaGVPresupuestosInsumos(TmpDT)
|
|
|
|
|
LbTotalGeneral.Text = "0.00"
|
|
|
|
|
End Sub
|
|
|
|
|
End Sub
|
|
|
|
|
#End Region
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#Region " CONFIGURA TIPOS CONTRATO "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Private Sub ConfiguraTipos()
|
|
|
|
|
If Not TipoContrato.Contiene({7, 9, 13, 16, 18, 21}) Then
|
|
|
|
|
TabAF.Visible = False
|
|
|
|
|
@@ -650,10 +650,10 @@ Partial Class Contratos_Default
|
|
|
|
|
'End If
|
|
|
|
|
'UpTitulos.Update()
|
|
|
|
|
'UpGral.Update()
|
|
|
|
|
End Sub
|
|
|
|
|
|
|
|
|
|
End Sub
|
|
|
|
|
|
|
|
|
|
#End Region
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#Region " PANTALLA INICIAL"
|
|
|
|
|
Protected Sub rpCompra_CheckedChanged(sender As Object, e As EventArgs) Handles rpCompra.CheckedChanged
|
|
|
|
|
loadComboTipoContrato(False)
|
|
|
|
|
@@ -681,9 +681,9 @@ Partial Class Contratos_Default
|
|
|
|
|
Alert(ex.Message, TipoMensaje.MsgError)
|
|
|
|
|
|
|
|
|
|
End Try
|
|
|
|
|
End Sub
|
|
|
|
|
End Sub
|
|
|
|
|
#End Region
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#Region " INICIO DE PAGINA "
|
|
|
|
|
Protected Sub DdlTipoContrato_SelectedIndexChanged(sender As Object, e As EventArgs)
|
|
|
|
|
CargaTipoContrato()
|
|
|
|
|
@@ -1589,9 +1589,9 @@ Partial Class Contratos_Default
|
|
|
|
|
Else
|
|
|
|
|
' Alert("Ocurrio un error al eliminar el contrato", TipoMensaje.MsgError)
|
|
|
|
|
End If
|
|
|
|
|
End Sub
|
|
|
|
|
End Sub
|
|
|
|
|
#End Region
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#Region " TERMINAR/CANCELAR CONTRATO "
|
|
|
|
|
Protected Sub LBTerminarContrato_Click(sender As Object, e As EventArgs)
|
|
|
|
|
Dim ObjContratos As New ClsContratos
|
|
|
|
|
@@ -1615,13 +1615,13 @@ Partial Class Contratos_Default
|
|
|
|
|
Alert("El Contrato fue cancelado Correctamente.", TipoMensaje.MsgInformacion, String.Format("document.location.href=""/Contratos/Contrato.aspx?CveContrato={0}""", CveContrato))
|
|
|
|
|
End If
|
|
|
|
|
ObjContratos.Dispose()
|
|
|
|
|
End Sub
|
|
|
|
|
End Sub
|
|
|
|
|
#End Region
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#Region " TABS "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#Region " TAB: INFORMACION GENERAL"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#Region "COMBOS - INFO GENERAL"
|
|
|
|
|
Private Sub CargaProyecto()
|
|
|
|
|
CargarCentrosDeCosto(DdlProyecto, DdlSubProyectoContrato, LblProyecto, lblsubproyecto)
|
|
|
|
|
@@ -1694,20 +1694,20 @@ Partial Class Contratos_Default
|
|
|
|
|
|
|
|
|
|
CargaContratoPadre()
|
|
|
|
|
UpProyecto.Update()
|
|
|
|
|
End Sub
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
End Sub
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#End Region
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#Region " ARCHIVO "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Private Sub BtnDescargar_Click(sender As Object, e As EventArgs) Handles BtnDescargar.Click
|
|
|
|
|
DescargarArchivo()
|
|
|
|
|
End Sub
|
|
|
|
|
@@ -1774,13 +1774,13 @@ Partial Class Contratos_Default
|
|
|
|
|
If Not FileExtension = "-1" Then
|
|
|
|
|
BtnDescargar.Visible = True
|
|
|
|
|
End If
|
|
|
|
|
End Sub
|
|
|
|
|
End Sub
|
|
|
|
|
#End Region
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#End Region
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#Region " TAB: PRESUPUESTOS "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#Region "C O M B O S - PRESUPUESTOS"
|
|
|
|
|
Private Function isWhitFamily() As Boolean
|
|
|
|
|
Return (UsuarioActual.CveEmpresa = 66)
|
|
|
|
|
@@ -1798,8 +1798,8 @@ Partial Class Contratos_Default
|
|
|
|
|
DdlClasificacionInt.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa) 'GlobalDTSubFamilias(UsuarioActual.CveEmpresa)
|
|
|
|
|
DdlClasificacionInt.DataBind()
|
|
|
|
|
DdlClasificacionInt.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
|
|
|
|
End Sub
|
|
|
|
|
|
|
|
|
|
End Sub
|
|
|
|
|
|
|
|
|
|
#Region " FUNCIONALIDAD 105 "
|
|
|
|
|
Private Sub CargaPS()
|
|
|
|
|
DdlProductows.setEsWebService(UsuarioActual.Empresa.Funcionalidad(105) = "1")
|
|
|
|
|
@@ -1876,11 +1876,11 @@ Partial Class Contratos_Default
|
|
|
|
|
DdlProductowsInsumos.ddlWS.Attributes.Add("data-idClasificacion", DdlClasificacionAddInsumos.SelectedValue)
|
|
|
|
|
'End If
|
|
|
|
|
End If
|
|
|
|
|
End Sub
|
|
|
|
|
End Sub
|
|
|
|
|
#End Region
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#End Region
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#Region " TAB PRESUPUESTOS VENTAS "
|
|
|
|
|
Private Sub CargaGVPresupuestos(DtTemp As DataTable)
|
|
|
|
|
Gv.DataSource = DtTemp
|
|
|
|
|
@@ -1982,8 +1982,8 @@ Partial Class Contratos_Default
|
|
|
|
|
ContratosSecciones.Dispose()
|
|
|
|
|
|
|
|
|
|
UpGral.Update()
|
|
|
|
|
End Sub
|
|
|
|
|
|
|
|
|
|
End Sub
|
|
|
|
|
|
|
|
|
|
#Region "GV PRESUPUESTOS"
|
|
|
|
|
Protected Sub EstClick(sender As Object, e As System.EventArgs)
|
|
|
|
|
'Get the button that raised the event
|
|
|
|
|
@@ -2146,12 +2146,12 @@ Partial Class Contratos_Default
|
|
|
|
|
' Seleccionado = e.CommandArgument.ToString
|
|
|
|
|
Gv.SelectRow(e.CommandArgument.ToString.ToEntero - 1)
|
|
|
|
|
End If
|
|
|
|
|
End Sub
|
|
|
|
|
End Sub
|
|
|
|
|
#End Region
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#End Region
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#Region " TAB PRESUPUESTOS INSUMOS "
|
|
|
|
|
Private Sub CargaGVPresupuestosInsumos(DtTemp As DataTable)
|
|
|
|
|
GvInsumos.DataSource = DtTemp
|
|
|
|
|
@@ -2207,10 +2207,10 @@ Partial Class Contratos_Default
|
|
|
|
|
End If
|
|
|
|
|
|
|
|
|
|
ObjContratos.Dispose()
|
|
|
|
|
End Sub
|
|
|
|
|
|
|
|
|
|
End Sub
|
|
|
|
|
|
|
|
|
|
#Region "GV PRESUPUESTOS"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Protected Sub GVInsumos_RowDataBound(ByVal sender As Object, ByVal e As GridViewRowEventArgs) Handles GvInsumos.RowDataBound
|
|
|
|
|
|
|
|
|
|
If e.Row.RowIndex > -1 Then
|
|
|
|
|
@@ -2328,14 +2328,14 @@ Partial Class Contratos_Default
|
|
|
|
|
' Seleccionado = e.CommandArgument.ToString
|
|
|
|
|
GvInsumos.SelectRow(e.CommandArgument.ToString.ToEntero - 1)
|
|
|
|
|
End If
|
|
|
|
|
End Sub
|
|
|
|
|
End Sub
|
|
|
|
|
#End Region
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#End Region
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#Region " TAB PRESUPUESTOS INTERNOS"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Protected Sub AgregarInt_Click(sender As Object, e As EventArgs) Handles AgregarInt.Click
|
|
|
|
|
Dim Row As DataRow = TmpDT.NewRow()
|
|
|
|
|
Row("Cantidad") = TxtCantidadInt.Text.ToDouble.FormatoNumero
|
|
|
|
|
@@ -2375,12 +2375,12 @@ Partial Class Contratos_Default
|
|
|
|
|
'Alert("No se pudo agregar el detalle")
|
|
|
|
|
End If
|
|
|
|
|
ObjContratos.Dispose()
|
|
|
|
|
End Sub
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
End Sub
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#Region "GVInternos"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Protected Sub GVInt_RowEditing(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles GvInt.RowEditing
|
|
|
|
|
GvInt.EditIndex = e.NewEditIndex
|
|
|
|
|
GvInt.DataSource = TmpDT.FiltraParametros("CveTipoPresupuesto=1")
|
|
|
|
|
@@ -2462,13 +2462,13 @@ Partial Class Contratos_Default
|
|
|
|
|
' Seleccionado = e.CommandArgument.ToString
|
|
|
|
|
GvInt.SelectRow(e.CommandArgument.ToString.ToEntero - 1)
|
|
|
|
|
End If
|
|
|
|
|
End Sub
|
|
|
|
|
End Sub
|
|
|
|
|
#End Region
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#End Region
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#End Region
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#Region " TAB: REPORTE AVANCES "
|
|
|
|
|
Private Sub CargaDatosAvance()
|
|
|
|
|
If CveContrato <= 0 Then
|
|
|
|
|
@@ -2549,9 +2549,9 @@ Partial Class Contratos_Default
|
|
|
|
|
|
|
|
|
|
UpVentasAvance.Update()
|
|
|
|
|
|
|
|
|
|
End Sub
|
|
|
|
|
End Sub
|
|
|
|
|
#End Region
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#Region " TAB: REPORTE AVANCES POR DOCUMENTO "
|
|
|
|
|
Protected Sub RBLTipoDocto_SelectedIndexChanged(sender As Object, e As EventArgs)
|
|
|
|
|
CargaDatosAvancePorDocumento()
|
|
|
|
|
@@ -2595,10 +2595,10 @@ Partial Class Contratos_Default
|
|
|
|
|
e.Row.CssClass = "Totales"
|
|
|
|
|
End If
|
|
|
|
|
End If
|
|
|
|
|
End Sub
|
|
|
|
|
|
|
|
|
|
End Sub
|
|
|
|
|
|
|
|
|
|
#End Region
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#Region " TAB: CONTRATO GASTOS "
|
|
|
|
|
Private Sub MandaCorreo(Para As String, Asunto As String, Body As String)
|
|
|
|
|
Dim a As String = String.Format("{0} -- {1} ---- -->", Asunto, Para)
|
|
|
|
|
@@ -2824,9 +2824,9 @@ Partial Class Contratos_Default
|
|
|
|
|
Protected Sub LnkDescargar_Click1(sender As Object, e As EventArgs)
|
|
|
|
|
Dim gvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
|
|
|
|
|
RegistraScript($"window.location.href = '/Compras/PopUpVerFactura.aspx?P={Encripta(String.Format("OP=CONG&CVECONTRATO={0}&CVECONTRATOGASTO={1}", CveContrato, gvRow.DataKey("CveContratoGasto").ToString))}'")
|
|
|
|
|
End Sub
|
|
|
|
|
End Sub
|
|
|
|
|
#End Region
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#Region "TAB: PEDIDOS / DEVOLUCIONES"
|
|
|
|
|
Private Sub CargaDatosPedDev()
|
|
|
|
|
Dim ObjContratos As New ClsContratos
|
|
|
|
|
@@ -2936,10 +2936,10 @@ Partial Class Contratos_Default
|
|
|
|
|
|
|
|
|
|
End If
|
|
|
|
|
End If
|
|
|
|
|
End Sub
|
|
|
|
|
|
|
|
|
|
End Sub
|
|
|
|
|
|
|
|
|
|
#End Region
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#Region " TAB: ALMACEN - ACTIVOS FIJBtnAlmacenEsInterno_ClickOS "
|
|
|
|
|
Private Sub CargaInventarios()
|
|
|
|
|
|
|
|
|
|
@@ -3120,10 +3120,10 @@ Partial Class Contratos_Default
|
|
|
|
|
UpHajusteAcciones.Update()
|
|
|
|
|
UpAlmacen.Update()
|
|
|
|
|
|
|
|
|
|
End Sub
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
End Sub
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#Region " DEVOLUCION ALMACEN "
|
|
|
|
|
Protected Sub BtnDevolucionAlmacen_Click(sender As Object, e As EventArgs)
|
|
|
|
|
Dim ObjVentas As New ClsVentas
|
|
|
|
|
@@ -3160,12 +3160,12 @@ Partial Class Contratos_Default
|
|
|
|
|
LblFacturado.Text = SumaAvance.FormatoNumero
|
|
|
|
|
LblPorFacturar.Text = (LblImporte.Text.ToDouble - SumaAvance).FormatoNumero
|
|
|
|
|
|
|
|
|
|
End Sub
|
|
|
|
|
|
|
|
|
|
End Sub
|
|
|
|
|
|
|
|
|
|
#End Region
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#End Region
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#Region "TAB SISTEMA"
|
|
|
|
|
Protected Sub ChkPermitirAvance_CheckedChanged(sender As Object, e As EventArgs)
|
|
|
|
|
Dim ObjContrato As New ClsContratos
|
|
|
|
|
@@ -3183,11 +3183,11 @@ Partial Class Contratos_Default
|
|
|
|
|
ObjContrato.Dispose()
|
|
|
|
|
Alert("Se ha permitido estimar en la sección", TipoMensaje.MsgInformacion)
|
|
|
|
|
CargaDatos()
|
|
|
|
|
End Sub
|
|
|
|
|
End Sub
|
|
|
|
|
#End Region
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#End Region
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#Region " BITACORA "
|
|
|
|
|
Private Sub guardarBitacora(Descripcion As String)
|
|
|
|
|
Dim ObjEventoBitacora As New ClsOIEventos
|
|
|
|
|
@@ -3300,10 +3300,10 @@ Partial Class Contratos_Default
|
|
|
|
|
txtFileBit.getfiles().Archivos.Clear()
|
|
|
|
|
|
|
|
|
|
txtFileBit.Text = ""
|
|
|
|
|
End Sub
|
|
|
|
|
|
|
|
|
|
End Sub
|
|
|
|
|
|
|
|
|
|
#End Region
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#Region "SUBIR EXCEL"
|
|
|
|
|
Public Sub DescargarFormato()
|
|
|
|
|
Dim Directorio As String = ModExtensiones.DirectorioBaseEmpresas & "Empresas\Grales\Formatos\FormatoContrato.xlsx"
|
|
|
|
|
@@ -3325,7 +3325,7 @@ Partial Class Contratos_Default
|
|
|
|
|
End Sub
|
|
|
|
|
Private Function ReadExcelFile(ByVal flatFilePath As String, ByVal firstRowHasHeaders As Boolean) As DataTable
|
|
|
|
|
SpreadsheetInfo.SetLicense(ModExtensiones.SerialGemBoxSpreadsheet)
|
|
|
|
|
Dim excelFile As ExcelFile = ExcelFile.Load(flatFilePath)
|
|
|
|
|
Dim excelFile As ExcelFile = excelFile.Load(flatFilePath)
|
|
|
|
|
|
|
|
|
|
Dim unnamed As Integer = 0
|
|
|
|
|
Dim cols As Integer
|
|
|
|
|
@@ -3560,11 +3560,11 @@ Partial Class Contratos_Default
|
|
|
|
|
Else
|
|
|
|
|
Alert("No existe el archivo. Favor de subir un archivo excel a la plataforma.", TipoMensaje.MsgError)
|
|
|
|
|
End If
|
|
|
|
|
End Sub
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
End Sub
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#End Region
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#Region " GPS "
|
|
|
|
|
Private Sub CargaCuentasEquipos()
|
|
|
|
|
Dim GPS As New ClsGPS
|
|
|
|
|
@@ -3719,11 +3719,11 @@ Partial Class Contratos_Default
|
|
|
|
|
End If
|
|
|
|
|
ImprimirPDF("Empresas/Grales/Formatos/Contrato.rdlc", dt, params, $"Contrato-{Titulo}", Formato:="PDF")
|
|
|
|
|
|
|
|
|
|
End Sub
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
End Sub
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#End Region
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#Region "I M P R E S I O N D E G A S T O S"
|
|
|
|
|
Protected Sub ImgImprimirGastos_Click(sender As Object, e As EventArgs) Handles LBImprimirGastos.Click
|
|
|
|
|
GenerarPDFGastos()
|
|
|
|
|
@@ -3765,10 +3765,10 @@ Partial Class Contratos_Default
|
|
|
|
|
TxtFecha.Text = ""
|
|
|
|
|
UpAgregarGastos.Update()
|
|
|
|
|
RegistraScript("$('#ModalAgregarGastos').modal();")
|
|
|
|
|
End Sub
|
|
|
|
|
|
|
|
|
|
End Sub
|
|
|
|
|
|
|
|
|
|
#End Region
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#Region "I M P R E S I O N D E S U M I N I S T R O S"
|
|
|
|
|
Protected Sub ImgImprimirSuministros_Click(sender As Object, e As EventArgs) Handles LbImprimirSuministros.Click
|
|
|
|
|
GenerarPDFSuministros()
|
|
|
|
|
@@ -3797,9 +3797,9 @@ Partial Class Contratos_Default
|
|
|
|
|
End If
|
|
|
|
|
Dim Nombre As String = If(LtlTitulo.Text.Length > 20, LtlTitulo.Text.Substring(0, 20), LtlTitulo.Text)
|
|
|
|
|
ImprimirPDF("Empresas/Grales/Formatos/RepContratoSuministros.rdlc", dt, params, $"{Nombre}-Suministros", Formato:=Formato)
|
|
|
|
|
End Sub
|
|
|
|
|
End Sub
|
|
|
|
|
#End Region
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#Region "I M P R E S I O N D E A V A N C E "
|
|
|
|
|
Private Sub lbImprimirAvance_Click(sender As Object, e As EventArgs) Handles lbImprimirAvance.Click
|
|
|
|
|
GenerarPDFAvance()
|
|
|
|
|
@@ -3829,9 +3829,9 @@ Partial Class Contratos_Default
|
|
|
|
|
End If
|
|
|
|
|
Dim Nombre As String = If(LtlTitulo.Text.Length > 20, LtlTitulo.Text.Substring(0, 20), LtlTitulo.Text)
|
|
|
|
|
ImprimirPDF("Empresas/Grales/Formatos/ContratoAvance.rdlc", dt, params, $"{Nombre}-Avance", Formato:=Formato)
|
|
|
|
|
End Sub
|
|
|
|
|
End Sub
|
|
|
|
|
#End Region
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#Region "I M P R E S I O N D E P R E S U P U E S T O "
|
|
|
|
|
Private Sub lLbImprimirPresupuesto_Click(sender As Object, e As EventArgs) Handles LbImprimirPresupuesto.Click
|
|
|
|
|
GenerarPDFPPresupuesto()
|
|
|
|
|
@@ -3861,9 +3861,9 @@ Partial Class Contratos_Default
|
|
|
|
|
End If
|
|
|
|
|
Dim Nombre As String = If(LtlTitulo.Text.Length > 20, LtlTitulo.Text.Substring(0, 20), LtlTitulo.Text)
|
|
|
|
|
ImprimirPDF("Empresas/Grales/Formatos/RepContratoPresupuestos.rdlc", dt, params, $"{Nombre}-Presupuestos", Formato:=Formato)
|
|
|
|
|
End Sub
|
|
|
|
|
End Sub
|
|
|
|
|
#End Region
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#Region "I M P R E S I O N D E A C T I V O S F I J O S "
|
|
|
|
|
Private Sub LbImprmirAF_Click(sender As Object, e As EventArgs) Handles LbImprmirAF.Click
|
|
|
|
|
GenerarPDFActivosFijos()
|
|
|
|
|
@@ -3915,11 +3915,11 @@ Partial Class Contratos_Default
|
|
|
|
|
End If
|
|
|
|
|
Dim Nombre As String = If(LtlTitulo.Text.Length > 20, LtlTitulo.Text.Substring(0, 20), LtlTitulo.Text)
|
|
|
|
|
ImprimirPDF("Empresas/Grales/Formatos/RepContratoActivosFijos.rdlc", dt, params, $"{Nombre}-ActivosFijos", Formato:=Formato)
|
|
|
|
|
End Sub
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
End Sub
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#End Region
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#Region " IMPRIMIR DOCUMENTO - SABE "
|
|
|
|
|
Public Sub DescarFormato(documento As String)
|
|
|
|
|
|
|
|
|
|
@@ -3996,12 +3996,12 @@ Partial Class Contratos_Default
|
|
|
|
|
Protected Sub BtnImprimirC_Click(sender As Object, e As EventArgs) Handles liImprimir.Click
|
|
|
|
|
Dim docx As String = DtPlantillasContratos.FiltroPrimeroValor("URL", $"CveContratoPlantilla = {DdlPlantillaContrato.SelectedValue}")
|
|
|
|
|
DescarFormato(docx)
|
|
|
|
|
End Sub
|
|
|
|
|
End Sub
|
|
|
|
|
#End Region
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#End Region
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#Region "CREAR A PARTIR DE"
|
|
|
|
|
Private Sub BtnAgregarContratoHijo_Click(sender As Object, e As EventArgs) Handles BtnAgregarContratoHijo.Click
|
|
|
|
|
Dim TieneError = False
|
|
|
|
|
@@ -4133,97 +4133,97 @@ Partial Class Contratos_Default
|
|
|
|
|
End If
|
|
|
|
|
|
|
|
|
|
Return TieneError
|
|
|
|
|
End Function
|
|
|
|
|
|
|
|
|
|
'Private Sub AgregarMovimientosAFHijo(CveContratoHijo As Integer)
|
|
|
|
|
' 'BUSCA LOS ACTIVOS FIJOS VIGENTES
|
|
|
|
|
' Dim Dt As DataTable = DtMovimientos.FiltraParametros($"(CodigoPS IS NULL AND Cantidad - CantidadDevolucion > 0) OR (CodigoPS IS NOT NULL AND SerieFolioDevolucion IS NULL)")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
' Dim DtVentas As DataTable = Dt.FiltraParametros($"No = 0")
|
|
|
|
|
|
|
|
|
|
' Dim CveAlmacenOrigen As Integer = DdlAlmacenOrigen.SelectedValue.ToEntero
|
|
|
|
|
' Dim CveAlmacenDestino As Integer = DdlAlmacenDestino.SelectedValue.ToEntero
|
|
|
|
|
' Dim CveMoneda As Integer = DdlMoneda.SelectedValue.ToEntero
|
|
|
|
|
|
|
|
|
|
' Dim CveConceptoSalida As Integer = 8
|
|
|
|
|
' Dim CveConceptoEntrada As Integer = 9
|
|
|
|
|
' Dim CveCliente As Integer = If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, DdlCliente.SelectedValue.ToEntero)
|
|
|
|
|
|
|
|
|
|
' Dim ObjInv As New ClsInventarios()
|
|
|
|
|
' Try
|
|
|
|
|
' ObjInv.IniciaTransacSQL()
|
|
|
|
|
' Dim TieneError As Boolean = False
|
|
|
|
|
|
|
|
|
|
' For Each Dr As DataRow In DtVentas.Rows
|
|
|
|
|
|
|
|
|
|
' Dim CveVentaAlmacen As Integer = Dr("CveVenta").ToString.ToEntero
|
|
|
|
|
|
|
|
|
|
' 'Movimiento de salida por traspaso al almacen destino
|
|
|
|
|
' Dim CveMovimientoSalida As Integer = ObjInv.AddMovimiento(CveAlmacenDestino, CveConceptoSalida, CveMoneda, Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, DdlSubProyectoContrato.SelectedValue.ToEntero, -1, CveContrato:=CveContrato, CveCliente:=CveCliente, CveAlmacenDestino:=CveAlmacenOrigen)
|
|
|
|
|
|
|
|
|
|
' If CveMovimientoSalida > 0 Then
|
|
|
|
|
' For Each Row As DataRow In Dt.FiltraParametros($"CvePS IS NOT NULL AND CveVenta = {CveVentaAlmacen}").Rows
|
|
|
|
|
|
|
|
|
|
' Dim Cantidad As Double = Row("Cantidad").ToString.ToDouble
|
|
|
|
|
' Dim CvePS As Integer = Row("CvePS").ToString.ToEntero
|
|
|
|
|
' Dim CveVentaDetalle As Integer = Row("CveVentaDetalle").ToString.ToEntero
|
|
|
|
|
' Dim CveUnidadMedida As Integer = Row("CveUnidadMedida").ToString.ToEntero
|
|
|
|
|
' Dim PU As Double = Row("PU").ToString.ToDouble
|
|
|
|
|
|
|
|
|
|
' If Not ObjInv.AddMovimientoDetalle(CveMovimientoSalida, Cantidad, CveUnidadMedida, CvePS, PU, -1) Then
|
|
|
|
|
' TieneError = True
|
|
|
|
|
' Exit For
|
|
|
|
|
' End If
|
|
|
|
|
' Next
|
|
|
|
|
' Else
|
|
|
|
|
' TieneError = True
|
|
|
|
|
' Exit For
|
|
|
|
|
' End If
|
|
|
|
|
|
|
|
|
|
' 'Movimeinto de entrada por traspaso al almacen origen
|
|
|
|
|
' Dim CveMovimientoEntrada As Integer = ObjInv.AddMovimiento(CveAlmacenOrigen, CveConceptoEntrada, CveMoneda, Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, DdlSubProyectoContrato.SelectedValue.ToEntero, -1, CveContrato:=CveContratoHijo, CveCliente:=CveCliente, CveAlmacenDestino:=CveAlmacenDestino)
|
|
|
|
|
|
|
|
|
|
' If CveMovimientoEntrada > 0 Then
|
|
|
|
|
' For Each Row As DataRow In Dt.FiltraParametros($"CvePS IS NOT NULL AND CveVenta = {CveVentaAlmacen}").Rows
|
|
|
|
|
|
|
|
|
|
' Dim Cantidad As Double = Row("Cantidad").ToString.ToDouble
|
|
|
|
|
' Dim CvePS As Integer = Row("CvePS").ToString.ToEntero
|
|
|
|
|
' Dim CveVentaDetalle As Integer = Row("CveVentaDetalle").ToString.ToEntero
|
|
|
|
|
' Dim CveUnidadMedida As Integer = Row("CveUnidadMedida").ToString.ToEntero
|
|
|
|
|
' Dim PU As Double = Row("PU").ToString.ToDouble
|
|
|
|
|
|
|
|
|
|
' If Not ObjInv.AddMovimientoDetalle(CveMovimientoEntrada, Cantidad, CveUnidadMedida, CvePS, PU, -1) Then
|
|
|
|
|
' TieneError = True
|
|
|
|
|
' Exit For
|
|
|
|
|
' End If
|
|
|
|
|
' Next
|
|
|
|
|
' Else
|
|
|
|
|
' TieneError = True
|
|
|
|
|
' Exit For
|
|
|
|
|
' End If
|
|
|
|
|
|
|
|
|
|
' Next
|
|
|
|
|
' If TieneError Then
|
|
|
|
|
' Alert("Ocurrió un error al traspasar los activos fijos", TipoMensaje.MsgAdvertencia)
|
|
|
|
|
' ObjInv.RollBack()
|
|
|
|
|
' Else
|
|
|
|
|
' ObjInv.Commit()
|
|
|
|
|
' End If
|
|
|
|
|
|
|
|
|
|
' Catch ex As Exception
|
|
|
|
|
' ObjInv.RollBack()
|
|
|
|
|
' OnError("Ocurrió un error al traspasar los activos fijos", ex)
|
|
|
|
|
' End Try
|
|
|
|
|
' ObjInv.Dispose()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
'End Sub
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
End Function
|
|
|
|
|
|
|
|
|
|
'Private Sub AgregarMovimientosAFHijo(CveContratoHijo As Integer)
|
|
|
|
|
' 'BUSCA LOS ACTIVOS FIJOS VIGENTES
|
|
|
|
|
' Dim Dt As DataTable = DtMovimientos.FiltraParametros($"(CodigoPS IS NULL AND Cantidad - CantidadDevolucion > 0) OR (CodigoPS IS NOT NULL AND SerieFolioDevolucion IS NULL)")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
' Dim DtVentas As DataTable = Dt.FiltraParametros($"No = 0")
|
|
|
|
|
|
|
|
|
|
' Dim CveAlmacenOrigen As Integer = DdlAlmacenOrigen.SelectedValue.ToEntero
|
|
|
|
|
' Dim CveAlmacenDestino As Integer = DdlAlmacenDestino.SelectedValue.ToEntero
|
|
|
|
|
' Dim CveMoneda As Integer = DdlMoneda.SelectedValue.ToEntero
|
|
|
|
|
|
|
|
|
|
' Dim CveConceptoSalida As Integer = 8
|
|
|
|
|
' Dim CveConceptoEntrada As Integer = 9
|
|
|
|
|
' Dim CveCliente As Integer = If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, DdlCliente.SelectedValue.ToEntero)
|
|
|
|
|
|
|
|
|
|
' Dim ObjInv As New ClsInventarios()
|
|
|
|
|
' Try
|
|
|
|
|
' ObjInv.IniciaTransacSQL()
|
|
|
|
|
' Dim TieneError As Boolean = False
|
|
|
|
|
|
|
|
|
|
' For Each Dr As DataRow In DtVentas.Rows
|
|
|
|
|
|
|
|
|
|
' Dim CveVentaAlmacen As Integer = Dr("CveVenta").ToString.ToEntero
|
|
|
|
|
|
|
|
|
|
' 'Movimiento de salida por traspaso al almacen destino
|
|
|
|
|
' Dim CveMovimientoSalida As Integer = ObjInv.AddMovimiento(CveAlmacenDestino, CveConceptoSalida, CveMoneda, Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, DdlSubProyectoContrato.SelectedValue.ToEntero, -1, CveContrato:=CveContrato, CveCliente:=CveCliente, CveAlmacenDestino:=CveAlmacenOrigen)
|
|
|
|
|
|
|
|
|
|
' If CveMovimientoSalida > 0 Then
|
|
|
|
|
' For Each Row As DataRow In Dt.FiltraParametros($"CvePS IS NOT NULL AND CveVenta = {CveVentaAlmacen}").Rows
|
|
|
|
|
|
|
|
|
|
' Dim Cantidad As Double = Row("Cantidad").ToString.ToDouble
|
|
|
|
|
' Dim CvePS As Integer = Row("CvePS").ToString.ToEntero
|
|
|
|
|
' Dim CveVentaDetalle As Integer = Row("CveVentaDetalle").ToString.ToEntero
|
|
|
|
|
' Dim CveUnidadMedida As Integer = Row("CveUnidadMedida").ToString.ToEntero
|
|
|
|
|
' Dim PU As Double = Row("PU").ToString.ToDouble
|
|
|
|
|
|
|
|
|
|
' If Not ObjInv.AddMovimientoDetalle(CveMovimientoSalida, Cantidad, CveUnidadMedida, CvePS, PU, -1) Then
|
|
|
|
|
' TieneError = True
|
|
|
|
|
' Exit For
|
|
|
|
|
' End If
|
|
|
|
|
' Next
|
|
|
|
|
' Else
|
|
|
|
|
' TieneError = True
|
|
|
|
|
' Exit For
|
|
|
|
|
' End If
|
|
|
|
|
|
|
|
|
|
' 'Movimeinto de entrada por traspaso al almacen origen
|
|
|
|
|
' Dim CveMovimientoEntrada As Integer = ObjInv.AddMovimiento(CveAlmacenOrigen, CveConceptoEntrada, CveMoneda, Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, DdlSubProyectoContrato.SelectedValue.ToEntero, -1, CveContrato:=CveContratoHijo, CveCliente:=CveCliente, CveAlmacenDestino:=CveAlmacenDestino)
|
|
|
|
|
|
|
|
|
|
' If CveMovimientoEntrada > 0 Then
|
|
|
|
|
' For Each Row As DataRow In Dt.FiltraParametros($"CvePS IS NOT NULL AND CveVenta = {CveVentaAlmacen}").Rows
|
|
|
|
|
|
|
|
|
|
' Dim Cantidad As Double = Row("Cantidad").ToString.ToDouble
|
|
|
|
|
' Dim CvePS As Integer = Row("CvePS").ToString.ToEntero
|
|
|
|
|
' Dim CveVentaDetalle As Integer = Row("CveVentaDetalle").ToString.ToEntero
|
|
|
|
|
' Dim CveUnidadMedida As Integer = Row("CveUnidadMedida").ToString.ToEntero
|
|
|
|
|
' Dim PU As Double = Row("PU").ToString.ToDouble
|
|
|
|
|
|
|
|
|
|
' If Not ObjInv.AddMovimientoDetalle(CveMovimientoEntrada, Cantidad, CveUnidadMedida, CvePS, PU, -1) Then
|
|
|
|
|
' TieneError = True
|
|
|
|
|
' Exit For
|
|
|
|
|
' End If
|
|
|
|
|
' Next
|
|
|
|
|
' Else
|
|
|
|
|
' TieneError = True
|
|
|
|
|
' Exit For
|
|
|
|
|
' End If
|
|
|
|
|
|
|
|
|
|
' Next
|
|
|
|
|
' If TieneError Then
|
|
|
|
|
' Alert("Ocurrió un error al traspasar los activos fijos", TipoMensaje.MsgAdvertencia)
|
|
|
|
|
' ObjInv.RollBack()
|
|
|
|
|
' Else
|
|
|
|
|
' ObjInv.Commit()
|
|
|
|
|
' End If
|
|
|
|
|
|
|
|
|
|
' Catch ex As Exception
|
|
|
|
|
' ObjInv.RollBack()
|
|
|
|
|
' OnError("Ocurrió un error al traspasar los activos fijos", ex)
|
|
|
|
|
' End Try
|
|
|
|
|
' ObjInv.Dispose()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
'End Sub
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#End Region
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#Region "FIANZAS"
|
|
|
|
|
Protected Sub LimpiarCamposModalFianzas()
|
|
|
|
|
txtFolioFianza.Text = ""
|
|
|
|
|
@@ -4440,10 +4440,10 @@ Partial Class Contratos_Default
|
|
|
|
|
ScriptManager.GetCurrent(Me).RegisterPostBackControl(lb)
|
|
|
|
|
End If
|
|
|
|
|
End If
|
|
|
|
|
End Sub
|
|
|
|
|
|
|
|
|
|
End Sub
|
|
|
|
|
|
|
|
|
|
#End Region
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#Region "CONVENIO DE PRECIO FIJO"
|
|
|
|
|
Protected Sub CargaConvenioPrecioFijo()
|
|
|
|
|
'12/04/2018 - oculta campo de licitacion, portlet finanzas y campo tipo de garantia
|
|
|
|
|
@@ -4452,9 +4452,9 @@ Partial Class Contratos_Default
|
|
|
|
|
DivTipoGarantia.Visible = False
|
|
|
|
|
|
|
|
|
|
UpGral.Update()
|
|
|
|
|
End Sub
|
|
|
|
|
End Sub
|
|
|
|
|
#End Region
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#Region "NOMENCLATURA CONTRATOS"
|
|
|
|
|
Protected Sub GetNoContratoNuevo()
|
|
|
|
|
Dim ObjContratos As New ClsContratos()
|
|
|
|
|
@@ -4486,9 +4486,9 @@ Partial Class Contratos_Default
|
|
|
|
|
End If
|
|
|
|
|
|
|
|
|
|
ObjContratos.Dispose()
|
|
|
|
|
End Sub
|
|
|
|
|
End Sub
|
|
|
|
|
#End Region
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#Region "IMPUESOS LOCALES"
|
|
|
|
|
Protected Sub ChkImpuestosLocales_CheckedChanged(sender As Object, e As EventArgs)
|
|
|
|
|
If ChkImpuestosLocales.Checked Then
|
|
|
|
|
|