From c46fec2b0562e0893cb09a037da84af4129bd6a2 Mon Sep 17 00:00:00 2001 From: rrene Date: Tue, 12 Oct 2021 12:29:18 -0700 Subject: [PATCH 01/24] =?UTF-8?q?se=20agreg=C3=B3=20qe=20el=20mporte=20fue?= =?UTF-8?q?ra=20<>=20a=20cero=20y=20no=20solo=20mayor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Bancos/PolizaCheque.aspx.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Bancos/PolizaCheque.aspx.vb b/Bancos/PolizaCheque.aspx.vb index 4c7177d1f..84d9822fa 100644 --- a/Bancos/PolizaCheque.aspx.vb +++ b/Bancos/PolizaCheque.aspx.vb @@ -912,7 +912,7 @@ Partial Class Bancos_PolizaCheque CveProveedor = gvr.DataKey("CveProveedor").ToEntero If HdnCveProveedor.Value.ToEntero > 0 Then CveProveedor = HdnCveProveedor.Value.ToEntero - If Importe > 0 Then + If Importe <> 0 Then 'If ChkContabilizar.Checked AndAlso UsuarioActual.Empresa.UsaContabilidad Then ' If Not Conta.AddMovimiento(IDPoliza, gvr.DataKey("IDCuenta").ToEntero, TipoMovto, Importe, gvr.FCLiteral("LtlReferencia").Text, gvr.FCTextBox("TxtConcepto").Text, 0, TxtFechaDocumento.Text.ToDate, "") Then ' MsgError = "No se pudo insertar movimiento contable" From 6ef5241747bf4462bc79f67dfbc42b4fc77eed33 Mon Sep 17 00:00:00 2001 From: rrene Date: Tue, 12 Oct 2021 12:29:46 -0700 Subject: [PATCH 02/24] usuario de ricardo, vea inconsistencias --- Inicio.aspx.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Inicio.aspx.vb b/Inicio.aspx.vb index e9826cf74..3fa330bd6 100644 --- a/Inicio.aspx.vb +++ b/Inicio.aspx.vb @@ -200,7 +200,7 @@ Partial Class Inicio Dim EsDEV = Not UsuarioActual.Empresa.FacturaProduccion If Not EsDEV Then - If UsuarioActual.CveUsuario.Contiene(93, 1425, 2, 1606, 1472, 100) Then MuestraInconsistencias() '100 + If UsuarioActual.CveUsuario.Contiene(93, 1425, 2, 1606, 1472, 100, 1918) Then MuestraInconsistencias() '100 End If 'MUESTRA CALENDARIO SOLO ROL ADMINISTRADOR-AD From 675d64cc1ea24605ffb0928fc282f6472a879731 Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 13 Oct 2021 06:17:08 -0700 Subject: [PATCH 03/24] -addmovimiento con HHMMSS --- App_Code/ClsInventarios.vb | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/App_Code/ClsInventarios.vb b/App_Code/ClsInventarios.vb index 1fd262498..a66caee5c 100644 --- a/App_Code/ClsInventarios.vb +++ b/App_Code/ClsInventarios.vb @@ -965,7 +965,7 @@ Public Class ClsInventarios CveVenta As Integer, CveSubProyecto As Integer, CveActivoFijo As Integer, Optional CveOS As Integer = -1, Optional CvePersonal As Integer = -1, Optional IDPoliza As Integer = -1, Optional CveUsuarioResponsable As Integer = -1, Optional CveConsignacion As Integer = -1, Optional Guia As String = "", Optional CveAlmacenDestino As Integer = -1, Optional Observaciones As String = "", Optional Recibio As String = "", Optional CveMovimientoRelacionado As Integer = -1, Optional TipoCambio As Double = -1, Optional CveVendedor As Integer = -1, Optional CveCliente As Integer = -1, Optional MovimientoFijo As Boolean = False, Optional CveContrato As Integer = -1, - Optional CveProveedor As Integer = -1, Optional Remision As String = "", Optional CveClienteSucursal As Integer = -1, Optional DepartamentoEntrega As String = "", Optional PedidoContrato As String = "", Optional GastoIndirecto As Double = -1, Optional CveChofer As Integer = -1, Optional Placa As String = "", + Optional CveProveedor As Integer = -1, Optional Remision As String = "", Optional CveClienteSucursal As Integer = -1, Optional DepartamentoEntrega As String = "", Optional PedidoContrato As String = "", Optional GastoIndirecto As Double = -1, Optional CveChofer As Integer = -1, Optional CveCamion As Integer = -1, Optional Placa As String = "", Optional FechaEntrega As String = "", Optional EspecifUnidad As String = "", Optional ResponsableCarga As String = "", Optional ResponsableRecibio As String = "", Optional Identificacion As String = "", Optional Domicilio As String = "", Optional Telefono As String = "", Optional Ciudad As String = "", Optional Licencia As String = "", Optional Modulo As String = "", Optional CveOP As Integer = -1) As Integer @@ -973,12 +973,16 @@ Public Class ClsInventarios DataAdapter("PA_Inv_MovimientosAdd") + If FechaMovto.Hour = 0 AndAlso FechaMovto.Minute = 0 AndAlso FechaMovto.Second = 0 Then + FechaMovto = String.Format("{0} {1}:{2}:{3}", FechaMovto.ToShortDateString, Now.Hour, Now.Minute, Now.Second).ToDateTime + End If + With SqlAdapter.SelectCommand.Parameters .Add("@CveAlmacen", SqlDbType.Int).Value = CveAlmacen .Add("@CveConcepto", SqlDbType.Int).Value = CveConcepto .Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda '.Add("@FechaMovto", SqlDbType.DateTime).Value = DateTime.ParseExact(FechaMovto, "yyyy/MM/dd HH:mm", Nothing) - .Add("@FechaMovto", SqlDbType.DateTime).Value = String.Format("{0} {1}:{2}:{3}", FechaMovto.ToShortDateString, Now.Hour, Now.Minute, Now.Second).ToDateTime + .Add("@FechaMovto", SqlDbType.DateTime).Value = FechaMovto .Add("@Folio", SqlDbType.Int).Value = tFolio .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa @@ -1010,6 +1014,7 @@ Public Class ClsInventarios .Add("@PedidoContrato", SqlDbType.VarChar).Value = PedidoContrato .Add("@GastoIndirecto", SqlDbType.Money).Value = GastoIndirecto .Add("@CveChofer", SqlDbType.Int).Value = CveChofer + .Add("@CveCamion", SqlDbType.Int).Value = CveCamion .Add("@Placa", SqlDbType.VarChar).Value = Placa .Add("@FechaEntrega", SqlDbType.VarChar).Value = FechaEntrega .Add("@EspecifUnidad", SqlDbType.VarChar).Value = EspecifUnidad From b69d7e436cb5b9d5550e5a447e196628d2422167 Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 13 Oct 2021 06:17:17 -0700 Subject: [PATCH 04/24] -- ajustar cantidad en partida --- App_Code/ClsOC.vb | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/App_Code/ClsOC.vb b/App_Code/ClsOC.vb index bd1832379..a2a007864 100644 --- a/App_Code/ClsOC.vb +++ b/App_Code/ClsOC.vb @@ -988,6 +988,24 @@ Public Class ClsOC End Try Return Retorno End Function + + Public Function UpdateOrdenCompraDetalleDivideCantidad(CveOrdenCompra As Integer, CveOrdenCompraDetalle As Integer, Cantidad As Decimal, CveUsuarioModifico As Integer) As Boolean + Dim Retorno As Boolean = False + DataAdapter("PA_OC_OrdenesCompraDetalleDivideCantidadUpdate") + With SqlAdapter.SelectCommand.Parameters + .Add("@CveOrdenCompra", SqlDbType.Int).Value = CveOrdenCompra + .Add("@CveOrdenCompraDetalle", SqlDbType.Int).Value = CveOrdenCompraDetalle + .Add("@Cantidad", SqlDbType.Decimal).Value = Cantidad + .Add("@CveUsuarioModifico", SqlDbType.Int).Value = CveUsuarioModifico + End With + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al actualizar la Orden de Compra Detalle.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + Return Retorno + End Function Public Function UpdateOrdenCompraMoneda(CveOrdenCompra As Integer, CveEmpresa As Integer, CveMoneda As Integer, CveUsuarioModifico As Integer) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_OC_OrdenesCompraMonedaUpdate") From e04af71626bdf2559c910731d632b8f0e88cef31 Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 13 Oct 2021 06:17:36 -0700 Subject: [PATCH 05/24] fecha en registro de almacen --- General/SaldosIniciales.aspx | 11 +++++++- General/SaldosIniciales.aspx.vb | 49 +++++++++++++++++++-------------- 2 files changed, 39 insertions(+), 21 deletions(-) diff --git a/General/SaldosIniciales.aspx b/General/SaldosIniciales.aspx index 6d8b0d9b6..83a5f7055 100644 --- a/General/SaldosIniciales.aspx +++ b/General/SaldosIniciales.aspx @@ -50,7 +50,16 @@ - +
+
+ Fecha: +
+ Concepto: + + Carga Inicial + Salida Almacen + +
diff --git a/General/SaldosIniciales.aspx.vb b/General/SaldosIniciales.aspx.vb index ca07acd2c..4d9c3b474 100644 --- a/General/SaldosIniciales.aspx.vb +++ b/General/SaldosIniciales.aspx.vb @@ -1774,37 +1774,46 @@ Partial Class General_SaldosIniciales Dim contadorMovimientos As Integer = 0 Dim listadoMovimientos As String = "" Dim mensajeError As String = "" + Dim Fecha As DateTime = (TxtFecha.Text).ToDate Try For Each almacenSinRepetir As DataRow In dt.FiltraParametros("Almacen <> ''", DistinctColumns:={"Almacen"}).Rows - Dim almacenActual As String = almacenSinRepetir("Almacen").ToString + Dim almacenActual As String = almacenSinRepetir("Almacen").ToString.Trim 'Dim CveAlmacen As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveAlmacen", $"Almacen = '{almacenActual}'").ToEntero Dim CveAlmacen As Integer = AlmacenRef.FiltroPrimeroValor("CveAlmacen", $"Almacen = '{almacenActual}'").ToEntero - Dim movimientoCabecera As Integer = ObjMovimientos.AddMovimiento(CveAlmacen, 1, 1, Date.Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1) - listadoMovimientos += $"movimiento con folio {ObjMovimientos.Folio}
" If CveAlmacen > 0 Then - contadorMovimientos += 1 - For Each nuevaEntrada As DataRow In dt.FiltraParametros($"Almacen = '{almacenActual}'").Rows - Dim RowPS As DataRow = ProductosServiciosRef.FiltroPrimero($"Codigo = '{nuevaEntrada("CodigoPS")}' AND CveEmpresa = {UsuarioActual.CveEmpresa}") - If RowPS IsNot Nothing Then - Dim CvePS As Integer = RowPS("CvePS").ToString().ToEntero - Dim CveUM As Integer = RowPS("CveUnidadMedida").ToString().ToEntero - If CveUM > 0 Then - Dim Cantidad As Decimal = nuevaEntrada("Existencia").ToString.ToDecimal - Dim Valor As Decimal = nuevaEntrada("Valor").ToString.ToDecimal + Dim movimientoCabecera As Integer = ObjMovimientos.AddMovimiento(CveAlmacen, DdlConceptoAlmacen.SelectedValue.ToEntero, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1) + listadoMovimientos += $"movimiento con folio {ObjMovimientos.Folio}
" + If movimientoCabecera > 0 Then - If Not ObjMovimientos.AddMovimientoDetalle(movimientoCabecera, Cantidad, CveUM, CvePS, (Valor / Cantidad), -1, -1) Then - mensajeError = "No se logró generar el detalle del movimiento" + + contadorMovimientos += 1 + For Each nuevaEntrada As DataRow In dt.FiltraParametros($"Almacen = '{almacenActual}'").Rows + Dim RowPS As DataRow = ProductosServiciosRef.FiltroPrimero($"Codigo = '{nuevaEntrada("CodigoPS")}' AND CveEmpresa = {UsuarioActual.CveEmpresa}") + If RowPS IsNot Nothing Then + Dim CvePS As Integer = RowPS("CvePS").ToString().ToEntero + Dim CveUM As Integer = RowPS("CveUnidadMedida").ToString().ToEntero + If CveUM > 0 Then + Dim Cantidad As Decimal = nuevaEntrada("Existencia").ToString.ToDecimal + Dim Valor As Decimal = nuevaEntrada("Valor").ToString.ToDecimal + + If Not ObjMovimientos.AddMovimientoDetalle(movimientoCabecera, Cantidad, CveUM, CvePS, (Valor / Cantidad), -1, -1) Then + mensajeError = "No se logró generar el detalle del movimiento" + Throw New Exception() + End If + Else + mensajeError = $"La unidad de medida no se reconoce para el producto servicio:{nuevaEntrada("CodigoPS")}" Throw New Exception() End If Else - mensajeError = $"La unidad de medida no se reconoce para el producto servicio:{nuevaEntrada("CodigoPS")}" + mensajeError = $"No se encontró el producto o servicio con código ""{nuevaEntrada("CodigoPS")}""" Throw New Exception() End If - Else - mensajeError = $"No se encontró el producto o servicio con código ""{nuevaEntrada("CodigoPS")}""" - Throw New Exception() - End If - Next + Next + Else + mensajeError = $"No se registró el encabezado ""{almacenActual}""" + Throw New Exception() + Exit For + End If Else mensajeError = $"No se encontró el almacén con nombre ""{almacenActual}""" Throw New Exception() From cbd6f2cd6d85ad7652f8871b04b1a57d2246574c Mon Sep 17 00:00:00 2001 From: JORGE LUIS CAUDILLO ESPARZA Date: Wed, 13 Oct 2021 09:25:38 -0700 Subject: [PATCH 06/24] --- Nomina/Nomina.aspx.cs | 1 + RH/Personal.aspx | 2 +- vwd.webinfo | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Nomina/Nomina.aspx.cs b/Nomina/Nomina.aspx.cs index 2dbb9bda8..35c32faf3 100644 --- a/Nomina/Nomina.aspx.cs +++ b/Nomina/Nomina.aspx.cs @@ -437,6 +437,7 @@ public partial class Nomina_Nomina2 : ClsPaginas LnkProvisionNomina.Visible = CvePrePolizaProvision > 0; LnkProvisionNomina.NavigateUrl = $"../Contabilidad/RegPrePoliza.aspx?CvePrePoliza={CvePrePolizaProvision}"; LnkProvisionNominaAsimilados.Visible = CvePrePolizaProvisionAsimilados > 0; + LnkProvisionNominaAsimilados.NavigateUrl = $"../Contabilidad/RegPrePoliza.aspx?CvePrePoliza={CvePrePolizaProvisionAsimilados}"; LnkProvisionProrrateo.NavigateUrl = $"../Contabilidad/RegPrePoliza.aspx?CvePrePoliza={CvePrePolizaProrrateo}"; LnkProvisionProrrateo.Visible = CvePrePolizaProrrateo > 0; UpAccciones.Update(); diff --git a/RH/Personal.aspx b/RH/Personal.aspx index b55013907..e69de49b8 100644 --- a/RH/Personal.aspx +++ b/RH/Personal.aspx @@ -1474,13 +1474,13 @@ +
-
diff --git a/vwd.webinfo b/vwd.webinfo index 1b85ca648..2997fdae3 100644 --- a/vwd.webinfo +++ b/vwd.webinfo @@ -338,6 +338,8 @@ + + From 353e191b5d9c22988ed3d46ee2884c78373bd46c Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 13 Oct 2021 17:35:17 -0700 Subject: [PATCH 07/24] parametros caducar --- App_Code/ClsInventarios.vb | 6 +++++- Inventarios/RepProductosPorCaducar.aspx.cs | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/App_Code/ClsInventarios.vb b/App_Code/ClsInventarios.vb index a66caee5c..c3cfb0f9b 100644 --- a/App_Code/ClsInventarios.vb +++ b/App_Code/ClsInventarios.vb @@ -1645,7 +1645,8 @@ Public Class ClsInventarios End Function - Public Function GetProductosCaducidad(CveProveedor As Integer, FechaInicio As Date, FechaFin As Date, CveSubProyecto As Integer, CveClasificacion As Integer, CvePS As Integer, CveEmpresa As Integer) As Boolean + Public Function GetProductosCaducidad(CveProveedor As Integer, FechaInicio As Date, FechaFin As Date, CveSubProyecto As Integer, CveClasificacion As Integer, CvePS As Integer, + FiltroFecha As Integer, CvesAlmacenes As String, CveUsuario As Integer, CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Inv_ProductosCaducidadGet") @@ -1657,6 +1658,9 @@ Public Class ClsInventarios .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto .Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion .Add("@CvePS", SqlDbType.Int).Value = CvePS + .Add("@FiltroFecha", SqlDbType.SmallInt).Value = FiltroFecha + .Add("@CvesAlmacenes", SqlDbType.VarChar).Value = CvesAlmacenes + .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa End With diff --git a/Inventarios/RepProductosPorCaducar.aspx.cs b/Inventarios/RepProductosPorCaducar.aspx.cs index 59ae587ea..d5e8b486c 100644 --- a/Inventarios/RepProductosPorCaducar.aspx.cs +++ b/Inventarios/RepProductosPorCaducar.aspx.cs @@ -44,7 +44,7 @@ public partial class Inventarios_RepProductosPorCaducar : ClsPaginas // aqui siempre se visualiza la caducidad, sin importar la condición, porque siempre se valida la caducidad ClsInventarios ObjInventarios = new ClsInventarios(); if (ObjInventarios.GetProductosCaducidad(DdlProveedor.SelectedValue.ToEntero(), FI, TxtFechaFin.Text.ToDate(), DdlSucursal.SelectedValue.ToEntero(), - DdlClasificacion.SelectedValue.ToEntero(), CvePS, UsuarioActual.CveEmpresa)) + DdlClasificacion.SelectedValue.ToEntero(), CvePS, 1,"1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)) { GvDatos.DataSource = ObjInventarios.DtResultados; DTDatos = ObjInventarios.DtResultados; From fb10aa2e8c48efd032964828b2fce700a01ec631 Mon Sep 17 00:00:00 2001 From: rakcsle Date: Wed, 13 Oct 2021 19:08:15 -0700 Subject: [PATCH 08/24] Acarreos Choferes Localidad Colonia --- Acarreos/CatChoferes.aspx | 132 +- Acarreos/CatChoferes.aspx.vb | 194 ++- App_Code/ClsAcarreos.vb | 16 +- App_Code/ClsContabilidad.vb | 3 +- App_Code/ClsGenerales.vb | 17 + App_Code/ClsPaginas.vb | 42 + Ashx/SIGWeb.ashx | 33 + Empresas/15/Formatos/ReciboDePago.rdlc | 1830 +++++++++++++++++++++++- Sistemas/PopUpAddUsuario.aspx.vb | 2 +- 9 files changed, 2212 insertions(+), 57 deletions(-) diff --git a/Acarreos/CatChoferes.aspx b/Acarreos/CatChoferes.aspx index 4187821b9..47982c348 100644 --- a/Acarreos/CatChoferes.aspx +++ b/Acarreos/CatChoferes.aspx @@ -3,6 +3,16 @@ + + Catálogo de Choferes @@ -28,7 +38,8 @@ " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info">
+ DataKeyNames="CveChofer,Chofer,Estatus,FechaIng,CveUsuario,CveEmpresa,Usuario,CveTransportista,Identificacion,Domicilio,Telefono,Ciudad,RFC,Licencia,NumeroInterior,NumeroExterior,Colonia,Estado,NumRegidTribOperador,ResidenciaFiscalOperador,CP,CveEstado,CveMunicipio,CveLocalidad,CveColonia,ClaveSATColoniaCP" + CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" CellSpacing="0" Width="100%" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros" ToolTip="Listado de Choferes"> @@ -49,6 +60,13 @@ + +
+ +
+ + + <%--POPUP AGREGAR--%> @@ -78,16 +96,27 @@ -
- - <%----%> - -
-
- - - + + +
+ +
+
+ + +
+
+ +
+
+ + + +
+
+ +
@@ -97,45 +126,70 @@
-
+
-
+
-
+
+
- - + + + +
+
-
-
- - +
+
+ + +
+ +
-
+ +
- - + +
-
-
-
- - -
-
+
+
+ +
+ +
+
+ + +
+
+ +
+ +
+ + +
+ +
+ +
+ +
@@ -159,6 +213,9 @@ done_allAgregar + + +
@@ -169,5 +226,22 @@
+ + + + + diff --git a/Acarreos/CatChoferes.aspx.vb b/Acarreos/CatChoferes.aspx.vb index 48624b2ab..aafd859f2 100644 --- a/Acarreos/CatChoferes.aspx.vb +++ b/Acarreos/CatChoferes.aspx.vb @@ -3,17 +3,38 @@ Imports System.Data Partial Class Acarreos_CatChoferes - Inherits ClsPaginas - + Inherits ClsPaginas + #Region " PROPIEDADES" - + #End Region - + Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load If Not Page.IsPostBack Then CargaDatos() - CargaDdlTransportista() + CargaDdlTransportista() + DdlColonias.setEsWebService(True) + Dim DT As DataTable = GlobalDTColonia(-1) + CargaDdls() + + End If + End Sub + + + Private Sub CargaDdls() + + + + DdlEstado.DataSource = GlobalDTEstado(-1).FiltraParametros("ClaveSATPais = 'MEX'") + DdlEstado.DataBind() + DdlEstado.Items.Insert(0, New ListItem("Seleccione uno", "-1")) + + + DdlMunicipio.Items.Insert(0, New ListItem("Seleccione Uno", "-1")) + DdlLocalidad.Items.Insert(0, New ListItem("Seleccione Una", "-1")) + + End Sub Private Sub CargaDatos() @@ -38,32 +59,44 @@ Partial Class Acarreos_CatChoferes UpAddChofer.Update() End Sub - Private Sub BtnAgregarChofer_Click(sender As Object, e As EventArgs) Handles BtnAgregarChofer.Click + Private Sub BtnAgregarChofer_Click(sender As Object, e As EventArgs) Handles BtnAgregarChofer.Click + + + Dim CveColonia As Integer = If(DdlColonias.txtValue.Value.ToEntero > 0, DdlColonias.txtValue.Value.ToEntero, -1) + + If CveColonia <= 0 Then + Alert("El campo colonia es necesario, por favor ingréselo.", TipoMensaje.MsgAdvertencia) + End If + + If DdlTransportista.SelectedValue = "-1" Then Alert("Tiene que seleccionar un transportista.", TipoMensaje.MsgAdvertencia) Else Dim ObjAcar As New ClsAcarreos Dim Estatus = 0 - If ChkEstatus.Checked Then Estatus = 1 + If ChkEstatus.Checked Then Estatus = 1 + If HdnModalidad.Value = "A" Then - If ObjAcar.AddChofer(TxtChofer.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DdlTransportista.SelectedValue, TxtIdentificacion.Text.Trim, TxtTelefono.Text.Trim, Licencia:=TxtLicencia.Text, RFC:=TxtRFC.Text.Trim, Domicilio:=TxtDomicilio.Text.Trim, NumeroExterior:=TxtNumExt.Text.Trim, NumeroInterior:=TxtNumInt.Text.Trim, Colonia:=TxtColonia.Text.Trim, Ciudad:=TxtCiudad.Text.Trim, Estado:=TxtEstado.Text.Trim(), CP:=TxtCP.Text.Trim, NumRegidTribOperador:=TxtNumRegidTribOperador.Text.Trim, ResidenciaFiscalOperador:=TxtResidenciaFiscalOperador.Text.Trim) Then + If ObjAcar.AddChofer(TxtChofer.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DdlTransportista.SelectedValue, TxtIdentificacion.Text.Trim, TxtTelefono.Text.Trim, Licencia:=TxtLicencia.Text, RFC:=TxtRFC.Text.Trim, Domicilio:=TxtDomicilio.Text.Trim, NumeroExterior:=TxtNumExt.Text.Trim, NumeroInterior:=TxtNumInt.Text.Trim, Colonia:="", Ciudad:="", Estado:="", CP:=TxtCP.Text.Trim, NumRegidTribOperador:=TxtNumRegidTribOperador.Text.Trim, ResidenciaFiscalOperador:=TxtResidenciaFiscalOperador.Text.Trim, CveEstado:=DdlEstado.SelectedValue.ToEntero, CveMunicipio:=DdlMunicipio.SelectedValue.ToEntero, CveLocalidad:=DdlLocalidad.SelectedValue.ToEntero, CveColonia:=CveColonia) Then CargaDatos() Alert("Agregado Correctamente.", TipoMensaje.MsgInformacion) End If ElseIf HdnModalidad.Value = "U" Then - If ObjAcar.UpdateChofer(HdnID.Value.ToEntero(), TxtChofer.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Estatus, DdlTransportista.SelectedValue, TxtIdentificacion.Text.Trim, TxtTelefono.Text.Trim, Licencia:=TxtLicencia.Text, RFC:=TxtRFC.Text.Trim, Domicilio:=TxtDomicilio.Text.Trim, NumeroExterior:=TxtNumExt.Text.Trim, NumeroInterior:=TxtNumInt.Text.Trim, Colonia:=TxtColonia.Text.Trim, Ciudad:=TxtCiudad.Text.Trim, Estado:=TxtEstado.Text.Trim(), CP:=TxtCP.Text.Trim, NumRegidTribOperador:=TxtNumRegidTribOperador.Text.Trim, ResidenciaFiscalOperador:=TxtResidenciaFiscalOperador.Text.Trim) Then + If ObjAcar.UpdateChofer(HdnID.Value.ToEntero(), TxtChofer.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Estatus, DdlTransportista.SelectedValue, TxtIdentificacion.Text.Trim, TxtTelefono.Text.Trim, Licencia:=TxtLicencia.Text, RFC:=TxtRFC.Text.Trim, Domicilio:=TxtDomicilio.Text.Trim, NumeroExterior:=TxtNumExt.Text.Trim, NumeroInterior:=TxtNumInt.Text.Trim, Colonia:="", Ciudad:="", Estado:="", CP:=TxtCP.Text.Trim, NumRegidTribOperador:=TxtNumRegidTribOperador.Text.Trim, ResidenciaFiscalOperador:=TxtResidenciaFiscalOperador.Text.Trim, CveEstado:=DdlEstado.SelectedValue.ToEntero, CveMunicipio:=DdlMunicipio.SelectedValue.ToEntero, CveLocalidad:=DdlLocalidad.SelectedValue.ToEntero, CveColonia:=CveColonia) Then CargaDatos() Alert("Actualizado Correctamente.", TipoMensaje.MsgInformacion) End If End If + RegistraScript(String.Format("$('#{0}').modal('hide');", "divAddChofer")) ObjAcar.Dispose() UpDatos.Update() End If End Sub - Public Sub Edit_Click(sender As Object, e As EventArgs) + Public Sub Edit_Click(sender As Object, e As EventArgs) + Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) HdnModalidad.Value = "U" HdnID.Value = GvRow.DataKey("CveChofer") @@ -79,9 +112,9 @@ Partial Class Acarreos_CatChoferes TxtDomicilio.Text = GvRow.DataKey("Domicilio") TxtNumInt.Text = GvRow.DataKey("NumeroInterior") TxtNumExt.Text = GvRow.DataKey("NumeroExterior") - TxtColonia.Text = GvRow.DataKey("Colonia") - TxtCiudad.Text = GvRow.DataKey("Ciudad") - TxtEstado.Text = GvRow.DataKey("Estado") + 'TxtColonia.Text = GvRow.DataKey("Colonia") + 'TxtCiudad.Text = GvRow.DataKey("Ciudad") + 'TxtEstado.Text = GvRow.DataKey("Estado") TxtCP.Text = GvRow.DataKey("CP") TxtLicencia.Text = GvRow.DataKey("Licencia") @@ -92,8 +125,49 @@ Partial Class Acarreos_CatChoferes divEstatus.Visible = True ChkEstatus.Checked = CBool(GvRow.DataKey("Estatus")) + + + DdlEstado.SelectedValueExist(GvRow.DataKey("CveEstado")) + + + DdlMunicipio.Items.Clear() + If DdlEstado.SelectedValue.ToEntero > 0 Then + + Dim ClaveSATEstado As String = GlobalDTEstado("MEX").FiltroPrimeroValor("ClaveSATEstado", $" CveEstado = {DdlEstado.SelectedValue} ") + DdlMunicipio.DataSource = GlobalDTMunicipio(ClaveSATEstado) + DdlMunicipio.DataBind() + + End If + DdlMunicipio.Items.Insert(0, New ListItem("Seleccione Uno", "-1")) + DdlMunicipio.SelectedValueExist(GvRow.DataKey("CveMunicipio")) + + + DdlLocalidad.Items.Clear() + If DdlEstado.SelectedValue.ToEntero > 0 And DdlMunicipio.SelectedValue.ToEntero > 0 Then + + DdlLocalidad.DataSource = GlobalDTLocalidad(DdlEstado.SelectedValue.ToEntero, DdlMunicipio.SelectedValue.ToEntero) + DdlLocalidad.DataBind() + + + End If + DdlLocalidad.Items.Insert(0, New ListItem("Seleccione Uno", "-1")) + DdlLocalidad.SelectedValueExist(GvRow.DataKey("CveLocalidad")) + + If GvRow.DataKey("CveColonia").ToEntero > 0 Then + + DdlColonias.txtText.Value = GvRow.DataKey("ClaveSATColoniaCP") + DdlColonias.txtValue.Value = GvRow.DataKey("CveColonia") + + Else + DdlColonias.txtText.Value = "Selecione Una" + DdlColonias.txtValue.Value = "-1" + End If + + UpAddChofer.Update() - RegistraScript(String.Format("$('#{0}').modal('show');", "divAddChofer")) + + RegistraScript(String.Format("$('#{0}').modal('show');", "divAddChofer")) + End Sub Public Sub Agregar() @@ -105,7 +179,7 @@ Partial Class Acarreos_CatChoferes TxtIdentificacion.Text = "" TxtDomicilio.Text = "" TxtTelefono.Text = "" - TxtCiudad.Text = "" + 'TxtCiudad.Text = "" TxtLicencia.Text = "" @@ -113,14 +187,20 @@ Partial Class Acarreos_CatChoferes TxtRFC.Text = "" TxtNumInt.Text = "" TxtNumExt.Text = "" - TxtEstado.Text = "" + 'TxtEstado.Text = "" TxtCP.Text = "" - TxtColonia.Text = "" + 'TxtColonia.Text = "" TxtNumRegidTribOperador.Text = "" TxtResidenciaFiscalOperador.Text = "" - + DdlColonias.txtText.Value = "Selecione Una" + DdlColonias.txtValue.Value = "-1" + + DdlEstado.SelectedValueExist(-1) + DdlEstado_SelectedIndexChanged(Nothing, Nothing) + + ChkEstatus.Checked = True divEstatus.Visible = False UpAddChofer.Update() @@ -155,5 +235,81 @@ Partial Class Acarreos_CatChoferes Private Sub LnkChofer_Click(sender As Object, e As EventArgs) Handles LnkChofer.Click Agregar() - End Sub + End Sub + + Protected Sub LnkValidar_Click(sender As Object, e As EventArgs) + validaCodigoPostal() + End Sub + + Protected Sub DdlEstado_SelectedIndexChanged(sender As Object, e As EventArgs) + + + DdlMunicipio.Items.Clear() + + If DdlEstado.SelectedValue > 0 Then + + Dim ClaveSATEstado As String = GlobalDTEstado("MEX").FiltroPrimeroValor("ClaveSATEstado", $" CveEstado = {DdlEstado.SelectedValue} ") + DdlMunicipio.DataSource = GlobalDTMunicipio(ClaveSATEstado) + DdlMunicipio.DataBind() + + + End If + + DdlMunicipio.Items.Insert(0, New ListItem("Seleccione Uno", "-1")) + DdlMunicipio.SelectedValueExist(-1) + + + DdlLocalidad.Items.Clear() + DdlLocalidad.Items.Insert(0, New ListItem("Seleccione Una", "-1")) + + + UpAddChofer.Update() + + + End Sub + Protected Sub DdlMunicipio_SelectedIndexChanged(sender As Object, e As EventArgs) + + DdlLocalidad.Items.Clear() + + If DdlMunicipio.SelectedValue > 0 Then + + DdlLocalidad.DataSource = GlobalDTLocalidad(DdlEstado.SelectedValue.ToEntero, DdlMunicipio.SelectedValue.ToEntero) + DdlLocalidad.DataBind() + + End If + + DdlLocalidad.Items.Insert(0, New ListItem("Seleccione Uno", "-1")) + DdlLocalidad.SelectedValueExist(-1) + + + UpAddChofer.Update() + + End Sub + + + + Protected Sub DdlColonias_selectedindexchange(sender As Object, e As EventArgs) + + If DdlColonias.txtValue.Value.ToEntero > 0 Then + validaCodigoPostal() + End If + + End Sub + + + Private Sub validaCodigoPostal() + + Dim CPTxt As Integer = TxtCP.Text.ToEntero() + + Dim CveColonia As Integer = DdlColonias.txtValue.Value.ToEntero + + If CPTxt > 0 And CveColonia > 0 Then + Dim CP As Integer = GlobalDTColonia(-1).FiltroPrimeroValor("CP", $"CveColonia = {CveColonia}") + If CPTxt <> CP Then + Alert("El codigo postal selecionado es diferente del codigo postal de la Colonia.", TipoMensaje.MsgAdvertencia) + End If + End If + + End Sub + End Class diff --git a/App_Code/ClsAcarreos.vb b/App_Code/ClsAcarreos.vb index 14875112c..40453e466 100644 --- a/App_Code/ClsAcarreos.vb +++ b/App_Code/ClsAcarreos.vb @@ -111,7 +111,7 @@ Public Class ClsAcarreos #Region "Choferes" Public Function AddChofer(Chofer As String, CveUsuario As Integer, CveEmpresa As Integer, CveTransportista As Integer, Identificacion As String, Telefono As String, Licencia As String, RFC As String, Domicilio As String, Optional NumeroExterior As String = "", Optional NumeroInterior As String = "", Optional Colonia As String = "", Optional Ciudad As String = "", Optional Estado As String = "", Optional CP As String = "", - Optional NumRegidTribOperador As String = "", Optional ResidenciaFiscalOperador As String = "") As Boolean + Optional NumRegidTribOperador As String = "", Optional ResidenciaFiscalOperador As String = "", Optional CveEstado As Integer = -1, Optional CveMunicipio As Integer = -1, Optional CveLocalidad As Integer = -1, Optional CveColonia As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Acar_ChoferesAdd") With SqlAdapter.SelectCommand.Parameters @@ -131,7 +131,11 @@ Public Class ClsAcarreos .Add("@Estado", SqlDbType.VarChar).Value = Estado .Add("@CP", SqlDbType.VarChar).Value = CP .Add("@NumRegidTribOperador", SqlDbType.VarChar).Value = NumRegidTribOperador - .Add("@ResidenciaFiscalOperador", SqlDbType.VarChar).Value = ResidenciaFiscalOperador + .Add("@ResidenciaFiscalOperador", SqlDbType.VarChar).Value = ResidenciaFiscalOperador + .Add("@CveEstado", SqlDbType.Int).Value = CveEstado + .Add("@CveMunicipio", SqlDbType.Int).Value = CveMunicipio + .Add("@CveLocalidad", SqlDbType.Int).Value = CveLocalidad + .Add("@CveColonia", SqlDbType.Int).Value = CveColonia End With Try SqlAdapter.Fill(Data) @@ -145,7 +149,7 @@ Public Class ClsAcarreos Public Function UpdateChofer(CveChofer As Integer, Chofer As String, CveUsuario As Integer, CveEmpresa As Integer, Estatus As Integer, CveTransportista As Integer, Identificacion As String, Telefono As String, Licencia As String, RFC As String, Domicilio As String, Optional NumeroExterior As String = "", Optional NumeroInterior As String = "", Optional Colonia As String = "", Optional Ciudad As String = "", Optional Estado As String = "", Optional CP As String = "", - Optional NumRegidTribOperador As String = "", Optional ResidenciaFiscalOperador As String = "") As Boolean + Optional NumRegidTribOperador As String = "", Optional ResidenciaFiscalOperador As String = "", Optional CveEstado As Integer = -1, Optional CveMunicipio As Integer = -1, Optional CveLocalidad As Integer = -1, Optional CveColonia As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Acar_ChoferesUpdate") With SqlAdapter.SelectCommand.Parameters @@ -167,7 +171,11 @@ Public Class ClsAcarreos .Add("@CP", SqlDbType.VarChar).Value = CP .Add("@Estatus", SqlDbType.Int).Value = Estatus .Add("@NumRegidTribOperador", SqlDbType.VarChar).Value = NumRegidTribOperador - .Add("@ResidenciaFiscalOperador", SqlDbType.VarChar).Value = ResidenciaFiscalOperador + .Add("@ResidenciaFiscalOperador", SqlDbType.VarChar).Value = ResidenciaFiscalOperador + .Add("@CveEstado", SqlDbType.Int).Value = CveEstado + .Add("@CveMunicipio", SqlDbType.Int).Value = CveMunicipio + .Add("@CveLocalidad", SqlDbType.Int).Value = CveLocalidad + .Add("@CveColonia", SqlDbType.Int).Value = CveColonia End With Try SqlAdapter.Fill(Data) diff --git a/App_Code/ClsContabilidad.vb b/App_Code/ClsContabilidad.vb index 5615d03b2..ab161ebc8 100644 --- a/App_Code/ClsContabilidad.vb +++ b/App_Code/ClsContabilidad.vb @@ -258,7 +258,7 @@ Public Class ClsContabilidad Public Function UpdatePrePolizasDetalle(CvePrePolizaDetalle As Integer, Concepto As String, CveSubProyecto As Integer, IdCtaContable As Integer, TipoMovto As Boolean, ImporteMN As Decimal, Optional CveTipoGasto As Integer = -1, Optional CveConceptoContable As Integer = -1, Optional CveProveedor As Integer = -1, Optional CveCompra As Integer = -1, Optional CvePersonal As Integer = -1, Optional CveCliente As Integer = -1, Optional CveVenta As Integer = -1, - Optional Referencia As String = "-1", Optional CveUsuarioModifico As Integer = -1, Optional CveCuenta As Integer = -1, Optional PorcentajeImpuesto As Decimal = -1) As Boolean + Optional Referencia As String = "-1", Optional CveUsuarioModifico As Integer = -1, Optional CveCuenta As Integer = -1, Optional PorcentajeImpuesto As Decimal = -1, Optional Importe As Decimal = -1) As Boolean Dim Retorno As Boolean = False @@ -271,6 +271,7 @@ Public Class ClsContabilidad .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto .Add("@IdCtaContable", SqlDbType.Int).Value = IdCtaContable .Add("@TipoMovto", SqlDbType.Bit).Value = TipoMovto + '.Add("@Importe", SqlDbType.Money).Value = Importe .Add("@ImporteMN", SqlDbType.Money).Value = ImporteMN .Add("@CveTipoGasto", SqlDbType.Int).Value = CveTipoGasto .Add("@CveConceptoContable", SqlDbType.Int).Value = CveConceptoContable diff --git a/App_Code/ClsGenerales.vb b/App_Code/ClsGenerales.vb index 9f6c539d7..c693d37a3 100644 --- a/App_Code/ClsGenerales.vb +++ b/App_Code/ClsGenerales.vb @@ -2820,6 +2820,23 @@ Public Class ClsGenerales OnError("Ocurrió un error al obtener los municipios del SAT", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) End Try Return Retorno + End Function + + + Public Function GetSATLocalidad(Optional CveEstado As Integer = -1, Optional CveMunicipio As Integer = -1) As Boolean + Dim Retorno As Boolean = False + DataAdapter("Gral_SAT_LocalidadGet") + With SqlAdapter.SelectCommand.Parameters + .Add("@CveEstado", SqlDbType.VarChar).Value = CveEstado + .Add("@CveMunicipio", SqlDbType.VarChar).Value = CveMunicipio + End With + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al obtener las localidades del SAT", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + Return Retorno End Function Public Function GetSATColonia(ClaveSATMunicipio As String) As Boolean diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 16a836392..2898c514e 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -425,6 +425,48 @@ Public Class ClsPaginas End Set End Property + + Property GlobalDTLocalidad(Optional CveEstado As Integer = -1, Optional CveMunicipio As Integer = -1) As DataTable + Get + + If Application("GlobalDTLocalidad") Is Nothing Then + + Dim ObjGrales As New ClsGenerales + If ObjGrales.GetSATLocalidad(-1, -1) Then Application("GlobalDTLocalidad") = ObjGrales.DtResultados Else Application("GlobalDTLocalidad") = Nothing + ObjGrales.Dispose() + + End If + + Dim StrFiltro As String = "" + + If CveEstado > 0 And CveMunicipio > 0 Then + StrFiltro = $" CveEstado = '{CveEstado}' AND CveMunicipio = '{CveMunicipio}'" + ElseIf CveEstado > 0 Then + StrFiltro = $" CveEstado = '{CveEstado}'" + ElseIf CveMunicipio > 0 Then + StrFiltro = $" CveMunicipio = '{CveMunicipio}'" + + Else + StrFiltro = "" + End If + + + Dim Dv As New DataView(DirectCast(Application("GlobalDTLocalidad"), DataTable), StrFiltro, "", DataViewRowState.CurrentRows) + GlobalDTLocalidad = Dv.ToTable + + Dv.Dispose() + + + + End Get + Set(value As DataTable) + Application("GlobalDTLocalidad") = value + End Set + + End Property + + + Property GlobalDTColonia(ClaveSATMunicipio As String) As DataTable Get If Application("GlobalDTColonia") Is Nothing Then diff --git a/Ashx/SIGWeb.ashx b/Ashx/SIGWeb.ashx index fdc3a076d..21f62896b 100644 --- a/Ashx/SIGWeb.ashx +++ b/Ashx/SIGWeb.ashx @@ -113,6 +113,8 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState context.Response.Write(sendMail(context)) Case "sendMailLPM" context.Response.Write(sendMailLPM(context)) + Case "getSATColomias" + getSatColonias(context) End Select Catch ex As Exception ex.GuardaLog(ex.Message) @@ -1319,6 +1321,37 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState End Function #End Region + + +#Region "Get SAT Colonmias" + Private Function getSATColonias(ByVal context As HttpContext) As String + Dim retorno As String = "" + Dim DtRetorno As DataTable = Nothing + + + Dim Name = IfNull(context.Request("Name"), "-1").ToString + + + Dim dt As DataTable = DirectCast(context.Application("GlobalDTColonia"), DataTable) + If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then + DtRetorno = dt.FiltraParametros($"ClaveSATColoniaCP like '%{Name}%'") + End If + + + If DtRetorno IsNot Nothing AndAlso DtRetorno.Rows.Count > 0 Then + DtRetorno.Columns("CveColonia").ColumnName = "id" + DtRetorno.Columns("ClaveSATColoniaCP").ColumnName = "text" + retorno = JsonConvert.SerializeObject(DtRetorno).ToString + DtRetorno.Dispose() + context.Response.Write(retorno) + Else + context.Response.Write("[]") + End If + + Return retorno + End Function +#End Region + #Region "Get Contratos" Private Function GetContratos(ByVal context As HttpContext) As String Dim retorno As String = "" diff --git a/Empresas/15/Formatos/ReciboDePago.rdlc b/Empresas/15/Formatos/ReciboDePago.rdlc index f734098e0..6d86bc79f 100644 --- a/Empresas/15/Formatos/ReciboDePago.rdlc +++ b/Empresas/15/Formatos/ReciboDePago.rdlc @@ -3803,7 +3803,7 @@ - Av. Alfredo Eguiarte, #268, Local 10, + Camelia num 346, colonia Luis Encinas, @@ -19,6 +65,12 @@
  • Excel
  • + +
  • + Personalizar +
  • + + @@ -36,7 +88,7 @@
    -
    +
    @@ -73,7 +125,15 @@
    - + +
    + + + + +
    + +
    @@ -92,14 +152,30 @@
    - +
    + + + +
    + +
    +
    + + Elaboración + Caducidad + +
    + + +
    + @@ -109,10 +185,64 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Inventarios/RepProductosPorCaducar.aspx.cs b/Inventarios/RepProductosPorCaducar.aspx.cs index d5e8b486c..8187791ce 100644 --- a/Inventarios/RepProductosPorCaducar.aspx.cs +++ b/Inventarios/RepProductosPorCaducar.aspx.cs @@ -9,6 +9,7 @@ using System.Data; using Microsoft.Reporting.WebForms; using System.Text; + public partial class Inventarios_RepProductosPorCaducar : ClsPaginas { private DataTable DTDatos @@ -30,11 +31,16 @@ public partial class Inventarios_RepProductosPorCaducar : ClsPaginas { CargaFiltros(); CargarDatos(); + CargaAlamacenes(); + } } private void CargarDatos() { + + string Cves_Alamcenes = ddlAlmacen.GetSelectedValuesM(); + DateTime FI = ModExtensiones.MinFecha; if (TxtFechaInicio.Text != "") FI = TxtFechaInicio.Text.ToDate(); @@ -44,7 +50,7 @@ public partial class Inventarios_RepProductosPorCaducar : ClsPaginas // aqui siempre se visualiza la caducidad, sin importar la condición, porque siempre se valida la caducidad ClsInventarios ObjInventarios = new ClsInventarios(); if (ObjInventarios.GetProductosCaducidad(DdlProveedor.SelectedValue.ToEntero(), FI, TxtFechaFin.Text.ToDate(), DdlSucursal.SelectedValue.ToEntero(), - DdlClasificacion.SelectedValue.ToEntero(), CvePS, 1,"1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)) + DdlClasificacion.SelectedValue.ToEntero(), CvePS, 1, Cves_Alamcenes, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Opcion:DdlOpcion.SelectedValue.ToEntero())) { GvDatos.DataSource = ObjInventarios.DtResultados; DTDatos = ObjInventarios.DtResultados; @@ -60,6 +66,7 @@ public partial class Inventarios_RepProductosPorCaducar : ClsPaginas CargarSucursales(); CargarClasificaciones(); + } private void CargarFechaText() @@ -89,6 +96,9 @@ public partial class Inventarios_RepProductosPorCaducar : ClsPaginas DdlSucursal.DataSource = get_GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1); DdlSucursal.DataBind(); DdlSucursal.Items.Insert(0, new ListItem("Todas", "-1")); + + + } private void CargarClasificaciones() @@ -104,6 +114,32 @@ public partial class Inventarios_RepProductosPorCaducar : ClsPaginas DdlClasificacion.Items.Insert(0,new ListItem("Todas","-1")); } + + + + private void CargaAlamacenes(int CveSubProyectoFiltro = -1) + { + + ddlAlmacen.Items.Clear(); + + if (CveSubProyectoFiltro > 0) + { + ddlAlmacen.DataSource = get_GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros($"CveSubProyecto = {CveSubProyectoFiltro}"); + } + else + { + ddlAlmacen.DataSource = get_GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1); + } + + ddlAlmacen.DataBind(); + ddlAlmacen.Items.Insert(0, new ListItem("Todos", "-1")); + + UPFiltros.Update(); + } + + + + protected void BtnConsultar_Click(object sender, EventArgs e) { CargarDatos(); @@ -134,6 +170,11 @@ public partial class Inventarios_RepProductosPorCaducar : ClsPaginas @params.Add(new ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)); @params.Add(new ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)); + @params.Add(new ReportParameter("OcultaCaducidad", ChkTiempoCaducidad.Checked ? "0": "1" )); + + + + var logouri = string.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa); System.IO.FileInfo Imagen = new System.IO.FileInfo(string.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)); if (Imagen.Exists) @@ -148,4 +189,35 @@ public partial class Inventarios_RepProductosPorCaducar : ClsPaginas ImprimirPDF("Empresas/Grales/Formatos/RepProductosCaducidad.rdlc", DTDatos, @params, "Reporte de Productos por Caducar", formato); } + + + + + + protected void DdlSucursal_SelectedIndexChanged(object sender, EventArgs e) + { + CargaAlamacenes(DdlSucursal.SelectedValue.ToEntero()); + } + + + + protected void BtnPersonalizar_Click(object sender, EventArgs e) + { + Personaliza(); + } + + private void Personaliza() + { + if (ChkTiempoCaducidad.Checked) + { + GvDatos.Columns[5].Visible = true; + } + else + { + GvDatos.Columns[5].Visible = false; + } + CargarDatos();//Si no se recarga no se muestran los valores dela la columna de tiempo caducindad laprimera vez que pasa de oculta a mostrarse + UpDatos.Update(); + } + } \ No newline at end of file From ed76e783b92547e2dc8e06d7580b691f0f732784 Mon Sep 17 00:00:00 2001 From: rakcsle Date: Fri, 15 Oct 2021 09:44:06 -0700 Subject: [PATCH 22/24] Dll SAT pais, estado, municipio, localidad, colonia --- Acarreos/CatChoferes.aspx | 1 + App_Code/ClsSubProyectos.vb | 7 +- Planeacion/CatSubProyectos.aspx | 127 +++++++++++++++++++------- Planeacion/CatSubProyectos.aspx.vb | 142 +++++++++++++++++++++++------ 4 files changed, 213 insertions(+), 64 deletions(-) diff --git a/Acarreos/CatChoferes.aspx b/Acarreos/CatChoferes.aspx index af85b3f0d..740010af5 100644 --- a/Acarreos/CatChoferes.aspx +++ b/Acarreos/CatChoferes.aspx @@ -147,6 +147,7 @@
    +
    diff --git a/App_Code/ClsSubProyectos.vb b/App_Code/ClsSubProyectos.vb index f07ce9213..97c8bd94d 100644 --- a/App_Code/ClsSubProyectos.vb +++ b/App_Code/ClsSubProyectos.vb @@ -335,7 +335,7 @@ Public Class ClsSubProyectos Public Function AddCentroCosto(SubProyecto As String, IdSegNeg As Integer, CveUsuario As Integer, CveEmpresa As Integer, CveProyecto As Integer, Optional Serie As String = "", Optional IVA As Double = 0.0, Optional Calle As String = "", Optional NoExt As String = "", Optional NoInt As String = "", Optional Colonia As String = "", Optional Localidad As String = "", Optional Municipio As String = "", Optional Estado As String = "", Optional Pais As String = "", Optional CP As String = "", Optional TipoSucursal As Integer = 0, Optional EsSucursal As Integer = 0, Optional CvePais As Integer = -1, Optional CveEstado As Integer = -1, Optional CveMunicipio As Integer = -1, Optional CveColonia As Integer = -1, Optional AplicaComercioExterior As Boolean = False, Optional Correo As String = "", Optional CvePrecioLista As Integer = -1, - Optional Telefono As String = "", Optional NoVerificaAlmacen As Boolean = False, Optional CodigoSucursal As String = "") As Boolean + Optional Telefono As String = "", Optional NoVerificaAlmacen As Boolean = False, Optional CodigoSucursal As String = "", Optional CveLocalidad As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_CentroCostoAdd") @@ -369,6 +369,7 @@ Public Class ClsSubProyectos .Add("@Telefono", SqlDbType.VarChar).Value = Telefono .Add("@NoVerificaAlmacen", SqlDbType.Bit).Value = NoVerificaAlmacen .Add("@CodigoSucursal", SqlDbType.VarChar).Value = CodigoSucursal + .Add("@CveSubProyecto", SqlDbType.Int).Direction = ParameterDirection.Output End With @@ -391,7 +392,7 @@ Public Class ClsSubProyectos Public Function UpdateCentroCosto(CveSubProyecto As Integer, SubProyecto As String, IdSegNeg As Integer, Estatus As Integer, CveUsuario As Integer, CveEmpresa As Integer, CveProyecto As Integer, Optional Serie As String = "", Optional IVA As Double = 0.0, Optional Calle As String = "", Optional NoExt As String = "", Optional NoInt As String = "", Optional Colonia As String = "", Optional Localidad As String = "", Optional Municipio As String = "", Optional Estado As String = "", Optional Pais As String = "", Optional CP As String = "", Optional TipoSucursal As Integer = 0, Optional EsSucursal As Integer = 0, Optional CvePais As Integer = -1, Optional CveEstado As Integer = -1, Optional CveMunicipio As Integer = -1, Optional CveColonia As Integer = -1, Optional AplicaComercioExterior As Boolean = False, Optional Correo As String = "", Optional CvePrecioLista As Integer = -1, - Optional Telefono As String = "", Optional HorarioVerano As Integer = Nothing, Optional HorarioInvierno As Integer = Nothing, Optional NoVerificaAlmacen As Boolean = False, Optional CodigoSucursal As String = "") As Boolean + Optional Telefono As String = "", Optional HorarioVerano As Integer = Nothing, Optional HorarioInvierno As Integer = Nothing, Optional NoVerificaAlmacen As Boolean = False, Optional CodigoSucursal As String = "", Optional CveLocalidad As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_CentroCostoUpdate") @@ -429,6 +430,8 @@ Public Class ClsSubProyectos .Add("@HorarioInvierno", SqlDbType.Int).Value = HorarioInvierno .Add("@NoVerificaAlmacen", SqlDbType.Bit).Value = NoVerificaAlmacen .Add("@CodigoSucursal", SqlDbType.VarChar).Value = CodigoSucursal + .Add("@CveLocalidad", SqlDbType.Int).Value = CveLocalidad + End With Try diff --git a/Planeacion/CatSubProyectos.aspx b/Planeacion/CatSubProyectos.aspx index 03c8f97f5..4535b4e75 100644 --- a/Planeacion/CatSubProyectos.aspx +++ b/Planeacion/CatSubProyectos.aspx @@ -83,7 +83,7 @@
    @@ -120,6 +120,11 @@
    + +
    + +
    + @@ -180,7 +185,7 @@
    - +
    @@ -273,18 +278,81 @@
    - +
    - + + +
    + + + +
    +
    +
    + + + + + +
    +
    + +
    +
    + + + + + +
    +
    +
    + + +
    + + +
    +
    + + + +
    +
    +
    + +
    + + +
    + +
    + +
    + +
    +
    + +
    + + + + +
    + +
    +
    + +
    @@ -322,38 +390,19 @@ - + + + + + +<%-- -
    -
    - - - -
    -
    -
    -
    - - - -
    -
    -
    -
    - - - -
    -
    -
    -
    - - - -
    -
    + + + +
    -
    +
    --%> @@ -375,7 +424,7 @@ - diff --git a/Planeacion/CatSubProyectos.aspx.vb b/Planeacion/CatSubProyectos.aspx.vb index 1d89bde3c..eff61c7fb 100644 --- a/Planeacion/CatSubProyectos.aspx.vb +++ b/Planeacion/CatSubProyectos.aspx.vb @@ -74,6 +74,7 @@ Partial Class CatSubProyectos CargaEstado() CargaMunicipio() CargaColonia() + CargaLocalidad() CargaPrecioLista() @@ -301,7 +302,9 @@ Partial Class CatSubProyectos DdlMunicipio.SelectedValueExist(GvRow.DataKey("CveMunicipio")) CargaColonia() DdlColonia.SelectedValueExist(GvRow.DataKey("CveColonia")) - AplicaComercio() + CargaLocalidad() + DdlLocalidad.SelectedValueExist(GvRow.DataKey("CveLocalidad")) + 'AplicaComercio() ChkNoVerificaAlmacen.Checked = If(GvRow.DataKey("NoVerificaAlmacen").ToString = "True", True, False) TxtCodigoSucursal.Text = (GvRow.DataKey("CodigoSucursal")) @@ -368,12 +371,52 @@ Partial Class CatSubProyectos Dim IdSeg As Integer If DdlSegmentoNegocio.Visible = True Then IdSeg = DdlSegmentoNegocio.SelectedValue.ToEntero Else IdSeg = 0 - 'CREA SUBPROYECTO + + + Dim StrPais As String = "" + Dim StrEstado As String = "" + Dim StrMunicipio As String = "" + Dim StrLocalidad As String = "" + Dim StrColonia As String = "" + + + + If DdlPais.SelectedValue.ToEntero > 0 Then + StrPais = DdlPais.SelectedItem.Text + Else + StrPais = TxtPais.Text + End If + + If DdlEstado.SelectedValue.ToEntero > 0 Then + StrEstado = DdlEstado.SelectedItem.Text + Else + StrEstado = TxtEstado.Text + End If + + If DdlMunicipio.SelectedValue.ToEntero > 0 Then + StrMunicipio = DdlMunicipio.SelectedItem.Text + Else + StrMunicipio = TxtMunicipio.Text + End If + + If DdlLocalidad.SelectedValue.ToEntero > 0 Then + StrLocalidad = DdlLocalidad.SelectedItem.Text + Else + StrLocalidad = TxtLocalidad.Text + End If + + If DdlColonia.SelectedValue.ToEntero > 0 Then + StrColonia = DdlColonia.SelectedItem.Text + Else + StrColonia = TxtColonia.Text + End If + + 'CREA SUBPROYECTO If HdnModalidad.Value = "I" Then If Not ObjSubproyectos.AddCentroCosto(TxtCentroCosto.Text.Trim, IdSeg, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DdlProyecto.SelectedValue.ToEntero, Serie:=TxtSerie.Text.Trim, IVA:=TxtIVA.Text.ToDecimal, Calle:=TxtCalle.Text.Trim, NoExt:=TxtNoExt.Text.Trim, - NoInt:=TxtNoInt.Text.Trim, Colonia:=TxtColonia.Text.Trim, Localidad:=TxtLocalidad.Text.Trim, Municipio:=TxtMunicipio.Text.Trim, Estado:=TxtEstado.Text.Trim, Pais:=TxtPais.Text.Trim, CP:=TxtCP.Text.Trim, TipoSucursal:=TipoSucursal, EsSucursal:=EsSucursal, + NoInt:=TxtNoInt.Text.Trim, Colonia:=StrColonia, Localidad:=StrLocalidad, Municipio:=StrMunicipio, Estado:=StrEstado, Pais:=StrPais, CP:=TxtCP.Text.Trim, TipoSucursal:=TipoSucursal, EsSucursal:=EsSucursal, CvePais:=DdlPais.SelectedValue.ToEntero, CveEstado:=DdlEstado.SelectedValue.ToEntero, CveMunicipio:=DdlMunicipio.SelectedValue.ToEntero, CveColonia:=DdlColonia.SelectedValue.ToEntero, AplicaComercioExterior:=ChkAplicaComercioExterior.Checked, Correo:=TxtCorreo.Text, CvePrecioLista:=DdlPrecioLista.SelectedValue.ToEntero, - Telefono:=TxtTelefono.Text, NoVerificaAlmacen:=ChkNoVerificaAlmacen.Checked, CodigoSucursal:=TxtCodigoSucursal.Text.Trim) Then + Telefono:=TxtTelefono.Text, NoVerificaAlmacen:=ChkNoVerificaAlmacen.Checked, CodigoSucursal:=TxtCodigoSucursal.Text.Trim, CveLocalidad:=DdlLocalidad.SelectedValue.ToEntero) Then TieneError = True Else CveSubProyecto = ObjSubproyectos.CveSubProyecto @@ -381,9 +424,9 @@ Partial Class CatSubProyectos Else If (HorarioVerano > -13 And HorarioVerano < 13) And (HorarioInvierno > -13 And HorarioInvierno < 13) Then If Not ObjSubproyectos.UpdateCentroCosto(CveCentroCosto, TxtCentroCosto.Text.Trim, IdSeg, If(ChkEstatus.Checked = True, 1, 0), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DdlProyecto.SelectedValue.ToEntero, Serie:=TxtSerie.Text.Trim, IVA:=TxtIVA.Text.ToDecimal, Calle:=TxtCalle.Text.Trim, NoExt:=TxtNoExt.Text.Trim, - NoInt:=TxtNoInt.Text.Trim, Colonia:=TxtColonia.Text.Trim, Localidad:=TxtLocalidad.Text.Trim, Municipio:=TxtMunicipio.Text.Trim, Estado:=TxtEstado.Text.Trim, Pais:=TxtPais.Text.Trim, CP:=TxtCP.Text.Trim, TipoSucursal:=TipoSucursal, EsSucursal:=EsSucursal, + NoInt:=TxtNoInt.Text.Trim, Colonia:=StrColonia, Localidad:=TxtLocalidad.Text.Trim, Municipio:=StrMunicipio, Estado:=StrEstado, Pais:=StrPais, CP:=TxtCP.Text.Trim, TipoSucursal:=TipoSucursal, EsSucursal:=EsSucursal, CvePais:=DdlPais.SelectedValue.ToEntero, CveEstado:=DdlEstado.SelectedValue.ToEntero, CveMunicipio:=DdlMunicipio.SelectedValue.ToEntero, CveColonia:=DdlColonia.SelectedValue.ToEntero, AplicaComercioExterior:=ChkAplicaComercioExterior.Checked, Correo:=TxtCorreo.Text, CvePrecioLista:=DdlPrecioLista.SelectedValue.ToEntero, - Telefono:=TxtTelefono.Text, HorarioVerano:=TxtHorarioVerano.Text.ToEntero, HorarioInvierno:=TxtHorarioInvierno.Text.ToEntero, NoVerificaAlmacen:=ChkNoVerificaAlmacen.Checked, CodigoSucursal:=TxtCodigoSucursal.Text.Trim) Then + Telefono:=TxtTelefono.Text, HorarioVerano:=TxtHorarioVerano.Text.ToEntero, HorarioInvierno:=TxtHorarioInvierno.Text.ToEntero, NoVerificaAlmacen:=ChkNoVerificaAlmacen.Checked, CodigoSucursal:=TxtCodigoSucursal.Text.Trim, CveLocalidad:=DdlLocalidad.SelectedValue.ToEntero) Then TieneError = True End If Else @@ -668,7 +711,7 @@ Partial Class CatSubProyectos ChkEsMatriz.Checked = False ChkEsSucursal.Checked = False ChkAplicaComercioExterior.Checked = False - TabComercioExterior.Visible = False + 'TabComercioExterior.Visible = False TxtSerie.Text = "" TxtIVA.Text = "0.16" @@ -689,6 +732,7 @@ Partial Class CatSubProyectos CargaEstado() CargaMunicipio() CargaColonia() + CargaLocalidad() If UsuarioActual.Empresa.UsaContabilidad Then CargaSegmentosNegocio() @@ -790,36 +834,80 @@ Partial Class CatSubProyectos End If DdlColonia.Items.Insert(0, New ListItem("Seleccione", "-1")) DdlColonia.DataBind() + End Sub + + + Protected Sub CargaLocalidad() + + DdlLocalidad.Items.Clear() + + If DdlEstado.SelectedValue.ToEntero > 0 Then + DdlLocalidad.DataSource = GlobalDTLocalidad(DdlEstado.SelectedValue.ToEntero, DdlMunicipio.SelectedValue.ToEntero) + DdlLocalidad.DataBind() + End If + + DdlLocalidad.Items.Insert(0, New ListItem("Seleccione una", "-1")) + End Sub Protected Sub DdlPais_SelectedIndexChanged(sender As Object, e As EventArgs) CargaEstado() CargaMunicipio() CargaColonia() + CargaLocalidad() End Sub Protected Sub DdlEstado_SelectedIndexChanged(sender As Object, e As EventArgs) CargaMunicipio() CargaColonia() - End Sub - Protected Sub DdlMunicipio_SelectedIndexChanged(sender As Object, e As EventArgs) - CargaColonia() - End Sub - - Protected Sub ChkAplicaComercioExterior_CheckedChanged(sender As Object, e As EventArgs) - AplicaComercio() - End Sub - - Private Sub AplicaComercio() - If ChkAplicaComercioExterior.Checked Then - TabComercioExterior.Visible = True - Else - TabComercioExterior.Visible = False - End If - UpBodyCentroCosto.Update() - End Sub - + CargaLocalidad() + End Sub + + Protected Sub DdlMunicipio_SelectedIndexChanged(sender As Object, e As EventArgs) + CargaColonia() + CargaLocalidad() + End Sub + + 'Protected Sub ChkAplicaComercioExterior_CheckedChanged(sender As Object, e As EventArgs) + ' AplicaComercio() + 'End Sub + + 'Private Sub AplicaComercio() + ' If ChkAplicaComercioExterior.Checked Then + ' TabComercioExterior.Visible = True + ' Else + ' TabComercioExterior.Visible = False + ' End If + ' UpBodyCentroCosto.Update() + 'End Sub + #End Region - - + + Protected Sub BtnValidar_Click(sender As Object, e As EventArgs) + validaCodigoPostal() + End Sub + + + Protected Sub DdlColonia_SelectedIndexChanged(sender As Object, e As EventArgs) + validaCodigoPostal() + End Sub + + Private Sub validaCodigoPostal() + + Dim CPTxt As Integer = TxtCP.Text.ToEntero() + + Dim CveColonia As Integer = DdlColonia.SelectedValue.ToEntero + + If CPTxt > 0 And CveColonia > 0 Then + Dim CP As Integer = GlobalDTColonia("-1").FiltroPrimeroValor("CP", $"CveColonia = {CveColonia}").ToEntero + If CPTxt <> CP Then + Alert("El codigo postal selecionado es diferente del codigo postal de la Colonia.", TipoMensaje.MsgAdvertencia) + End If + End If + + End Sub + + + + End Class From 2bdb0fa8632fe259773760a37126fbdfb2e53dd5 Mon Sep 17 00:00:00 2001 From: rakcsle Date: Fri, 15 Oct 2021 15:41:27 -0700 Subject: [PATCH 23/24] CxC Pop de pago no se mostraba correctamente --- Ventas/Clientes.aspx | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Ventas/Clientes.aspx b/Ventas/Clientes.aspx index 82c774b14..d05fb3407 100644 --- a/Ventas/Clientes.aspx +++ b/Ventas/Clientes.aspx @@ -2078,6 +2078,11 @@ + + + + +
    @@ -6569,6 +6574,11 @@ $("#C_Tab_TabContratos_tab").click(function () { CargaContratos(); }); } + var isAsyncPostback = Sys.WebForms.PageRequestManager.getInstance().get_isInAsyncPostBack(); + if (isAsyncPostback) { + tb_init('a.thickbox'); + } + } $(document).on('mouseenter', ".truncate", function () { var $this = $(this); @@ -7293,6 +7303,13 @@ $get("BtnCambiaPorcentaje").click(); } + + + + + + + From a167fb86693ded2c52dc9780edddae239e7d2d96 Mon Sep 17 00:00:00 2001 From: rakcsle Date: Fri, 15 Oct 2021 18:17:51 -0700 Subject: [PATCH 24/24] Requerir combos SAT cuando es sucursal --- Compras/eFacturas.aspx.vb | 8 ++++++-- Planeacion/CatSubProyectos.aspx | 12 +++++++----- Planeacion/CatSubProyectos.aspx.vb | 21 ++++++++++++++++++++- 3 files changed, 33 insertions(+), 8 deletions(-) diff --git a/Compras/eFacturas.aspx.vb b/Compras/eFacturas.aspx.vb index 3bd8d405b..322ac5493 100644 --- a/Compras/eFacturas.aspx.vb +++ b/Compras/eFacturas.aspx.vb @@ -2924,14 +2924,18 @@ Partial Class Compras_eFacturas For Each dRow2 As DataRow In DTDocumentosRelacionados.Rows - If dRow2("IdDocumento").ToString.ToUpper = drow("IdDocumento").ToString.ToUpper And drow("CveIE").ToString.ToEntero > 0 Then + If dRow2("IdDocumento").ToString.ToUpper = drow("IdDocumento").ToString.ToUpper Then dRow2("CveCompra") = drow("CveCompra").ToString.ToEntero dRow2("CveFactura") = drow("CveFactura").ToString.ToEntero dRow2("CveMetodoPago") = drow("CveMetodoPago").ToString.ToEntero dRow2("SerieFolioCompra") = drow("SerieFolioCompra").ToString Try - dRow2("CvePrePolizaDetalle") = drow("CvePrePolizaDetalle").ToString + + If drow("CveIE").ToString.ToEntero > 0 Then + dRow2("CvePrePolizaDetalle") = drow("CvePrePolizaDetalle").ToString + End If + Catch ex As Exception dRow2("CvePrePolizaDetalle") = 0 End Try diff --git a/Planeacion/CatSubProyectos.aspx b/Planeacion/CatSubProyectos.aspx index 4535b4e75..a0f58e6cf 100644 --- a/Planeacion/CatSubProyectos.aspx +++ b/Planeacion/CatSubProyectos.aspx @@ -300,7 +300,7 @@
    - +
    @@ -310,7 +310,7 @@
    - +
    @@ -323,8 +323,9 @@
    - - + + +
    @@ -332,6 +333,7 @@
    +
    @@ -345,7 +347,7 @@
    - +
    diff --git a/Planeacion/CatSubProyectos.aspx.vb b/Planeacion/CatSubProyectos.aspx.vb index eff61c7fb..02500da0f 100644 --- a/Planeacion/CatSubProyectos.aspx.vb +++ b/Planeacion/CatSubProyectos.aspx.vb @@ -743,7 +743,8 @@ Partial Class CatSubProyectos RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarCentroCosto")) End Sub - Private Sub CargaRequired() + Private Sub CargaRequired() + If ChkEsSucursal.Checked = True Then RFVSerie.Enabled = True RFVIVA.Enabled = True @@ -767,6 +768,14 @@ Partial Class CatSubProyectos RFVPais.Visible = True RFVCP.Visible = True + RFVCP.Visible = True + RFVDdlPais.Visible = True + RFVDdlEstado.Visible = True + RFVMunicipio.Visible = True + RFVLocalidad.Visible = True + RFVColonia.Visible = True + + Else RFVSerie.Enabled = False RFVIVA.Enabled = False @@ -790,6 +799,14 @@ Partial Class CatSubProyectos RFVPais.Visible = False RFVCP.Visible = False + + RFVCP.Visible = False + RFVDdlPais.Visible = False + RFVDdlEstado.Visible = False + RFVMunicipio.Visible = False + RFVLocalidad.Visible = False + RFVColonia.Visible = False + End If End Sub @@ -909,5 +926,7 @@ Partial Class CatSubProyectos + + End Class