{% macro submenu_links(items, flyout) %} {% for item in items %} {% if item.allowed %} {{ item.label|trans }} {% endif %} {% endfor %} {% endmacro %} {% import _self as sidebarUi %} {% set reportItems = [ {route: 'rep_antiguedad', label: 'menu.reportes.antiguedad_saldos', allowed: has_access('rep_antiguedad', 'ver'), active: currentRoute == 'rep_antiguedad'}, {route: 'rep_estado', label: 'menu.reportes.estado_cuenta', allowed: has_access('rep_estado', 'ver'), active: currentRoute == 'rep_estado'}, {route: 'rep_estado_documentos', label: 'menu.reportes.documentos_pendientes', allowed: has_access('rep_estado_documentos', 'ver'), active: currentRoute == 'rep_estado_documentos'}, {route: 'rep_resumen_prov', label: 'menu.reportes.resumen_proveedores', allowed: has_access('rep_resumen_prov', 'ver'), active: currentRoute == 'rep_resumen_prov'}, {route: 'rep_resumen_prov_pagos', label: 'menu.reportes.pagos_aplicaciones', allowed: has_access('rep_resumen_prov_pagos', 'ver'), active: currentRoute == 'rep_resumen_prov_pagos'}, {route: 'rep_gasto_centro_costo', label: 'menu.reportes.gasto_centro_costo', allowed: has_access('rep_gasto_centro_costo', 'ver'), active: currentRoute == 'rep_gasto_centro_costo'} ] %} {% set userRole = user_role_level() %} {% set adminActive = currentRoute starts with 'cliente' or currentRoute starts with 'admin_' or currentRoute starts with 'sitio' or currentRoute starts with 'usuario' or currentRoute starts with 'formato_pago' %} {% set adminItems = [ {route: 'cliente_index', label: 'menu.clientes', allowed: userRole == 1, active: currentRoute starts with 'cliente'}, {route: 'admin_tenants_index', label: 'menu.tenants', allowed: userRole == 1, active: currentRoute starts with 'admin_tenants'}, {route: 'sitio_index', label: 'menu.sitios', allowed: userRole == 1, active: currentRoute starts with 'sitio'}, {route: 'admin_erp_config', label: 'menu.integracion_erp', allowed: userRole == 1, active: currentRoute starts with 'admin_erp'}, {route: 'usuario_index', label: 'menu.usuarios', allowed: userRole <= 3, active: currentRoute starts with 'usuario'}, {route: 'formato_pago_index', label: 'menu.formatos_pago', allowed: userRole <= 3, active: currentRoute starts with 'formato_pago'} ] %} {% set catalogActive = currentRoute starts with 'banco' or currentRoute starts with 'clasificacion_proveedor' or currentRoute starts with 'cc_' or currentRoute starts with 'condpago' or currentRoute starts with 'formapago' or currentRoute starts with 'cuenta_' or currentRoute starts with 'idp_tasa' or currentRoute starts with 'imp_' or currentRoute starts with 'moneda' or currentRoute starts with 'pais' or currentRoute starts with 'proy' or currentRoute starts with 'regimen' or currentRoute starts with 'ret_' or currentRoute starts with 'tc_' or currentRoute starts with 'tdoc' or currentRoute starts with 'classdoc' or currentRoute starts with 'tipo_iva' %} {% set bankAccountActive = currentRoute starts with 'cuenta_' and not (currentRoute starts with 'cuenta_contable') %} {% set catalogItems = [ {route: 'banco_index', label: 'menu.catalogos.bancos', allowed: has_access('banco', 'ver'), active: currentRoute starts with 'banco'}, {route: 'cc_index', label: 'menu.catalogos.centros_costo', allowed: has_access('cc', 'ver'), active: currentRoute starts with 'cc_'}, {route: 'clasificacion_proveedor_index', label: 'menu.catalogos.clasificaciones_proveedor', allowed: has_access('clasificacion_proveedor', 'ver'), active: currentRoute starts with 'clasificacion_proveedor'}, {route: 'condpago_index', label: 'menu.catalogos.condiciones_pago', allowed: has_access('condpago', 'ver'), active: currentRoute starts with 'condpago'}, {route: 'formapago_index', label: 'menu.catalogos.formas_pago', allowed: has_access('condpago', 'ver'), active: currentRoute starts with 'formapago'}, {route: 'pais_index', label: 'menu.catalogos.paises', allowed: has_access('pais', 'ver'), active: currentRoute starts with 'pais'}, {route: 'cuenta_index', label: 'menu.catalogos.cuentas_bancarias', allowed: has_access('cuenta', 'ver'), active: bankAccountActive}, {route: 'cuenta_contable_index', label: 'menu.catalogos.cuentas_contables', allowed: has_access('cuenta_contable', 'ver'), active: currentRoute starts with 'cuenta_contable'}, {route: 'regimen_index', label: 'menu.catalogos.regimen_fiscal', allowed: has_access('regimen', 'ver'), active: currentRoute starts with 'regimen'}, {route: 'imp_index', label: 'menu.catalogos.impuestos', allowed: has_access('imp', 'ver'), active: currentRoute starts with 'imp_'}, {route: 'moneda_index', label: 'menu.catalogos.monedas', allowed: has_access('moneda', 'ver'), active: currentRoute starts with 'moneda'}, {route: 'proy_index', label: 'menu.catalogos.proyectos', allowed: has_access('proy', 'ver'), active: currentRoute starts with 'proy'}, {route: 'ret_index', label: 'menu.catalogos.retenciones', allowed: has_access('ret', 'ver'), active: currentRoute starts with 'ret_'}, {route: 'idp_tasa_index', label: 'menu.catalogos.idp_tasas', allowed: has_access('idp_tasa', 'ver'), active: currentRoute starts with 'idp_tasa'}, {route: 'tc_index', label: 'menu.catalogos.tipos_cambio', allowed: has_access('tc', 'ver'), active: currentRoute starts with 'tc_'}, {route: 'tipo_iva_index', label: 'menu.catalogos.tipos_iva', allowed: has_access('tipo_iva', 'ver'), active: currentRoute starts with 'tipo_iva'}, {route: 'tdoc_index', label: 'menu.catalogos.tipos_documento', allowed: has_access('tdoc', 'ver'), active: currentRoute starts with 'tdoc'}, {route: 'classdoc_index', label: 'menu.catalogos.clases_documento', allowed: has_access('classdoc', 'ver'), active: currentRoute starts with 'classdoc'} ] %}