From 5de1659cd6968a36f615cfedda7eeed45276c508 Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Wed, 7 Oct 2020 10:32:42 -0700 Subject: [PATCH 01/17] =?UTF-8?q?se=20repar=C3=B3=20el=20reporte=20de=20mo?= =?UTF-8?q?vimientos=20de=20uniformes=20en=20resguardos=20y=20correcci?= =?UTF-8?q?=C3=B3nes=20de=20layout=20en=20folios=20garant=C3=ADa?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Acumuladores/CatFoliosGarantia.aspx | 22 +++++++++++----------- Compras/PopUpVerFactura.aspx.vb | 11 ++++++----- Ventas/ProductosServicios.aspx.vb | 6 +++++- 3 files changed, 22 insertions(+), 17 deletions(-) diff --git a/Acumuladores/CatFoliosGarantia.aspx b/Acumuladores/CatFoliosGarantia.aspx index 4f7dc67ac..fde6379a1 100644 --- a/Acumuladores/CatFoliosGarantia.aspx +++ b/Acumuladores/CatFoliosGarantia.aspx @@ -247,35 +247,35 @@ -
+ <%--
--%> -
- SubProyecto: - +
+ SubProyecto:
+
-
+ <%--
--%>
-   +
-   - + Tipo Folio:
+ General Optima Motobateria
-
+ <%--
--%>
@@ -283,8 +283,8 @@
-   - + Área:
+ Piso Almacén diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb index 482e6026a..49ae7b3d6 100644 --- a/Compras/PopUpVerFactura.aspx.vb +++ b/Compras/PopUpVerFactura.aspx.vb @@ -1238,6 +1238,7 @@ Partial Class PopUpVerFactura Dim Observaciones As String = ObjInventarios.Observaciones Dim ObservacionesSolicitud As String = ObjInventarios.DtResultados.FiltroPrimeroValor("ObservacionesSolicitud") Dim NombreCapturo As String = ObjInventarios.NombreCapturo + Dim NombreEntrego As String = ObjInventarios.DtResultados.FiltroPrimeroValor("Entrego") Dim CveAlmacen As Integer = ObjInventarios.CveAlmacen Dim Recibio As String = ObjInventarios.Recibio Dim PuestoRecibio As String = ObjInventarios.PuestoRecibio @@ -1341,7 +1342,7 @@ Partial Class PopUpVerFactura EstadoOrigen, PaisOrigen, CPOrigen, CalleDestino, NoExtDestino, ColoniaDestino, LocalidadDestino, MunicipioDestino, EstadoDestino, PaisDestino, CPDestino, FechaMovimiento, NombreCapturo, PuestoRecibio, PuestoEnrego, RazonSocial, ResponsableCarga, ResponsableRecibio, NombreCliente, - CantidadProductos:=CantidadProductos, CantidadUsados:=CantidadUsados, CveTipoAlmacen:=CveTipoAlmacen) + CantidadProductos:=CantidadProductos, CantidadUsados:=CantidadUsados, CveTipoAlmacen:=CveTipoAlmacen, NombreEntrego:=NombreEntrego) End Sub Private Sub PUanacExtr(CveMoneda As Integer) 'preciounitario a moneda nacional o extranjera @@ -1358,7 +1359,7 @@ Partial Class PopUpVerFactura Remision As String, Proveedor As String, CalleOrigen As String, NoExtOrigen As String, ColoniaOrigen As String, LocalidadOrigen As String, MunicipioOrigen As String, EstadoOrigen As String, PaisOrigen As String, CPOrigen As String, CalleDestino As String, NoExtDestino As String, ColoniaDestino As String, LocalidadDestino As String, MunicipioDestino As String, EstadoDestino As String, PaisDestino As String, CPDestino As String, FechaMovimiento As Date, NombreCapturo As String, PuestoRecibio As String, PuestoEntrego As String, - RazonSocial As String, ResponsableCarga As String, ResponsableRecibio As String, NombreCliente As String, Optional CantidadProductos As Decimal = 0, Optional CantidadUsados As Decimal = 0, Optional CveTipoAlmacen As Integer = -1) + RazonSocial As String, ResponsableCarga As String, ResponsableRecibio As String, NombreCliente As String, Optional CantidadProductos As Decimal = 0, Optional CantidadUsados As Decimal = 0, Optional CveTipoAlmacen As Integer = -1, Optional NombreEntrego As String = "") Select Case CveConcepto @@ -2704,7 +2705,7 @@ Partial Class PopUpVerFactura End If Dim DepartamentoRecibe As String = GlobalDTRHPersonal(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Departamento", String.Format("NombreCompleto = '{0}'", Recibio)) - Dim DepartamentoEntrego As String = GlobalDTRHPersonal(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Departamento", String.Format("NombreCompleto = '{0}'", Capturo)) + Dim DepartamentoEntrego As String = GlobalDTRHPersonal(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Departamento", String.Format("NombreCompleto = '{0}'", NombreEntrego)) params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("Concepto", "Salida por resguardo")) @@ -2715,7 +2716,7 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("Descuentos", "")) params.Add(New ReportParameter("IVA", "")) params.Add(New ReportParameter("Total", "")) - params.Add(New ReportParameter("NombreEntrego", String.Format("ENTREGÓ{0}{1}", vbCrLf, Capturo))) + params.Add(New ReportParameter("NombreEntrego", NombreEntrego)) params.Add(New ReportParameter("NombreRecibio", Recibio)) params.Add(New ReportParameter("PuestoRecibio", PuestoEntrego)) params.Add(New ReportParameter("PuestoEntrego", PuestoRecibio)) @@ -2727,7 +2728,7 @@ Partial Class PopUpVerFactura End If params.Add(New ReportParameter("FechaMovimiento", FechaMovimiento.ToString("dd/MM/yyyy"))) - params.Add(New ReportParameter("UsuarioImprimio", NombreCapturo)) + params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) params.Add(New ReportParameter("Observaciones", Observaciones)) diff --git a/Ventas/ProductosServicios.aspx.vb b/Ventas/ProductosServicios.aspx.vb index 51997adf9..e9d0ab307 100644 --- a/Ventas/ProductosServicios.aspx.vb +++ b/Ventas/ProductosServicios.aspx.vb @@ -912,7 +912,7 @@ Partial Class ProductosyServicios Public Sub CargaDdlSATPS() DdlSATPS.setEsWebService(True) - DdlSATPS.Attributes.Add("data-metodo", "getpssat") + DdlSATPS.ddlWS.Attributes.Add("data-metodo", "getpssat") End Sub Public Sub CargaDdlFraccionArancelaria() @@ -1124,6 +1124,10 @@ Partial Class ProductosyServicios End Sub Protected Sub BtnGuardar_Click(sender As Object, e As System.EventArgs) Handles BtnGuardar.Click + If DdlSATPS.SelectedValue = "46920" Then + Alert("El Producto Servicio SAT con clave '01010101' no es valido, por favor seleccione otro", TipoMensaje.MsgAdvertencia) + Exit Sub + End If If TxtPS.Text.Trim.Length = 0 Or DdlTipoPS.SelectedValue.ToEntero <= 0 Or DdlUnidadMedida.SelectedValue.ToEntero <= 0 Or DdlClasificacion.SelectedValue.ToEntero <= 0 Then Alert("Los campos Producto/Servicio, Tipo, Unidad de medida, Clasificación Contable son requeridos por favor ingreselos.", TipoMensaje.MsgAdvertencia) From 821cc923e147410d6a519b409389bc27570ce223 Mon Sep 17 00:00:00 2001 From: Rakcsle Supertramp Date: Wed, 7 Oct 2020 17:23:01 -0700 Subject: [PATCH 02/17] Clientes PopIEVentas Metodo Pago, Empresa validacion metodo inventario --- Bancos/PopIEVentas.aspx | 7 +++++++ Bancos/PopIEVentas.aspx.vb | 13 +++++++++---- Sistemas/Empresa.aspx | 5 +++++ Ventas/Clientes.aspx | 3 +++ 4 files changed, 24 insertions(+), 4 deletions(-) diff --git a/Bancos/PopIEVentas.aspx b/Bancos/PopIEVentas.aspx index 4824b3eeb..cdaa66505 100644 --- a/Bancos/PopIEVentas.aspx +++ b/Bancos/PopIEVentas.aspx @@ -35,6 +35,13 @@ + + + +   + + +
diff --git a/Bancos/PopIEVentas.aspx.vb b/Bancos/PopIEVentas.aspx.vb index 3d83cb0b4..ef4f28551 100644 --- a/Bancos/PopIEVentas.aspx.vb +++ b/Bancos/PopIEVentas.aspx.vb @@ -736,11 +736,16 @@ Partial Class Bancos_PopIEVentas SerieFolio = dr("SerieFolio").ToString TipoCambioOriginal = dr("TipoCambio").ToString.ToDecimal CveSubProyectoVenta = dr("CveSubProyecto").ToString.ToEntero - 'Configuración de Modalidad Update - - 'Dim RFCCliente As String = GlobalDTCliente(UsuarioActual.CveEmpresa).FiltroPrimeroValor("RFC", $"CveCliente = {CveCliente} ") - + LblMetodoPAgo.Text = $"{dr("ClaveMetodoPagoSATStr").ToString() }" + + + + 'Configuración de Modalidad Update + + 'Dim RFCCliente As String = GlobalDTCliente(UsuarioActual.CveEmpresa).FiltroPrimeroValor("RFC", $"CveCliente = {CveCliente} ") + + If Not UsuarioActual.Empresa.Funcionalidad(536) = "1" Then If dr("TipoDocto").ToString = "Rem" Then Alert("Los documentos de tipo Remisión no se permite realizar el pago", TipoMensaje.MsgAdvertencia) diff --git a/Sistemas/Empresa.aspx b/Sistemas/Empresa.aspx index 65c1c9719..0c560e540 100644 --- a/Sistemas/Empresa.aspx +++ b/Sistemas/Empresa.aspx @@ -1327,6 +1327,11 @@ + + + + + diff --git a/Ventas/Clientes.aspx b/Ventas/Clientes.aspx index 3c9ac4d86..b592f7565 100644 --- a/Ventas/Clientes.aspx +++ b/Ventas/Clientes.aspx @@ -1931,6 +1931,9 @@ + + + From 62b4d1dbd573665cede46afd290cdb41f965f87a Mon Sep 17 00:00:00 2001 From: Rakcsle Supertramp Date: Wed, 7 Oct 2020 18:22:36 -0700 Subject: [PATCH 03/17] correcion clientes --- Ventas/Clientes.aspx | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Ventas/Clientes.aspx b/Ventas/Clientes.aspx index b592f7565..391f5f8cb 100644 --- a/Ventas/Clientes.aspx +++ b/Ventas/Clientes.aspx @@ -1921,7 +1921,9 @@
- +
+ @@ -1977,6 +1979,8 @@ +
+ @@ -2006,14 +2010,15 @@
-
+
" style="display: inline-block; margin-right: -20px; width: 150px;" /> " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info">
-
+

+
@@ -2055,6 +2060,7 @@ +
From 0fac7c5b0949682bcc50ea26327489b7cb713322 Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Wed, 7 Oct 2020 19:59:18 -0700 Subject: [PATCH 04/17] =?UTF-8?q?validaciones=20del=20producto=20servicio?= =?UTF-8?q?=20sat=20con=20c=C3=B3digo=2001010101=20al=20cargar=20una=20fac?= =?UTF-8?q?tura=20con=20xml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Compras/Compras.aspx.vb | 117 ++++++++++++++++++++++++++++++++-------- 1 file changed, 96 insertions(+), 21 deletions(-) diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index be933f6a1..d7ef591ea 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -29,6 +29,24 @@ Partial Class Compras_Compras End Set End Property + Private Property EstaAsociadoACajaChica() As Boolean + Get + Return If(IsNothing(ViewState("EstaAsociadoACajaChica")), False, CBool(ViewState("EstaAsociadoACajaChica"))) + End Get + Set + ViewState("EstaAsociadoACajaChica") = Value + End Set + End Property + + Private Property EstaAsociadoAPersonal() As Boolean + Get + Return If(IsNothing(ViewState("EstaAsociadoAPersonal")), False, CBool(ViewState("EstaAsociadoAPersonal"))) + End Get + Set + ViewState("EstaAsociadoAPersonal") = Value + End Set + End Property + Private Property CveUsuarioEvaluador() As Integer Get Return If(IsNothing(ViewState("CveUsuarioEvaluador")), -1, CInt(ViewState("CveUsuarioEvaluador"))) @@ -848,6 +866,14 @@ Partial Class Compras_Compras ViewState("PopUpOC") = value End Set End Property + Private Property CompraEstaVinculadaOC As Boolean + Get + Return CBool(ViewState("CompraEstaVinculadaOC")) + End Get + Set(value As Boolean) + ViewState("CompraEstaVinculadaOC") = value + End Set + End Property #End Region #Region "PROPIEDADES ALMACEN" 'Charlie @@ -1307,6 +1333,9 @@ Partial Class Compras_Compras ViewState("CveFactura") = Request("CveFactura").ToEntero Dim RFC As String = CargaFactura(CveFactura) + If Not VerificarProductosSATPS() Then + Exit Sub + End If If RFC.Trim <> String.Empty Then DdlProveedor.Visible = False HplProveedor.Visible = True @@ -1734,6 +1763,7 @@ Partial Class Compras_Compras 'TmpDT.Columns.Add("IEPSPSIVAPorcentaje") SubTotalConceptos = Math.Round(TmpDT.SUM("Total"), 2).ToDecimal AddPS2(False) + End If Else CargaConceptosXML(XMLDoc) @@ -3971,6 +4001,17 @@ Partial Class Compras_Compras DtNoEncontrados.Dispose() End If + 'Verifica funcionalidad 702 "Require orden de compra para factura de compra" + + If UsuarioActual.Empresa.Funcionalidad(702) = "1" Then + If Not EstaAsociadoACajaChica And Not EstaAsociadoAPersonal Then + If Not CompraEstaVinculadaOC Then + Alert("Debe de vincular una orden de compra para realizar esta factura") + Exit Sub + End If + End If + End If + 'Si se marcó No Deducible en el encabezado mínimo se debe registrar un No Deducible en el Detalle Dim GuardaNoDeducibles As Boolean = False If ChkEsNoDeducible.Checked Then @@ -12712,6 +12753,7 @@ Partial Class Compras_Compras CveMoneda = dr("CveMoneda").ToString.ToEntero IdCuentaBancaria = dr("IdCtaContable").ToString.ToEntero CveCuentaBancaria = dr("IdCtaContableSIG").ToString.ToEntero + EstaAsociadoACajaChica = True End If If UsuarioActual.Empresa.Funcionalidad(505) <> "1" Then @@ -12740,7 +12782,7 @@ Partial Class Compras_Compras ObjMovtos.Dispose() DDlCheques.DataBind() - + EstaAsociadoAPersonal = True DDlCheques_SelectedIndexChanged(DDlCheques, EventArgs.Empty) Else @@ -13751,6 +13793,9 @@ Partial Class Compras_Compras #Region " REEMBOLSOS NO USA AC " Protected Sub DdlPersonal2_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlPersonalReembolso.SelectedIndexChanged ViewState("CvePersonal") = DdlPersonalReembolso.SelectedValue + If DdlPersonalReembolso.SelectedValue.ToEntero > 0 Then + EstaAsociadoAPersonal = True + End If End Sub Protected Sub DdlCajaChica2_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlCuentaCajaChicaReembolso.SelectedIndexChanged Dim dr As DataRow = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero("CveCuenta = " & DdlCuentaCajaChicaReembolso.SelectedValue) @@ -13759,6 +13804,7 @@ Partial Class Compras_Compras CveMoneda = dr("CveMoneda").ToString.ToEntero IdCuentaBancaria = dr("IdCtaContable").ToString.ToEntero CveCuentaBancaria = dr("IdCtaContableSIG").ToString.ToEntero + EstaAsociadoACajaChica = True End If ViewState("CveCajaChica") = DdlCuentaCajaChicaReembolso.SelectedValue End Sub @@ -15381,27 +15427,27 @@ Partial Class Compras_Compras Dim SubTotalCompra As Decimal = Amortizacion Dim DiferenciaPermitida = 1 Dim Cont = 0 - Dim ProductosCodigoSATNoPermitidos As New StringBuilder("") - For Each gvr As GridViewRow In GvOC1.Rows - SubTotalGV += gvr.FCTextBox("TxtTotalOC1").Text.ToDecimal - If Cont = 0 Then DdlProveedorSucursal.SelectedValueExist(gvr.DataKey("CveProveedorSucursal").ToEntero()) - Cont = 1 - If GvOC1.Columns(6).Visible Then - Dim SatPS As String = gvr.FCDropDownLost("DdlSATPS").SelectedText() - Dim NombreProducto As String = gvr.FCLabel("LbProductoServicio").Text - If SatPS.Contains("01010101") Then - ProductosCodigoSATNoPermitidos.AppendFormat("{0}
", NombreProducto) - 'Dim mensajeAdvertencia As String = String.Format("Al vincular una Orden de Compra no se permiten productos con Producto/Servicio SAT igual a '{0}', revise el producto '{1}' en Orden(es) de Compra Vinculada(s)", SatPS, NombreProducto) - 'Alert(mensajeAdvertencia, TipoMensaje.MsgAdvertencia) + 'Dim ProductosCodigoSATNoPermitidos As New StringBuilder("") + 'For Each gvr As GridViewRow In GvOC1.Rows + ' SubTotalGV += gvr.FCTextBox("TxtTotalOC1").Text.ToDecimal + ' If Cont = 0 Then DdlProveedorSucursal.SelectedValueExist(gvr.DataKey("CveProveedorSucursal").ToEntero()) + ' Cont = 1 + ' If GvOC1.Columns(6).Visible Then + ' Dim SatPS As String = gvr.FCDropDownLost("DdlSATPS").SelectedText() + ' Dim NombreProducto As String = gvr.FCLabel("LbProductoServicio").Text + ' If SatPS.Contains("01010101") Then + ' ProductosCodigoSATNoPermitidos.AppendFormat("{0}
", NombreProducto) + ' 'Dim mensajeAdvertencia As String = String.Format("Al vincular una Orden de Compra no se permiten productos con Producto/Servicio SAT igual a '{0}', revise el producto '{1}' en Orden(es) de Compra Vinculada(s)", SatPS, NombreProducto) + ' 'Alert(mensajeAdvertencia, TipoMensaje.MsgAdvertencia) - End If - End If - Next - If ProductosCodigoSATNoPermitidos.ToString.Length > 0 Then - Dim mensajeAdvertencia As String = String.Format("No se permite vinculación de productos con código SAT '01010101', revise los productos:

{0}", ProductosCodigoSATNoPermitidos.ToString) - Alert(mensajeAdvertencia, TipoMensaje.MsgAdvertencia) - Exit Sub - End If + ' End If + ' End If + 'Next + 'If ProductosCodigoSATNoPermitidos.ToString.Length > 0 Then + ' Dim mensajeAdvertencia As String = String.Format("No se permite vinculación de productos con código SAT '01010101', revise los productos:

{0}", ProductosCodigoSATNoPermitidos.ToString) + ' Alert(mensajeAdvertencia, TipoMensaje.MsgAdvertencia) + ' Exit Sub + 'End If If Math.Abs(SubTotalGV - SubTotalCompra) < DiferenciaPermitida Then LbSubTotalDif.Visible = False @@ -15639,6 +15685,7 @@ Partial Class Compras_Compras End If CalculaTotales() + CompraEstaVinculadaOC = True End Sub @@ -20156,7 +20203,35 @@ Partial Class Compras_Compras End Sub + Private Function VerificarProductosSATPS() As Boolean + Dim CvePSGRuposAux As New StringBuilder("") + For Each gvr As GridViewRow In GvPS.Rows + Dim CvePSIndividual As String = gvr.DataKey("CvePS") + CvePSGRuposAux.AppendFormat("{0},", CvePSIndividual) + Next + Dim CvePSGRupos As String = Left(CvePSGRuposAux.ToString, CvePSGRuposAux.Length - 1) + + Dim PSSat As DataTable = GlobalDTPS(UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CvePS IN ({0})", CvePSGRuposAux)) + + Dim ProductosCodigoSATNoPermitidos As New StringBuilder("") + For Each PS As GridViewRow In GvPS.Rows + Dim PSIndividual As String = PS.DataKey("PS") + Dim ClavePSSAT As String = PSSat.FiltroPrimeroValor("CveSATPS", String.Format("PS = '{0}'", PSIndividual)) + If ClavePSSAT = "46920" Then + ProductosCodigoSATNoPermitidos.AppendFormat("{0}
", PSIndividual) + End If + Next + + If ProductosCodigoSATNoPermitidos.ToString.Length > 0 Then + Dim mensajeAdvertencia As String = String.Format("No se permite vinculación de productos con código SAT '01010101', revise los productos:

{0}", ProductosCodigoSATNoPermitidos.ToString) + Alert(mensajeAdvertencia, TipoMensaje.MsgAdvertencia) + Return False + End If + + Return True + + End Function End Class From 7ef202e81842fc4c8cdd5d6af6906f6119f746c1 Mon Sep 17 00:00:00 2001 From: Rakcsle Supertramp Date: Thu, 8 Oct 2020 12:33:34 -0700 Subject: [PATCH 05/17] Fuctaciones Cambiarias, se agrega txt Concepto por cada tipo --- Bancos/FluctuacionCambiaria.aspx | 155 +++++++++++++++++++------- Bancos/FluctuacionCambiaria.aspx.vb | 64 +++-------- Inventarios/TrasladoSolicitud.aspx | 50 +++++---- Inventarios/TrasladoSolicitud.aspx.vb | 6 + 4 files changed, 162 insertions(+), 113 deletions(-) diff --git a/Bancos/FluctuacionCambiaria.aspx b/Bancos/FluctuacionCambiaria.aspx index 57b64e754..3ecd068fa 100644 --- a/Bancos/FluctuacionCambiaria.aspx +++ b/Bancos/FluctuacionCambiaria.aspx @@ -225,20 +225,32 @@
+ +
-
- - - - - -
+ +
+ + + + +
+ +
+ + + + + +
+
-
- + + @@ -320,19 +332,31 @@ -
+
-
- - + +
+ + + + +
+ +
+ - - -
+ + + +
+ +
+

@@ -361,17 +385,30 @@
-
- - + + +
+ + + + +
+ +
+ - - -
+ + + +
+ +
+
@@ -407,13 +444,23 @@
-
- - + +
+ + + + +
+ +
+ - - -
+ + + +
+
@@ -445,14 +492,26 @@
-
-
- - - - - -
+
+ +
+ + + + +
+ +
+ + + + + +
+ + +
@@ -481,13 +540,23 @@
-
- - - - - -
+ +
+ + + + +
+ +
+ + + + + +
+
diff --git a/Bancos/FluctuacionCambiaria.aspx.vb b/Bancos/FluctuacionCambiaria.aspx.vb index b2b635433..504ba6539 100644 --- a/Bancos/FluctuacionCambiaria.aspx.vb +++ b/Bancos/FluctuacionCambiaria.aspx.vb @@ -20,7 +20,7 @@ Partial Class Bancos_FluctuacionCambiaria Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load If Not Page.IsPostBack Then - CargarCentrosDeCosto(Nothing, DdlSubproyectoBancos, Nothing, LblSubProyecto) + CargarCentrosDeCosto(Nothing, DdlSubproyectoBancos, Nothing, LblSubProyectoBancos) CargarCentrosDeCosto(Nothing, DdlsubProyectoVentas, Nothing, LblSubProyectoVentas) CargarCentrosDeCosto(Nothing, DdlSubProyectoCompras, Nothing, LblSubProyectoCompras) CargarCentrosDeCosto(Nothing, DdlSubProyectoFiliales, Nothing, LblSubProyectoFiliales) @@ -232,17 +232,12 @@ Partial Class Bancos_FluctuacionCambiaria #Region "FLUCTUACION COMPRAS" - Protected Sub BtnGeneraCompras_Click(sender As Object, e As EventArgs) - - 'If DdlSubproyecto.SelectedValue.ToEntero < 0 Then - ' Alert($"Debe de seleccionar un {LblSubProyecto.Text}", TipoMensaje.MsgAdvertencia) - ' Exit Sub - 'End If - + Protected Sub BtnGeneraCompras_Click(sender As Object, e As EventArgs) + Dim Total As Decimal = 0 Dim Conta As New ClsContabilidad Conta.IniciaTransacSQL() - Dim CvePrePoliza As Integer = Conta.AddPrePolizas("Banc/FluctuaC", 1, 0, 0, 1, TxtFecha.Text.ToDate, "Fluctuación", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) + Dim CvePrePoliza As Integer = Conta.AddPrePolizas("Banc/FluctuaC", 1, 0, 0, 1, TxtFecha.Text.ToDate, TxtConceptoCompras.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Dim idCta As Integer = 0 Dim CveCuenta As Integer = 0 Dim CveCuentaPerdida, CveCuentaGanancia As Integer @@ -306,18 +301,12 @@ Partial Class Bancos_FluctuacionCambiaria #Region "FLUCTUACION VENTAS" - Protected Sub BtnGeneraVentas_Click(sender As Object, e As EventArgs) - - 'If DdlsubProyectoVentas.SelectedValue.ToEntero < 0 Then - ' Alert($"Debe de seleccionar un {LblSubProyecto.Text}", TipoMensaje.MsgAdvertencia) - ' Exit Sub - 'End If - - + Protected Sub BtnGeneraVentas_Click(sender As Object, e As EventArgs) + Dim Total As Decimal = 0 Dim Conta As New ClsContabilidad Conta.IniciaTransacSQL() - Dim CvePrePoliza As Integer = Conta.AddPrePolizas("Banc/FluctuaV", 1, 0, 0, 1, TxtFecha.Text.ToDate, "Fluctuación Ventas", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) + Dim CvePrePoliza As Integer = Conta.AddPrePolizas("Banc/FluctuaV", 1, 0, 0, 1, TxtFecha.Text.ToDate, TxtConceptoVentas.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Dim idCta As Integer = 0 Dim CveCuenta As Integer = 0 Dim CveCuentaPerdida, CveCuentaGanancia As Integer @@ -345,13 +334,13 @@ Partial Class Bancos_FluctuacionCambiaria CveCuenta = CveCuentaPerdida idCta = idCtaPerdida TipoMovto = False - End If - If Not Conta.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Math.Abs(Total), "Fluctuación Ventas", CveConceptoContable, "Fluctuación Ventas", Now, idCta, 0, ImporteMX:=Math.Abs(Total), CveCuenta:=CveCuenta, CveSubProyecto:=DdlsubProyectoVentas.SelectedValue.ToEntero) Then - If Not Conta.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Math.Abs(Total), "Fluctuación Ventas", CveConceptoContable, "Fluctuación Ventas", Now, idCta, 0, ImporteMX:=Math.Abs(Total), CveCuenta:=CveCuenta, CveSubProyecto:=DdlsubProyectoVentas.SelectedValue.ToEntero) Then - ErrorRegistrar = True - End If + End If - Dim CveConconceptoCliente As Integer = 203 + If Not Conta.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Math.Abs(Total), "Fluctuación Ventas", CveConceptoContable, "Fluctuación Ventas", Now, idCta, 0, ImporteMX:=Math.Abs(Total), CveCuenta:=CveCuenta, CveSubProyecto:=DdlsubProyectoVentas.SelectedValue.ToEntero) Then + ErrorRegistrar = True + End If + + Dim CveConconceptoCliente As Integer = 203 'saco las cuentas de pérdida y ganancia For Each gvr As GridViewRow In GvVentas.Rows @@ -386,18 +375,12 @@ Partial Class Bancos_FluctuacionCambiaria Protected Sub BtnGeneraBancos_Click(sender As Object, e As EventArgs) - - 'If DdlSubproyectoBancos.SelectedValue.ToEntero < 0 Then - ' Alert($"Debe de seleccionar un {LblSubProyecto.Text}", TipoMensaje.MsgAdvertencia) - ' Exit Sub - 'End If - Dim Total As Decimal = 0 Dim Conta As New ClsContabilidad Conta.IniciaTransacSQL() Dim ObjContPaq As New ClsContPAQi(UsuarioActual.Empresa) ObjContPaq.IniciaTransacSQL() - Dim CvePrePoliza As Integer = Conta.AddPrePolizas("Banc/FluctuaB", 1, 0, 0, 1, TxtFecha.Text.ToDate, "Fluctuación Bancaria", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) + Dim CvePrePoliza As Integer = Conta.AddPrePolizas("Banc/FluctuaB", 1, 0, 0, 1, TxtFecha.Text.ToDate, TxtConceptoBancos.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Dim idCta As Integer = 0 Dim CveCuenta As Integer = 0 Dim CveCuentaPerdida, CveCuentaGanancia As Integer @@ -485,16 +468,10 @@ Partial Class Bancos_FluctuacionCambiaria Protected Sub BtnGeneraDedudores_Click(sender As Object, e As EventArgs) - - 'If DdlSubProyectoDeoudores.SelectedValue.ToEntero < 0 Then - ' Alert($"Debe de seleccionar un {LblSubProyecto.Text}", TipoMensaje.MsgAdvertencia) - ' Exit Sub - 'End If - Dim Total As Decimal = 0 Dim Conta As New ClsContabilidad Dim Banco As New ClsBancos(Conta.IniciaTransacSQL()) - Dim CvePrePoliza As Integer = Conta.AddPrePolizas("Banc/FluctuaDD", 1, 0, 0, 1, TxtFecha.Text.ToDate, "Fluctuación Deudor", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) + Dim CvePrePoliza As Integer = Conta.AddPrePolizas("Banc/FluctuaDD", 1, 0, 0, 1, TxtFecha.Text.ToDate, TxtConceptoDeudores.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Dim idCta As Integer = 0 Dim CveCuenta As Integer = 0 Dim CveCuentaPerdida, CveCuentaGanancia As Integer @@ -565,17 +542,12 @@ Partial Class Bancos_FluctuacionCambiaria Protected Sub BtnGeneraFiliales_Click(sender As Object, e As EventArgs) - 'If DdlSubproyecto.SelectedValue.ToEntero < 0 Then - ' Alert($"Debe de seleccionar un {LblSubProyecto.Text}", TipoMensaje.MsgAdvertencia) - ' Exit Sub - 'End If - Dim Total As Decimal = 0 Dim Conta As New ClsContabilidad Dim Banco As New ClsBancos(Conta.IniciaTransacSQL()) Dim ObjContPaq As New ClsContPAQi(UsuarioActual.Empresa) ObjContPaq.IniciaTransacSQL() - Dim CvePrePoliza As Integer = Conta.AddPrePolizas("Banc/FluctuaFilial", 1, 0, 0, 1, TxtFecha.Text.ToDate, "Fluctuación Filiales", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) + Dim CvePrePoliza As Integer = Conta.AddPrePolizas("Banc/FluctuaFilial", 1, 0, 0, 1, TxtFecha.Text.ToDate, TxtConceptoFiliales.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Dim idCta As Integer = 0 Dim CveCuenta As Integer = 0 Dim CveCuentaPerdida, CveCuentaGanancia As Integer @@ -665,12 +637,10 @@ Partial Class Bancos_FluctuacionCambiaria Protected Sub BtnGeneraAcreedores_Click(sender As Object, e As EventArgs) - - Dim Total As Decimal = 0 Dim Conta As New ClsContabilidad Conta.IniciaTransacSQL() - Dim CvePrePoliza As Integer = Conta.AddPrePolizas("Banc/FluctuaA", 1, 0, 0, 1, TxtFecha.Text.ToDate, "Fluctuación", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) + Dim CvePrePoliza As Integer = Conta.AddPrePolizas("Banc/FluctuaA", 1, 0, 0, 1, TxtFecha.Text.ToDate, TxtConceptoAcreedores.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Dim idCta As Integer = 0 Dim CveCuenta As Integer = 0 Dim CveCuentaPerdida, CveCuentaGanancia As Integer diff --git a/Inventarios/TrasladoSolicitud.aspx b/Inventarios/TrasladoSolicitud.aspx index 5e5b351c2..ea4114667 100644 --- a/Inventarios/TrasladoSolicitud.aspx +++ b/Inventarios/TrasladoSolicitud.aspx @@ -234,35 +234,39 @@
- - -
+ + + -
- +
+ +
+
- - - + + + -
Estado :
Usuario :
Fecha :
Estado :
Usuario :
Fecha :
+ +
+
-
- -
- -
- +
-
- -
-
- -
+
+ +
+
+ +
-
+
+ + + + + diff --git a/Inventarios/TrasladoSolicitud.aspx.vb b/Inventarios/TrasladoSolicitud.aspx.vb index 13286849f..baf983a9c 100644 --- a/Inventarios/TrasladoSolicitud.aspx.vb +++ b/Inventarios/TrasladoSolicitud.aspx.vb @@ -285,6 +285,9 @@ Partial Class Inventarios_TrasladoSolicitud Else Alert("Ocurrió un error al obtener los datos del traspaso.", TipoMensaje.MsgError) End If + + UpAutorizaciones.Update() + End If ObjInventarios.Dispose() ObjClientes.Dispose() @@ -1034,6 +1037,9 @@ Partial Class Inventarios_TrasladoSolicitud MandaCorreoRechazo(LbFolio.Text.ToEntero, CveTraspasoSolicitud, CveUsuarioSolicita, TxtMotivoRechazo.Text) CargaDatos() RegistraScript("$('#ModalRechazarTraslado').modal('hide');") + + + End If End Sub From 726b445552d1bc80aeaa1efa5bc5955cd63ebabd Mon Sep 17 00:00:00 2001 From: JORGE LUIS CAUDILLO ESPARZA Date: Thu, 8 Oct 2020 14:29:01 -0700 Subject: [PATCH 06/17] --- RH/Personal.aspx.vb | 17 ++++++++++++----- Ventas/Clientes.aspx.vb | 2 +- vwd.webinfo | 2 ++ 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/RH/Personal.aspx.vb b/RH/Personal.aspx.vb index 9f4100846..7e0de0225 100644 --- a/RH/Personal.aspx.vb +++ b/RH/Personal.aspx.vb @@ -1089,11 +1089,18 @@ Partial Class RH_Personal End Sub Private Sub CargaSubProyectoAsignado() - DdlSubProyectoAsignado.Items.Clear() - DdlSubProyectoAsignado.DataSource = GlobalDTSubProyectos(DdlProyectoAsignado.SelectedValue.ToEntero) - DdlSubProyectoAsignado.DataBind() - - DdlSubProyectoAsignado.Items.Insert(0, New ListItem("Sin SubProyecto asignado", "-1")) + If DivProyectosAsignado.Visible Then + + DdlSubProyectoAsignado.DataSource = If(Not UsuarioActual.TienePermisoProceso(110), GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1), GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, 1)) + DdlSubProyectoAsignado.DataBind() + DdlSubProyectoAsignado.Items.Insert(0, New ListItem("Todos", "-1")) + 'old + 'DdlSubProyectoAsignado.Items.Clear() + 'DdlSubProyectoAsignado.DataSource = GlobalDTSubProyectos(DdlProyectoAsignado.SelectedValue.ToEntero) + 'DdlSubProyectoAsignado.DataBind() + + 'DdlSubProyectoAsignado.Items.Insert(0, New ListItem("Sin SubProyecto asignado", "-1")) + End If End Sub Private Sub CargaSubProyectoAsistenciaC() diff --git a/Ventas/Clientes.aspx.vb b/Ventas/Clientes.aspx.vb index c2b28c20a..de17079a9 100644 --- a/Ventas/Clientes.aspx.vb +++ b/Ventas/Clientes.aspx.vb @@ -2731,7 +2731,7 @@ Partial Class Clientes 'HLRemision.HRef = $"/Ventas/Ventas.aspx?CveRemision={e.Row.DBCampo("CveVenta")}" Dim Liga As String = String.Format("< a class=""Texto"" href=""/Ventas/Ventas.aspx?CveVenta={0}"">", e.Row.DBCampo("CveVenta")) - HLSendMail.HRef = String.Format("javascript:$get('HdnTipoDocto').value='{0}';$get('HdnCveVenta').value='{1}';$get('HdnFolioVenta').value='{2}';$get('TxtParaMail').value='{3}';$get('HdnSerieFolio').value='{4}';$get('HdnSubProyecto').value='{5}';$('#ModalDivMail').modal();", e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("CveVenta"), e.Row.DBCampo("folio"), e.Row.DBCampo("Correo"), e.Row.DBCampo("SerieFolio"), e.Row.DBCampo("SubProyecto")) + HLSendMail.HRef = String.Format("javascript:(function mail(){{$get('HdnTipoDocto').value='{0}';$get('HdnCveVenta').value='{1}';$get('HdnFolioVenta').value='{2}';$get('TxtParaMail').value='{3}';$get('HdnSerieFolio').value='{4}';$get('HdnSubProyecto').value='{5}';$('#ModalDivMail').modal();return false;}})();", e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("CveVenta"), e.Row.DBCampo("folio"), e.Row.DBCampo("Correo"), e.Row.DBCampo("SerieFolio"), e.Row.DBCampo("SubProyecto")) e.Row.FCLiteral("LtlFactura").Text = String.Format("{1}", e.Row.DBCampo("CveVenta"), e.Row.DBCampo("Folio")) UpSendMail.Update() diff --git a/vwd.webinfo b/vwd.webinfo index f280abd89..c04cff67c 100644 --- a/vwd.webinfo +++ b/vwd.webinfo @@ -114,6 +114,8 @@ + + From cb7455f17a7828e62f1d6585bcbd057e6142fe6c Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 8 Oct 2020 18:11:39 -0700 Subject: [PATCH 07/17] --ignorar el ajuste del pu si no tiene movimeitnos de salida --- OC/OC.aspx.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OC/OC.aspx.vb b/OC/OC.aspx.vb index 526093576..146939ec4 100644 --- a/OC/OC.aspx.vb +++ b/OC/OC.aspx.vb @@ -2858,7 +2858,7 @@ Partial Class OC '2018.11.24 se cambia concepto 176, de cargo a abono negativo., petición MALL '2019.03.26 se cambia concepto 177, de abono a cargo., petición MALL '2019.04.10 se cambia concepto 177, de cargo a abono., petición MALL - If ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, -DiferenciaInvOC, SerieFolio, If(ConceptoSalida = 0, 177, 177), SerieFolio, Fecha, If(ConceptoSalida = 0, IdCtaContableAlmacen, IdCtaContableRecepcionOCER), -1, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimientoAlmacen, CveOC:=CveOrdenCompra, ImporteMX:=-DiferenciaInvOC, CveCuenta:=CveCuentaAlmacen, CveOCDetalle:=CveOCDetalle, CveSubProyecto:=DdlSubProyecto.SelectedValue.ToEntero) Then + If ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, -DiferenciaInvOC, SerieFolio, If(ConceptoSalida = 0, 177, 177), SerieFolio, Fecha, IdCtaContableRecepcionOCER, -1, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimientoAlmacen, CveOC:=CveOrdenCompra, ImporteMX:=-DiferenciaInvOC, CveCuenta:=CveCuentaAlmacen, CveOCDetalle:=CveOCDetalle, CveSubProyecto:=DdlSubProyecto.SelectedValue.ToEntero) Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, DiferenciaInvOC, SerieFolio, 176, SerieFolio, Fecha, IdCtaContableRecepcionOC, -1, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimientoAlmacen, CveOC:=CveOrdenCompra, ImporteMX:=DiferenciaInvOC, CveOCDetalle:=CveOCDetalle) Then TieneError = True Exit For From 28b42b681fcd74c9d14782833fe9f7d5adedd2d3 Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 8 Oct 2020 18:12:07 -0700 Subject: [PATCH 08/17] - envio de parametro de usuario --- OC/CatEstatus.aspx.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OC/CatEstatus.aspx.vb b/OC/CatEstatus.aspx.vb index 84303384c..f44f0a3d6 100644 --- a/OC/CatEstatus.aspx.vb +++ b/OC/CatEstatus.aspx.vb @@ -280,7 +280,7 @@ Partial Class OC_CatEstatus Dim CveSuperior As Integer = If(tblSuperior.Visible = True, ddlSuperior.SelectedValue.ToEntero, -1) If hdnCveEstatusUsuarios.Value.ToEntero = -1 Then - If objOC.AddEstatusUsuarios(hdnCveEstatus.Value.ToEntero, CboSubProyecto.SelectedValue.ToEntero, hdnCveUsuario.Value.ToEntero, True, CveSuperior, LimiteSuperior, LimiteInferior) Then + If objOC.AddEstatusUsuarios(hdnCveEstatus.Value.ToEntero, CboSubProyecto.SelectedValue.ToEntero, hdnCveUsuario.Value.ToEntero, True, CveSuperior, LimiteSuperior, LimiteInferior, UsuarioActual.CveUsuario) Then RegistraScript(String.Format("{0}.style.background-color='yellow'", IDCellYellow.Value)) End If From 5264f95b7d05aeb7d767f9a6960ff11f53fe1e0f Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 8 Oct 2020 18:12:28 -0700 Subject: [PATCH 09/17] -- cambio en alerta de guardado --- Contabilidad/RegPrePoliza.aspx.vb | 59 +++++++++++++++++-------------- 1 file changed, 32 insertions(+), 27 deletions(-) diff --git a/Contabilidad/RegPrePoliza.aspx.vb b/Contabilidad/RegPrePoliza.aspx.vb index cd307959c..28d7b8831 100644 --- a/Contabilidad/RegPrePoliza.aspx.vb +++ b/Contabilidad/RegPrePoliza.aspx.vb @@ -982,34 +982,39 @@ Partial Class ContabilidadC_RegPrePoliza Else MsgError = "No se pudo insertar la póliza" - End If - Catch ex As Exception - MsgError = "Error" - End Try - - If MsgError = "" Then - 'MENSAJE IE - If CveIE > 0 Then - MensajeAlert.AppendFormat("

Folio Bancario: {1}", CveIE, FolioIE) - Alert(MensajeAlert.ToString, ModExtensiones.TipoMensaje.MsgInformacion, "window.location.reload()") - Else - Alert(If(MensajeAlert.ToString = "", "Se registro con exito.", MensajeAlert.ToString), TipoMensaje.MsgInformacion, "window.location.reload()") - End If - - ObjIE.Commit() - If Conta IsNot Nothing Then Conta.Commit() - - UPPDocumento.Update() - - TxtObservaciones.Text = "" - GvMov.DataBind() - TxtFecha.Text = "" - TxtObservaciones.Text = "" - Else - ObjIE.RollBack() + End If + + If MsgError = "" Then + + 'MENSAJE IE + If CveIE > 0 Then + MensajeAlert.AppendFormat("

Folio Bancario: {1}", CveIE, FolioIE) + Alert(MensajeAlert.ToString, ModExtensiones.TipoMensaje.MsgInformacion, "window.location.reload()") + Else + Alert(If(MensajeAlert.ToString = "", "Se registro con exito.", MensajeAlert.ToString), TipoMensaje.MsgInformacion, "window.location.reload()") + End If + + ObjIE.Commit() + If Conta IsNot Nothing Then Conta.Commit() + + 'UPPDocumento.Update() + 'TxtObservaciones.Text = "" + 'GvMov.DataBind() + 'TxtFecha.Text = "" + 'TxtObservaciones.Text = "" + Else + ObjIE.RollBack() + If Conta IsNot Nothing Then Conta.RollBack() + End If + Catch ex As Exception + ObjIE.RollBack() If Conta IsNot Nothing Then Conta.RollBack() - End If - + Alert("Ocurrio un error al registrar el movimiento", TipoMensaje.MsgInformacion) + ex.GuardaLog(ex.Message) + End Try + + + ObjIE.Dispose() ObjMov.Dispose() If Conta IsNot Nothing Then Conta.Dispose() From 2d317f5baf359c4e03b34745ed21c065c5c01e5b Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 8 Oct 2020 18:12:44 -0700 Subject: [PATCH 10/17] -- cambio en la cuenta contable enviada --- Compras/ReembolsosComprobaciones.aspx.vb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Compras/ReembolsosComprobaciones.aspx.vb b/Compras/ReembolsosComprobaciones.aspx.vb index 36b4176d3..f5d83d58c 100644 --- a/Compras/ReembolsosComprobaciones.aspx.vb +++ b/Compras/ReembolsosComprobaciones.aspx.vb @@ -644,7 +644,7 @@ Partial Class Compras_ReembolsosComprobaciones ConceptoMovimiento = $"{gvr.DataKey("Proveedor")} F:{gvr.DataKey("SerieFolio")} {If(DdlPersonal.Visible, DdlPersonal.SelectedItem.Text, DdlCajaChica.SelectedItem.Text)}" Referencia = gvr.DataKey("SerieFolio").ToString IdCtaProveedor = gvr.DataKey("IdCtaContProveedores").ToEntero - CveCuentaProveedor = gvr.DataKey("IdCtaContProveedoresSIG").ToEntero + ImportePagar = gvr.FCTextBox("TxtAbonar").Text.ToDecimal ImporteOriginal = gvr.FCTextBox("TxtAbonar").Text.ToDecimal @@ -660,6 +660,11 @@ Partial Class Compras_ReembolsosComprobaciones Case Else End Select End If + If gvr.DataKey("CveTipoConcepto").ToEntero = 2 Then + IdCtaProveedor = gvr.DataKey("IdCtaContAcreedor").ToEntero + Else + IdCtaProveedor = gvr.DataKey("IdCtaContProveedores").ToEntero + End If If SaldoCheque > 0 Then ImporteMovto = If(ImportePagar > SaldoCheque, SaldoCheque, ImportePagar) From 0f53eedd2661c7df76f3d1e7a05c0a81122bf49c Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 8 Oct 2020 18:13:26 -0700 Subject: [PATCH 11/17] -- cambios en parametro de concepto de prepoliza --- Bancos/FluctuacionCambiaria.aspx.vb | 42 ++++++++++++++--------------- 1 file changed, 20 insertions(+), 22 deletions(-) diff --git a/Bancos/FluctuacionCambiaria.aspx.vb b/Bancos/FluctuacionCambiaria.aspx.vb index b2b635433..98b0fec8d 100644 --- a/Bancos/FluctuacionCambiaria.aspx.vb +++ b/Bancos/FluctuacionCambiaria.aspx.vb @@ -20,12 +20,12 @@ Partial Class Bancos_FluctuacionCambiaria Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load If Not Page.IsPostBack Then - CargarCentrosDeCosto(Nothing, DdlSubproyectoBancos, Nothing, LblSubProyecto) - CargarCentrosDeCosto(Nothing, DdlsubProyectoVentas, Nothing, LblSubProyectoVentas) - CargarCentrosDeCosto(Nothing, DdlSubProyectoCompras, Nothing, LblSubProyectoCompras) - CargarCentrosDeCosto(Nothing, DdlSubProyectoFiliales, Nothing, LblSubProyectoFiliales) - CargarCentrosDeCosto(Nothing, DdlSubProyectoAcreedores, Nothing, LblSubProyectoAcreedores) - CargarCentrosDeCosto(Nothing, DdlSubProyectoDeudores, Nothing, LblSubProyectoDeudores) + CargarCentrosDeCosto(Nothing, DdlSubproyectoBancos, Nothing, LblSubProyecto, "") + CargarCentrosDeCosto(Nothing, DdlsubProyectoVentas, Nothing, LblSubProyectoVentas, "") + CargarCentrosDeCosto(Nothing, DdlSubProyectoCompras, Nothing, LblSubProyectoCompras, "") + CargarCentrosDeCosto(Nothing, DdlSubProyectoFiliales, Nothing, LblSubProyectoFiliales, "") + CargarCentrosDeCosto(Nothing, DdlSubProyectoAcreedores, Nothing, LblSubProyectoAcreedores, "") + CargarCentrosDeCosto(Nothing, DdlSubProyectoDeudores, Nothing, LblSubProyectoDeudores, "") CargaUltimaFluctuacion() End If @@ -347,9 +347,8 @@ Partial Class Bancos_FluctuacionCambiaria TipoMovto = False End If If Not Conta.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Math.Abs(Total), "Fluctuación Ventas", CveConceptoContable, "Fluctuación Ventas", Now, idCta, 0, ImporteMX:=Math.Abs(Total), CveCuenta:=CveCuenta, CveSubProyecto:=DdlsubProyectoVentas.SelectedValue.ToEntero) Then - If Not Conta.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Math.Abs(Total), "Fluctuación Ventas", CveConceptoContable, "Fluctuación Ventas", Now, idCta, 0, ImporteMX:=Math.Abs(Total), CveCuenta:=CveCuenta, CveSubProyecto:=DdlsubProyectoVentas.SelectedValue.ToEntero) Then - ErrorRegistrar = True - End If + ErrorRegistrar = True + End If Dim CveConconceptoCliente As Integer = 203 @@ -397,7 +396,6 @@ Partial Class Bancos_FluctuacionCambiaria Conta.IniciaTransacSQL() Dim ObjContPaq As New ClsContPAQi(UsuarioActual.Empresa) ObjContPaq.IniciaTransacSQL() - Dim CvePrePoliza As Integer = Conta.AddPrePolizas("Banc/FluctuaB", 1, 0, 0, 1, TxtFecha.Text.ToDate, "Fluctuación Bancaria", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Dim idCta As Integer = 0 Dim CveCuenta As Integer = 0 Dim CveCuentaPerdida, CveCuentaGanancia As Integer @@ -405,28 +403,28 @@ Partial Class Bancos_FluctuacionCambiaria Dim TipoMovto As Boolean = False Dim CveConceptoContable As Integer = 0 Dim ErrorRegistrar As Boolean = False - Dim TCCierreFluctuacion As Decimal = LtTipoCambioActual.Text.ToDecimal - + Dim TCCierreFluctuacion As Decimal = LtTipoCambioActual.Text.ToDecimal + Dim MesTCtexto As String = String.Format("{0} TC:{1}", TxtFecha.Text.ToDate.ToString("MMMM-yyyy"), TCCierreFluctuacion) + + Dim CvePrePoliza As Integer = Conta.AddPrePolizas("Banc/FluctuaB", 1, 0, 0, 1, TxtFecha.Text.ToDate, String.Format("Fluctuación Bancaria {0} ", MesTCtexto), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) + + CveCuentaPerdida = 0 ' 55379 CveCuentaGanancia = 0 ' 55382 idCtaPerdida = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria '1227 IdCtaGanancia = UsuarioActual.Empresa.IdCuentaGananciaCambiaria '1230 Dim TC As Decimal = 2 ' se pone 2, para que cumpla con el check constrains de complementarias - Total = LblTotalBancos.Text.ToDecimal - - - - - Dim CveConconceptoBancos As Integer = 204 - - - 'saco las cuentas de pérdida y ganancia + Total = LblTotalBancos.Text.ToDecimal + + Dim CveConconceptoBancos As Integer = 204 + + 'saco las cuentas de pérdida y ganancia For Each gvr As GridViewRow In GvCuentas.Rows Dim cb As CheckBox = gvr.FCCheckBox("ChkGenerarBancos") If cb.Checked Then Total = gvr.DataKey("Fluctuacion").ToDecimal Dim IdCtaComplementaria As Integer = gvr.DataKey("IdCtaAfectable").ToEntero - Dim ConceptoReferencia As String = $"{gvr.DataKey("Banco")} - {gvr.DataKey("NumCuenta")} " + Dim ConceptoReferencia As String = String.Format("{0} - {1} {2}", gvr.DataKey("Banco"), gvr.DataKey("NumCuenta"), MesTCtexto) 'MOVIMIENTO DE FLUCTUACION From b85454b2e5967fd138ced06ae80cdaa0371f4d0f Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 8 Oct 2020 18:13:50 -0700 Subject: [PATCH 12/17] -- recepcion por OC --- Compras/Compras.aspx.vb | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index be933f6a1..b71f8ecfd 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -15052,7 +15052,7 @@ Partial Class Compras_Compras 'SI PUEDE RECIBIR POR OC Y COMPRA ' si usa almacen, si tiene activado que reciba por OC, y que si la compra tipo Proveedor. que lo muestre - If UsuarioActual.Empresa.UsaInventarios And UsuarioActual.Empresa.Funcionalidad(131).ToEntero > 0 AndAlso CveTipoConcepto = 1 Then + If UsuarioActual.CveEmpresa = 119 AndAlso UsuarioActual.Empresa.UsaInventarios And UsuarioActual.Empresa.Funcionalidad(131).ToEntero > 0 AndAlso CveTipoConcepto = 1 Then DivOCVinculaInv.Visible = True End If @@ -15434,15 +15434,16 @@ Partial Class Compras_Compras 'SI PUEDE RECIBIR POR OC Y COMPRA - If UsuarioActual.CveEmpresa.Contiene(119) Then - If UsuarioActual.Empresa.UsaInventarios And UsuarioActual.Empresa.Funcionalidad(131).ToEntero > 0 And Not UsuarioActual.Empresa.Funcionalidad(153).ToEntero > 0 Then - If DdlOCVinculaInv.SelectedValue.ToEntero <= 0 Then - Alert("El campo Tipo de recepción almacén es necesario. Por favor verifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia) - Exit Sub - End If + + If UsuarioActual.CveEmpresa = 119 AndAlso UsuarioActual.Empresa.UsaInventarios And UsuarioActual.Empresa.Funcionalidad(131).ToEntero > 0 AndAlso CveTipoConcepto = 1 Then + + If DdlOCVinculaInv.SelectedValue.ToEntero <= 0 Then + Alert("El campo Tipo de recepción almacén es necesario. Por favor verifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia) + Exit Sub End If End If + If Math.Abs(HdnIEPSModificadoOC.Value.ToDecimal - LbIEPSOC2.Text.ToDecimal) > 0.05 AndAlso UsuarioActual.CveEmpresa.Contiene(119) Then Alert($"Hay una diferencia de IEPS entre la factura y la OC. Dif: {HdnIEPSModificadoOC.Value.ToDecimal - LbIEPSOC2.Text.ToDecimal}", TipoMensaje.MsgAdvertencia) Exit Sub @@ -19831,7 +19832,7 @@ Partial Class Compras_Compras End If Else '2018.11.24 se cambia concepto 177, de cargo a abono negativo., petición MALL - If ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, -DiferenciaInvOC, SerieFolio, If(ConceptoSalida = 0, 177, 177), ConceptoPartida, Fecha, If(ConceptoSalida = 0, IdCtaContableAlmacen, IdCtaContableRecepcionOCER), -1, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimientoAlmacen, CveOC:=CveOrdenCompra, ImporteMX:=-DiferenciaInvOC, CveCuenta:=CveCuentaAlmacen, CveOCDetalle:=CveOCDetalle, CveSubProyecto:=CveSubProyecto) Then + If ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, -DiferenciaInvOC, SerieFolio, If(ConceptoSalida = 0, 177, 177), ConceptoPartida, Fecha, IdCtaContableRecepcionOCER, -1, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimientoAlmacen, CveOC:=CveOrdenCompra, ImporteMX:=-DiferenciaInvOC, CveCuenta:=CveCuentaAlmacen, CveOCDetalle:=CveOCDetalle, CveSubProyecto:=CveSubProyecto) Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, DiferenciaInvOC, SerieFolio, 176, ConceptoPartida, Fecha, IdCtaContableRecepcionOC, -1, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimientoAlmacen, CveOC:=CveOrdenCompra, ImporteMX:=DiferenciaInvOC, CveOCDetalle:=CveOCDetalle) Then Retorno = False Exit For From a71c16b7caf7dc4f11590af70232c4391d5c3afa Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 8 Oct 2020 18:14:06 -0700 Subject: [PATCH 13/17] columna de descripcion --- Compras/RepCxPDetalle.aspx | 12 +++++++++++- Compras/RepCxPDetalle.aspx.vb | 2 ++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/Compras/RepCxPDetalle.aspx b/Compras/RepCxPDetalle.aspx index 120b5ff4b..33b22246f 100644 --- a/Compras/RepCxPDetalle.aspx +++ b/Compras/RepCxPDetalle.aspx @@ -249,7 +249,7 @@ + CssClass="table table-striped table-advance table-hover Widthall ScrollAD" GridLines="None"> @@ -366,6 +366,14 @@ + + + Descripción + + + + + @@ -419,6 +427,8 @@ + + diff --git a/Compras/RepCxPDetalle.aspx.vb b/Compras/RepCxPDetalle.aspx.vb index 842000f1e..8a61cd2fe 100644 --- a/Compras/RepCxPDetalle.aspx.vb +++ b/Compras/RepCxPDetalle.aspx.vb @@ -621,6 +621,8 @@ Partial Class RepCxPDetalle GvDatos.Columns(13).Visible = False End If + GvDatos.Columns(14).Visible = ChkDescripcion.Checked + Personalizo = 1 If Personalizo = 1 Then ImgExcelPersonalizado.Visible = True From df8932c7e7d605f3c9bc7f20c93fa200688adeaf Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 8 Oct 2020 18:20:31 -0700 Subject: [PATCH 14/17] label --- Bancos/FluctuacionCambiaria.aspx.vb | 46 ++++++++++++++--------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/Bancos/FluctuacionCambiaria.aspx.vb b/Bancos/FluctuacionCambiaria.aspx.vb index 4c6bd01d8..56901e562 100644 --- a/Bancos/FluctuacionCambiaria.aspx.vb +++ b/Bancos/FluctuacionCambiaria.aspx.vb @@ -20,7 +20,7 @@ Partial Class Bancos_FluctuacionCambiaria Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load If Not Page.IsPostBack Then - CargarCentrosDeCosto(Nothing, DdlSubproyectoBancos, Nothing, LblSubProyecto, "") + CargarCentrosDeCosto(Nothing, DdlSubproyectoBancos, Nothing, LblSubProyectoBancos, "") CargarCentrosDeCosto(Nothing, DdlsubProyectoVentas, Nothing, LblSubProyectoVentas, "") CargarCentrosDeCosto(Nothing, DdlSubProyectoCompras, Nothing, LblSubProyectoCompras, "") CargarCentrosDeCosto(Nothing, DdlSubProyectoFiliales, Nothing, LblSubProyectoFiliales, "") @@ -342,31 +342,31 @@ Partial Class Bancos_FluctuacionCambiaria Dim CveConconceptoCliente As Integer = 203 - 'saco las cuentas de pérdida y ganancia - For Each gvr As GridViewRow In GvVentas.Rows - Total = -gvr.DataKey("Fluctuacion").ToDecimal - - If gvr.DataKey("CveIE").ToEntero > 0 AndAlso gvr.DataKey("CveVenta").ToEntero < 0 Then - CveConconceptoCliente = 226 - Else - CveConconceptoCliente = 203 - End If - - 'movimiento de complementaria - If Not Conta.AddPrePolizasDetalle(CvePrePoliza, True, Total, gvr.DataKey("SerieFolio"), CveConconceptoCliente, gvr.DataKey("SerieFolio"), Now, IdCtaComplementaria, 0, CveVenta:=gvr.DataKey("CveVenta").ToEntero, TipoCambio:=TC, ImporteMX:=Total, ImporteME:=Total, CveCuenta:=CveCuentaComplementaria, CveIE:=gvr.DataKey("CveIE").ToEntero) Then - ErrorRegistrar = True - Exit For - End If - Next - - If Not ErrorRegistrar Then - Conta.Commit() - Alert(String.Format("La Fluctuación se ha generado
Ver PrePóliza", CvePrePoliza), TipoMensaje.MsgInformacion) + 'saco las cuentas de pérdida y ganancia + For Each gvr As GridViewRow In GvVentas.Rows + Total = -gvr.DataKey("Fluctuacion").ToDecimal + If gvr.DataKey("CveIE").ToEntero > 0 AndAlso gvr.DataKey("CveVenta").ToEntero < 0 Then + CveConconceptoCliente = 226 Else - Conta.RollBack() + CveConconceptoCliente = 203 End If - Conta.Dispose() + + 'movimiento de complementaria + If Not Conta.AddPrePolizasDetalle(CvePrePoliza, True, Total, gvr.DataKey("SerieFolio"), CveConconceptoCliente, gvr.DataKey("SerieFolio"), Now, IdCtaComplementaria, 0, CveVenta:=gvr.DataKey("CveVenta").ToEntero, TipoCambio:=TC, ImporteMX:=Total, ImporteME:=Total, CveCuenta:=CveCuentaComplementaria, CveIE:=gvr.DataKey("CveIE").ToEntero) Then + ErrorRegistrar = True + Exit For + End If + Next + + If Not ErrorRegistrar Then + Conta.Commit() + Alert(String.Format("La Fluctuación se ha generado
Ver PrePóliza", CvePrePoliza), TipoMensaje.MsgInformacion) + + Else + Conta.RollBack() + End If + Conta.Dispose() End Sub #End Region From 7a7c1f71eaeebed18ff7c4289d8b34ccea5997d2 Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Thu, 8 Oct 2020 18:33:17 -0700 Subject: [PATCH 15/17] =?UTF-8?q?se=20agrego=20un=20nuevo=20cat=C3=A1logo?= =?UTF-8?q?=20de=20equivalencias=20en=20medidas=20para=20econollantas?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App_Code/ClsGenerales.vb | 81 ++++++++++++ App_Code/ClsPaginas.vb | 1 + Compras/CatTipoGasto.aspx | 2 +- General/CatMedidaEquivalencia.aspx | 96 ++++++++++++++ General/CatMedidaEquivalencia.aspx.cs | 132 ++++++++++++++++++++ Inventarios/PopUpExistenciasAlmacen.aspx | 27 +++- Inventarios/PopUpExistenciasAlmacen.aspx.vb | 11 ++ 7 files changed, 348 insertions(+), 2 deletions(-) create mode 100644 General/CatMedidaEquivalencia.aspx create mode 100644 General/CatMedidaEquivalencia.aspx.cs diff --git a/App_Code/ClsGenerales.vb b/App_Code/ClsGenerales.vb index 2b82c5a1b..16d1f7a61 100644 --- a/App_Code/ClsGenerales.vb +++ b/App_Code/ClsGenerales.vb @@ -1106,6 +1106,87 @@ Public Class ClsGenerales OnError("Ocurrió un error al eliminar el modelo", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) End Try + Return Retorno + End Function + Public Function GetMedidasEquivalentes(CveEmpresa As Integer, Optional CveMedida As Integer = -1, Optional CveRin As Integer = -1) As Boolean + Dim Retorno As Boolean = False + + DataAdapter("PA_Gral_MedidasEquivalenciasGet") + + With SqlAdapter.SelectCommand.Parameters + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@CveMedida", SqlDbType.Int).Value = CveMedida + .Add("@CveRin", SqlDbType.Int).Value = CveRin + End With + + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al obtener las equivalencias de medidas", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + + Return Retorno + End Function + Public Function AddMedidasEquivalentes(CveMedida As Integer, CveRin As Integer, CveMedidaEquivalente As Integer, CveRinEquivalente As Integer) As Boolean + Dim Retorno As Boolean = False + + DataAdapter("PA_Gral_MedidasEquivalenciasAdd") + + With SqlAdapter.SelectCommand.Parameters + .Add("@CveMedida", SqlDbType.Int).Value = CveMedida + .Add("@CveRin", SqlDbType.Int).Value = CveRin + .Add("@CveMedidaEquivalente", SqlDbType.Int).Value = CveMedidaEquivalente + .Add("@CveRinEquivalente", SqlDbType.Int).Value = CveRinEquivalente + End With + + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al agregar la equivalencia de medida", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + + Return Retorno + End Function + Public Function UpdateMedidasEquivalentes(CveMedidaEquivalencia As Integer, CveMedida As Integer, CveRin As Integer, CveMedidaEquivalente As Integer, CveRinEquivalente As Integer) As Boolean + Dim Retorno As Boolean = False + + DataAdapter("PA_Gral_MedidasEquivalenciasUpdate") + + With SqlAdapter.SelectCommand.Parameters + .Add("@CveMedidaEquivalencia", SqlDbType.Int).Value = CveMedidaEquivalencia + .Add("@CveMedida", SqlDbType.Int).Value = CveMedida + .Add("@CveRin", SqlDbType.Int).Value = CveRin + .Add("@CveMedidaEquivalente", SqlDbType.Int).Value = CveMedidaEquivalente + .Add("@CveRinEquivalente", SqlDbType.Int).Value = CveRinEquivalente + End With + + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al agregar la equivalencia de medida", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + + Return Retorno + End Function + Public Function RemoveMedidasEquivalentes(CveMedidaEquivalencia As Integer) As Boolean + Dim Retorno As Boolean = False + + DataAdapter("PA_Gral_MedidasEquivalenciasDelete") + + With SqlAdapter.SelectCommand.Parameters + .Add("@CveMedidaEquivalencia", SqlDbType.Int).Value = CveMedidaEquivalencia + End With + + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al eliminar la equivalencia de medida", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + Return Retorno End Function #End Region diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index c8384b872..8cef487fc 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -4420,6 +4420,7 @@ Public Class ClsPaginas PaginaDict.Add("/General/CatRinTamanios.aspx".ToUpper(), 711) PaginaDict.Add("/General/CatMedidas.aspx".ToUpper(), 712) PaginaDict.Add("/General/CatSatListado69B.aspx".ToUpper, 1038) + PaginaDict.Add("/General/CatMedidaEquivalencia.aspx".ToUpper(), 773) #End Region diff --git a/Compras/CatTipoGasto.aspx b/Compras/CatTipoGasto.aspx index c1f4a738e..ac328153b 100644 --- a/Compras/CatTipoGasto.aspx +++ b/Compras/CatTipoGasto.aspx @@ -45,7 +45,7 @@ -
+
diff --git a/Inventarios/PopUpExistenciasAlmacen.aspx.vb b/Inventarios/PopUpExistenciasAlmacen.aspx.vb index b71e823e5..7b6ec9130 100644 --- a/Inventarios/PopUpExistenciasAlmacen.aspx.vb +++ b/Inventarios/PopUpExistenciasAlmacen.aspx.vb @@ -70,6 +70,7 @@ Partial Class Inventarios_Default DivRin.Visible = True CargarMedRin() DivMedRin.Visible = True + DivEquivalentes.Visible = True DivPS.Visible = False End If Dim Txt As String = IfNull(Request("Txt"), "").ToString @@ -89,6 +90,7 @@ Partial Class Inventarios_Default Protected Sub BtnBuscar_Click(sender As Object, e As System.EventArgs) Handles BtnBuscar.Click If UsuarioActual.Empresa.Funcionalidad(558) = "1" Then CargarDatosMedRin() + CargaEquivalencia() Else CargaDatos(DDlPS.SelectedValue.ToEntero, 1) End If @@ -243,6 +245,15 @@ Partial Class Inventarios_Default UPDatos.Update() End Sub + Private Sub CargaEquivalencia() + Dim ObjGeneral As New ClsGenerales + If ObjGeneral.GetMedidasEquivalentes(UsuarioActual.CveEmpresa, DdlMedidas.SelectedValue.ToEntero(), DdlRin.SelectedValue.ToEntero()) Then + GvEquival.DataSource = ObjGeneral.DtResultados + End If + ObjGeneral.Dispose() + GvEquival.DataBind() + End Sub + Private Function ValidarFiltrosSeleccionados() As Boolean If DDlPS.SelectedValue.ToEntero > 0 Then Return True Return False From 145e805b1243b56a08ac5b665b06d843c5111501 Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Thu, 8 Oct 2020 21:35:42 -0700 Subject: [PATCH 16/17] =?UTF-8?q?reparando=20error=20l=C3=B3gico?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Compras/Compras.aspx.vb | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 7838361a3..47d1eb77c 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -20211,23 +20211,25 @@ Partial Class Compras_Compras CvePSGRuposAux.AppendFormat("{0},", CvePSIndividual) Next - Dim CvePSGRupos As String = Left(CvePSGRuposAux.ToString, CvePSGRuposAux.Length - 1) + If CvePSGRuposAux.Length > 0 Then + Dim CvePSGRupos As String = Left(CvePSGRuposAux.ToString, CvePSGRuposAux.Length - 1) - Dim PSSat As DataTable = GlobalDTPS(UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CvePS IN ({0})", CvePSGRuposAux)) + Dim PSSat As DataTable = GlobalDTPS(UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CvePS IN ({0})", CvePSGRuposAux)) - Dim ProductosCodigoSATNoPermitidos As New StringBuilder("") - For Each PS As GridViewRow In GvPS.Rows - Dim PSIndividual As String = PS.DataKey("PS") - Dim ClavePSSAT As String = PSSat.FiltroPrimeroValor("CveSATPS", String.Format("PS = '{0}'", PSIndividual)) - If ClavePSSAT = "46920" Then - ProductosCodigoSATNoPermitidos.AppendFormat("{0}
", PSIndividual) + Dim ProductosCodigoSATNoPermitidos As New StringBuilder("") + For Each PS As GridViewRow In GvPS.Rows + Dim PSIndividual As String = PS.DataKey("PS") + Dim ClavePSSAT As String = PSSat.FiltroPrimeroValor("CveSATPS", String.Format("PS = '{0}'", PSIndividual)) + If ClavePSSAT = "46920" Then + ProductosCodigoSATNoPermitidos.AppendFormat("{0}
", PSIndividual) + End If + Next + + If ProductosCodigoSATNoPermitidos.ToString.Length > 0 Then + Dim mensajeAdvertencia As String = String.Format("No se permite vinculación de productos con código SAT '01010101', revise los productos:

{0}", ProductosCodigoSATNoPermitidos.ToString) + Alert(mensajeAdvertencia, TipoMensaje.MsgAdvertencia) + Return False End If - Next - - If ProductosCodigoSATNoPermitidos.ToString.Length > 0 Then - Dim mensajeAdvertencia As String = String.Format("No se permite vinculación de productos con código SAT '01010101', revise los productos:

{0}", ProductosCodigoSATNoPermitidos.ToString) - Alert(mensajeAdvertencia, TipoMensaje.MsgAdvertencia) - Return False End If Return True From 81d669748d8bc8cbf9f993b9527fa4df6e76747d Mon Sep 17 00:00:00 2001 From: Rakcsle Supertramp Date: Fri, 9 Oct 2020 11:19:52 -0700 Subject: [PATCH 17/17] Funcionalidad 281 bloquear fechas --- Bancos/FluctuacionCambiaria.aspx | 10 ++++---- Bancos/PrestamoPersonal.aspx.cs | 11 +++++++++ Inventarios/EntradasSalidas.aspx.vb | 35 ++++++++++++++++++++++++++++ Inventarios/EntregaAlmacen.aspx.vb | 8 +++++++ Inventarios/RecepcionAlmacen.aspx.vb | 8 +++++++ Inventarios/TraspasoAlmacen.aspx.vb | 12 ++++++++++ 6 files changed, 78 insertions(+), 6 deletions(-) diff --git a/Bancos/FluctuacionCambiaria.aspx b/Bancos/FluctuacionCambiaria.aspx index 3ecd068fa..56c76c41c 100644 --- a/Bancos/FluctuacionCambiaria.aspx +++ b/Bancos/FluctuacionCambiaria.aspx @@ -147,9 +147,7 @@
-
- - +
@@ -230,15 +228,15 @@
-
- +
+
-
+
diff --git a/Bancos/PrestamoPersonal.aspx.cs b/Bancos/PrestamoPersonal.aspx.cs index f9674a6bb..2ecb1b234 100644 --- a/Bancos/PrestamoPersonal.aspx.cs +++ b/Bancos/PrestamoPersonal.aspx.cs @@ -106,6 +106,17 @@ public partial class Bancos_PrestamoPersonal : ClsPaginas txtFechaF.Text = DateTime.Now.ToShortDateString(); TxtImporte.Attributes.Add("disabled", "disabled"); + if(UsuarioActual.Empresa.Funcionalidad(281).ToEntero() == 1) + { + TxtFechaPrestamo.Enabled = false; + ImgCalendarioPrestamo.Visible = false; + + TxtFechaDocumento.Enabled = false; + ImgCalendario.Visible = false; + + } + + } } diff --git a/Inventarios/EntradasSalidas.aspx.vb b/Inventarios/EntradasSalidas.aspx.vb index 08040c50e..059f71e5b 100644 --- a/Inventarios/EntradasSalidas.aspx.vb +++ b/Inventarios/EntradasSalidas.aspx.vb @@ -275,6 +275,7 @@ Partial Class Inventarios_EntradasSalidas #End Region Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load + If Not IsPostBack Then CveMovimiento = -1 @@ -289,6 +290,7 @@ Partial Class Inventarios_EntradasSalidas CreaDT() CargaCombos() TxtFecha.Text = Now.ToShortDateString + TxtFechaInvFisico.Text = Now.ToShortDateString RVFecha.MaximumValue = Now.ToShortDateString If Not UsuarioActual.CveEmpresa = 48 Then @@ -350,7 +352,25 @@ Partial Class Inventarios_EntradasSalidas PermisoVerImportes() End If + + If UsuarioActual.Empresa.Funcionalidad(281).ToEntero = 1 Then + + TxtFecha.Enabled = False + ImgFecha.Visible = False + + TxtFechaInvFisico.Enabled = False + ImgFechaInvFisico.Visible = False + + UpGenerales.Update() + UpModalInventarioFisico.Update() + + End If + End If + + + + End Sub #Region " PERMISOS PAGINAS " @@ -927,6 +947,21 @@ Partial Class Inventarios_EntradasSalidas 'BtnGuardar.Visible = False End If + + If UsuarioActual.Empresa.Funcionalidad(281).ToEntero = 1 Then + + TxtFecha.Enabled = False + ImgFecha.Visible = False + + TxtFechaInvFisico.Enabled = False + ImgFechaInvFisico.Visible = False + + + + + End If + + UpModalInventarioFisico.Update() BloqueaEdicionEncabezado() Mov.Dispose() UpGenerales.Update() diff --git a/Inventarios/EntregaAlmacen.aspx.vb b/Inventarios/EntregaAlmacen.aspx.vb index 6d6e99153..8aff48266 100644 --- a/Inventarios/EntregaAlmacen.aspx.vb +++ b/Inventarios/EntregaAlmacen.aspx.vb @@ -263,6 +263,14 @@ Partial Class Inventarios_EntregaAlmacen InicializaValores() CargaParametrosAD() If UsuarioActual.CveEmpresa.Contiene(72, 80) Then DdlAlmacen.AutoPostBack = True + + If UsuarioActual.Empresa.Funcionalidad(281).ToEntero = 1 Then + + TxtFecha.Enabled = False + ImgFecha.Visible = False + + End If + End If End Sub diff --git a/Inventarios/RecepcionAlmacen.aspx.vb b/Inventarios/RecepcionAlmacen.aspx.vb index 5022d6ebb..e5b39aeef 100644 --- a/Inventarios/RecepcionAlmacen.aspx.vb +++ b/Inventarios/RecepcionAlmacen.aspx.vb @@ -399,6 +399,14 @@ Partial Class Inventarios_RecepcionAlmacen CargaPermisos() If UsuarioActual.CveEmpresa.Contiene(72, 80) Then DdlAlmacen.AutoPostBack = True + If UsuarioActual.Empresa.Funcionalidad(281).ToEntero = 1 Then + + TxtFecha.Enabled = False + ImgFecha.Visible = False + + End If + + End If End Sub diff --git a/Inventarios/TraspasoAlmacen.aspx.vb b/Inventarios/TraspasoAlmacen.aspx.vb index edb1228f1..efb17de68 100644 --- a/Inventarios/TraspasoAlmacen.aspx.vb +++ b/Inventarios/TraspasoAlmacen.aspx.vb @@ -228,6 +228,18 @@ Partial Class Inventarios_TraspasoAlmacen TipoSeccionAlmacen = 0 + + + If UsuarioActual.Empresa.Funcionalidad(281).ToEntero = 1 Then + + TxtFecha.Enabled = False + ImgFecha.Visible = False + + TxtFechaRecepcion.Enabled = False + ImgFechaRecepcion.Visible = False + + End If + Else If ChkTransitorio.Checked Then RegistraScript("$('#DivTransitorio').show(0);$('#DivGastoIndirecto').show(0);$('#DivDocChofer').show(0);")