From 2570f4061456433708bfaf2b7c2c3b7dc76c3772 Mon Sep 17 00:00:00 2001 From: rakcsle Date: Tue, 9 Mar 2021 15:39:02 -0700 Subject: [PATCH 01/67] Compras ajustar IVA --- Compras/Compras.aspx.vb | 75 +++++++++++++++++++++------ Empresas/72/Formatos/ResguardoAF.rdlc | 67 ++++++++---------------- OC/OC.aspx | 1 + OC/OC.aspx.vb | 1 - 4 files changed, 82 insertions(+), 62 deletions(-) diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 0809c0dc4..15ef51251 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -3988,9 +3988,11 @@ Partial Class Compras_Compras Protected Sub BtnGuardar_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles BtnGuardar.Click - AjustaCombustibles() + 'If Not AjustaCombustibles() Then + ' Exit Sub + 'End If - '------------------INICIA VALIDACIONES------------------ + '------------------ INICIA VALIDACIONES ------------------ Dim EstatusCredito As Integer = 0 Dim CveSubProyecto As Integer = 0 'Credito Multiple @@ -4303,7 +4305,7 @@ Partial Class Compras_Compras Next If ErrorValidacion Then Exit Sub - '------------------TERMINA VALIDACIONES------------------ + 'RECORRO LOS PRODUCTOS O SERVICIOS PARA REGISTRARLOS LOS QUE NO EXISTEN EN EL CATÁLOGO Dim tCve As Integer @@ -4374,6 +4376,17 @@ Partial Class Compras_Compras UM.Dispose() PSS.Dispose() + 'VALIDA IMPORTES + If Not ValidaTotalesGuardar() Then + Exit Sub + End If + + If Not AjustaCombustibles() Then + Exit Sub + End If + + '------------------TERMINA VALIDACIONES------------------ + 'si hay necesidad de actualizar el globaldtps If RegeneraPS Then 'Dim Hilo As New System.Threading.Thread(AddressOf GeneraGlobalDT) @@ -4423,10 +4436,7 @@ Partial Class Compras_Compras TmpDT.AcceptChanges() If Correcto Then - 'VALIDA IMPORTES - If Not ValidaTotalesGuardar() Then - Exit Sub - End If + Dim ObjCompras As New ClsCompras() @@ -4650,6 +4660,8 @@ Partial Class Compras_Compras End If Next + + 'Compra If ObjCompras.AddCompra(DdlTipoComprobante.SelectedValue, TxtDescripcion.Text.Trim, TxtSerie.Text.Trim, TxtFolio.Text.Trim, TxtFolioSecundario.Text.Trim, CveProveedor, TxtSubTotal.Text.ToDouble, TxtDescuento.Text.ToDouble, LblAmortizacion.Text.ToDouble, TxtIVA.Text.ToDouble, TxtRetIVA.Text.ToDouble, TxtRetISR.Text.ToDouble, TxtIEPS.Text.ToDouble, TxtOtrosImpuestos.Text.ToDouble, @@ -8486,6 +8498,8 @@ Partial Class Compras_Compras End If Alert(Msg.ToString, TipoMensaje.MsgInformacion, MsgAccionAceptar) + BtnGuardar.Enabled = False + UpFacturar.Update() End If @@ -8530,7 +8544,12 @@ Partial Class Compras_Compras End Sub - Private Sub AjustaCombustibles() + Private Function AjustaCombustibles() As Boolean + + Dim Respuesta As Boolean = False + + Dim IVADetalles As Decimal = TmpDT.SUM("IVA", " IVA > 0 ").ToDecimal + Dim DiferenciaIVas As Decimal = TxtIVA.Text.ToDecimal - IVADetalles If Not TmpDT.Columns.Contains("AplicaIEPS") Then @@ -8561,18 +8580,14 @@ Partial Class Compras_Compras Dim IndiceUltimo As Integer = 0 For Each dRow As DataRow In TmpDT.Rows - If Boolean.Parse(dRow("AplicaIEPS").ToString) And Boolean.Parse(dRow("IEPSGrabaIVA").ToString) = False And dRow("IVA").ToString.ToDecimal > 0 Then IndiceUltimo = IndiceContador End If - IndiceContador = IndiceContador + 1 - Next - - Dim IVADetalles As Decimal = TmpDT.SUM("IVA", " IVA > 0 ").ToDecimal - Dim DiferenciaIVas As Decimal = TxtIVA.Text.ToDecimal - IVADetalles + IVADetalles = TmpDT.SUM("IVA", " IVA > 0 ").ToDecimal + DiferenciaIVas = TxtIVA.Text.ToDecimal - IVADetalles If Math.Abs(DiferenciaIVas) > 0.01D Then TmpDT.Rows(IndiceUltimo)("IVA") = TmpDT.Rows(IndiceUltimo)("IVA").ToString.ToDecimal + DiferenciaIVas @@ -8582,7 +8597,36 @@ Partial Class Compras_Compras End If - End Sub + 'Revalidacion de ajuste + IVADetalles = TmpDT.SUM("IVA", " IVA > 0 ").ToDecimal + DiferenciaIVas = TxtIVA.Text.ToDecimal - IVADetalles + + + + If Math.Abs(DiferenciaIVas) > 0.01D Then + + If IVADetalles > 0 Then + + For Each dRow As DataRow In TmpDT.Rows + If dRow("IVA").ToString.ToDecimal > 0 Then + dRow("IVA") = dRow("IVA").ToString.ToDecimal + DiferenciaIVas + TmpDT.AcceptChanges() + Respuesta = True + Exit For + End If + Next + + Else + Alert("Los productos especificados en el lisado no tienen asigando impuesto IVA, favor de realizar la correción en el producto que aplique el impúesto.", TipoMensaje.MsgAdvertencia) + Respuesta = False + End If + Else + Respuesta = True + End If + + Return Respuesta + + End Function Protected Sub TxtCodigo_TextChanged(sender As Object, e As System.EventArgs) Handles TxtCodigo.TextChanged Dim ObjProveedores As New ClsCompProveedores() @@ -12650,6 +12694,7 @@ Partial Class Compras_Compras TmpDT.Rows(Indice)("PU") = TmpDT.Rows(Indice)("PU").ToString.ToDouble + tPU TmpDT.Rows(Indice)("Total") = TmpDT.Rows(Indice)("Total").ToString.ToDouble + ImporteAjuste TmpDT.Rows(Indice)("IEPSPS") = (TmpDT.Rows(Indice)("Total").ToString.ToDouble() * TmpDT.Rows(Indice)("IEPSPSPorcentaje").ToString.ToDouble()).RoundAD(2) + TmpDT.Rows(Indice)("IVA") = TmpDT.Rows(Indice)("PU").ToString.ToDecimal * TmpDT.Rows(Indice)("Cantidad").ToString.ToDecimal * TmpDT.Rows(Indice)("IVAPorcentaje").ToString.ToDecimal 'Row("IEPSPS") = Math.Round(IEPSPS, DecimalesPermitidos) 'Row("IEPSPSPorcentaje") = PorcentajeIEPS TmpDT.AcceptChanges() diff --git a/Empresas/72/Formatos/ResguardoAF.rdlc b/Empresas/72/Formatos/ResguardoAF.rdlc index 46a19ecc7..a3f114ece 100644 --- a/Empresas/72/Formatos/ResguardoAF.rdlc +++ b/Empresas/72/Formatos/ResguardoAF.rdlc @@ -1287,7 +1287,7 @@ - 8.4664cm + 7.77848cm true true @@ -1573,51 +1573,6 @@ 2pt - - true - true - - - - - Fecha Impresión: - - - - - - - - =Today - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - -
  • - - <%--Clonar Usuario --%> - - Clonar Usuario - -
  • -
  • - Actualizar Gestor Cobranza -
  • -
    -
    - -
    - -   - - - - - - - - - - - - - -
    -
    - - -
    -
    -
    - - Datos del Usuario -
    -
    -
    -
    -
    -
    - - -
    -
    -
    - - - - --%> + + + + + + + + + + + + + + + + + +
    Usuario: - - - +<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="UsuarioDetalle.aspx.vb" Inherits="Sistemas_UsuarioDetalle" %> + +<%@ PreviousPageType VirtualPath="Usuarios.aspx" %> + + + + + + + + + + + +
  • + + <%--Clonar Usuario --%> + + Clonar Usuario + +
  • +
  • + Actualizar Gestor Cobranza +
  • +
    +
    + +
    + +   + + + + + + + + + + + + + +
    +
    + + +
    +
    +
    + + Datos del Usuario +
    +
    +
    +
    +
    +
    + + +
    +
    +
    + + + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + <%-- - --%> - - - - - - - - - - - - -
    Usuario: + + +   + vpn_lock - + lock - + email - + <%----%> -
    Contraseña: - - - -
    Nombre: - - - -
    Rol: - - - - - -
    Correo: - - - -
    Contraseña: + + + +
    Nombre: + + + +
    Rol: + + + + + +
    Correo: + + + +
    Supervisa: @@ -182,2324 +183,2343 @@
    Empresa: - - - - - - - - - -
    Sessión por equipo
    Autorizar equipo
    -
    -
    -
    -
    -
    -
    - -
    -
    - - - - - -
    -
    -
    -
    -
    - - General -
    -
    -
    -
    -
    -
    - - -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Empresa: - - - -
    Personal - -
    Documento Venta - -
    Vendedor - -
    Sucursal: - - - <%----%> - - - -
    Almacén: - - - - - -
    Descuento Autorizado: - - -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    - - Almacen -
    -
    -
    -
    -
    -
    - - -
    -
    -
    - - - - - - - - - -
    AlmacénComandos
    - - - - - -
    -
    - - - - - - - - - - - - - - - +
    Empresa: + + + + + + + + + +
    Sessión por equipo
    Autorizar equipo
    Código Acceso: + + + + lock + +
    +
    +
    +
    +
    +
    +
    + +
    +
    + + + + + +
    +
    +
    +
    +
    + + General +
    +
    +
    +
    +
    +
    + + +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Empresa: + + + +
    Personal + +
    Documento Venta + +
    Vendedor + +
    Sucursal: + + + <%----%> + + + +
    Almacén: + + + + + +
    Descuento Autorizado: + + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + + Almacen +
    +
    +
    +
    +
    +
    + + +
    +
    +
    + + + + + + + + + +
    AlmacénComandos
    + + + + + +
    +
    + + + + + + + + + + + + + + +   - - - - - - - - - - -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    - - SubProyectos -
    -
    -
    -
    -
    -
    - - -
    -
    -
    - - - - - - - - - - - - - - -
    Proyecto - Comandos
    - - - - - - - - - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + + SubProyectos +
    +
    +
    +
    +
    +
    + + +
    +
    +
    + + + + + + + + + + + + + + +
    Proyecto + Comandos
    + + + + + + + + + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + +   - - - - - - - - - - -
    -
    -
    -
    -
    -
    -
    -
    - - Estatus de Órdenes de Compra -
    -
    -
    -
    -
    -
    - - -
    -
    -
    - - - - -
    - - - - - - - - - - - - - - - -
    - - - - - - - -
    -
    -
    - - - - - - - - - - -
    - - - - - - - -
    -
    -
    - - - - - - - - - - -
    - - - - - - - -
    -
    -
    - - - - - - - - - - -
    - - - - - - - -
    -
    -
    - - - - - - - - - - -
    - - - - - - - -
    -
    -
    - - - - - - - - - - -
    - - - - - - - -
    -
    -
    - - - - - - - - - - -
    - - - - - - - -
    -
    -
    - - - - - - - - - - -
    - - - - - - - -
    -
    -
    - - - - - - - - - - -
    - - - - - - - -
    -
    -
    - - - - - - - - - - -
    - - - - - - - -
    -
    -
    -
    -
    -
    -
    -
    - - -
    - - - - - - - - - - - - - - -
    - - - - - - - -
    -
    -
    - - - - - - - - - - -
    - - - - - - - -
    -
    -
    - - - - - - - - - - -
    - - - - - - - -
    -
    -
    - - - - - - - - - - -
    - - - - - - - -
    -
    -
    - - - - - - - - - - -
    - - - - - - - -
    -
    -
    - - - - - - - - - - -
    - - - - - - - -
    -
    -
    - - - - - - - - - - -
    - - - - - - - -
    -
    -
    - - - - - - - - - - -
    - - - - - - - -
    -
    -
    - - - - - - - - - - -
    - - - - - - - -
    -
    -
    - - - - - - - - - - -
    - - - - - - - -
    -
    -
    -
    -
    -
    -
    -
    -
    - - - - - - - - - - - - -
    -
    -
    -
    - -
    -
    -
    -
    -
    - - Cuentas Bancarias -
    -
    -
    -
    -
    -
    - - -
    -
    -
    - - - - - - - - - -
    No. Cuenta/ Resp. Caja ChicaComandos
    - - - - - -
    -
    - - - - - - - - - - - - - - - - -
    -
    -
    -
    -
    -
    -
    -
    - - Estatus de Órdenes de Servicio -
    -
    -
    -
    -
    -
    - - -
    -
    -
    -
    - - - - - - - - - - - - - -
    - -
    -
    -
    - - - - - - - - - -
    - -
    -
    -
    - - - - - - - - - -
    - -
    -
    -
    - - - - - - - - - -
    - -
    -
    -
    - - - - - - - - - -
    - -
    -
    -
    - - - - - - - - - -
    - -
    -
    -
    - - - - - - - - - -
    - -
    -
    -
    - - - - - - - - - -
    - -
    -
    -
    - - - - - - - - - -
    - -
    -
    -
    - - - - - - - - - -
    - -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    - -
    -
    -
    -
    -
    - - Clasificaciones -
    -
    -
    -
    -
    -
    - - -
    -
    -
    - - - - - - - - - -
    ClasificaciónComandos
    - - - - - -
    -
    - - - - - - - - - - - - - - - - -
    -
    -
    -
    -
    - - - - -
    -
    -
    -
    - - - - - - -
    -
    -
    -
    -
    - - Asignación de Permisos -
    -
    -
    -
    -
    - - -
    -
    -
    - - - - -
    - " style="display: inline-block; margin-right: -20px; width: 150px;" /> - " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> -
    - - - - - - - - - - - - - - - - - - - <%----%> - -
    -
    - -
    -
    -
    -
    - -
    -
    -
    -
    - - - - - - -
    -
    - -
    -
    -
    - - Asignar Procesos -
    -
    -
    -
    -
    -
    - - -
    -
    -
    - - - -
    - " style="display: inline-block; margin-right: -20px; width: 150px;" /> - " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> -
    - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    -
    -
    - -
    -
    - -
    -
    -
    -
    - - - - - -
    -
    -
    -
    -
    - - Listado de Empresas -
    -
    -
    -
    -
    -
    - - -
    -
    -
    - - -
    - " style="display: inline-block; margin-right: -20px; width: 150px;" /> - " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> -
    -
    - - - - - - - - - - - - - - -
    -
    -
    -
    -
    -
    -
    - -
    -
    -
    -
    - - - - - - -
    -
    - -
    -
    -
    - - Restricciones -
    -
    -
    - -
    -
    -
    - -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - -
    -
    - -
    -
    - -
    -
    -
    -
    - - - - - - -
    -
    -
    -
    -
    -
    -
    + + + + + + + + + + + +
    +
    +
    +
    +
    +
    +
    +
    + + Estatus de Órdenes de Compra +
    +
    +
    +
    +
    +
    + + +
    +
    +
    + + + + +
    + + + + + + + + + + + + + + + +
    + + + + + + + +
    +
    +
    + + + + + + + + + + +
    + + + + + + + +
    +
    +
    + + + + + + + + + + +
    + + + + + + + +
    +
    +
    + + + + + + + + + + +
    + + + + + + + +
    +
    +
    + + + + + + + + + + +
    + + + + + + + +
    +
    +
    + + + + + + + + + + +
    + + + + + + + +
    +
    +
    + + + + + + + + + + +
    + + + + + + + +
    +
    +
    + + + + + + + + + + +
    + + + + + + + +
    +
    +
    + + + + + + + + + + +
    + + + + + + + +
    +
    +
    + + + + + + + + + + +
    + + + + + + + +
    +
    +
    +
    +
    +
    +
    +
    + + +
    + + + + + + + + + + + + + + +
    + + + + + + + +
    +
    +
    + + + + + + + + + + +
    + + + + + + + +
    +
    +
    + + + + + + + + + + +
    + + + + + + + +
    +
    +
    + + + + + + + + + + +
    + + + + + + + +
    +
    +
    + + + + + + + + + + +
    + + + + + + + +
    +
    +
    + + + + + + + + + + +
    + + + + + + + +
    +
    +
    + + + + + + + + + + +
    + + + + + + + +
    +
    +
    + + + + + + + + + + +
    + + + + + + + +
    +
    +
    + + + + + + + + + + +
    + + + + + + + +
    +
    +
    + + + + + + + + + + +
    + + + + + + + +
    +
    +
    +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + +
    +
    +
    +
    + +
    +
    +
    +
    +
    + + Cuentas Bancarias +
    +
    +
    +
    +
    +
    + + +
    +
    +
    + + + + + + + + + +
    No. Cuenta/ Resp. Caja ChicaComandos
    + + + + + +
    +
    + + + + + + + + + + + + + + + + +
    +
    +
    +
    +
    +
    +
    +
    + + Estatus de Órdenes de Servicio +
    +
    +
    +
    +
    +
    + + +
    +
    +
    +
    + + + + + + + + + + + + + +
    + +
    +
    +
    + + + + + + + + + +
    + +
    +
    +
    + + + + + + + + + +
    + +
    +
    +
    + + + + + + + + + +
    + +
    +
    +
    + + + + + + + + + +
    + +
    +
    +
    + + + + + + + + + +
    + +
    +
    +
    + + + + + + + + + +
    + +
    +
    +
    + + + + + + + + + +
    + +
    +
    +
    + + + + + + + + + +
    + +
    +
    +
    + + + + + + + + + +
    + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    + + Clasificaciones +
    +
    +
    +
    +
    +
    + + +
    +
    +
    + + + + + + + + + +
    ClasificaciónComandos
    + + + + + +
    +
    + + + + + + + + + + + + + + + + +
    +
    +
    +
    +
    + + + + +
    +
    +
    +
    + + + + + + +
    +
    +
    +
    +
    + + Asignación de Permisos +
    +
    +
    +
    +
    + + +
    +
    +
    + + + + +
    + " style="display: inline-block; margin-right: -20px; width: 150px;" /> + " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> +
    + + + + + + + + + + + + + + + + + + + <%----%> + +
    +
    + +
    +
    +
    +
    + +
    +
    +
    +
    + + + + + + +
    +
    + +
    +
    +
    + + Asignar Procesos +
    +
    +
    +
    +
    +
    + + +
    +
    +
    + + + +
    + " style="display: inline-block; margin-right: -20px; width: 150px;" /> + " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> +
    + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    +
    + +
    +
    + +
    +
    +
    +
    + + + + + +
    +
    +
    +
    +
    + + Listado de Empresas +
    +
    +
    +
    +
    +
    + + +
    +
    +
    + + +
    + " style="display: inline-block; margin-right: -20px; width: 150px;" /> + " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> +
    +
    + + + + + + + + + + + + + + +
    +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    + + + + + + +
    +
    + +
    +
    +
    + + Restricciones +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + +
    +
    +
    +
    + + + + + + +
    +
    +
    +
    +
    +
    +
    Empresa: -
    -
    - - - -
    -
    -
    - -
    -
    -
    -
    - -
    - <%--EMPRESAS--%> -
    -
    -
    -
    - - Empresas -
    -
    -
    -
    -
    -
    -
    - " style="display: inline-block; margin-right: -20px; width: 150px;" /> - " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> -
    - - -
    -
    -
    - - -
    - - - - - - - - - - - - -
    -
    -
    -
    -
    -
    - - <%--ROLES--%> -
    -
    -
    -
    - - ROLES -
    -
    -
    -
    -
    -
    - - -
    -
    -
    - - - - - - - - - - - -
    RolComandos
    - - - - - -
    -
    - - - - - - - - - - - - - - - - -
    -
    -
    - -
    -
    -
    - - <%--INDICADORES--%> -
    -
    -
    -
    - - Indicadores -
    -
    -
    -
    -
    -
    -
    - " style="display: inline-block; margin-right: -20px; width: 150px;" /> - " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> -
    - - -
    -
    -
    - - -
    - - - - - - - - - - -
    -
    -
    -
    -
    -
    - -
    - -
    - - <%--ALMACENES--%> -
    -
    -
    -
    - - Almacen -
    -
    -
    -
    -
    -
    - - -
    -
    -
    - - - - - - - - - - - -
    AlmacénComandos
    - - - - - -
    -
    - - - - - - - - - - - - - - - - -
    -
    -
    -
    -
    -
    - - <%--SUBPROYECTOS--%> -
    -
    -
    -
    - - SubProyectos -
    -
    -
    -
    -
    -
    - - -
    -
    -
    - - - - - - - - - - - -
    ProyectoComandos
    - - - -
    - - - -
    - -
    -
    - - - - - - - - - - - - - - - - - -
    -
    -
    -
    -
    -
    - - <%--CUENTAS BANCARIAS--%> -
    -
    -
    -
    - - Cuentas Bancarias -
    -
    -
    -
    -
    -
    - - -
    -
    -
    - - - - - - - - - - - -
    No. Cuenta/ Resp. Caja ChicaComandos
    - - - - - -
    -
    - - - - - - - - - - - - - - - - -
    -
    -
    -
    -
    -
    - -
    - - -
    -
    -
    -
    -
    - - ESTATUS DE ÓRDENES DE COMPRA -
    -
    -
    -
    -
    -
    - - -
    -
    -
    - - - - - - - - - - - -
    Tipo - Comandos
    - - - - - - - - - - - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - -   - - - - - - - - - - -
    -
    -
    -
    -
    - -
    -
    - -
    - - <%--MODULOS--%> -
    -
    -
    -
    - - Módulos -
    -
    -
    -
    -
    -
    -
    - " style="display: inline-block; margin-right: -20px; width: 150px;" /> - " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> -
    - - -
    -
    -
    - - - - - - - - - - - - - - - - -
    -
    -
    - - <%--PERMISOS--%> -
    -
    -
    -
    - - Permisos -
    -
    -
    -
    -
    -
    -
    - " style="display: inline-block; margin-right: -20px; width: 150px;" /> - " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> -
    - - -
    -
    -
    - - - - - - - - - - - - - - - - - - - - -
    -
    -
    - -
    - -
    -
    - - - - - -
    -
    -
    -
    -
    - - Indicadores -
    -
    -
    -
    -
    -
    - -
    -
    -
    - - - - - - - - - - - - -
    -
    -
    -
    -
    -
    -
    -
    - - - - - - -
    -
    -
    -
    -
    - - Sistema -
    -
    -
    -
    -
    -
    - - -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - -
    Fecha último acceso: -
    Fecha último cambio de contraseña: -
    Política de cambio de contraseña -
    Fecha de captura: -
    Usuario capturó: -
    Estado: -
    -
    -
    -
    -
    -
    -
    -
    - - Bitácora de registro -
    -
    -
    -
    -
    -
    - - -
    -
    -
    -
    - " style="display: inline-block; margin-right: -20px; width: 150px;" /> - " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> -
    -
    - - - - - - - - - - -
    -
    -
    -
    -
    -
    -
    -
    -
    - -
    -
    -
    -
    - - - - -
    - - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    - - Bitacora -
    -
    -
    -
    -
    -
    -
    - - - - - - - - - - - - - -
    -
    -
    -
    -
    -
    -
    - - - - + + + +
    - - + <%--EMPRESAS--%> +
    +
    +
    +
    + + Empresas +
    +
    +
    +
    +
    +
    +
    + " style="display: inline-block; margin-right: -20px; width: 150px;" /> + " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> +
    + + +
    +
    +
    + + +
    + + + + + + + + + + + + +
    +
    +
    +
    +
    +
    + + <%--ROLES--%> +
    +
    +
    +
    + + ROLES +
    +
    +
    +
    +
    +
    + + +
    +
    +
    + + + + + + + + + + + +
    RolComandos
    + + + + + +
    +
    + + + + + + + + + + + + + + + + +
    +
    +
    + +
    +
    +
    + + <%--INDICADORES--%> +
    +
    +
    +
    + + Indicadores +
    +
    +
    +
    +
    +
    +
    + " style="display: inline-block; margin-right: -20px; width: 150px;" /> + " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> +
    + + +
    +
    +
    + + +
    + + + + + + + + + + +
    +
    +
    +
    +
    +
    + +
    + +
    + + <%--ALMACENES--%> +
    +
    +
    +
    + + Almacen +
    +
    +
    +
    +
    +
    + + +
    +
    +
    + + + + + + + + + + + +
    AlmacénComandos
    + + + + + +
    +
    + + + + + + + + + + + + + + + + +
    +
    +
    +
    +
    +
    + + <%--SUBPROYECTOS--%> +
    +
    +
    +
    + + SubProyectos +
    +
    +
    +
    +
    +
    + + +
    +
    +
    + + + + + + + + + + + +
    ProyectoComandos
    + + + +
    + + + +
    + +
    +
    + + + + + + + + + + + + + + + + + +
    +
    +
    +
    +
    +
    + + <%--CUENTAS BANCARIAS--%> +
    +
    +
    +
    + + Cuentas Bancarias +
    +
    +
    +
    +
    +
    + + +
    +
    +
    + + + + + + + + + + + +
    No. Cuenta/ Resp. Caja ChicaComandos
    + + + + + +
    +
    + + + + + + + + + + + + + + + + +
    +
    +
    +
    +
    +
    + +
    + + +
    +
    +
    +
    +
    + + ESTATUS DE ÓRDENES DE COMPRA +
    +
    +
    +
    +
    +
    + + +
    +
    +
    + + + + + + + + + + + +
    Tipo + Comandos
    + + + + + + + + + + + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + +   + + + + + + + + + + + +
    +
    +
    +
    +
    + +
    +
    + +
    + + <%--MODULOS--%> +
    +
    +
    +
    + + Módulos +
    +
    +
    +
    +
    +
    +
    + " style="display: inline-block; margin-right: -20px; width: 150px;" /> + " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> +
    + + +
    +
    +
    + + + + + + + + + + + + + + + + +
    +
    +
    + + <%--PERMISOS--%> +
    +
    +
    +
    + + Permisos +
    +
    +
    +
    +
    +
    +
    + " style="display: inline-block; margin-right: -20px; width: 150px;" /> + " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> +
    + + +
    +
    +
    + + + + + + + + + + + + + + + + + + + + +
    +
    +
    + +
    + + + + + + + + +
    +
    +
    +
    +
    + + Indicadores +
    +
    +
    +
    +
    +
    + +
    +
    +
    + + + + + + + + + + + + +
    +
    +
    +
    +
    +
    +
    +
    + + + + + + +
    +
    +
    +
    +
    + + Sistema +
    +
    +
    +
    +
    +
    + + +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Fecha último acceso: +
    Fecha último cambio de contraseña: +
    Política de cambio de contraseña +
    Fecha de captura: +
    Usuario capturó: +
    Estado: +
    +
    +
    +
    +
    +
    +
    +
    + + Bitácora de registro +
    +
    +
    +
    +
    +
    + + +
    +
    +
    +
    + " style="display: inline-block; margin-right: -20px; width: 150px;" /> + " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> +
    +
    + + + + + + + + + + +
    +
    +
    +
    +
    +
    +
    +
    +
    + + + + +
    + + + + +
    + + + + + + + + + +
    +
    + + +
    +
    +
    +
    +
    + + Bitacora +
    +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + + +
    +
    +
    +
    +
    +
    + + + + + - - - + + + + + + + - - -
    - - - + + +
    + + +
    + +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Día de la SemanaHora InicioHora Fin
    + + Todos +
    +
    + + + Hora + + + + + + + +
    +
    +
    +
    +
    + + + Hora + + + + + + + +
    +
    +
    + + Lunes +
    +
    + + + Hora + + + + + + + +
    +
    +
    +
    +
    + + + Hora + + + + + + + +
    +
    +
    + + Martes +
    +
    + + + Hora + + + + + + + +
    +
    +
    +
    +
    + + + Hora + + + + + + + +
    +
    +
    + + Miercoles +
    +
    + + + Hora + + + + + + + +
    +
    +
    +
    +
    + + + Hora + + + + + + + +
    +
    +
    + + Jueves +
    +
    + + + Hora + + + + + + + +
    +
    +
    +
    +
    + + + Hora + + + + + + + +
    +
    +
    + + Viernes +
    +
    + + + Hora + + + + + + + +
    +
    +
    +
    +
    + + + Hora + + + + + + + +
    +
    +
    + + Sabado +
    +
    + + + Hora + + + + + + + +
    +
    +
    +
    +
    + + + Hora + + + + + + + +
    +
    +
    + + Domingo +
    +
    + + + Hora + + + + + + + +
    +
    +
    +
    +
    + + + Hora + + + + + + + +
    +
    +
    +
    +
    + + + + + + + + + + +
    + + + - + + diff --git a/Sistemas/UsuarioDetalle.aspx.vb b/Sistemas/UsuarioDetalle.aspx.vb index 3c125be18..89a9b347e 100644 --- a/Sistemas/UsuarioDetalle.aspx.vb +++ b/Sistemas/UsuarioDetalle.aspx.vb @@ -6,8 +6,8 @@ Imports System.Data Imports System.Threading Partial Class Sistemas_UsuarioDetalle - Inherits ClsPaginas - + Inherits ClsPaginas + #Region "P R O P I E D A D E S" Private Property DTEstatusSubProyectos As DataTable Get @@ -84,6 +84,11 @@ Partial Class Sistemas_UsuarioDetalle Get Return ViewState("Password").ToString End Get + End Property + Private ReadOnly Property CodigoAcceso As String + Get + Return ViewState("CodigoAcceso").ToString + End Get End Property Private Property DtClasificaciones As DataTable Get @@ -390,10 +395,10 @@ Partial Class Sistemas_UsuarioDetalle Set(value As Integer) ViewState("CveEmpresaAnterior") = value End Set - End Property + End Property #End Region - - + + Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load If Not IsPostBack Then @@ -444,27 +449,30 @@ Partial Class Sistemas_UsuarioDetalle TrDescuentoAutorizado.Visible = True End If - - CargaDatos() - InicializaClonarUsuario() - InicializaRestricciones() - CargaGvBitacora() - CargaEmpresasAsignaciones() - CreaDtAsignacionesMultiEmpresa() - CveEmpresaAnterior = DdlEmpresaAsignaciones.SelectedValue.ToEntero - + If UsuarioActual.Empresa.Funcionalidad(599) = "1" Then + TrCodigoAcceso.Visible = True End If - End Sub - - 'DOCUMENTACION - 'LOS CAMPOS DE DATATABLE "ACCION" SE REFIERE AL ESTATUS DE LOS CAMBIOS QUE OCURRIERON ANTES DE DARLE GUARDAR - ' 0/NULL/VACIO = ORIGINAL (SIN CAMBIO) - ' 1 = AGREGADO - ' 2 = ELIMINADO - ' 3 = NADA (AGREGADO Y ELIMINADO): CUANDO AGREGA UN REGISTRO Y LO ELIMINA, ES DECIR, NO SE GUARDA NADA - ' 4 = UPDATE - + CargaDatos() + InicializaClonarUsuario() + InicializaRestricciones() + CargaGvBitacora() + CargaEmpresasAsignaciones() + CreaDtAsignacionesMultiEmpresa() + CveEmpresaAnterior = DdlEmpresaAsignaciones.SelectedValue.ToEntero + + End If + End Sub + + 'DOCUMENTACION + 'LOS CAMPOS DE DATATABLE "ACCION" SE REFIERE AL ESTATUS DE LOS CAMBIOS QUE OCURRIERON ANTES DE DARLE GUARDAR + ' 0/NULL/VACIO = ORIGINAL (SIN CAMBIO) + ' 1 = AGREGADO + ' 2 = ELIMINADO + ' 3 = NADA (AGREGADO Y ELIMINADO): CUANDO AGREGA UN REGISTRO Y LO ELIMINA, ES DECIR, NO SE GUARDA NADA + ' 4 = UPDATE + + #Region " C A R G A R - D A T O S " Private Sub CargaDatos() @@ -518,10 +526,10 @@ Partial Class Sistemas_UsuarioDetalle CargarRol() CargaAsignaciones() - CargaUsuarioResponsable - - ' ValidaAccesoEstatusOC() - + CargaUsuarioResponsable() + + ' ValidaAccesoEstatusOC() + End Sub Public Sub CargaUsuarioResponsable() @@ -545,7 +553,7 @@ Partial Class Sistemas_UsuarioDetalle ViewState("CveRol") = ObjUsuario.CveRol.ToString DdlRol.SelectedValue = ObjUsuario.CveRol.ToString TxtCorreo.Text = ObjUsuario.Correo - + TxtCodigoAcceso.Text = ObjUsuario.DtResultados.Rows(0)("CodigoAcceso").ToString() Dim autoip As String = ObjUsuario.DtResultados.Rows(0)("AutorizadoxIP").ToString().ToUpper() 'chkSessionxEquipo.Checked = (autoip = "1" OrElse autoip = "TRUE") @@ -553,6 +561,7 @@ Partial Class Sistemas_UsuarioDetalle 'DdlAutoriza.SelectedValue = ObjUsuario.CveAutoriza.ToString ViewState("Password") = ObjUsuario.Contraseña + ViewState("CodigoAcceso") = ObjUsuario.DtResultados.Rows(0)("CodigoAcceso").ToString() ViewState("CveEmpresa") = ObjUsuario.CveEmpresaPredeterminada DdlEmpresa.SelectedValue = CveEmpresa.ToString @@ -749,23 +758,23 @@ Partial Class Sistemas_UsuarioDetalle If CveTipoDocumentoAsignado <> "-1" Then DdlTipoDocumento.SelectedValueExist(CveTipoDocumentoAsignado) UpFiltrosAsignarPermiso.Update() - End Sub + End Sub #End Region - - 'Private Sub CargaSucursal() - ' DtSubProyectos2 = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltraParametros("CveSubProyecto =" & DdlSubProyectos.SelectedValue.ToEntero) - ' If DtSubProyectos2.Rows.Count > 0 Then - ' Dim dr As DataRow - ' dr = DtSubProyectos2(0) - ' CveSucursal = dr("CveSucursal").ToString.ToEntero - ' Else - ' CveSucursal = -1 - ' End If - - 'End Sub - + + 'Private Sub CargaSucursal() + ' DtSubProyectos2 = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltraParametros("CveSubProyecto =" & DdlSubProyectos.SelectedValue.ToEntero) + ' If DtSubProyectos2.Rows.Count > 0 Then + ' Dim dr As DataRow + ' dr = DtSubProyectos2(0) + ' CveSucursal = dr("CveSucursal").ToString.ToEntero + ' Else + ' CveSucursal = -1 + ' End If + + 'End Sub + #Region " G U A R D A R - U P D A T E " - + Private Function ValidaUsername(Username As String, Correo As String) As Boolean Dim Retorno As Boolean = True 'If CveUsuario = -1 Then @@ -818,10 +827,11 @@ Partial Class Sistemas_UsuarioDetalle DtAsignacionesMultiEmpresa.Rows.Add(Row) End If + Dim CodigoAcceso As String = If(String.IsNullOrEmpty(TxtCodigoAcceso.Text.Trim), "-1", TxtCodigoAcceso.Text.Trim) 'REGISTRA O ACTUALIZA LOS DATOS GENERALES DEL USUARIO If CveUsuario = -1 Then - CveUsuario = ObjUsuarios.AddUsuario(TxtUsuario.Text.Trim, Encripta(ContraseñaPredeterminada), TxtNombre.Text.Trim, DdlRol.SelectedValue.ToEntero, TxtCorreo.Text.Trim, DdlPersonal.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, ChkCambiarContraseña.Checked, UsuarioActual.CveUsuario, DdlEmpresa.SelectedValue.ToEntero, DdlSubProyectos.SelectedValue.ToEntero, CveAlmacenAsignado:=DdlAlmacenGeneral.SelectedValue.ToEntero, AsignarSubProyecto:=ChkAsignarSubProyecto.Checked, AsignarOC:=ChkAsignarOC.Checked, DescuentoAutorizado:=TxtDescuentoAutorizado.Text.ToDouble) + CveUsuario = ObjUsuarios.AddUsuario(TxtUsuario.Text.Trim, Encripta(ContraseñaPredeterminada), TxtNombre.Text.Trim, DdlRol.SelectedValue.ToEntero, TxtCorreo.Text.Trim, DdlPersonal.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, ChkCambiarContraseña.Checked, UsuarioActual.CveUsuario, DdlEmpresa.SelectedValue.ToEntero, DdlSubProyectos.SelectedValue.ToEntero, CveAlmacenAsignado:=DdlAlmacenGeneral.SelectedValue.ToEntero, AsignarSubProyecto:=ChkAsignarSubProyecto.Checked, AsignarOC:=ChkAsignarOC.Checked, DescuentoAutorizado:=TxtDescuentoAutorizado.Text.ToDouble, CodigoAcceso:=CodigoAcceso) EsNuevoUsuario = True If CveUsuario = -1 Then TieneError = True @@ -833,7 +843,7 @@ Partial Class Sistemas_UsuarioDetalle End If Next Else - If Not ObjUsuarios.UpdateUsuario(TxtUsuario.Text.Trim, TxtNombre.Text.Trim, DdlRol.SelectedValue.ToEntero, TxtCorreo.Text.Trim, DdlPersonal.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, ChkCambiarContraseña.Checked, ChkEstatus.Checked, DdlEmpresa.SelectedValue.ToEntero, CveUsuario, DdlAlmacenGeneral.SelectedValue.ToEntero, DdlSubProyectos.SelectedValue.ToEntero, UsuarioActual.CveUsuario, AsignarSubProyecto:=ChkAsignarSubProyecto.Checked, AsignarOC:=ChkAsignarOC.Checked, DescuentoAutorizado:=TxtDescuentoAutorizado.Text.ToDouble) Then + If Not ObjUsuarios.UpdateUsuario(TxtUsuario.Text.Trim, TxtNombre.Text.Trim, DdlRol.SelectedValue.ToEntero, TxtCorreo.Text.Trim, DdlPersonal.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, ChkCambiarContraseña.Checked, ChkEstatus.Checked, DdlEmpresa.SelectedValue.ToEntero, CveUsuario, DdlAlmacenGeneral.SelectedValue.ToEntero, DdlSubProyectos.SelectedValue.ToEntero, UsuarioActual.CveUsuario, AsignarSubProyecto:=ChkAsignarSubProyecto.Checked, AsignarOC:=ChkAsignarOC.Checked, DescuentoAutorizado:=TxtDescuentoAutorizado.Text.ToDouble, CodigoAcceso:=CodigoAcceso) Then TieneError = True End If @@ -1398,10 +1408,10 @@ Partial Class Sistemas_UsuarioDetalle Catch ex As Exception OnError("Ocurrió error al mandar MAIL", ex) End Try - End Sub + End Sub #End Region - - + + #Region " E L I M I N A R - U S U A R I O " Protected Sub BtnEliminar_Click(sender As Object, e As System.EventArgs) Handles BtnEliminar.Click ''DENTRO DEL PROCEDIMIENTO ELIMINA TODO LO RELACIONADO CON EL USUARIO (ALMACENES, SUBPROYECTOS, ACCESO A EMPRESAS...) @@ -1413,10 +1423,10 @@ Partial Class Sistemas_UsuarioDetalle Alert("Ocurrió un error al eliminar el usuario. Por favor vuelva a intentar", TipoMensaje.MsgError) End If ObjUsuario.Dispose() - End Sub + End Sub #End Region - - + + #Region " CONTRASEÑA " Protected Sub LnkRestablecer_Click(sender As Object, e As EventArgs) Handles LnkRestablecer.Click Dim Usuario As New ClsSisUsuarios @@ -1430,11 +1440,15 @@ Partial Class Sistemas_UsuarioDetalle Protected Sub LnkVerPass_Click(sender As Object, e As EventArgs) Handles LnkVerPass.Click Alert(Extensiones.Decripta(Password)) - End Sub - + End Sub + Protected Sub LnkVerCodigoAcceso_Click(sender As Object, e As EventArgs) Handles LnkVerCodigoAcceso.Click + Alert(CodigoAcceso) + End Sub + + #End Region - - + + #Region "TAB - ASIGNACIONES" Protected Sub DdlEmpresaAsignaciones_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlEmpresaAsignaciones.SelectedIndexChanged @@ -1496,8 +1510,8 @@ Partial Class Sistemas_UsuarioDetalle DtAsignacionesMultiEmpresa.Columns.Add("CveSucursal", GetType(Integer)) DtAsignacionesMultiEmpresa.Columns.Add("CveAlmacen", GetType(Integer)) DtAsignacionesMultiEmpresa.Columns.Add("CveTipoDocumento", GetType(String)) - End Sub - + End Sub + #Region " PROYECTOS-SUBPROYECTOS " Private Sub CargaProyectos() DdlProyecto.Items.Clear() @@ -1879,8 +1893,8 @@ Partial Class Sistemas_UsuarioDetalle End If End If ChkAsignarAllProyectos.Checked = False - End Sub - + End Sub + #Region "GV SUBPROYECTOS" Protected Sub GvSubProyectos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvSubProyectos.RowDataBound If e.Row.RowType = DataControlRowType.DataRow Then @@ -1982,14 +1996,14 @@ Partial Class Sistemas_UsuarioDetalle GvSubProyectos.EditIndex = -1 CargaGvSubProyectos() - End Sub - + End Sub + #End Region - + #End Region - + #Region " ALMACENES " - + Private Function GetAlmacenesSinGV() As String Dim SB As New StringBuilder Dim prefix As String = "" @@ -2098,8 +2112,8 @@ Partial Class Sistemas_UsuarioDetalle Private Sub CargaGVAlmacen() GvAlmacenes.DataSource = DtAlmacenes.FiltraParametros(String.Format("CveEmpresa = {0} And (isnull(Accion,0) < 2 Or Accion = 4)", DdlEmpresaAsignaciones.SelectedValue.ToEntero)) GvAlmacenes.DataBind() - End Sub - + End Sub + #Region "GV ALMACENES" Protected Sub GvAlmacenes_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvAlmacenes.RowDataBound If e.Row.RowType = DataControlRowType.DataRow Then @@ -2186,11 +2200,11 @@ Partial Class Sistemas_UsuarioDetalle GvAlmacenes.EditIndex = -1 CargaGVAlmacen() - End Sub + End Sub #End Region - + #End Region - + #Region " CUENTAS BANCARIAS " Private Sub CargaCuentasBancarias() DdlCuentasBancarias.Items.Clear() @@ -2253,9 +2267,9 @@ Partial Class Sistemas_UsuarioDetalle DtCuentasBancarias.AcceptChanges() CargaGvCuentasBancarias() - End Sub + End Sub #End Region - + #Region " ESTATUS DE ÓRDENES DE COMPRA" Private Sub CargaEstatusOrdenesCompra() ' Exit Sub @@ -2449,9 +2463,9 @@ Partial Class Sistemas_UsuarioDetalle Else CargaGridEstatusUsuarioOC("OC") End If - End Sub + End Sub #Region "GRIDVIEW" - + Protected Sub GvEstatusUsuariosREQ_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvEstatusUsuariosREQ.RowDataBound If e.Row.RowType = DataControlRowType.DataRow Then Dim tmpT As DataTable = DTEstatusSubProyectos.FiltraParametros(String.Format("CveSubProyecto = {0}", e.Row.DBCampo("CveSubProyecto").ToString)) @@ -2706,13 +2720,13 @@ Partial Class Sistemas_UsuarioDetalle End If Next End If - End Sub - - + End Sub + + #End Region - + #End Region - + #Region "ESTATUS DE ORDENES DE SERVICIO" Private Sub CargaEstatusOS() CreaGridEstatusOS() @@ -2865,9 +2879,9 @@ Partial Class Sistemas_UsuarioDetalle End If Next Next - End Sub + End Sub #End Region - + #Region " ESTATUS ORDENES DE COMPRA - CLASIFICACIONES USUARIO OC " Private Sub InicializaEstasClasificacionesOC() @@ -2929,15 +2943,15 @@ Partial Class Sistemas_UsuarioDetalle ObjOC.Dispose() CargaGVOCClasificaciones() - End Sub - - - + End Sub + + + #End Region - + #End Region - - + + #Region "TAB - ACCESO MODULOS" Public Sub CargaModulosAcceso() Dim ObjPermisos As New ClsSisUsuarios @@ -3023,10 +3037,10 @@ Partial Class Sistemas_UsuarioDetalle Alert("Los Permisos se eliminaron correctamente.", TipoMensaje.MsgInformacion, "window.location.href=""/Sistemas/Usuarios.aspx""") End If ObjUsuario.Dispose() - End Sub + End Sub #End Region - - + + #Region "TAB - PERMISO MODULOS" Public Sub CargaModulosPermisos() Dim ObjProcesos As New ClsSisUsuarios @@ -3126,10 +3140,10 @@ Partial Class Sistemas_UsuarioDetalle Alert("Los Procesos se eliminaron correctamente.", TipoMensaje.MsgInformacion, "window.location.href=""/Sistemas/Usuarios.aspx""") End If ObjUsuario.Dispose() - End Sub + End Sub #End Region - - + + #Region "TAB - ACCESO EMPRESAS" Private Sub CargaEmpresas() Dim ClsUsuarios As New ClsSisUsuarios @@ -3319,10 +3333,10 @@ Partial Class Sistemas_UsuarioDetalle Private Sub LnkRenviaCorreo_Click(sender As Object, e As EventArgs) Handles LnkRenviaCorreo.Click EnviaCorreo() Alert("Correo enviado con exito.", TipoMensaje.MsgInformacion) - End Sub + End Sub #End Region - - + + #Region "TAB - RESTRICCIONES ACCESO " Private Sub InicializaRestricciones() CargaDtRestricciones() @@ -3535,8 +3549,8 @@ Partial Class Sistemas_UsuarioDetalle CargaGvRestricciones() RegistraScript("$('#DivAgregarRestricción').modal('hide')") - End Sub - + End Sub + #Region " GV " Private Sub GvRestricciones_RowCommand(sender As Object, e As GridViewCommandEventArgs) Handles GvRestricciones.RowCommand @@ -3626,13 +3640,13 @@ Partial Class Sistemas_UsuarioDetalle End If CargaGvRestricciones() - End Sub + End Sub #End Region - - + + #End Region - - + + #Region "TAB - INDICADORES" Public Sub CargaGridIndicadores() Dim Objeto As New ClsIndicadores @@ -3649,11 +3663,11 @@ Partial Class Sistemas_UsuarioDetalle e.Row.FCCheckBox("chkIndicador").Checked = True End If End If - End Sub - + End Sub + #End Region - - + + #Region " CLONAR USUARIO " Private Sub InicializaClonarUsuario() DdlUsuarioClonar.DataSource = GlobalDTUsuarios(-1, UsuarioActual.CveEmpresa) @@ -3739,12 +3753,12 @@ Partial Class Sistemas_UsuarioDetalle 'CargaDatos() Return Retorno - End Function - - + End Function + + #End Region - - + + #Region " MANDA CORREO " Private Sub MandaCorreo(Asunto As String, Para As String, Body As String) Dim a As String = String.Format("{0} -- {1} ---- -->", Asunto, Para) @@ -3752,13 +3766,13 @@ Partial Class Sistemas_UsuarioDetalle Dim Mail As New ClsSisMail() 'Mail.MandaCorreo(ClsPaginas.EmpresaNotificaciones, Para, Asunto, "", "", Nothing, Body) Mail.SendMail(ClsPaginas.EmpresaNotificaciones, Para, Asunto, Body) - End Sub - - - + End Sub + + + #End Region - - + + #Region " ASIGNACIONES DE PERMISOS " Protected Sub DdlEmpresaAsignarPermiso_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlEmpresaAsignarPermiso.SelectedIndexChanged CargaAsignaciones() @@ -3782,8 +3796,8 @@ Partial Class Sistemas_UsuarioDetalle CargaDtEstatusOC() CargaGvEstatusOC() - End Sub - + End Sub + #Region " EMPRESAS " Public Sub CargaDTEmpresasAsignar() Dim ObjPermisos As New ClsSisUsuarios @@ -3842,10 +3856,10 @@ Partial Class Sistemas_UsuarioDetalle CargaAsignaciones() - End Sub - + End Sub + #End Region - + #Region " ROLES " Private Sub CargaDtRolesAsignar() Dim ClsUsuarios As New ClsSisUsuarios @@ -3934,9 +3948,9 @@ Partial Class Sistemas_UsuarioDetalle DTRolesAsignar.AcceptChanges() CargaGVRolesAsignar() - End Sub + End Sub #End Region - + #Region " ALMACENES " Private Sub CargaDtAlmacenAsignar() Dim ClsUsuarios As New ClsSisUsuarios @@ -4027,11 +4041,11 @@ Partial Class Sistemas_UsuarioDetalle DtAlmacenesAsignar.AcceptChanges() CargaGVAlmacenAsignar() - End Sub - - + End Sub + + #End Region - + #Region " PROYECTOS-SUBPROYECTOS " Private Sub CargaDtSubProyectosAsignar() Dim ClsUsuarios As New ClsSisUsuarios @@ -4142,10 +4156,10 @@ Partial Class Sistemas_UsuarioDetalle DtSubProyectosAsignar.AcceptChanges() CargarGvSubProyectosAsignar() - End Sub - + End Sub + #End Region - + #Region " CUENTAS BANCARIAS " Private Sub CargaCuentasBancariasAsignar() DdlCuentasBancariasAsignar.Items.Clear() @@ -4230,9 +4244,9 @@ Partial Class Sistemas_UsuarioDetalle DtCuentasBancariasAsignar.AcceptChanges() CargaGvCuentasBancariasAsignar() - End Sub + End Sub #End Region - + #Region " MODULOS " Public Sub CargaDTModulosAsignar() Dim ObjPermisos As New ClsSisUsuarios @@ -4267,10 +4281,10 @@ Partial Class Sistemas_UsuarioDetalle End If End If - End Sub - + End Sub + #End Region - + #Region " PERMISOS " Public Sub CargaDTPermisosAsignar() Dim ObjPermisos As New ClsSisUsuarios @@ -4305,9 +4319,9 @@ Partial Class Sistemas_UsuarioDetalle End If End If - End Sub + End Sub #End Region - + #Region " INDICADORES " Public Sub CargaDTIndicadoresAsignar() Dim ObjIndicadores As New ClsSisUsuarios @@ -4335,13 +4349,13 @@ Partial Class Sistemas_UsuarioDetalle End If End If - End Sub + End Sub #End Region - - + + #End Region - - + + #Region " USUARIO CONTROLADO " Private Sub InicializaUsuarioControlado() Dim ClsUsuarios As New ClsSisUsuarios @@ -4391,12 +4405,12 @@ Partial Class Sistemas_UsuarioDetalle End If ClsUsuarios.Dispose() - End Sub + End Sub #End Region - - + + #Region "C O N T O L E S DE U S U A R I O S" - + #Region "ESTATUS DE ÓRDENES DE COMPRA" Private Sub CargaDtEstatusOCPermisos() Dim ClsUsuarios As New ClsSisUsuarios @@ -4517,10 +4531,10 @@ Partial Class Sistemas_UsuarioDetalle DTEstatusOC = dt DTEstatusOCAsignar = dt - End Sub + End Sub #End Region - - + + #Region "GV ESTATUS DE OC" Protected Sub GvEstatusOC_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvEstatusOC.RowDataBound If e.Row.RowType = DataControlRowType.DataRow Then @@ -4631,11 +4645,11 @@ Partial Class Sistemas_UsuarioDetalle GvEstatusUsuariosOC.Columns(i).Visible = (dtValida IsNot Nothing AndAlso dtValida.Rows.Count = 1) End If Next - End Sub - + End Sub + #End Region #End Region - + Protected Sub LnkAgregarClasificacion_Click(sender As Object, e As EventArgs) If DtClasificaciones IsNot Nothing Then Dim CveClasificacion As Integer = DdlClasificacion.SelectedValue.ToEntero @@ -4762,10 +4776,10 @@ Partial Class Sistemas_UsuarioDetalle - End Sub - + End Sub + #Region "USUARIO RESPONSABLE" - + Protected Sub BtnUpdateUsuarioResponsable_Click(sender As Object, e As EventArgs) Dim ObjUsuarios As New ClsSisUsuarios If ObjUsuarios.UpdateUsuarioResponsableMasivo(CveUsuario, DdlUsuarioResponsable.SelectedValue.ToEntero) Then @@ -4773,10 +4787,10 @@ Partial Class Sistemas_UsuarioDetalle RegistraScript("$('#DivUpdateUsuarioResponsable').modal('hide')") End If ObjUsuarios.Dispose() - End Sub - + End Sub + #End Region - + Protected Sub LnkAutorizarEquipo_Click(sender As Object, e As EventArgs) 'CveUsuario Dim AdsCodex As String = Encripta(String.Format("{0}_{1}_{2}", CveUsuario, DateTime.Now.Ticks, UsuarioActual.CveUsuario)) diff --git a/Ventas/PV.aspx b/Ventas/PV.aspx index b54300575..4de796386 100644 --- a/Ventas/PV.aspx +++ b/Ventas/PV.aspx @@ -585,6 +585,14 @@ + + + +
    + +
    +
    +
    @@ -833,7 +841,7 @@ - + @@ -1917,6 +1925,45 @@ + + <%-- ******************************************** Bloqueo de Caja *************************************************************************************************************************************** --%> + +