shared-tsi 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +63 -0
- package/fesm2022/shared-tsi.mjs +879 -0
- package/fesm2022/shared-tsi.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/utils/configuracion-sistema/factores.d.ts +272 -0
- package/lib/utils/configuracion-sistema/formularios.d.ts +57 -0
- package/lib/utils/configuracion-sistema/permisos.d.ts +196 -0
- package/lib/utils/general/funciones.d.ts +32 -0
- package/lib/utils/general/textos.d.ts +4 -0
- package/lib/utils/general/utilidades.d.ts +47 -0
- package/package.json +23 -0
- package/public-api.d.ts +6 -0
- package/shared-tsi-0.0.1.tgz +0 -0
|
@@ -0,0 +1,879 @@
|
|
|
1
|
+
import Swal from 'sweetalert2';
|
|
2
|
+
|
|
3
|
+
const FACTORES = {
|
|
4
|
+
valorDeIGVEnVenta: {
|
|
5
|
+
descri: '1 - I.G.V VENTA',
|
|
6
|
+
key: 'igvVenta'
|
|
7
|
+
},
|
|
8
|
+
/*-*/ valorDeIGVEnCompra: {
|
|
9
|
+
descri: '11 - I.G.V. COMPRA',
|
|
10
|
+
key: 'igvCompra'
|
|
11
|
+
},
|
|
12
|
+
/*-*/ longitudDeCodigoDeArticulo: {
|
|
13
|
+
descri: '20 - LONGITUD DE CÓDIGO ARTÍCULO / DECIMAL',
|
|
14
|
+
key: 'longitudCodigoArticulo'
|
|
15
|
+
},
|
|
16
|
+
/*-*/ longitudDeCodigoDeCliente: {
|
|
17
|
+
descri: '21 - LONGITUD DE CÓDIGO CLIENTE / CADENA',
|
|
18
|
+
key: 'longitudCodigoCliente'
|
|
19
|
+
},
|
|
20
|
+
/*-*/ codigoCorrelativoDeArticulo: {
|
|
21
|
+
descri: '22 - CÓDIGO DE ARTÍCULO CORRELATIVO',
|
|
22
|
+
key: 'codigoArticuloAutomatico'
|
|
23
|
+
},
|
|
24
|
+
codigoCorrelativoAutomaticoDeCliente: {
|
|
25
|
+
descri: '23 - CÓDIGO CORRELATIVO AUTOMÁTICO DE CLIENTES',
|
|
26
|
+
key: 'codigoClienteAutomatico'
|
|
27
|
+
},
|
|
28
|
+
/*-*/ porcentajeDeServicioDePlanchado: {
|
|
29
|
+
descri: '35 - SERVICIO DE PLANCHADO LAVANDERIA - CORPORATIVO / DECIMAL',
|
|
30
|
+
key: 'servicioPlanchadoPorcentaje'
|
|
31
|
+
},
|
|
32
|
+
definirTipoDeHerencia: {
|
|
33
|
+
descri: '216 - PROCESO DE FACTURACIÓN / ENTERO',
|
|
34
|
+
key: 'procesoFacturacion'
|
|
35
|
+
},
|
|
36
|
+
numeroDeDecimalesParaCantidadEnComercial: {
|
|
37
|
+
descri: '219 - DECIMALES PARA COMERCIAL / ENTERO',
|
|
38
|
+
key: 'decimalesComercialCantidad'
|
|
39
|
+
},
|
|
40
|
+
numeroDeDecimalesParaPrecioEnComercial: {
|
|
41
|
+
descri: '219 - DECIMALES PARA COMERCIAL / DECIMAL',
|
|
42
|
+
key: 'decimalesComercialPrecio'
|
|
43
|
+
},
|
|
44
|
+
numeroDeDecimalesParaCantidadEnLogistica: {
|
|
45
|
+
descri: '220 - DECIMALES PARA LOGISTICA / ENTERO',
|
|
46
|
+
key: 'decimalesLogisticaCantidad'
|
|
47
|
+
},
|
|
48
|
+
numeroDeDecimalesParaPrecioEnLogistica: {
|
|
49
|
+
descri: '220 - DECIMALES PARA LOGISTICA / DECIMAL',
|
|
50
|
+
key: 'decimalesLogisticaPrecio'
|
|
51
|
+
},
|
|
52
|
+
cuentaIGVDeRetencionPorDefecto: {
|
|
53
|
+
descri: '224 - VALORES DEFAULT COMPROBANTE DE RETENCIÓN / CUENTA',
|
|
54
|
+
key: 'cuentaIGVRetencionDefecto'
|
|
55
|
+
},
|
|
56
|
+
cuentaDeRetencionPorDefecto: {
|
|
57
|
+
descri: '224 - VALORES DEFAULT COMPROBANTE DE RETENCIÓN / ENTERO',
|
|
58
|
+
key: 'cuentaRetencionDefecto'
|
|
59
|
+
},
|
|
60
|
+
/*-*/ diasDeEntregaDeLavado: {
|
|
61
|
+
descri: '301 - DIAS DE ENTREGA DE LAVADO',
|
|
62
|
+
key: 'diasEntregaGuiasRecepcion'
|
|
63
|
+
},
|
|
64
|
+
cantidadDeDescuentoEnComercial: {
|
|
65
|
+
descri: '302 - NRO DE DESCUENTO - COMERCIAL',
|
|
66
|
+
key: 'cantidadDescuentosComercial'
|
|
67
|
+
},
|
|
68
|
+
/*-*/ cantidadDeDescuentoEnLogistica: {
|
|
69
|
+
descri: '303 - NRO DE DESCUENTO - LOGÍSTICA',
|
|
70
|
+
key: 'cantidadDescuentosLogistica'
|
|
71
|
+
},
|
|
72
|
+
tipoDeMonedaDeLimiteDeCredito: {
|
|
73
|
+
descri: '311 - MONEDA DE LÍMITE DE CRÉDITO CLIENTES',
|
|
74
|
+
key: 'monedaLimiteCreditoClientes'
|
|
75
|
+
},
|
|
76
|
+
redondeoAlTotalPorItem: {
|
|
77
|
+
descri: '314 - REDONDEO AL TOTAL POR ITEM DEL DOCUMENTO / ENTERO',
|
|
78
|
+
key: 'redondeoPorItem'
|
|
79
|
+
},
|
|
80
|
+
agenteDeRetencion: {
|
|
81
|
+
descri: '331 - ES AGENTE DE RETENCIÓN',
|
|
82
|
+
key: 'agenteRetencion'
|
|
83
|
+
},
|
|
84
|
+
agenteDePercepcion: {
|
|
85
|
+
descri: '332 - ES AGENTE DE PERCEPCIÓN',
|
|
86
|
+
key: 'agentePercepcion'
|
|
87
|
+
},
|
|
88
|
+
codigoCorrelativoAutomaticoDeProveedor: {
|
|
89
|
+
descri: '341 - CÓDIGO CORRELATIVO AUTOMÁTICO DE PROVEEDORES',
|
|
90
|
+
key: 'codigoProveedorAutomatico'
|
|
91
|
+
},
|
|
92
|
+
/*-*/ codigoCorrelativoAutomaticoDeClienteVentaRapida: {
|
|
93
|
+
descri: '342 - CÓDIGO CORRELATIVO AUTOMÁTICO DE CLIENTES - VENTA RÁPIDA',
|
|
94
|
+
key: 'codigoClienteAutomaticoVentaRapida'
|
|
95
|
+
},
|
|
96
|
+
/*-*/ agregarCondicionDePagoAlAprobarOrdenDePedido: {
|
|
97
|
+
descri: '348 - AGREGAR CONDICIÓN DE PAGO AL APROBAR ORDEN DE PEDIDO',
|
|
98
|
+
key: 'agregaCondicionPagoAprobarOrdenPedido'
|
|
99
|
+
},
|
|
100
|
+
impresionLuegoDeRegistrar: {
|
|
101
|
+
descri: '350 - ENVÍO DIRECTO A IMPRESIÓN',
|
|
102
|
+
key: 'impresionDirectaCompVenta'
|
|
103
|
+
},
|
|
104
|
+
/*-*/ tamanoDeDireccionDeCliente: {
|
|
105
|
+
descri: '351 - TAMAÑO DE DIRECCIÓN DE CLIENTE',
|
|
106
|
+
key: 'tamanoDireccionCliente'
|
|
107
|
+
},
|
|
108
|
+
/*-*/ identificarUsuarioEnBoletaSiSuperaTope: {
|
|
109
|
+
descri: '354 - IDENTIFICAR A USUARIO EN BOLETA DE VENTA SI SUPERA TOPE MÍNIMO(SUNAT)',
|
|
110
|
+
key: 'topeBoletaVentaIdentCliente'
|
|
111
|
+
},
|
|
112
|
+
/*-*/ montoBancarizableEnSoles: {
|
|
113
|
+
descri: '355 - MONTO BANCARIZABLE EN SOLES',
|
|
114
|
+
key: 'montoBancarizableSoles'
|
|
115
|
+
},
|
|
116
|
+
/*-*/ montoBancarizableEnDolares: {
|
|
117
|
+
descri: '356 - MONTO BANCARIZABLE EN DÓLARES',
|
|
118
|
+
key: 'montoBancarizableDolares'
|
|
119
|
+
},
|
|
120
|
+
/*-*/ controlDeStockPorDefectoEnMantenimientoDeArticulos: {
|
|
121
|
+
descri: '361 - CONTROL STOCK DEFAULT EN MANTENIMIENTO DE ARTÍCULOS',
|
|
122
|
+
key: 'tipoControlStockDefecto'
|
|
123
|
+
},
|
|
124
|
+
/*-*/ codigoCorrelativoDeActivoFijo: {
|
|
125
|
+
descri: '366 - CÓDIGO CORRELATIVO DE ACTIVO FIJO',
|
|
126
|
+
key: 'codigoCorrelativoActivoFijo'
|
|
127
|
+
},
|
|
128
|
+
/*-*/ permiteImprimirVariasEtiquetas: {
|
|
129
|
+
descri: '370 - PROGRAMA DE AUTORIZACIÓN DE IMPRESION DE ETIQUETAS MÁS DE 1 VEZ',
|
|
130
|
+
key: 'permiteImprimirVariasEtiquetas'
|
|
131
|
+
},
|
|
132
|
+
/*-*/ facturadorElectronico: {
|
|
133
|
+
descri: '374 - FACTURADOR ELECTRÓNICO SUNAT',
|
|
134
|
+
key: 'facturadorElectronico'
|
|
135
|
+
},
|
|
136
|
+
vendedorNoModificableEnComercial: {
|
|
137
|
+
descri: '375 - VENDEDOR NO SE MODIFICA EN PROCESO COMERCIAL',
|
|
138
|
+
key: 'permiteModificarVendedorComercial'
|
|
139
|
+
},
|
|
140
|
+
/*-*/ actualizarTituloDeListaDePreciosDeVenta: {
|
|
141
|
+
descri: '384 - ACTUALIZAR LISTA DE PRECIOS DE VENTA (S/N) - CÓDIGO DE LISTA (ENTERO) / ENTERO',
|
|
142
|
+
key: 'tituloListaActualizaPrecio'
|
|
143
|
+
},
|
|
144
|
+
/*-*/ actualizarListaDePreciosDeVenta: {
|
|
145
|
+
descri: '384 - ACTUALIZAR LISTA DE PRECIOS DE VENTA (S/N) - CÓDIGO DE LISTA (ENTERO)',
|
|
146
|
+
key: 'actualizaListaPrecio'
|
|
147
|
+
},
|
|
148
|
+
/*-*/ margenDeVentaACostoDeEtiquetas: {
|
|
149
|
+
descri: '387 - MARGEN DE VENTA A COSTO DE ETIQUETAS / ENTERO',
|
|
150
|
+
key: 'facMargenVentaCostoEti'
|
|
151
|
+
},
|
|
152
|
+
/*-*/ diasAdicionalesParaFechaDeEntregaDeOrdenesDePedido: {
|
|
153
|
+
descri: '393 - DÍAS ADICIONALES PARA FECHA DE ENTREGA DE ORDENES DE PEDIDO / ENTERO',
|
|
154
|
+
key: 'diaAdicionalFechaEntregaOrdenPedido'
|
|
155
|
+
},
|
|
156
|
+
/*-*/ aprobacionAutomaticaDeOrdenesDeCompra: {
|
|
157
|
+
descri: '394 - APROBACIÓN AUTOMÁTICO DE ORDENES DE COMPRA',
|
|
158
|
+
key: 'aprobacionAutomaticoOrdenesCompra'
|
|
159
|
+
},
|
|
160
|
+
incluyeFleteYSeguroEnComprobanteDeExportacion: {
|
|
161
|
+
descri: '396 - PREDETERMINADO INCLUYE FLETE Y SEGURO EN COMPROBANTE DE EXPORTACIÓN',
|
|
162
|
+
key: 'incluyeFleteSeguroEnComprobanteExportacion'
|
|
163
|
+
},
|
|
164
|
+
/*-*/ listaDePreciosPorDefectoParaPrecisoEnCero: {
|
|
165
|
+
descri: '397 - LISTA DE PRECIOS DEFECTO PARA PRECIOS EN CERO / ENTERO',
|
|
166
|
+
key: 'tituloListaDefectoVenta'
|
|
167
|
+
},
|
|
168
|
+
/*-*/ emisionDeGuiasDeRemisionElectronicas: {
|
|
169
|
+
descri: '399 - EMISIÓN DE GUÍAS DE REMISIÓN ELECTRÓNICAS',
|
|
170
|
+
key: 'guiaRemisionElectronico'
|
|
171
|
+
},
|
|
172
|
+
/*-*/ controlDeAlmacenDeTransitoDeImportacion: {
|
|
173
|
+
descri: '404 - CONTROL DE ALMACÉN DE TRÁNSITO DE IMPORTACIÓN',
|
|
174
|
+
key: 'controlTransitoImportacion'
|
|
175
|
+
},
|
|
176
|
+
/*-*/ usarSegundaListaDePreciosPorUnidadDeMedida: {
|
|
177
|
+
descri: '405 - USAR SEGUNDA LISTA DE PRECIOS POR UNIDAD DE MEDIDA',
|
|
178
|
+
key: 'facSegundaPrePorUnidades'
|
|
179
|
+
},
|
|
180
|
+
/*-*/ validaSaldosPorRecibirEnOrdenDeCompra: {
|
|
181
|
+
descri: '410 - VALIDA SALDOS POR RECIBIR EN ORDEN DE COMPRA',
|
|
182
|
+
key: 'facValidaSaldosPorRecibirOrdCompra'
|
|
183
|
+
},
|
|
184
|
+
/*-*/ controlDeStockComprometidoPorComprobantesDeVenta: {
|
|
185
|
+
descri: '411 - CONTROL DE STOCK COMPROMETIDO POR COMPROBANTES DE VENTA',
|
|
186
|
+
key: 'controlStockCompVentaComprometido'
|
|
187
|
+
},
|
|
188
|
+
/*-*/ restriccionDeUsuarioPorSucursal: {
|
|
189
|
+
descri: '413 - RESTRICCIÓN DE USUARIO POR SUCURSAL',
|
|
190
|
+
key: 'restriccionUsuarioSucursal'
|
|
191
|
+
},
|
|
192
|
+
/*-*/ permiteEmisionDeBoletasConRuc: {
|
|
193
|
+
descri: '416 - PERMITE LA EMISIÓN DE BOLETAS ELECTRONICAS CON RUC',
|
|
194
|
+
key: 'emisionBoletaConRuc'
|
|
195
|
+
},
|
|
196
|
+
/*-*/ listaDePreciosVisualesEnTSIMobile: {
|
|
197
|
+
descri: '427 - LISTA DE PRECIOS VISUALES EN TSIMOBILE PARA VENDEDORES',
|
|
198
|
+
key: 'listaPreciosVendedorestm'
|
|
199
|
+
},
|
|
200
|
+
permiteModificarItemsDeDocPadreEnComercial: {
|
|
201
|
+
descri: '431 - PERMITE MODIFICAR ÍTEMS DE DOCUMENTO PADRE EN PROCESO COMERCIAL(ANGULAR)',
|
|
202
|
+
key: 'facPermiteModItmsDocPadreProcesoComercial'
|
|
203
|
+
},
|
|
204
|
+
/*-*/ calculaDocumentosSinAgregarImpuestoICBPER: {
|
|
205
|
+
descri: '432 - CALCULA DOCUMENTOS SIN AGREGAR IMPUESTO ICBPER',
|
|
206
|
+
key: 'facCalculatotalSinCBPER'
|
|
207
|
+
},
|
|
208
|
+
/*-*/ pathBaseDeServiciosRestInterbase: {
|
|
209
|
+
descri: '433 - PATH BASE DE SERVICIOS REST INTERBASE',
|
|
210
|
+
key: 'facBasePathServiciosTSI'
|
|
211
|
+
},
|
|
212
|
+
permiteModificarItemsDeDocPadreEnLogistica: {
|
|
213
|
+
descri: '434 - PERMITE MODIFICAR ÍTEMS DE DOCUMENTO PADRE EN PROCESO LOGÍSTICO',
|
|
214
|
+
key: 'facPermiteModItmsDocPadreProcesoLogistica'
|
|
215
|
+
},
|
|
216
|
+
/*-*/ codigoDeArticuloDeServicioDePlanchado: {
|
|
217
|
+
descri: '435 - SERVICIO DE PLANCHADO LAVANDERIA - CORPORATIVO / CADENA',
|
|
218
|
+
key: 'servicioPlanchadoCodart'
|
|
219
|
+
},
|
|
220
|
+
/*-*/ tipoDeInventarioDeServicioDePlanchado: {
|
|
221
|
+
descri: '435 - SERVICIO DE PLANCHADO LAVANDERIA - CORPORATIVO / ENTERO',
|
|
222
|
+
key: 'servicioPlanchadoTipinv'
|
|
223
|
+
},
|
|
224
|
+
preguntaPorImpresionAgrupadaEnComercial: {
|
|
225
|
+
descri: '437 - PREGUNTA IMPRESIÓN AGRUPADA EN PROCESO COMERCIAL',
|
|
226
|
+
key: 'impresionAgrupadaComercial'
|
|
227
|
+
},
|
|
228
|
+
fechaDeEntregaEnBlancoEnOrdenDePedido: {
|
|
229
|
+
descri: '438 - FECHA DE ENTREGA EN BLANCO EN ORDEN DE PEDIDO',
|
|
230
|
+
key: 'fechaEntregaEnBlancoOrdenPedido'
|
|
231
|
+
},
|
|
232
|
+
validaCostoYTipoDeCambioDeCotizaciones: {
|
|
233
|
+
descri: '442 - VALIDACIÓN DE COSTO Y TIPO DE CAMBIO EN EMISION DE COTIZACIONES',
|
|
234
|
+
key: 'validaCostoTipCamCotizaciones'
|
|
235
|
+
},
|
|
236
|
+
planillaDeCancelacionRapidaEnMarket: {
|
|
237
|
+
descri: '449 - PLANILLA DE CANCELACION RAPIDA EN MARKET',
|
|
238
|
+
key: 'planillaCancelacionRapidaMarket'
|
|
239
|
+
},
|
|
240
|
+
diasDeExpiracionDeClave: {
|
|
241
|
+
descri: '450 - POLITICA DE EXPIRACIÓN DE CONTRASEÑA / ENTERO',
|
|
242
|
+
key: 'diasExpiraClave'
|
|
243
|
+
},
|
|
244
|
+
tieneFlujoDeCaja: {
|
|
245
|
+
descri: '451 - FLUJO DE CAJA',
|
|
246
|
+
key: 'flujoDeCaja'
|
|
247
|
+
},
|
|
248
|
+
habilitaGlosaExtendida: {
|
|
249
|
+
descri: '452 - DOCUMENTOS UTILIZAN GLOSA EXTENDIDA',
|
|
250
|
+
key: 'utilizarGlosaExtendida'
|
|
251
|
+
},
|
|
252
|
+
vendedorNoModificableEnPuntoDeVenta: {
|
|
253
|
+
descri: '453 - PERMITE MODIFICAR VENDEDOR EN PROCESO COMERCIAL DE PUNTO DE VENTA',
|
|
254
|
+
key: 'permiteModificarVendedorPuntoVenta'
|
|
255
|
+
},
|
|
256
|
+
habilitaCalidadYColor: {
|
|
257
|
+
descri: '454 - EMPRESA UTILIZA CÓDIGOS ADICIONALES',
|
|
258
|
+
key: 'utilizaCodigosAdicionales'
|
|
259
|
+
},
|
|
260
|
+
/*-*/ validaDuplicidadDeOrdenDeCompra: {
|
|
261
|
+
descri: '455 - VALIDA DUPLICIDAD EN ORDEN DE COMPRA RELACIONADA AL COMPROBANTE',
|
|
262
|
+
key: 'validaOrdenCompraEnComprobantes'
|
|
263
|
+
},
|
|
264
|
+
requiereReferenciaContable: {
|
|
265
|
+
descri: '458 - HABILITAR REFERENCIA CONTABLE',
|
|
266
|
+
key: 'referenciaContable'
|
|
267
|
+
},
|
|
268
|
+
aprobacionDeOperacionesEnCXP: {
|
|
269
|
+
descri: '459 - APROBACIÓN EN OPERACIONES DE CUENTAS POR PAGAR',
|
|
270
|
+
key: 'aprobarEnOperacionesCxp'
|
|
271
|
+
}
|
|
272
|
+
};
|
|
273
|
+
|
|
274
|
+
const FORMULARIOS = {
|
|
275
|
+
//CONSULTAS
|
|
276
|
+
//----->COMERCIAL
|
|
277
|
+
consulta_cotizacion: 'frmConsultaCotizaciones',
|
|
278
|
+
consulta_ordenPedido: 'frmConsultaOrdenesPedido',
|
|
279
|
+
consulta_ordenProduccion: 'frmConsultaOrdenesProduccion',
|
|
280
|
+
consulta_guiaRemision: 'frmConsultaGuiasRemision',
|
|
281
|
+
consulta_comprobanteVenta: 'frmConsultaCompVentas',
|
|
282
|
+
//----->LOGISTICA
|
|
283
|
+
consulta_reqCompra: 'frmConsultaReqCompra',
|
|
284
|
+
consulta_ordenCompra: 'frmConsultaOrdenesCompra',
|
|
285
|
+
consulta_docImportacion: 'frmConsultaDocumentosImportacion',
|
|
286
|
+
consulta_guiaInterna: 'frmConsultaGuiasInternas',
|
|
287
|
+
//----->SUSCRIPCIONES
|
|
288
|
+
consulta_contratos: 'frmConsultaContratos',
|
|
289
|
+
//DETALLE
|
|
290
|
+
//----->COMERCIAL
|
|
291
|
+
detalle_cotizacion: 'frmCotizaciones',
|
|
292
|
+
detalle_cotizacionProduccion: 'frmCotizacionesPorProduccion',
|
|
293
|
+
detalle_ordenPedido: 'frmOrdenesPedido',
|
|
294
|
+
detalle_ordenPedidoProduccion: 'frmOrdenesPedidoPorProduccion',
|
|
295
|
+
detalle_guiaRemision: 'frmGuiasRemision',
|
|
296
|
+
detalle_comprobanteVenta: 'frmCompVentas',
|
|
297
|
+
//----->LOGISTICA
|
|
298
|
+
detalle_reqCompra: 'frmReqCompra',
|
|
299
|
+
detalle_ordenCompra: 'frmOrdenCompra',
|
|
300
|
+
detalle_guiaInterna: 'frmGuiaInterna',
|
|
301
|
+
detalle_guiaInternaOC: 'frmGuiaInternaOC',
|
|
302
|
+
consulta_guiaInterApertura: 'frmGuiaInventarioApertura',
|
|
303
|
+
//----->PUNTO DE VENTA
|
|
304
|
+
detalle_ventaCancelacion: 'frmVentaCancelacion',
|
|
305
|
+
detalle_market: 'frmMarket',
|
|
306
|
+
detalle_guiaDespacho: 'frmGuiaDespacho',
|
|
307
|
+
detalle_guiaRemisionPuntoVenta: 'frmGuiasRemisionPuntoVenta',
|
|
308
|
+
//MATERIALES
|
|
309
|
+
materiales_cotizacion_ordenPedido_produccion: 'frmOrdProduccionMateriales',
|
|
310
|
+
//MODALES
|
|
311
|
+
modal_consulta_etiqueta: 'frmEtiquetas',
|
|
312
|
+
modal_consulta_cliente: 'frmConsultaClientes',
|
|
313
|
+
modal_consulta_articulo: 'frmConsultaArticulos',
|
|
314
|
+
modal_consulta_historial: 'frmConsultaHistorial',
|
|
315
|
+
modal_consulta_detalleDocumento: 'frmConsultaDetalleDocumento',
|
|
316
|
+
modal_detalle_docRelacionado: 'frmDocumentoRelacionado',
|
|
317
|
+
modal_detalle_actualizacionManualCostos: 'frmActualizacionManualCostos',
|
|
318
|
+
modal_detalle_vincularGastos: 'frmVincularGastos',
|
|
319
|
+
/*-*/ detalle_docImportacion: 'frmDocImportacion',
|
|
320
|
+
/*-*/ detalle_guiaServicioProduccion: 'frmGuiaServicioProduccion',
|
|
321
|
+
/*-*/ detalle_guiaInternaDI: 'frmGuiaInternaDI',
|
|
322
|
+
/*-*/ detalle_ordenProduccion: 'frmOrdenesProduccion',
|
|
323
|
+
/*-*/ consulta_etiqueta: 'frmConsultaEtiquetas',
|
|
324
|
+
/*-*/ consulta_certificadoCalidad: 'frmConsultaCertificadosCalidad',
|
|
325
|
+
/*-*/ opGuiaInternoSaldo: 'frmOPGuiaIngSal',
|
|
326
|
+
/*-*/ ordTrabajoMateriales: 'frmOrdTrabajoMateriales',
|
|
327
|
+
/*-*/ puntoVenta: 'frmPuntoVenta',
|
|
328
|
+
/*-*/ cajaTienda: 'frmCajaTienda',
|
|
329
|
+
/*-*/ certificadoCalidad: 'frmCertificadoCalidad',
|
|
330
|
+
/*-*/ ordenesTrabajo: 'frmOrdenesTrabajo',
|
|
331
|
+
/*-*/ ordenesTrabajoMateriales: 'frmOrdTrabajoMateriales',
|
|
332
|
+
/*-*/ consultaOrdenesTrabajo: 'frmConsultaOrdenesTrabajo',
|
|
333
|
+
/*-*/ ordenPedidoProduccionMateriales: 'frmOrdPedidoProduccionMateriales',
|
|
334
|
+
/*-*/ consultaOrdenesPedidoProduccion: 'frmConsultaOrdenesPedidoProduccion',
|
|
335
|
+
/*-*/ guiaIngresoDevolucion: 'frmGuiaIngresoDevolucion',
|
|
336
|
+
/*-*/ salidaOrdenesProduccion: 'frmSalidaOrdenesProduccion',
|
|
337
|
+
/*-*/ consultaGuiasInternasProduccion: 'frmConsultaGuiasInternasProduccion',
|
|
338
|
+
/*-*/ consultaCompPercepcion: 'frmConsultaCompPercepcion'
|
|
339
|
+
};
|
|
340
|
+
|
|
341
|
+
const PERMISOS = {
|
|
342
|
+
modificar: {
|
|
343
|
+
descri: '1 - Modificar',
|
|
344
|
+
key: 'modificar'
|
|
345
|
+
},
|
|
346
|
+
eliminarRegistro: {
|
|
347
|
+
descri: '2 - Eliminar',
|
|
348
|
+
key: 'eliminar'
|
|
349
|
+
},
|
|
350
|
+
exportaDocumentos: {
|
|
351
|
+
descri: '4 - Exportar reporte',
|
|
352
|
+
key: 'exportaDocumentos'
|
|
353
|
+
},
|
|
354
|
+
visarCotizacion: {
|
|
355
|
+
descri: '5 - Visar cotizaciónes',
|
|
356
|
+
key: 'visarCotizacion'
|
|
357
|
+
},
|
|
358
|
+
enviarKardex: {
|
|
359
|
+
descri: '6 - Envía kardex',
|
|
360
|
+
key: 'enviarKardex'
|
|
361
|
+
},
|
|
362
|
+
enviarCtes: {
|
|
363
|
+
descri: '7 - Envía cuentas corrientes',
|
|
364
|
+
key: 'enviarCtes'
|
|
365
|
+
},
|
|
366
|
+
anular: {
|
|
367
|
+
descri: '8 - Anular documento',
|
|
368
|
+
key: 'anular'
|
|
369
|
+
},
|
|
370
|
+
anularGuiaRecepcion: {
|
|
371
|
+
descri: '8 - Anular documento',
|
|
372
|
+
key: 'anularGuiaRecepcion'
|
|
373
|
+
},
|
|
374
|
+
usaPeriodofijo: {
|
|
375
|
+
descri: '9 - Usar periodo fijo',
|
|
376
|
+
key: 'usaPeriodofijo'
|
|
377
|
+
},
|
|
378
|
+
visarOrdenpedido: {
|
|
379
|
+
descri: '10 - Visar ordenes de pedido/despacho',
|
|
380
|
+
key: 'visarOrdenpedido'
|
|
381
|
+
},
|
|
382
|
+
visarRequerimientocompra: {
|
|
383
|
+
descri: '11 - Visar requerimientos de compra',
|
|
384
|
+
key: 'visarRequerimientocompra'
|
|
385
|
+
},
|
|
386
|
+
visarOrdencompra: {
|
|
387
|
+
descri: '12 - Visar ordenes de compra',
|
|
388
|
+
key: 'visarOrdencompra'
|
|
389
|
+
},
|
|
390
|
+
visarOrdenproduccion: {
|
|
391
|
+
descri: '13 - Visar ordenes de producción',
|
|
392
|
+
key: 'visarOrdenproduccion'
|
|
393
|
+
},
|
|
394
|
+
visualizaCostos: {
|
|
395
|
+
descri: '14 - Vizualizar costos de los artículos',
|
|
396
|
+
key: 'visualizaCostos'
|
|
397
|
+
},
|
|
398
|
+
permiteModificarAlmacen: {
|
|
399
|
+
descri: '15 - Restricción a almacenes',
|
|
400
|
+
key: 'restriccionAlmacen'
|
|
401
|
+
},
|
|
402
|
+
descontabilizarCuentasCobrar: {
|
|
403
|
+
descri: '17 - Desaprobar planillas cuenta corriente',
|
|
404
|
+
key: 'descontabilizarCuentasCobrar'
|
|
405
|
+
},
|
|
406
|
+
contabilizarAsiento: {
|
|
407
|
+
descri: '29 - Contabilizar asiento',
|
|
408
|
+
key: 'contabilizarAsiento'
|
|
409
|
+
},
|
|
410
|
+
administraCajaChica: {
|
|
411
|
+
descri: '30 - Administrar cajas chicas',
|
|
412
|
+
key: 'administraCajaChica'
|
|
413
|
+
},
|
|
414
|
+
descontabilizarCuentasPagar: {
|
|
415
|
+
descri: '31 - Desaprobar planillas cuenta por pagar',
|
|
416
|
+
key: 'descontabilizarCuentasPagar'
|
|
417
|
+
},
|
|
418
|
+
contabilizarCuentasCobrar: {
|
|
419
|
+
descri: '38 - Contabilizar planillas de cuentas por cobrar',
|
|
420
|
+
key: 'contabilizarCuentasCobrar'
|
|
421
|
+
},
|
|
422
|
+
contabilizarCuentasPagar: {
|
|
423
|
+
descri: '39 - Contabilizar planillas de cuentas por pagar',
|
|
424
|
+
key: 'contabilizarCuentasPagar'
|
|
425
|
+
},
|
|
426
|
+
administraCaja: {
|
|
427
|
+
descri: '48 - Administrar cajas de venta',
|
|
428
|
+
key: 'administraCaja'
|
|
429
|
+
},
|
|
430
|
+
usodeCaja: {
|
|
431
|
+
descri: '49 - Usar caja de venta',
|
|
432
|
+
key: 'usodeCaja'
|
|
433
|
+
},
|
|
434
|
+
descontabilizarAsiento: {
|
|
435
|
+
descri: '54 - Descontabilizar asiento',
|
|
436
|
+
key: 'descontabilizarAsiento'
|
|
437
|
+
},
|
|
438
|
+
cobradorPredeterminado: {
|
|
439
|
+
descri: '63 - Cobrador predeterminado',
|
|
440
|
+
key: 'cobradorPredeterminado'
|
|
441
|
+
},
|
|
442
|
+
codigoCobradorPredeterminado: {
|
|
443
|
+
descri: '63 - Cobrador predeterminado / Código',
|
|
444
|
+
key: 'codigoCobradorPredeterminado'
|
|
445
|
+
},
|
|
446
|
+
administraImpresionEtiqueta: {
|
|
447
|
+
descri: '65 - Administrador de impresión de etiquetas',
|
|
448
|
+
key: 'administraImpresionEtiqueta'
|
|
449
|
+
},
|
|
450
|
+
aprobarOrdenpedido: {
|
|
451
|
+
descri: '80 - Aprobar orden de pedido',
|
|
452
|
+
key: 'aprobarOrdenpedido'
|
|
453
|
+
},
|
|
454
|
+
visarOrdendevolucion: {
|
|
455
|
+
descri: '84 - Visar ordenes de devolución',
|
|
456
|
+
key: 'visarOrdendevolucion'
|
|
457
|
+
},
|
|
458
|
+
aprobarOrdendevolucion: {
|
|
459
|
+
descri: '85 - Aprobar orden de devolución',
|
|
460
|
+
key: 'aprobarOrdendevolucion'
|
|
461
|
+
},
|
|
462
|
+
cerrarOrdenPedido: {
|
|
463
|
+
descri: '95 - Cerrar orden de pedido',
|
|
464
|
+
key: 'cerrarOrdenPedido'
|
|
465
|
+
},
|
|
466
|
+
liquidaImportacion: {
|
|
467
|
+
descri: '107 - Liquida costeo de importación',
|
|
468
|
+
key: 'liquidaImportacion'
|
|
469
|
+
},
|
|
470
|
+
aprobarOrdencompra: {
|
|
471
|
+
descri: '108 - Aprobar orden de compra',
|
|
472
|
+
key: 'aprobarOrdencompra'
|
|
473
|
+
},
|
|
474
|
+
aprobarGuiaRecepcionServicios: {
|
|
475
|
+
descri: '109 - Aprobar guía de recepción por servicios',
|
|
476
|
+
key: 'aprobarGuiaRecepcionServicios'
|
|
477
|
+
},
|
|
478
|
+
activaImportacion: {
|
|
479
|
+
descri: '113 - Activar importación',
|
|
480
|
+
key: 'activaImportacion'
|
|
481
|
+
},
|
|
482
|
+
codigoVendedor: {
|
|
483
|
+
descri: '114 - Código de vendedor por defecto para App Móvil',
|
|
484
|
+
key: 'codigoVendedor'
|
|
485
|
+
},
|
|
486
|
+
cerrarOrdenCompra: {
|
|
487
|
+
descri: '115 - Cerrar orden de compra',
|
|
488
|
+
key: 'cerrarOrdenCompra'
|
|
489
|
+
},
|
|
490
|
+
desentregarGuiaRecepcion: {
|
|
491
|
+
descri: '120 - Desentregar guía de recepción',
|
|
492
|
+
key: 'desentregarGuiaRecepcion'
|
|
493
|
+
},
|
|
494
|
+
enviarKardexGuiaInterna: {
|
|
495
|
+
descri: '124 - Enviar kardex en guías internas',
|
|
496
|
+
key: 'enviarKardexGuiaInterna'
|
|
497
|
+
},
|
|
498
|
+
cerrarCotizacion: {
|
|
499
|
+
descri: '125 - Cerrar cotización',
|
|
500
|
+
key: 'cerrarCotizacion'
|
|
501
|
+
},
|
|
502
|
+
destruirGuiaRecepcion: {
|
|
503
|
+
descri: '129 - Permite destruir guía de recepción lavandería',
|
|
504
|
+
key: 'destruirGuiaRecepcion'
|
|
505
|
+
},
|
|
506
|
+
anularComprobanteVenta: {
|
|
507
|
+
descri: '130 - Anular factura',
|
|
508
|
+
key: 'anularComprobanteVenta'
|
|
509
|
+
},
|
|
510
|
+
anularCotizacion: {
|
|
511
|
+
descri: '134 - Anular cotización',
|
|
512
|
+
key: 'anularCotizacion'
|
|
513
|
+
},
|
|
514
|
+
anularOrdenPedido: {
|
|
515
|
+
descri: '135 - Anular orden de pedido',
|
|
516
|
+
key: 'anularOrdenPedido'
|
|
517
|
+
},
|
|
518
|
+
anularGuiaRemision: {
|
|
519
|
+
descri: '136 - Anular guía de remisión',
|
|
520
|
+
key: 'anularGuiaRemision'
|
|
521
|
+
},
|
|
522
|
+
adminGruposUsuariosTsiReportes: {
|
|
523
|
+
descri: '143 - Administra usuarios y grupos de TSIReportes',
|
|
524
|
+
key: 'adminGruposUsuariosTsiReportes'
|
|
525
|
+
},
|
|
526
|
+
adminTSIReportes: {
|
|
527
|
+
descri: '145 - Acceso de administración del TSI Reportes',
|
|
528
|
+
key: 'adminTSIReportes'
|
|
529
|
+
},
|
|
530
|
+
aprobacionDePagos: {
|
|
531
|
+
descri: '149 - Aprobación de pagos',
|
|
532
|
+
key: 'aprobacionDePagos'
|
|
533
|
+
}
|
|
534
|
+
};
|
|
535
|
+
|
|
536
|
+
function sumarDias(fecha, dias) {
|
|
537
|
+
const nuevaFecha = new Date(fecha);
|
|
538
|
+
nuevaFecha.setDate(nuevaFecha.getDate() + dias);
|
|
539
|
+
return nuevaFecha.toISOString().split('T')[0];
|
|
540
|
+
}
|
|
541
|
+
function procesaSituaciones(tipdoc, situacionesArray) {
|
|
542
|
+
if (situacionesArray) {
|
|
543
|
+
return tipdoc
|
|
544
|
+
.map((item, index) => situacionesArray.includes(item.situac) ? index : -1)
|
|
545
|
+
.filter(index => index !== -1);
|
|
546
|
+
}
|
|
547
|
+
return [];
|
|
548
|
+
}
|
|
549
|
+
function validaSituaciones(situac) {
|
|
550
|
+
return typeof situac == 'string'
|
|
551
|
+
? situac.split(',')
|
|
552
|
+
: situac;
|
|
553
|
+
}
|
|
554
|
+
function obtenerIndicesSeleccionados(arrayData, selectedIds, keyId = 'id') {
|
|
555
|
+
if (!arrayData?.length || !selectedIds?.length)
|
|
556
|
+
return [];
|
|
557
|
+
return arrayData
|
|
558
|
+
.map((item, index) => selectedIds.includes(item[keyId]) ? index : -1)
|
|
559
|
+
.filter(index => index !== -1);
|
|
560
|
+
}
|
|
561
|
+
const adjuntoBuilders = {
|
|
562
|
+
documentos_cab: (ctx, archivo) => ({
|
|
563
|
+
tipdoc: ctx.tipdoc(),
|
|
564
|
+
numint: ctx.numint(),
|
|
565
|
+
...archivo
|
|
566
|
+
}),
|
|
567
|
+
compr010: (ctx, archivo) => ({
|
|
568
|
+
tipo: ctx.tipo(),
|
|
569
|
+
docume: ctx.docu(),
|
|
570
|
+
...archivo
|
|
571
|
+
}),
|
|
572
|
+
cxc: (ctx, archivo) => ({
|
|
573
|
+
libro: ctx.libro(),
|
|
574
|
+
periodo: ctx.periodo(),
|
|
575
|
+
mes: ctx.mes(),
|
|
576
|
+
asiento: ctx.asiento(),
|
|
577
|
+
...archivo
|
|
578
|
+
}),
|
|
579
|
+
cxp: (ctx, archivo) => ({
|
|
580
|
+
libro: ctx.libro(),
|
|
581
|
+
periodo: ctx.periodo(),
|
|
582
|
+
mes: ctx.mes(),
|
|
583
|
+
asiento: ctx.asiento(),
|
|
584
|
+
...archivo
|
|
585
|
+
})
|
|
586
|
+
};
|
|
587
|
+
function cleanNumber(number) {
|
|
588
|
+
if (number == null)
|
|
589
|
+
return 0;
|
|
590
|
+
if (typeof number == 'number') {
|
|
591
|
+
return isNaN(number) ? 0 : number;
|
|
592
|
+
}
|
|
593
|
+
const cleaned = number.replace(/,/g, "");
|
|
594
|
+
const parsed = Number(cleaned);
|
|
595
|
+
return isNaN(parsed) ? 0 : parsed;
|
|
596
|
+
}
|
|
597
|
+
function esFechaMayorActual(fechaTexto) {
|
|
598
|
+
const [año, mes, dia] = fechaTexto.split('-').map(Number);
|
|
599
|
+
const fecha = new Date(año, mes - 1, dia);
|
|
600
|
+
const hoy = new Date();
|
|
601
|
+
const fechaHoy = new Date(hoy.getFullYear(), hoy.getMonth(), hoy.getDate());
|
|
602
|
+
return fecha > fechaHoy;
|
|
603
|
+
}
|
|
604
|
+
function sumarValores(data, propiedad, ignorarUltimo) {
|
|
605
|
+
const valores = ignorarUltimo && data.length > 1 ? data.slice(0, -1) : data;
|
|
606
|
+
return valores.reduce((acumulador, item) => {
|
|
607
|
+
const valor = propiedad ? cleanNumber(item?.[propiedad]) : cleanNumber(item);
|
|
608
|
+
return acumulador + (!isNaN(valor) ? valor : 0);
|
|
609
|
+
}, 0);
|
|
610
|
+
}
|
|
611
|
+
function insertarEnPenultimo(array, elemento) {
|
|
612
|
+
if (!Array.isArray(array)) {
|
|
613
|
+
return [elemento];
|
|
614
|
+
}
|
|
615
|
+
array.length ? array.splice(array.length - 1, 0, elemento) : array.push(elemento);
|
|
616
|
+
return array;
|
|
617
|
+
}
|
|
618
|
+
function insertarArrayEnPenultimo(array, elemento, alFinal) {
|
|
619
|
+
if (!Array.isArray(array)) {
|
|
620
|
+
return [...elemento];
|
|
621
|
+
}
|
|
622
|
+
if (alFinal) {
|
|
623
|
+
array.push(...elemento);
|
|
624
|
+
return array;
|
|
625
|
+
}
|
|
626
|
+
array.length ? array.splice(array.length - 1, 0, ...elemento) : array.push(...elemento);
|
|
627
|
+
return array;
|
|
628
|
+
}
|
|
629
|
+
function formatNumber(directiva, value, pipe) {
|
|
630
|
+
return directiva.transform(value, pipe ?? '1.2-2');
|
|
631
|
+
}
|
|
632
|
+
function createFormatNumber(value) {
|
|
633
|
+
return `1.${value ?? 2}-${value ?? 2}`;
|
|
634
|
+
}
|
|
635
|
+
function applyHandlers(headers, handlers) {
|
|
636
|
+
headers.forEach(col => {
|
|
637
|
+
const extras = handlers[col.fieldname];
|
|
638
|
+
if (extras)
|
|
639
|
+
Object.assign(col, extras);
|
|
640
|
+
});
|
|
641
|
+
}
|
|
642
|
+
function obtenerTipoClases(lst) {
|
|
643
|
+
if (lst.vchar)
|
|
644
|
+
return 'vchar';
|
|
645
|
+
if (lst.vstrg)
|
|
646
|
+
return 'vstrg';
|
|
647
|
+
if (lst.ventero)
|
|
648
|
+
return 'ventero';
|
|
649
|
+
if (lst.vreal)
|
|
650
|
+
return 'vreal';
|
|
651
|
+
if (lst.vdate)
|
|
652
|
+
return 'vdate';
|
|
653
|
+
if (lst.vtime)
|
|
654
|
+
return 'vtime';
|
|
655
|
+
if (lst.vglosa)
|
|
656
|
+
return 'vglosa';
|
|
657
|
+
return 'codigo';
|
|
658
|
+
}
|
|
659
|
+
function allStatus(sender, status) {
|
|
660
|
+
Object.keys(sender).forEach(item => {
|
|
661
|
+
sender[item] = status;
|
|
662
|
+
});
|
|
663
|
+
}
|
|
664
|
+
function validarVacioAndNull(value) {
|
|
665
|
+
return value !== null && value !== undefined && value !== '';
|
|
666
|
+
}
|
|
667
|
+
function validarBoolean(value) {
|
|
668
|
+
return value ?? true;
|
|
669
|
+
}
|
|
670
|
+
function mostrarValor(data, clave) {
|
|
671
|
+
if (!data)
|
|
672
|
+
return 0;
|
|
673
|
+
if (!data[clave])
|
|
674
|
+
return 0;
|
|
675
|
+
return data[clave];
|
|
676
|
+
}
|
|
677
|
+
function filtrarUnicosPorClave(array, key) {
|
|
678
|
+
const unicos = new Set();
|
|
679
|
+
return array.filter(item => {
|
|
680
|
+
const clave = item[key];
|
|
681
|
+
if (unicos.has(clave)) {
|
|
682
|
+
return false;
|
|
683
|
+
}
|
|
684
|
+
unicos.add(clave);
|
|
685
|
+
return true;
|
|
686
|
+
});
|
|
687
|
+
}
|
|
688
|
+
function obtenerInventarioDefault(lista) {
|
|
689
|
+
const inventarioDefecto = lista.find(inv => inv.swdefaul == 'S');
|
|
690
|
+
const firstInventario = lista[0];
|
|
691
|
+
return inventarioDefecto ? inventarioDefecto.tipinv : firstInventario.tipinv;
|
|
692
|
+
}
|
|
693
|
+
function formatFloat(value, decimals) {
|
|
694
|
+
const num = Number(cleanNumber(value));
|
|
695
|
+
if (isNaN(num)) {
|
|
696
|
+
return 0;
|
|
697
|
+
}
|
|
698
|
+
return parseFloat(num.toFixed(decimals ?? 2));
|
|
699
|
+
}
|
|
700
|
+
function formatPlanilla(planilla) {
|
|
701
|
+
const result = { libro: null, periodo: null, mes: null, asiento: null };
|
|
702
|
+
if (!planilla || planilla === '---') {
|
|
703
|
+
return result;
|
|
704
|
+
}
|
|
705
|
+
const parts = planilla.split('-').filter(Boolean);
|
|
706
|
+
result.libro = parts[0] ?? null;
|
|
707
|
+
result.periodo = parts[1] !== undefined ? Number(parts[1]) || null : null;
|
|
708
|
+
result.mes = parts[2] !== undefined && parts[2] !== '' ? parts[2].toString().padStart(2, '0') : null;
|
|
709
|
+
result.asiento = parts[3] !== undefined ? Number(parts[3]) || null : null;
|
|
710
|
+
return result;
|
|
711
|
+
}
|
|
712
|
+
function validaArray(data) {
|
|
713
|
+
return Array.isArray(data) && data.length > 0;
|
|
714
|
+
}
|
|
715
|
+
function getFirstItem(data) {
|
|
716
|
+
if (!validaArray(data)) {
|
|
717
|
+
return null;
|
|
718
|
+
}
|
|
719
|
+
return data[0];
|
|
720
|
+
}
|
|
721
|
+
|
|
722
|
+
const TEXTOS = {
|
|
723
|
+
lenGlosa: 'En Comprobantes de Venta Electrónicos (CPE) la glosa no puede exceder los 500 caracteres, según disposiciones de SUNAT.'
|
|
724
|
+
};
|
|
725
|
+
function generarHTMLAlerta(title, value) {
|
|
726
|
+
return `<div class='fs-9'>¿Estas seguro de eliminar el ${title ?? 'registro'} ${value ? `<br> <b>${value}</b>` : ''}?</div>`;
|
|
727
|
+
}
|
|
728
|
+
|
|
729
|
+
const documentosEstadoCuenta = [
|
|
730
|
+
{ codigo: false, descri: 'Todos los documentos' },
|
|
731
|
+
{ codigo: true, descri: 'Documentos pendientes' }
|
|
732
|
+
];
|
|
733
|
+
const sexos = [
|
|
734
|
+
{ codsex: 'M', descri: 'Masculino' },
|
|
735
|
+
{ codsex: 'F', descri: 'Femenino' }
|
|
736
|
+
];
|
|
737
|
+
const creditosCliente = [
|
|
738
|
+
{ codigo: 0, descri: 'Cerrado' },
|
|
739
|
+
{ codigo: 1, descri: 'Abierto' }
|
|
740
|
+
];
|
|
741
|
+
const dhList = [
|
|
742
|
+
{ cod: 'D', descri: 'Debe' },
|
|
743
|
+
{ cod: 'H', descri: 'Haber' }
|
|
744
|
+
];
|
|
745
|
+
// LISTAS UTILITARIAS
|
|
746
|
+
const documentosList = [
|
|
747
|
+
{ codigo: 1, descri: 'Factura' },
|
|
748
|
+
{ codigo: 7, descri: 'Nota de Crédito' },
|
|
749
|
+
{ codigo: 8, descri: 'Nota de Débito' },
|
|
750
|
+
{ codigo: 20, descri: 'Comprobante de retencion' },
|
|
751
|
+
{ codigo: 41, descri: 'Comprobante de percepción' }
|
|
752
|
+
];
|
|
753
|
+
const allMeses = [
|
|
754
|
+
{ id: 1, nombre: 'Enero' },
|
|
755
|
+
{ id: 2, nombre: 'Febrero' },
|
|
756
|
+
{ id: 3, nombre: 'Marzo' },
|
|
757
|
+
{ id: 4, nombre: 'Abril' },
|
|
758
|
+
{ id: 5, nombre: 'Mayo' },
|
|
759
|
+
{ id: 6, nombre: 'Junio' },
|
|
760
|
+
{ id: 7, nombre: 'Julio' },
|
|
761
|
+
{ id: 8, nombre: 'Agosto' },
|
|
762
|
+
{ id: 9, nombre: 'Septiembre' },
|
|
763
|
+
{ id: 10, nombre: 'Octubre' },
|
|
764
|
+
{ id: 11, nombre: 'Noviembre' },
|
|
765
|
+
{ id: 12, nombre: 'Diciembre' },
|
|
766
|
+
];
|
|
767
|
+
const allMesesWithTodos = [
|
|
768
|
+
{ id: -1, nombre: 'Todos' },
|
|
769
|
+
{ id: 1, nombre: 'Enero' },
|
|
770
|
+
{ id: 2, nombre: 'Febrero' },
|
|
771
|
+
{ id: 3, nombre: 'Marzo' },
|
|
772
|
+
{ id: 4, nombre: 'Abril' },
|
|
773
|
+
{ id: 5, nombre: 'Mayo' },
|
|
774
|
+
{ id: 6, nombre: 'Junio' },
|
|
775
|
+
{ id: 7, nombre: 'Julio' },
|
|
776
|
+
{ id: 8, nombre: 'Agosto' },
|
|
777
|
+
{ id: 9, nombre: 'Septiembre' },
|
|
778
|
+
{ id: 10, nombre: 'Octubre' },
|
|
779
|
+
{ id: 11, nombre: 'Noviembre' },
|
|
780
|
+
{ id: 12, nombre: 'Diciembre' },
|
|
781
|
+
];
|
|
782
|
+
const allMesesWithApertura = [
|
|
783
|
+
{ id: 0, nombre: 'Apertura' },
|
|
784
|
+
{ id: 1, nombre: 'Enero' },
|
|
785
|
+
{ id: 2, nombre: 'Febrero' },
|
|
786
|
+
{ id: 3, nombre: 'Marzo' },
|
|
787
|
+
{ id: 4, nombre: 'Abril' },
|
|
788
|
+
{ id: 5, nombre: 'Mayo' },
|
|
789
|
+
{ id: 6, nombre: 'Junio' },
|
|
790
|
+
{ id: 7, nombre: 'Julio' },
|
|
791
|
+
{ id: 8, nombre: 'Agosto' },
|
|
792
|
+
{ id: 9, nombre: 'Septiembre' },
|
|
793
|
+
{ id: 10, nombre: 'Octubre' },
|
|
794
|
+
{ id: 11, nombre: 'Noviembre' },
|
|
795
|
+
{ id: 12, nombre: 'Diciembre' },
|
|
796
|
+
];
|
|
797
|
+
const allMesesObj = {
|
|
798
|
+
1: 'Enero',
|
|
799
|
+
2: 'Febrero',
|
|
800
|
+
3: 'Marzo',
|
|
801
|
+
4: 'Abril',
|
|
802
|
+
5: 'Mayo',
|
|
803
|
+
6: 'Junio',
|
|
804
|
+
7: 'Julio',
|
|
805
|
+
8: 'Agosto',
|
|
806
|
+
9: 'Septiembre',
|
|
807
|
+
10: 'Octubre',
|
|
808
|
+
11: 'Noviembre',
|
|
809
|
+
12: 'Diciembre'
|
|
810
|
+
};
|
|
811
|
+
const fileTypes = {
|
|
812
|
+
pdf: 'application/pdf',
|
|
813
|
+
jpeg: 'image/jpeg',
|
|
814
|
+
png: 'image/png',
|
|
815
|
+
jpg: 'image/jpg',
|
|
816
|
+
};
|
|
817
|
+
//FUNCIONES
|
|
818
|
+
function alertaLoaderHTML(mensaje, timer = 3000, onFinish) {
|
|
819
|
+
Swal.fire({
|
|
820
|
+
html: mensaje,
|
|
821
|
+
showConfirmButton: false,
|
|
822
|
+
allowOutsideClick: false,
|
|
823
|
+
timer,
|
|
824
|
+
timerProgressBar: true
|
|
825
|
+
}).then(() => {
|
|
826
|
+
if (onFinish)
|
|
827
|
+
onFinish();
|
|
828
|
+
});
|
|
829
|
+
}
|
|
830
|
+
function alertaConfirmacionHTML(mensaje, tipoAlerta) {
|
|
831
|
+
let ejecutarAlerta = new Promise(function (resolve) {
|
|
832
|
+
Swal.fire({
|
|
833
|
+
html: mensaje,
|
|
834
|
+
allowOutsideClick: false,
|
|
835
|
+
confirmButtonColor: '#3085d6',
|
|
836
|
+
cancelButtonColor: '#d33',
|
|
837
|
+
icon: tipoAlerta,
|
|
838
|
+
confirmButtonText: 'Aceptar',
|
|
839
|
+
}).then((result) => {
|
|
840
|
+
return resolve(result.value);
|
|
841
|
+
});
|
|
842
|
+
});
|
|
843
|
+
return ejecutarAlerta;
|
|
844
|
+
}
|
|
845
|
+
function refresh() {
|
|
846
|
+
window.location.reload();
|
|
847
|
+
}
|
|
848
|
+
function formatDate(date) {
|
|
849
|
+
const year = date.getFullYear();
|
|
850
|
+
const month = ('0' + (date.getMonth() + 1)).slice(-2);
|
|
851
|
+
const day = ('0' + date.getDate()).slice(-2);
|
|
852
|
+
return `${year}-${month}-${day}`;
|
|
853
|
+
}
|
|
854
|
+
const constosEspeciales = [2, 3, 4];
|
|
855
|
+
const constosSubEspecial = [2, 4];
|
|
856
|
+
function beep() {
|
|
857
|
+
const context = new AudioContext();
|
|
858
|
+
const oscillator = context.createOscillator();
|
|
859
|
+
const gainNode = context.createGain();
|
|
860
|
+
oscillator.type = 'triangle';
|
|
861
|
+
oscillator.frequency.value = 1040;
|
|
862
|
+
gainNode.gain.setValueAtTime(0.4, context.currentTime);
|
|
863
|
+
gainNode.gain.exponentialRampToValueAtTime(0.001, context.currentTime + 0.3);
|
|
864
|
+
oscillator.connect(gainNode);
|
|
865
|
+
gainNode.connect(context.destination);
|
|
866
|
+
oscillator.start(context.currentTime);
|
|
867
|
+
oscillator.stop(context.currentTime + 0.3);
|
|
868
|
+
}
|
|
869
|
+
|
|
870
|
+
/*
|
|
871
|
+
* Public API Surface of shared-tsi
|
|
872
|
+
*/
|
|
873
|
+
|
|
874
|
+
/**
|
|
875
|
+
* Generated bundle index. Do not edit.
|
|
876
|
+
*/
|
|
877
|
+
|
|
878
|
+
export { FACTORES, FORMULARIOS, PERMISOS, TEXTOS, adjuntoBuilders, alertaConfirmacionHTML, alertaLoaderHTML, allMeses, allMesesObj, allMesesWithApertura, allMesesWithTodos, allStatus, applyHandlers, beep, cleanNumber, constosEspeciales, constosSubEspecial, createFormatNumber, creditosCliente, dhList, documentosEstadoCuenta, documentosList, esFechaMayorActual, fileTypes, filtrarUnicosPorClave, formatDate, formatFloat, formatNumber, formatPlanilla, generarHTMLAlerta, getFirstItem, insertarArrayEnPenultimo, insertarEnPenultimo, mostrarValor, obtenerIndicesSeleccionados, obtenerInventarioDefault, obtenerTipoClases, procesaSituaciones, refresh, sexos, sumarDias, sumarValores, validaArray, validaSituaciones, validarBoolean, validarVacioAndNull };
|
|
879
|
+
//# sourceMappingURL=shared-tsi.mjs.map
|