"use strict";
(self["webpackChunkskote"] = self["webpackChunkskote"] || []).push([["default-src_app_pages_servicios_servicios_module_ts"],{

/***/ 62534:
/*!*********************************************************!*\
  !*** ./src/app/core/services/core/pto-venta.service.ts ***!
  \*********************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   PtoVentaService: () => (/* binding */ PtoVentaService)
/* harmony export */ });
/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/common/http */ 69862);
/* harmony import */ var src_app_core_services_config_service__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! src/app/core/services/config.service */ 56375);
/* harmony import */ var src_app_core_services_auth_service__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! src/app/core/services/auth.service */ 90304);
/* harmony import */ var src_app_core_services_core_api_base_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! src/app/core/services/core/api-base.service */ 78169);
/* harmony import */ var src_app_core_services_recursos_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! src/app/core/services/recursos.service */ 50657);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/core */ 65879);






class PtoVentaService extends src_app_core_services_core_api_base_service__WEBPACK_IMPORTED_MODULE_2__.ApiBaseService {
  constructor(http, configService, recursosService, authService) {
    super(http, configService, recursosService, authService);
    this.endpoint = this.url + this.core.PTO_VENTA.VERSION + this.core.PTO_VENTA.PATH_BASE;
  }
  static #_ = this.ɵfac = function PtoVentaService_Factory(t) {
    return new (t || PtoVentaService)(_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵinject"](_angular_common_http__WEBPACK_IMPORTED_MODULE_5__.HttpClient), _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵinject"](src_app_core_services_config_service__WEBPACK_IMPORTED_MODULE_0__.ConfigService), _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵinject"](src_app_core_services_recursos_service__WEBPACK_IMPORTED_MODULE_3__.RecursosService), _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵinject"](src_app_core_services_auth_service__WEBPACK_IMPORTED_MODULE_1__.AuthService));
  };
  static #_2 = this.ɵprov = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵdefineInjectable"]({
    token: PtoVentaService,
    factory: PtoVentaService.ɵfac,
    providedIn: 'root'
  });
}

/***/ }),

/***/ 53225:
/*!********************************************************************!*\
  !*** ./src/app/core/services/servicios/srvBonificacion.service.ts ***!
  \********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   SrvBonificacionService: () => (/* binding */ SrvBonificacionService)
/* harmony export */ });
/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/common/http */ 69862);
/* harmony import */ var _config_service__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../config.service */ 56375);
/* harmony import */ var _auth_service__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../auth.service */ 90304);
/* harmony import */ var _core_api_base_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../core/api-base.service */ 78169);
/* harmony import */ var src_app_core_services_recursos_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! src/app/core/services/recursos.service */ 50657);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/core */ 65879);






class SrvBonificacionService extends _core_api_base_service__WEBPACK_IMPORTED_MODULE_2__.ApiBaseService {
  constructor(http, configService, recursosService, authService) {
    super(http, configService, recursosService, authService);
    this.endpoint = this.url + this.servicios.SRV_BONIFICACION.VERSION + this.servicios.SRV_BONIFICACION.PATH_BASE;
  }
  static #_ = this.ɵfac = function SrvBonificacionService_Factory(t) {
    return new (t || SrvBonificacionService)(_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵinject"](_angular_common_http__WEBPACK_IMPORTED_MODULE_5__.HttpClient), _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵinject"](_config_service__WEBPACK_IMPORTED_MODULE_0__.ConfigService), _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵinject"](src_app_core_services_recursos_service__WEBPACK_IMPORTED_MODULE_3__.RecursosService), _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵinject"](_auth_service__WEBPACK_IMPORTED_MODULE_1__.AuthService));
  };
  static #_2 = this.ɵprov = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵdefineInjectable"]({
    token: SrvBonificacionService,
    factory: SrvBonificacionService.ɵfac,
    providedIn: 'root'
  });
}

/***/ }),

/***/ 26157:
/*!**************************************************************************!*\
  !*** ./src/app/core/services/servicios/srvContratadoConcepto.service.ts ***!
  \**************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   SrvContratadoConceptoService: () => (/* binding */ SrvContratadoConceptoService)
/* harmony export */ });
/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/common/http */ 69862);
/* harmony import */ var _config_service__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../config.service */ 56375);
/* harmony import */ var _auth_service__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../auth.service */ 90304);
/* harmony import */ var _core_api_base_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../core/api-base.service */ 78169);
/* harmony import */ var src_app_core_services_recursos_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! src/app/core/services/recursos.service */ 50657);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/core */ 65879);






class SrvContratadoConceptoService extends _core_api_base_service__WEBPACK_IMPORTED_MODULE_2__.ApiBaseService {
  constructor(http, configService, recursosService, authService) {
    super(http, configService, recursosService, authService);
    this.endpoint = this.url + this.servicios.SRV_CONTRATADO_CONCEPTO.VERSION + this.servicios.SRV_CONTRATADO_CONCEPTO.PATH_BASE;
  }
  static #_ = this.ɵfac = function SrvContratadoConceptoService_Factory(t) {
    return new (t || SrvContratadoConceptoService)(_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵinject"](_angular_common_http__WEBPACK_IMPORTED_MODULE_5__.HttpClient), _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵinject"](_config_service__WEBPACK_IMPORTED_MODULE_0__.ConfigService), _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵinject"](src_app_core_services_recursos_service__WEBPACK_IMPORTED_MODULE_3__.RecursosService), _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵinject"](_auth_service__WEBPACK_IMPORTED_MODULE_1__.AuthService));
  };
  static #_2 = this.ɵprov = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵdefineInjectable"]({
    token: SrvContratadoConceptoService,
    factory: SrvContratadoConceptoService.ɵfac,
    providedIn: 'root'
  });
}

/***/ }),

/***/ 50145:
/*!***********************************************************************!*\
  !*** ./src/app/core/services/servicios/svrLoteFacturacion.service.ts ***!
  \***********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   SrvLoteFacturacionService: () => (/* binding */ SrvLoteFacturacionService)
/* harmony export */ });
/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/common/http */ 69862);
/* harmony import */ var _config_service__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../config.service */ 56375);
/* harmony import */ var _auth_service__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../auth.service */ 90304);
/* harmony import */ var src_app_core_services_core_api_base_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! src/app/core/services/core/api-base.service */ 78169);
/* harmony import */ var src_app_core_services_recursos_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! src/app/core/services/recursos.service */ 50657);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/core */ 65879);






class SrvLoteFacturacionService extends src_app_core_services_core_api_base_service__WEBPACK_IMPORTED_MODULE_2__.ApiBaseService {
  constructor(http, configService, recursosService, authService) {
    super(http, configService, recursosService, authService);
    this.endpoint = this.url + this.servicios.SRV_LOTE_FACTURACION.VERSION + this.servicios.SRV_LOTE_FACTURACION.PATH_BASE;
  }
  static #_ = this.ɵfac = function SrvLoteFacturacionService_Factory(t) {
    return new (t || SrvLoteFacturacionService)(_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵinject"](_angular_common_http__WEBPACK_IMPORTED_MODULE_5__.HttpClient), _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵinject"](_config_service__WEBPACK_IMPORTED_MODULE_0__.ConfigService), _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵinject"](src_app_core_services_recursos_service__WEBPACK_IMPORTED_MODULE_3__.RecursosService), _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵinject"](_auth_service__WEBPACK_IMPORTED_MODULE_1__.AuthService));
  };
  static #_2 = this.ɵprov = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵdefineInjectable"]({
    token: SrvLoteFacturacionService,
    factory: SrvLoteFacturacionService.ɵfac,
    providedIn: 'root'
  });
}

/***/ }),

/***/ 50864:
/*!***************************************************************!*\
  !*** ./src/app/core/utils/constantes/constantes-servicios.ts ***!
  \***************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   DICCIONARIO_SERVICIOS_MOVIMIENTOS: () => (/* binding */ DICCIONARIO_SERVICIOS_MOVIMIENTOS),
/* harmony export */   DICCIONARIO_SRV_CONTRATADO_FREC_FACT: () => (/* binding */ DICCIONARIO_SRV_CONTRATADO_FREC_FACT),
/* harmony export */   DICCIONARIO_SRV_CONTRATADO_TIPO_BONIF: () => (/* binding */ DICCIONARIO_SRV_CONTRATADO_TIPO_BONIF),
/* harmony export */   MSJ_EXITO_BAJA: () => (/* binding */ MSJ_EXITO_BAJA),
/* harmony export */   MSJ_EXITO_BONIF_EDICION: () => (/* binding */ MSJ_EXITO_BONIF_EDICION),
/* harmony export */   MSJ_EXITO_BONIF_ELIM: () => (/* binding */ MSJ_EXITO_BONIF_ELIM),
/* harmony export */   MSJ_EXITO_BONIF_INSERCION: () => (/* binding */ MSJ_EXITO_BONIF_INSERCION),
/* harmony export */   MSJ_EXITO_EDICION: () => (/* binding */ MSJ_EXITO_EDICION),
/* harmony export */   MSJ_EXITO_INSERCION: () => (/* binding */ MSJ_EXITO_INSERCION),
/* harmony export */   MSJ_EXITO_MOV_INSERCION: () => (/* binding */ MSJ_EXITO_MOV_INSERCION),
/* harmony export */   SRV_ADM_MOV: () => (/* binding */ SRV_ADM_MOV),
/* harmony export */   SRV_ANULADA: () => (/* binding */ SRV_ANULADA),
/* harmony export */   SRV_DUPLICAR: () => (/* binding */ SRV_DUPLICAR),
/* harmony export */   SRV_EDITAR: () => (/* binding */ SRV_EDITAR),
/* harmony export */   SRV_ELIM_BONIF: () => (/* binding */ SRV_ELIM_BONIF),
/* harmony export */   SRV_INS_BONIF: () => (/* binding */ SRV_INS_BONIF),
/* harmony export */   SRV_INS_MOV: () => (/* binding */ SRV_INS_MOV),
/* harmony export */   SRV_MOD_BONIF: () => (/* binding */ SRV_MOD_BONIF),
/* harmony export */   SRV_VISUALIZAR: () => (/* binding */ SRV_VISUALIZAR),
/* harmony export */   actionSrvContratado: () => (/* binding */ actionSrvContratado),
/* harmony export */   frecFactSrvContratado: () => (/* binding */ frecFactSrvContratado),
/* harmony export */   servContratadosHeader: () => (/* binding */ servContratadosHeader),
/* harmony export */   serviciosFactHeader: () => (/* binding */ serviciosFactHeader)
/* harmony export */ });
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/common */ 96814);
/* harmony import */ var _formkit_tempo__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @formkit/tempo */ 58444);
/* harmony import */ var _metodos_metodos__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../metodos/metodos */ 38002);



const DICCIONARIO_SERVICIOS_MOVIMIENTOS = [{
  Id: 'A',
  Nombre: 'Alta',
  Style: 'background:#34c38f',
  Class: 'badge font-size-14'
}, {
  Id: 'B',
  Nombre: 'Baja',
  Style: 'background:#f1b44c',
  Class: 'badge font-size-14'
}];
const DICCIONARIO_SRV_CONTRATADO_FREC_FACT = [{
  Id: 'A',
  Nombre: 'Anual',
  Style: 'background:#f1b44c',
  Class: 'badge font-size-14'
}, {
  Id: 'B',
  Nombre: 'Bimestral',
  Style: 'background:#f1b44c',
  Class: 'badge font-size-14'
}, {
  Id: 'M',
  Nombre: 'Mensual',
  Style: 'background:#34c38f',
  Class: 'badge font-size-14'
}, {
  Id: 'S',
  Nombre: 'Semestral',
  Style: 'background:#f1b44c',
  Class: 'badge font-size-14'
}];
const DICCIONARIO_SRV_CONTRATADO_TIPO_BONIF = [{
  Id: 'P',
  Nombre: 'Porcentual',
  Style: 'background:#1c31a5',
  Class: 'badge font-size-14'
}, {
  Id: 'N',
  Nombre: 'Nominal',
  Style: 'background:#c6d6b8',
  Class: 'badge font-size-14'
}, {
  Id: 'F',
  Nombre: 'Fecha Lista Precio',
  Style: 'background:#539fa2',
  Class: 'badge font-size-14'
}, {
  Id: null,
  Nombre: 'Sin Bonificación',
  Style: 'background:#8ba6ac',
  Class: 'badge font-size-14'
}];
const SRV_VISUALIZAR = 501;
const SRV_EDITAR = 502;
const SRV_ANULADA = 503;
const SRV_INS_BONIF = 504;
const SRV_MOD_BONIF = 505;
const SRV_ELIM_BONIF = 506;
const SRV_INS_MOV = 507;
const SRV_ADM_MOV = 508;
const SRV_DUPLICAR = 509;
const serviciosFactHeader = [{
  Nombre: 'Número',
  Key: 'SrvContratado.NroSrvContratado',
  Disabled: false
}, {
  Nombre: '(Cod) Cliente',
  //Order: 3,
  Type: 'template',
  Data: {
    Template: '(a) b',
    ArrayKeys: {
      a: 'Cliente.Codigo',
      b: 'Cliente.Nombre'
    }
  },
  WCol: '15%',
  Disabled: false
}, {
  Nombre: '(Cod) Cliente Fact.',
  Type: 'template',
  Data: {
    Template: '(a) b',
    ArrayKeys: {
      a: 'ClienteFact.Codigo',
      b: 'ClienteFact.Nombre'
    }
  },
  WCol: '15%',
  Disabled: true
}, {
  Nombre: '(Cod) Artículo',
  //Order: 6,
  Type: 'template',
  Data: {
    Template: '(a) b',
    ArrayKeys: {
      a: 'Articulo.Codigo',
      b: 'Articulo.Nombre'
    }
  },
  WCol: '15%',
  Disabled: false
}, {
  Nombre: 'Último Periodo Fact.',
  Type: 'template',
  Data: {
    Template: 'a/b',
    ArrayKeys: {
      a: 'SrvContratado.UltimoPeriodoMes',
      b: 'SrvContratado.UltimoPeriodoAnio'
    }
  },
  Disabled: false
}, {
  Nombre: 'Frecuencia Fact.',
  Type: 'dictionary',
  Diccionario: DICCIONARIO_SRV_CONTRATADO_FREC_FACT,
  Key: 'SrvContratado.FrecuenciaFact',
  Disabled: false
}, {
  Nombre: 'Cant. Fact.',
  Key: 'Cantidad',
  Class: 'badge font-size-14 bg-dark text-light',
  Type: 'number',
  Pipe: 'number:1.2-5',
  WCol: '20%',
  Disabled: false
}, {
  Nombre: 'Fact. Activa',
  Type: 'checkbox',
  Key: 'SrvContratado.FacturacionActiva',
  TrueValue: 'S',
  FalseValue: 'N',
  WCol: '10%',
  Disabled: false
}, {
  Nombre: 'Mes Adelantado',
  Key: 'SrvContratado.MesAdelantado',
  Type: 'checkbox',
  TrueValue: 'S',
  FalseValue: 'N',
  Disabled: false
}, {
  Nombre: 'Bonificado',
  Type: 'checkbox',
  Key: 'Bonificado',
  TrueValue: 'S',
  FalseValue: 'N',
  WCol: '10%',
  Disabled: false
}, {
  Nombre: 'Vigente',
  Key: 'SrvContratado.Vigente',
  Type: 'checkbox',
  TrueValue: 'S',
  FalseValue: 'N',
  Disabled: false
}, {
  Nombre: 'Pausado',
  Key: 'SrvContratado.Pausado',
  Type: 'checkbox',
  TrueValue: 'S',
  FalseValue: 'N',
  Disabled: false
}, {
  Nombre: 'Débito Auto.',
  Key: 'SrvContratado.DebitoAutomatico',
  Type: 'checkbox',
  TrueValue: 'S',
  FalseValue: 'N',
  Disabled: false
}, {
  Nombre: 'Fecha Alta',
  Key: 'SrvContratado.FechaAlta',
  Disabled: false
}, {
  Nombre: 'Fecha Fin',
  Key: 'SrvContratado.FechaFin',
  Disabled: false
}, {
  Nombre: 'Observación',
  Key: 'SrvContratado.Observacion',
  Disabled: false
}, {
  Nombre: 'Subconcepto',
  Key: 'SrvContratado.Subconcepto',
  Disabled: true
}, {
  Nombre: 'Tipo Bonif.',
  Type: 'dictionary',
  Diccionario: DICCIONARIO_SRV_CONTRATADO_TIPO_BONIF,
  Key: 'TipoBonif',
  Disabled: false
}, {
  Nombre: 'Nombre Precio',
  Key: 'NombrePrecio.Nombre',
  Disabled: true
}, {
  Nombre: 'Fecha Lista',
  Key: 'FechaLista',
  Disabled: true
}, {
  Nombre: 'Cant. Bonif.',
  Key: 'CantidadBonif',
  Disabled: true
}, {
  Nombre: '% Desc. Bonif',
  Key: 'PjeDtoBonif',
  Type: 'number',
  Pipe: 'percent:1.2-5',
  Disabled: false
}, {
  Nombre: 'Precio Neto',
  Key: 'PrecioNeto',
  Type: 'number',
  Pipe: 'currency:$:symbol:1.2-5:es-AR',
  Disabled: false
}, {
  Nombre: 'Total Neto',
  Key: 'TotalNeto',
  Type: 'number',
  Pipe: 'currency:$:symbol:1.2-5:es-AR',
  Disabled: false
}, {
  Nombre: '% Iva',
  Key: 'PjeIva',
  Type: 'number',
  Pipe: 'percent:1.2-5',
  Disabled: false
}, {
  Nombre: '% Desc. Gral.',
  Key: 'PjeDtoGral',
  Type: 'number',
  Pipe: 'percent:1.2-5',
  Disabled: false
}, {
  Nombre: 'Precio Final',
  Key: 'PrecioFinal',
  Type: 'number',
  Pipe: 'currency:$:symbol:1.2-5:es-AR',
  Disabled: false
}, {
  Nombre: 'Total Final',
  Key: 'TotalFinal',
  Type: 'number',
  Pipe: 'currency:$:symbol:1.2-5:es-AR',
  Disabled: false
}];
const servContratadosHeader = [{
  Nombre: 'Número',
  Order: 11,
  Key: 'NroSrvContratado',
  WCol: '10%',
  Disabled: false
}, {
  Nombre: '(Cod) Cliente',
  Order: 3,
  Type: 'template',
  Data: {
    Template: '(a) b',
    ArrayKeys: {
      a: 'Cliente.Codigo',
      b: 'Cliente.Nombre'
    }
  },
  WCol: '15%',
  Disabled: false
}, {
  Nombre: '(Cod) Cliente Fact.',
  Type: 'template',
  Data: {
    Template: '(a) b',
    ArrayKeys: {
      a: 'ClienteFact.Codigo',
      b: 'ClienteFact.Nombre'
    }
  },
  WCol: '15%',
  Disabled: true
}, {
  Nombre: '(Cod) Artículo',
  Order: 6,
  Type: 'template',
  Data: {
    Template: '(a) b',
    ArrayKeys: {
      a: 'Articulo.Codigo',
      b: 'Articulo.Nombre'
    }
  },
  WCol: '15%',
  Disabled: false
}, {
  Nombre: 'Último Periodo Fact.',
  Order: 9,
  Type: 'template',
  Data: {
    Template: 'a/b',
    ArrayKeys: {
      a: 'UltimoPeriodoMes',
      b: 'UltimoPeriodoAnio'
    }
  },
  WCol: '10%',
  Disabled: false
}, {
  Nombre: 'Frecuencia Fact.',
  Key: 'FrecuenciaFact',
  Type: 'dictionary',
  Diccionario: DICCIONARIO_SRV_CONTRATADO_FREC_FACT,
  WCol: '15%',
  Disabled: false
}, {
  Nombre: 'Cant. Fact.',
  Key: 'CantidadFact',
  Class: 'badge font-size-14 bg-dark text-light',
  Type: 'number',
  Pipe: 'number:1.2-5',
  WCol: '20%',
  Disabled: false
}, {
  Nombre: 'Fact. Activa',
  Type: 'checkbox',
  Key: 'FacturacionActiva',
  TrueValue: 'S',
  FalseValue: 'N',
  WCol: '10%',
  Disabled: false
}, {
  Nombre: 'Mes Adelantado',
  Type: 'checkbox',
  Key: 'MesAdelantado',
  TrueValue: 'S',
  FalseValue: 'N',
  WCol: '10%',
  Disabled: false
}, {
  Nombre: 'Bonificado',
  Type: 'checkbox',
  Key: 'Bonificado',
  TrueValue: 'S',
  FalseValue: 'N',
  ConditionCheck: values => {
    return values[0] != null && values[0].FechaFin != null && (0,_formkit_tempo__WEBPACK_IMPORTED_MODULE_0__.isBefore)((0,_metodos_metodos__WEBPACK_IMPORTED_MODULE_1__.formatFechaComp)(values[0].FechaFin), (0,_formkit_tempo__WEBPACK_IMPORTED_MODULE_0__.format)(new Date(), 'YYYY-MM-DD'));
  },
  ConditionTooltip: 'La bonificación ya no está en vigencia',
  KeysCondition: ['Bonificacion'],
  WCol: '10%',
  Disabled: false
}, {
  Nombre: 'Bonif. Activa',
  Type: 'checkbox',
  Key: 'Bonificacion.Activa',
  TrueValue: 'S',
  FalseValue: 'N',
  WCol: '10%',
  Disabled: false
}, {
  Nombre: 'Tipo Bonif.',
  Type: 'dictionary',
  Diccionario: DICCIONARIO_SRV_CONTRATADO_TIPO_BONIF,
  Key: 'Bonificacion.TipoValor',
  WCol: '10%',
  Disabled: false
}, {
  Nombre: 'Valor Bonif.',
  Key: 'Bonificacion',
  Type: 'condition',
  CondFunction: (dato, func) => {
    return dato.Bonificacion != null ? dato.Bonificacion.TipoValor == 'N' ? new _angular_common__WEBPACK_IMPORTED_MODULE_2__.DecimalPipe('es-AR').transform(dato.Bonificacion.Valor, '1.2-5') : new _angular_common__WEBPACK_IMPORTED_MODULE_2__.DecimalPipe('es-AR').transform(dato.Bonificacion.Valor, '1.2-5') + ' %' : null;
  },
  WCol: '10%',
  Disabled: false
}, {
  Nombre: 'Fecha Lista Precio Bonif.',
  Key: 'Bonificacion.FechaListaPrecio',
  Type: 'date',
  Pipe: 'date:dd/MM/YYYY:es-AR',
  WCol: '10%',
  Disabled: true
}, {
  Nombre: 'Fecha Inicio Bonif.',
  Key: 'Bonificacion.FechaInicio',
  Type: 'date',
  WCol: '10%',
  Disabled: true
}, {
  Nombre: 'Fecha Fin Bonif.',
  Key: 'Bonificacion.FechaFin',
  Type: 'date',
  WCol: '10%',
  Disabled: true
}, {
  Nombre: 'Vigencia Ilimitada Bonif.',
  Key: 'Bonificacion.VigenciaIlimitada',
  Type: 'checkbox',
  TrueValue: 'S',
  FalseValue: 'N',
  WCol: '10%',
  Disabled: true
}, {
  Nombre: 'Vigente',
  Key: 'Vigente',
  Type: 'checkbox',
  TrueValue: 'S',
  FalseValue: 'N',
  ConditionCheck: values => {
    return values[0] != null && (0,_formkit_tempo__WEBPACK_IMPORTED_MODULE_0__.isBefore)((0,_metodos_metodos__WEBPACK_IMPORTED_MODULE_1__.formatFechaComp)(values[0]), (0,_formkit_tempo__WEBPACK_IMPORTED_MODULE_0__.format)(new Date(), 'YYYY-MM-DD'));
  },
  ConditionTooltip: 'El servicio ya no está en vigencia',
  KeysCondition: ['FechaFin'],
  WCol: '10%',
  Disabled: false
}, {
  Nombre: 'Pausado',
  Type: 'checkbox',
  Key: 'Pausado',
  TrueValue: 'S',
  FalseValue: 'N',
  WCol: '10%',
  Disabled: false
}, {
  Nombre: 'Débito Automático',
  Type: 'checkbox',
  Key: 'DebitoAutomatico',
  TrueValue: 'S',
  FalseValue: 'N',
  WCol: '10%',
  Disabled: false
}, {
  Nombre: 'Fecha Alta',
  Order: 10,
  Key: 'FechaAlta',
  WCol: '10%',
  Disabled: false
}, {
  Nombre: 'Fecha Fin',
  Key: 'FechaFin',
  WCol: '10%',
  Disabled: false
}, {
  Nombre: 'Observación',
  Key: 'Observacion',
  WCol: '10%',
  Disabled: false
}, {
  Nombre: 'Subconcepto',
  Key: 'Subconcepto',
  WCol: '10%',
  Disabled: true
}];
const actionSrvContratado = [{
  Title: 'Visualizar',
  Accion: SRV_VISUALIZAR
}, {
  Title: 'Editar',
  Accion: SRV_EDITAR
}, {
  Title: 'Anular',
  Accion: SRV_ANULADA,
  fieldsActivate: ['Vigente'],
  activate: (values, action) => {
    if (values[0] == 'S' && action == SRV_ANULADA) {
      return 'dropdown-item';
    } else {
      return 'dropdown-item disabled';
    }
  }
}, {
  Title: 'Duplicar',
  Accion: SRV_DUPLICAR
}, {
  Type: 'divider',
  disabled: true
}, {
  Title: 'Agregar Bonificación',
  Accion: SRV_INS_BONIF,
  fieldsActivate: ['Bonificacion'],
  activate: (values, action) => {
    if (values[0] == null && action == SRV_INS_BONIF) {
      return 'dropdown-item';
    } else {
      return 'dropdown-item disabled';
    }
  }
}, {
  Title: 'Modificar Bonificación',
  Accion: SRV_MOD_BONIF,
  fieldsActivate: ['Bonificacion'],
  activate: (values, action) => {
    if (values[0] !== null && action == SRV_MOD_BONIF) {
      return 'dropdown-item';
    } else {
      return 'dropdown-item disabled';
    }
  }
}, {
  Title: 'Eliminar Bonificación',
  Accion: SRV_ELIM_BONIF,
  fieldsActivate: ['Bonificacion'],
  activate: (values, action) => {
    if (values[0] !== null && action == SRV_ELIM_BONIF) {
      return 'dropdown-item';
    } else {
      return 'dropdown-item disabled';
    }
  }
}, {
  Type: 'divider',
  disabled: true
},
/**
 * SP SINWEB-320 se agrega nueva accion
 */
{
  Title: 'Administrar Movimientos',
  Accion: SRV_ADM_MOV
}, {
  Title: 'Nuevo movimiento',
  Accion: SRV_INS_MOV
}];
/**
 * SP SINWEB-449
 */
const frecFactSrvContratado = [{
  id: 'A',
  nombre: 'Anual'
}, {
  id: 'B',
  nombre: 'Bimestral'
}, {
  id: 'M',
  nombre: 'Mensual'
}, {
  id: 'S',
  nombre: 'Semestral'
}];
const MSJ_EXITO_INSERCION = 'Se insertó correctamente un nuevo servicio.';
const MSJ_EXITO_EDICION = 'Se modificó correctamente el servicio seleccionado.';
const MSJ_EXITO_BAJA = 'Se dio baja correctamente el servicio seleccionado.';
const MSJ_EXITO_MOV_INSERCION = 'Se insertó correctamente un nuevo movimiento en el servicio seleccionado';
const MSJ_EXITO_BONIF_INSERCION = 'Se insertó correctamente una nueva bonificacion al servicio seleccionado.';
const MSJ_EXITO_BONIF_EDICION = 'Se modificó correctamente la bonificacion del servicio seleccionado.';
const MSJ_EXITO_BONIF_ELIM = 'Se elimino correctamente la bonificaccion del servicio seleccionado.';

/***/ }),

/***/ 79893:
/*!************************************************************************************!*\
  !*** ./src/app/pages/servicios/facturacion-masiva/facturacion-masiva.component.ts ***!
  \************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   FacturacionMasivaComponent: () => (/* binding */ FacturacionMasivaComponent)
/* harmony export */ });
/* harmony import */ var src_app_core_services_alertCustom_service__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! src/app/core/services/alertCustom.service */ 53206);
/* harmony import */ var _angular_cdk_stepper__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @angular/cdk/stepper */ 71657);
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/common */ 96814);
/* harmony import */ var _angular_common_locales_es__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/common/locales/es */ 46828);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/core */ 65879);
/* harmony import */ var src_app_core_services_servicios_srvContratado_service__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! src/app/core/services/servicios/srvContratado.service */ 2158);
/* harmony import */ var src_app_core_services_auth_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! src/app/core/services/auth.service */ 90304);
/* harmony import */ var primeng_accordion__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! primeng/accordion */ 65389);
/* harmony import */ var primeng_api__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! primeng/api */ 85219);
/* harmony import */ var angular_ng_stepper__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! angular-ng-stepper */ 21379);
/* harmony import */ var primeng_table__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! primeng/table */ 94267);
/* harmony import */ var _listado_fact_masiva_listado_fact_masiva_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./listado-fact-masiva/listado-fact-masiva.component */ 9586);
/* harmony import */ var _form_fact_masiva_form_fact_masiva_component__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./form-fact-masiva/form-fact-masiva.component */ 75629);
















const _c0 = ["listado"];
const _c1 = ["formulario"];
function FacturacionMasivaComponent_ng_template_9_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementStart"](0, "div", 30)(1, "span", 31);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelement"](2, "i", 32);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵtext"](3, " \u00A0 ");
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementStart"](4, "span");
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵtext"](5, "Seleccionar servicios");
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementEnd"]()();
  }
}
function FacturacionMasivaComponent_ng_template_18_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementStart"](0, "div", 30)(1, "span", 31);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelement"](2, "i", 33);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵtext"](3, " \u00A0 ");
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementStart"](4, "span");
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵtext"](5, "Completar datos");
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementEnd"]()();
  }
}
function FacturacionMasivaComponent_ng_template_30_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementStart"](0, "div", 30)(1, "span", 31);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelement"](2, "i", 34);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵtext"](3, " \u00A0 ");
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementStart"](4, "span");
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵtext"](5, "Facturaci\u00F3n finalizada");
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementEnd"]()();
  }
}
function FacturacionMasivaComponent_ng_container_44_ng_template_2_Conditional_0_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementStart"](0, "div")(1, "span");
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵtext"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelement"](3, "i", 38);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementEnd"]();
  }
  if (rf & 2) {
    const srvResult_r7 = _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵnextContext"](2).$implicit;
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵtextInterpolate3"]("N\u00B0", srvResult_r7.Factura.Numero, " - (", srvResult_r7.Factura.Cliente.Codigo, ") ", srvResult_r7.Factura.Cliente.Nombre, " ");
  }
}
function FacturacionMasivaComponent_ng_container_44_ng_template_2_Conditional_1_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementStart"](0, "div")(1, "span");
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵtext"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelement"](3, "i", 39);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementEnd"]();
  }
  if (rf & 2) {
    const srvResult_r7 = _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵnextContext"](2).$implicit;
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵtextInterpolate3"]("N\u00B0 de Servicio ", srvResult_r7.DataError[0].NroSrvContratado, " - (", srvResult_r7.DataError[0].Cliente.Codigo, ") ", srvResult_r7.DataError[0].Cliente.Nombre, " ");
  }
}
function FacturacionMasivaComponent_ng_container_44_ng_template_2_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵtemplate"](0, FacturacionMasivaComponent_ng_container_44_ng_template_2_Conditional_0_Template, 4, 3, "div")(1, FacturacionMasivaComponent_ng_container_44_ng_template_2_Conditional_1_Template, 4, 3);
  }
  if (rf & 2) {
    const srvResult_r7 = _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵnextContext"]().$implicit;
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵconditional"](0, srvResult_r7.Exito ? 0 : 1);
  }
}
function FacturacionMasivaComponent_ng_container_44_ng_template_3_Conditional_0_ng_template_1_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementStart"](0, "tr")(1, "th");
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵtext"](2, "(Cod) Art\u00EDculo");
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementStart"](3, "th");
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵtext"](4, "Cant. \u00CDtems");
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementEnd"]()();
  }
}
function FacturacionMasivaComponent_ng_container_44_ng_template_3_Conditional_0_ng_template_2_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementStart"](0, "tr")(1, "td");
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵtext"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementStart"](3, "td");
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵtext"](4);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementEnd"]()();
  }
  if (rf & 2) {
    const art_r21 = ctx.$implicit;
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵtextInterpolate2"](" (", art_r21.Codigo, ") ", art_r21.NombreCorto, " ");
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵtextInterpolate"](art_r21.Cantidad);
  }
}
const _c2 = a0 => [a0, "", "", ".2-2", "es"];
function FacturacionMasivaComponent_ng_container_44_ng_template_3_Conditional_0_ng_template_3_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementStart"](0, "div", 43);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵtext"](1);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵpipe"](2, "currency");
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementEnd"]();
  }
  if (rf & 2) {
    const srvResult_r7 = _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵnextContext"](3).$implicit;
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵtextInterpolate1"](" Total: $ ", _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵpipeBindV"](2, 1, _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵpureFunction1"](7, _c2, srvResult_r7.Factura.Total)), " ");
  }
}
function FacturacionMasivaComponent_ng_container_44_ng_template_3_Conditional_0_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementStart"](0, "p-table", 40);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵtemplate"](1, FacturacionMasivaComponent_ng_container_44_ng_template_3_Conditional_0_ng_template_1_Template, 5, 0, "ng-template", 36)(2, FacturacionMasivaComponent_ng_container_44_ng_template_3_Conditional_0_ng_template_2_Template, 5, 3, "ng-template", 41)(3, FacturacionMasivaComponent_ng_container_44_ng_template_3_Conditional_0_ng_template_3_Template, 3, 9, "ng-template", 42);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementEnd"]();
  }
  if (rf & 2) {
    const srvResult_r7 = _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵnextContext"](2).$implicit;
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵproperty"]("value", srvResult_r7.Factura.Articulos)("responsive", true);
  }
}
function FacturacionMasivaComponent_ng_container_44_ng_template_3_Conditional_1_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementStart"](0, "div", 44)(1, "p", 45);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵtext"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementEnd"]()();
  }
  if (rf & 2) {
    const srvResult_r7 = _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵnextContext"](2).$implicit;
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵtextInterpolate1"](" ", srvResult_r7.MensajeError, " ");
  }
}
function FacturacionMasivaComponent_ng_container_44_ng_template_3_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵtemplate"](0, FacturacionMasivaComponent_ng_container_44_ng_template_3_Conditional_0_Template, 4, 2, "p-table", 40)(1, FacturacionMasivaComponent_ng_container_44_ng_template_3_Conditional_1_Template, 3, 1);
  }
  if (rf & 2) {
    const srvResult_r7 = _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵnextContext"]().$implicit;
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵconditional"](0, srvResult_r7.Exito ? 0 : 1);
  }
}
function FacturacionMasivaComponent_ng_container_44_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementContainerStart"](0);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementStart"](1, "p-accordionTab", 35);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵtemplate"](2, FacturacionMasivaComponent_ng_container_44_ng_template_2_Template, 2, 1, "ng-template", 36)(3, FacturacionMasivaComponent_ng_container_44_ng_template_3_Template, 2, 1, "ng-template", 37);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementContainerEnd"]();
  }
}
class FacturacionMasivaComponent {
  constructor(alert, srvContratadoService, auth) {
    this.alert = alert;
    this.srvContratadoService = srvContratadoService;
    this.auth = auth;
    this.serviciosFacturados = [];
    this.respFacturacion = [];
    this.totalNeto = 0;
    this.totalFact = 0;
    this.factExitosa = false;
  }
  ngOnInit() {
    (0,_angular_common__WEBPACK_IMPORTED_MODULE_6__.registerLocaleData)(_angular_common_locales_es__WEBPACK_IMPORTED_MODULE_7__["default"]);
  }
  setServiciosFactSelect(servicios) {
    this.serviciosFacturados = servicios;
    this.totalNeto = 0;
    this.totalFact = 0;
    this.serviciosFacturados.forEach(servicio => {
      this.totalNeto += servicio.TotalNeto;
      this.totalFact += servicio.TotalFinal;
    });
  }
  reiniciarWizard() {
    this.listado.cleanStates();
    this.wizard.reset();
    this.formulario.formGroup.reset({
      //IdPtoVenta:-1, // necesita suc emp
      IdDeposito: -1,
      Deposito: '',
      IdEmpleado: this.auth.usuario.Empleado ? this.auth.usuario.Empleado.Id : -1,
      Empleado: this.auth.usuario.Empleado ? JSON.parse(localStorage.getItem('empleado')).Nombre : '',
      IdEmpresa: this.auth.usuario.Empleado ? this.auth.usuario.IdEmpresa : -1,
      Empresa: this.auth.usuario.Empleado ? this.auth.usuario.Empresa : '',
      IdSucursal: this.auth.usuario.Empleado ? this.auth.usuario.IdSucursal : -1,
      Sucursal: this.auth.usuario.Empleado ? this.auth.usuario.Sucursal : '',
      IdCanal: -1,
      IdVendedor: -1,
      Vendedor: '',
      AgruparPorCliente: true
    });
    //SP CAMBIO POR CAMBIO DE WIZARD A STEPPER
  }
  finalizar(event) {
    console.log(event);
  }
  finalizarWizard() {
    this.alert.showReturnAlert('Facturación masiva de servicios.', '¿Está seguro que desea facturar los servicios?', 'warning', 'Confirmar', 'Cancelar', true).then(result => {
      if (result.value && this.formulario.formGroup.valid) {
        this.alert.showLoadingAlert('Facturando servicios', 'Generando lote de facturación...');
        this.enviarFacturacion();
      }
    });
  }
  enviarFacturacion() {
    const sb = this.srvContratadoService.postFactMasiva(this.prepararFacturas()).subscribe(res => {
      if (!res.Errors) {
        this.factExitosa = true;
        this.respFacturacion = res.Data;
      } else {
        this.factExitosa = false;
      }
      this.wizard.next();
      this.alert.closeLoadingAlert();
    });
  }
  prepararFacturas() {
    let datos = {};
    //this.formulario.formGroup.get('IdPtoVenta').value == -1 ? null : datos.IdPtoVta = Number(this.formulario.formGroup.get('IdPtoVenta').value)
    datos.IdTipoComprobante = 1, datos.IdDeposito = this.formulario.formGroup.get('IdDeposito').value;
    datos.IdEmpleado = this.formulario.formGroup.get('IdEmpleado').value;
    datos.IdEmpresa = this.formulario.formGroup.get('IdEmpresa').value;
    datos.IdSucursal = this.formulario.formGroup.get('IdSucursal').value;
    datos.IdCanal = Number(this.formulario.formGroup.get('IdCanal').value);
    datos.IdVendedor = this.formulario.formGroup.get('IdVendedor').value;
    datos.AgruparPorCliente = this.formulario.formGroup.get('AgruparPorCliente').value ? 'S' : 'N';
    let ServiciosAFacturar = this.serviciosFacturados.map(x => {
      return {
        IdSrvContratado: x.SrvContratado.Id,
        IdClienteFact: x.ClienteFact.Id,
        IdNombrePrecio: x.NombrePrecio.Id,
        Cantidad: x.Cantidad,
        FechaLista: x.FechaLista,
        PrecioNeto: x.PrecioNeto,
        PrecioFinal: x.PrecioFinal,
        PjeIva: x.PjeIva,
        PjeDtoBonif: x.PjeDtoBonif,
        PjeDtoGral: x.PjeDtoGral,
        TotalNeto: x.TotalNeto,
        TotalFinal: x.TotalFinal,
        CantidadBonif: x.CantidadBonif,
        TipoBonif: x.TipoBonif,
        Orden: x.Orden,
        CantTotalReg: x.CantTotalReg,
        IdSrvBonificacion: x.SrvBonificacion ? x.SrvBonificacion.Id : null,
        PeriodoValido: x.PeriodoValido
      };
    });
    datos.ServiciosAFacturar = ServiciosAFacturar;
    datos.Filtro = {};
    datos.Filtro.Periodo = this.listado.filterForm.get('Periodo').value;
    datos.Filtro.FacturacionActiva = this.listado.filterForm.get('FactActiva').value;
    if (this.listado.filterForm.get('FactActiva').value == 'S') {
      datos.Filtro.DebitoAutomatico = this.listado.filterForm.get('DebAuto').value;
    }
    datos.Filtro.IdSucursal = this.auth.usuario.IdSucursal;
    datos.Filtro.IdEmpresa = this.auth.usuario.IdEmpresa;
    datos.Filtro.IdPtoVenta = Number(this.listado.filterForm.get('IdPtoVenta').value);
    return datos;
  }
  static #_ = this.ɵfac = function FacturacionMasivaComponent_Factory(t) {
    return new (t || FacturacionMasivaComponent)(_angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵdirectiveInject"](src_app_core_services_alertCustom_service__WEBPACK_IMPORTED_MODULE_0__.AlertCustomService), _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵdirectiveInject"](src_app_core_services_servicios_srvContratado_service__WEBPACK_IMPORTED_MODULE_1__.SrvContratadoService), _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵdirectiveInject"](src_app_core_services_auth_service__WEBPACK_IMPORTED_MODULE_2__.AuthService));
  };
  static #_2 = this.ɵcmp = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵdefineComponent"]({
    type: FacturacionMasivaComponent,
    selectors: [["app-facturacion-masiva"]],
    viewQuery: function FacturacionMasivaComponent_Query(rf, ctx) {
      if (rf & 1) {
        _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵviewQuery"](_angular_cdk_stepper__WEBPACK_IMPORTED_MODULE_8__.CdkStepper, 5);
        _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵviewQuery"](_c0, 5);
        _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵviewQuery"](_c1, 5);
      }
      if (rf & 2) {
        let _t;
        _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵqueryRefresh"](_t = _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵloadQuery"]()) && (ctx.wizard = _t.first);
        _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵqueryRefresh"](_t = _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵloadQuery"]()) && (ctx.listado = _t.first);
        _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵqueryRefresh"](_t = _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵloadQuery"]()) && (ctx.formulario = _t.first);
      }
    },
    features: [_angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵProvidersFeature"]([src_app_core_services_alertCustom_service__WEBPACK_IMPORTED_MODULE_0__.AlertCustomService])],
    decls: 49,
    vars: 13,
    consts: [[1, "row"], [1, "col-lg-12"], [1, "card"], [1, "card-body"], [1, "card-title", "mb-4"], [1, "wizard", 3, "linear"], ["cdkStepper", ""], [3, "completed", "optional"], ["cdkStepLabel", ""], [3, "serviciosFactSelect"], ["listado", ""], [1, "list-inline", "wizard", "mb-0"], [1, "next", "list-inline-item", "float-end"], ["cdkStepperNext", "", 1, "btn", "btn-primary", 3, "disabled"], [3, "stepControl", "optional"], [3, "servicios", "totalNeto", "totalFact"], ["formulario", ""], [1, "previous", "list-inline-item"], ["cdkStepperPrevious", "", 1, "btn", "btn-primary"], [1, "btn", "btn-primary", 3, "disabled", "click"], [3, "optional"], [1, "row", "justify-content-center"], [1, "col-lg-6"], [1, "text-center"], [1, "mb-4"], [1, "mdi", "mdi-check-circle-outline", "text-success", "display-4"], [1, "col-12"], [1, "w-full", 3, "multiple"], [4, "ngFor", "ngForOf"], [1, "btn", "btn-primary", 3, "click"], [1, "my-3"], [1, "number"], [1, "fas", "fa-list"], [1, "far", "fa-clipboard"], [1, "far", "fa-check-circle"], ["iconPos", "end"], ["pTemplate", "header"], ["pTemplate", "content"], [1, "ps-3", "bx", "bx-check-circle", "bx-sm", "text-success"], [1, "ps-3", "bx", "bx-x-circle", "bx-sm", "text-danger"], ["styleClass", "p-datatable-gridlines", 3, "value", "responsive"], ["pTemplate", "body"], ["pTemplate", "summary"], [1, "text-end", "my-2"], ["role", "alert", 1, "alert", "alert-danger", "mt-2"], [1, "mb-0"]],
    template: function FacturacionMasivaComponent_Template(rf, ctx) {
      if (rf & 1) {
        _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementStart"](0, "div", 0)(1, "div", 1)(2, "div", 2)(3, "div", 3)(4, "h4", 4);
        _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵtext"](5, "Facturaci\u00F3n Masiva de Servicios");
        _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementStart"](6, "ng-stepper", 5, 6)(8, "cdk-step", 7);
        _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵtemplate"](9, FacturacionMasivaComponent_ng_template_9_Template, 6, 0, "ng-template", 8);
        _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementStart"](10, "section")(11, "app-listado-fact-masiva", 9, 10);
        _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵlistener"]("serviciosFactSelect", function FacturacionMasivaComponent_Template_app_listado_fact_masiva_serviciosFactSelect_11_listener($event) {
          return ctx.setServiciosFactSelect($event);
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementEnd"]()();
        _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementStart"](13, "ul", 11)(14, "li", 12)(15, "button", 13);
        _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵtext"](16, " Siguiente ");
        _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementEnd"]()()()();
        _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementStart"](17, "cdk-step", 14);
        _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵtemplate"](18, FacturacionMasivaComponent_ng_template_18_Template, 6, 0, "ng-template", 8);
        _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementStart"](19, "section");
        _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelement"](20, "app-form-fact-masiva", 15, 16);
        _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementStart"](22, "ul", 11)(23, "li", 17)(24, "button", 18);
        _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵtext"](25, " Volver ");
        _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementEnd"]()();
        _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementStart"](26, "li", 12)(27, "button", 19);
        _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵlistener"]("click", function FacturacionMasivaComponent_Template_button_click_27_listener() {
          return ctx.finalizarWizard();
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵtext"](28, " Enviar ");
        _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementEnd"]()()()()();
        _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementStart"](29, "cdk-step", 20);
        _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵtemplate"](30, FacturacionMasivaComponent_ng_template_30_Template, 6, 0, "ng-template", 8);
        _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementStart"](31, "section")(32, "div", 21)(33, "div", 22)(34, "div", 23)(35, "div", 24);
        _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelement"](36, "i", 25);
        _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementStart"](37, "div")(38, "h5");
        _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵtext"](39, "Servicios Facturados");
        _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementEnd"]()();
        _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementStart"](40, "div")(41, "div", 0)(42, "div", 26)(43, "p-accordion", 27);
        _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵtemplate"](44, FacturacionMasivaComponent_ng_container_44_Template, 4, 0, "ng-container", 28);
        _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementEnd"]()()()()()()();
        _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementStart"](45, "ul", 11)(46, "li", 17)(47, "button", 29);
        _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵlistener"]("click", function FacturacionMasivaComponent_Template_button_click_47_listener() {
          return ctx.reiniciarWizard();
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵtext"](48, " Inicio ");
        _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementEnd"]()()()()()()()()()();
      }
      if (rf & 2) {
        const _r4 = _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵreference"](21);
        _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵadvance"](6);
        _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵproperty"]("linear", true);
        _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵadvance"](2);
        _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵproperty"]("completed", ctx.serviciosFacturados.length > 0)("optional", false);
        _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵadvance"](7);
        _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵproperty"]("disabled", ctx.serviciosFacturados.length == 0);
        _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵadvance"](2);
        _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵproperty"]("stepControl", _r4.formGroup)("optional", false);
        _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵadvance"](3);
        _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵproperty"]("servicios", ctx.serviciosFacturados)("totalNeto", ctx.totalNeto)("totalFact", ctx.totalFact);
        _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵadvance"](7);
        _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵproperty"]("disabled", !_r4.formGroup.valid);
        _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵadvance"](2);
        _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵproperty"]("optional", false);
        _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵadvance"](14);
        _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵproperty"]("multiple", true);
        _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵadvance"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵproperty"]("ngForOf", ctx.respFacturacion);
      }
    },
    dependencies: [primeng_accordion__WEBPACK_IMPORTED_MODULE_9__.Accordion, primeng_accordion__WEBPACK_IMPORTED_MODULE_9__.AccordionTab, primeng_api__WEBPACK_IMPORTED_MODULE_10__.PrimeTemplate, _angular_common__WEBPACK_IMPORTED_MODULE_6__.NgForOf, _angular_cdk_stepper__WEBPACK_IMPORTED_MODULE_8__.CdkStep, _angular_cdk_stepper__WEBPACK_IMPORTED_MODULE_8__.CdkStepLabel, _angular_cdk_stepper__WEBPACK_IMPORTED_MODULE_8__.CdkStepperNext, _angular_cdk_stepper__WEBPACK_IMPORTED_MODULE_8__.CdkStepperPrevious, angular_ng_stepper__WEBPACK_IMPORTED_MODULE_11__.NgStepperComponent, primeng_table__WEBPACK_IMPORTED_MODULE_12__.Table, _listado_fact_masiva_listado_fact_masiva_component__WEBPACK_IMPORTED_MODULE_3__.ListadoFactMasivaComponent, _form_fact_masiva_form_fact_masiva_component__WEBPACK_IMPORTED_MODULE_4__.FormFactMasivaComponent, _angular_common__WEBPACK_IMPORTED_MODULE_6__.CurrencyPipe],
    styles: [".stepper-header {\n  pointer-events: none !important;\n}"]
  });
}

/***/ }),

/***/ 45416:
/*!********************************************************************************************************************!*\
  !*** ./src/app/pages/servicios/facturacion-masiva/form-fact-masiva/detalle-srv-fact/detalle-srv-fact.component.ts ***!
  \********************************************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   DetalleSrvFactComponent: () => (/* binding */ DetalleSrvFactComponent)
/* harmony export */ });
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ 6990);
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _angular_common_locales_es__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/common/locales/es */ 46828);
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/common */ 96814);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ 65879);
/* harmony import */ var _ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @ng-bootstrap/ng-bootstrap */ 85406);
/* harmony import */ var primeng_accordion__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! primeng/accordion */ 65389);
/* harmony import */ var primeng_api__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! primeng/api */ 85219);
/* harmony import */ var primeng_table__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! primeng/table */ 94267);









function DetalleSrvFactComponent_ng_container_8_ng_template_2_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](0, "div")(1, "span");
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]()();
  }
  if (rf & 2) {
    const srvResult_r1 = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵnextContext"]().$implicit;
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtextInterpolate2"]("(", srvResult_r1.Cliente.Codigo, ") ", srvResult_r1.Cliente.Nombre, "");
  }
}
function DetalleSrvFactComponent_ng_container_8_ng_template_3_ng_template_2_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](0, "tr")(1, "th");
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](2, "(Cod) Arti\u0301culo");
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](3, "th");
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](4, "Cant. Items a Fact.");
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](5, "th");
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](6, "% Desc. Bonif");
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](7, "th");
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](8, "Total Neto");
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](9, "th");
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](10, "% Iva");
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](11, "th");
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](12, "% Desc Gral");
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](13, "th");
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](14, "Total Final");
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]()();
  }
}
const _c0 = a0 => [a0, "", "", ".2-2", "es"];
function DetalleSrvFactComponent_ng_container_8_ng_template_3_ng_template_3_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](0, "tr")(1, "td");
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](3, "td");
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](4);
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](5, "td");
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](6);
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵpipe"](7, "number");
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](8, "td");
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](9);
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵpipe"](10, "currency");
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](11, "td");
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](12);
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵpipe"](13, "number");
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](14, "td");
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](15);
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵpipe"](16, "number");
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](17, "td");
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](18);
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵpipe"](19, "currency");
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]()();
  }
  if (rf & 2) {
    const srv_r8 = ctx.$implicit;
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtextInterpolate3"](" N\u00B0", srv_r8.SrvContratado.NroSrvContratado, " - (", srv_r8.Articulo.Codigo, ") ", srv_r8.Articulo.Nombre, " ");
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtextInterpolate"](srv_r8.Cantidad);
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtextInterpolate1"](" ", _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵpipeBind3"](7, 9, srv_r8.PjeDtoBonif, "1.2-5", "es"), " % ");
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](3);
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtextInterpolate1"](" $ ", _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵpipeBindV"](10, 13, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵpureFunction1"](33, _c0, srv_r8.TotalNeto)), " ");
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](3);
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtextInterpolate1"]("", _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵpipeBind3"](13, 19, srv_r8.PjeIva, "1.2-5", "es"), " %");
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](3);
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtextInterpolate1"]("", _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵpipeBind3"](16, 23, srv_r8.PjeDtoGral, "1.2-5", "es"), " %");
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](3);
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtextInterpolate1"](" $ ", _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵpipeBindV"](19, 27, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵpureFunction1"](35, _c0, srv_r8.TotalFinal)), " ");
  }
}
function DetalleSrvFactComponent_ng_container_8_ng_template_3_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](0, "div")(1, "p-table", 13);
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtemplate"](2, DetalleSrvFactComponent_ng_container_8_ng_template_3_ng_template_2_Template, 15, 0, "ng-template", 11)(3, DetalleSrvFactComponent_ng_container_8_ng_template_3_ng_template_3_Template, 20, 37, "ng-template", 14);
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]()();
  }
  if (rf & 2) {
    const srvResult_r1 = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵnextContext"]().$implicit;
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵproperty"]("value", srvResult_r1.Data)("responsive", true);
  }
}
function DetalleSrvFactComponent_ng_container_8_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementContainerStart"](0);
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](1, "p-accordionTab", 10);
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtemplate"](2, DetalleSrvFactComponent_ng_container_8_ng_template_2_Template, 3, 2, "ng-template", 11)(3, DetalleSrvFactComponent_ng_container_8_ng_template_3_Template, 4, 2, "ng-template", 12);
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementContainerEnd"]();
  }
}
class DetalleSrvFactComponent {
  constructor(modal) {
    this.modal = modal;
    this.servicios = [];
    this.serviciosPorCliente = [];
  }
  ngOnInit() {
    (0,_angular_common__WEBPACK_IMPORTED_MODULE_2__.registerLocaleData)(_angular_common_locales_es__WEBPACK_IMPORTED_MODULE_3__["default"]);
    //Called after the constructor, initializing input properties, and the first call to ngOnChanges.
    //Add 'implements OnInit' to the class.
    this.getSrvPorCliente();
    console.log(this.serviciosPorCliente);
  }
  getSrvPorCliente() {
    this.serviciosPorCliente = lodash__WEBPACK_IMPORTED_MODULE_0__.values(this.servicios.reduce((acumulador, elemento) => {
      const idCliente = elemento.Cliente.Id;
      if (!acumulador[idCliente]) {
        acumulador[idCliente] = {
          Cliente: elemento.Cliente,
          Data: []
        };
      }
      acumulador[idCliente].Data.push(elemento);
      return acumulador;
    }, {}));
  }
  static #_ = this.ɵfac = function DetalleSrvFactComponent_Factory(t) {
    return new (t || DetalleSrvFactComponent)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_4__.NgbActiveModal));
  };
  static #_2 = this.ɵcmp = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineComponent"]({
    type: DetalleSrvFactComponent,
    selectors: [["app-detalle-srv-fact"]],
    inputs: {
      servicios: "servicios"
    },
    decls: 12,
    vars: 2,
    consts: [[1, "modal-content"], [1, "modal-header"], ["id", "example-modal-sizes-title-lg", 1, "modal-title", "h4"], [1, "overlay", "overlay-block", "cursor-default", "modal-body"], [1, "row"], [1, "col-12"], [1, "w-full", 3, "multiple"], [4, "ngFor", "ngForOf"], [1, "modal-footer"], ["type", "button", 1, "btn", "btn-success", "btn-elevate", "mr-2", 3, "click"], ["iconPos", "end"], ["pTemplate", "header"], ["pTemplate", "content"], ["styleClass", "p-datatable-gridlines", 3, "value", "responsive"], ["pTemplate", "body"]],
    template: function DetalleSrvFactComponent_Template(rf, ctx) {
      if (rf & 1) {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](0, "div", 0)(1, "div", 1)(2, "div", 2);
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](3, " Detalle de servicios a facturar ");
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]()();
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](4, "div", 3)(5, "div", 4)(6, "div", 5)(7, "p-accordion", 6);
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtemplate"](8, DetalleSrvFactComponent_ng_container_8_Template, 4, 0, "ng-container", 7);
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]()()()();
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](9, "div", 8)(10, "button", 9);
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵlistener"]("click", function DetalleSrvFactComponent_Template_button_click_10_listener() {
          return ctx.modal.close();
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](11, " Aceptar ");
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]()()();
      }
      if (rf & 2) {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](7);
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵproperty"]("multiple", true);
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵproperty"]("ngForOf", ctx.serviciosPorCliente);
      }
    },
    dependencies: [primeng_accordion__WEBPACK_IMPORTED_MODULE_5__.Accordion, primeng_accordion__WEBPACK_IMPORTED_MODULE_5__.AccordionTab, primeng_api__WEBPACK_IMPORTED_MODULE_6__.PrimeTemplate, _angular_common__WEBPACK_IMPORTED_MODULE_2__.NgForOf, primeng_table__WEBPACK_IMPORTED_MODULE_7__.Table, _angular_common__WEBPACK_IMPORTED_MODULE_2__.DecimalPipe, _angular_common__WEBPACK_IMPORTED_MODULE_2__.CurrencyPipe]
  });
}

/***/ }),

/***/ 75629:
/*!***************************************************************************************************!*\
  !*** ./src/app/pages/servicios/facturacion-masiva/form-fact-masiva/form-fact-masiva.component.ts ***!
  \***************************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   FormFactMasivaComponent: () => (/* binding */ FormFactMasivaComponent)
/* harmony export */ });
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @angular/forms */ 56223);
/* harmony import */ var src_app_pages_dashboards_core_seleccionar_empleado_seleccionar_empleado_component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! src/app/pages/dashboards/core/seleccionar-empleado/seleccionar-empleado.component */ 53317);
/* harmony import */ var src_app_pages_dashboards_core_seleccionar_deposito_seleccionar_deposito_component__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! src/app/pages/dashboards/core/seleccionar-deposito/seleccionar-deposito.component */ 89730);
/* harmony import */ var src_app_core_services_core_viewHelper_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! src/app/core/services/core/viewHelper.service */ 4506);
/* harmony import */ var _angular_common_locales_es__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @angular/common/locales/es */ 46828);
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @angular/common */ 96814);
/* harmony import */ var _detalle_srv_fact_detalle_srv_fact_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./detalle-srv-fact/detalle-srv-fact.component */ 45416);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @angular/core */ 65879);
/* harmony import */ var src_app_core_services_core_pto_venta_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! src/app/core/services/core/pto-venta.service */ 62534);
/* harmony import */ var src_app_core_services_core_canal_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! src/app/core/services/core/canal.service */ 84003);
/* harmony import */ var _ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @ng-bootstrap/ng-bootstrap */ 85406);
/* harmony import */ var src_app_core_services_auth_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! src/app/core/services/auth.service */ 90304);
/* harmony import */ var primeng_tooltip__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! primeng/tooltip */ 33259);
/* harmony import */ var ngx_ui_tour_ng_bootstrap__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ngx-ui-tour-ng-bootstrap */ 58469);
/* harmony import */ var _shared_ui_checkbox_checkbox_component__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../../shared/ui/checkbox/checkbox.component */ 79468);
/* harmony import */ var _shared_ui_select_loading_select_loading_component__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../../shared/ui/select-loading/select-loading.component */ 24718);



















function FormFactMasivaComponent_div_16_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](0, "div", 32)(1, "div", 33);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtext"](2, " No hay servicios , seleccione alguno ");
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]()();
  }
}
function FormFactMasivaComponent_a_43_Template(rf, ctx) {
  if (rf & 1) {
    const _r5 = _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵgetCurrentView"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](0, "a", 34);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵlistener"]("click", function FormFactMasivaComponent_a_43_Template_a_click_0_listener() {
      _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵrestoreView"](_r5);
      const ctx_r4 = _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵnextContext"]();
      return _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵresetView"](ctx_r4.borrarComp("Empleado"));
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelement"](1, "i", 35);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]();
  }
}
function FormFactMasivaComponent_a_51_Template(rf, ctx) {
  if (rf & 1) {
    const _r7 = _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵgetCurrentView"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](0, "a", 34);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵlistener"]("click", function FormFactMasivaComponent_a_51_Template_a_click_0_listener() {
      _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵrestoreView"](_r7);
      const ctx_r6 = _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵnextContext"]();
      return _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵresetView"](ctx_r6.borrarComp("Vendedor"));
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelement"](1, "i", 35);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]();
  }
}
function FormFactMasivaComponent_a_59_Template(rf, ctx) {
  if (rf & 1) {
    const _r9 = _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵgetCurrentView"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](0, "a", 34);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵlistener"]("click", function FormFactMasivaComponent_a_59_Template_a_click_0_listener() {
      _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵrestoreView"](_r9);
      const ctx_r8 = _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵnextContext"]();
      return _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵresetView"](ctx_r8.borrarComp("Deposito"));
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelement"](1, "i", 35);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]();
  }
}
const _c0 = a0 => [a0, "", "", ".2-2", "es"];
class FormFactMasivaComponent {
  constructor(fb, ptoVentaService, canalService, modalService, vh, auth) {
    this.fb = fb;
    this.ptoVentaService = ptoVentaService;
    this.canalService = canalService;
    this.modalService = modalService;
    this.vh = vh;
    this.auth = auth;
    this.totalNeto = 0;
    this.totalFact = 0;
    //puntosDeVenta : any[]= [];
    this.canales = [];
    this.formGroup = this.fb.group({
      IdDeposito: [-1, _angular_forms__WEBPACK_IMPORTED_MODULE_10__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_10__.Validators.required, _angular_forms__WEBPACK_IMPORTED_MODULE_10__.Validators.min(0)])],
      Deposito: [''],
      IdEmpleado: [this.auth.usuario.Empleado ? this.auth.usuario.Empleado.Id : -1, _angular_forms__WEBPACK_IMPORTED_MODULE_10__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_10__.Validators.required, _angular_forms__WEBPACK_IMPORTED_MODULE_10__.Validators.min(0)])],
      Empleado: [this.auth.usuario.Empleado ? JSON.parse(localStorage.getItem('empleado')).Nombre : ''],
      IdEmpresa: [this.auth.usuario.Empleado ? this.auth.usuario.IdEmpresa : -1, _angular_forms__WEBPACK_IMPORTED_MODULE_10__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_10__.Validators.required, _angular_forms__WEBPACK_IMPORTED_MODULE_10__.Validators.min(0)])],
      Empresa: [this.auth.usuario.Empleado ? this.auth.usuario.Empresa : ''],
      IdSucursal: [this.auth.usuario.Empleado ? this.auth.usuario.IdSucursal : -1, _angular_forms__WEBPACK_IMPORTED_MODULE_10__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_10__.Validators.required, _angular_forms__WEBPACK_IMPORTED_MODULE_10__.Validators.min(0)])],
      Sucursal: [this.auth.usuario.Empleado ? this.auth.usuario.Sucursal : ''],
      IdCanal: [-1, _angular_forms__WEBPACK_IMPORTED_MODULE_10__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_10__.Validators.required, _angular_forms__WEBPACK_IMPORTED_MODULE_10__.Validators.min(0)])],
      IdVendedor: [-1, _angular_forms__WEBPACK_IMPORTED_MODULE_10__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_10__.Validators.required, _angular_forms__WEBPACK_IMPORTED_MODULE_10__.Validators.min(0)])],
      Vendedor: [''],
      AgruparPorCliente: [true, _angular_forms__WEBPACK_IMPORTED_MODULE_10__.Validators.required]
    });
  }
  ngOnChanges(changes) {}
  ngOnInit() {
    (0,_angular_common__WEBPACK_IMPORTED_MODULE_11__.registerLocaleData)(_angular_common_locales_es__WEBPACK_IMPORTED_MODULE_12__["default"]);
    this.cargarCanal();
    this.vh.inicializar();
    this.vh.formGroup = this.formGroup;
  }
  cargarCanal() {
    let datos = {
      PageSize: -1
    };
    const sb = this.canalService.fetch(datos).subscribe(res => {
      this.canales = res.Data;
    });
  }
  getComp(field) {
    return this.formGroup.get(field).value;
  }
  /**
   * Método para limpiar el filtro
   */
  borrarComp(field) {
    this.formGroup.get(field).reset('');
    this.formGroup.get('Id'.concat(field)).reset(-1);
  }
  /**
   * SP Método para buscar
   */
  buscarComp(field) {
    let modalRef;
    switch (field) {
      case 'Deposito':
        modalRef = this.modalService.open(src_app_pages_dashboards_core_seleccionar_deposito_seleccionar_deposito_component__WEBPACK_IMPORTED_MODULE_1__.SeleccionarDepositoComponent, {
          size: 'xl',
          backdropClass: 'back-z-index',
          windowClass: 'modal-z-index',
          backdrop: 'static',
          keyboard: false,
          scrollable: true
        });
        //SP SINWEB-394 cambios de input por cambios en el ocmponente seleccionar de depositos
        modalRef.componentInstance.filtros = {
          Multiple: false,
          IdEmpresa: this.formGroup.get('IdEmpresa').value != -1 ? this.formGroup.get('IdEmpresa').value : undefined,
          IdSucursal: this.formGroup.get('IdSucursal').value != -1 ? this.formGroup.get('IdSucursal').value : undefined
        };
        break;
      case 'Empleado':
        modalRef = this.modalService.open(src_app_pages_dashboards_core_seleccionar_empleado_seleccionar_empleado_component__WEBPACK_IMPORTED_MODULE_0__.SeleccionarEmpleadoComponent, {
          size: 'xl',
          backdropClass: 'back-z-index',
          windowClass: 'modal-z-index',
          backdrop: 'static',
          keyboard: false,
          scrollable: true
        });
        modalRef.componentInstance.filtros = {
          Multiple: false,
          IdEmpresa: this.formGroup.get('IdEmpresa').value != -1 ? this.formGroup.get('IdEmpresa').value : undefined
          //IdSucursal:this.formGroup.get('IdSucursal').value != -1 ? this.formGroup.get('IdSucursal').value : undefined
        };
        break;
      case 'Vendedor':
        modalRef = this.modalService.open(src_app_pages_dashboards_core_seleccionar_empleado_seleccionar_empleado_component__WEBPACK_IMPORTED_MODULE_0__.SeleccionarEmpleadoComponent, {
          size: 'xl',
          backdropClass: 'back-z-index',
          windowClass: 'modal-z-index',
          backdrop: 'static',
          keyboard: false,
          scrollable: true
        });
        modalRef.componentInstance.filtros = {
          Multiple: false,
          IdEmpresa: this.formGroup.get('IdEmpresa').value != -1 ? this.formGroup.get('IdEmpresa').value : undefined,
          TipoEmpleado: {
            Id: 2,
            Ocultar: true
          }
          //IdSucursal:this.formGroup.get('IdSucursal').value != -1 ? this.formGroup.get('IdSucursal').value : undefined
        };
        break;
      default:
        break;
    }
    if (modalRef !== undefined) {
      modalRef.result.then(resolve => {
        if (resolve !== undefined) {
          if (field == 'Empleado' || field == 'Vendedor') {
            this.formGroup.get('Id'.concat(field)).setValue(resolve.IdEmpleado);
            this.formGroup.get(field).setValue(resolve.Empleado);
          } else {
            this.formGroup.get('Id'.concat(field)).setValue(resolve['Id'.concat(field)]);
            this.formGroup.get(field).setValue(resolve[field]);
          }
        }
      });
    }
  }
  getAgrupCli() {
    return this.formGroup.get('AgruparPorCliente').value;
  }
  setAgrupCli() {
    this.formGroup.get('AgruparPorCliente').setValue(!this.getAgrupCli());
  }
  verDetalle() {
    const modalRef = this.modalService.open(_detalle_srv_fact_detalle_srv_fact_component__WEBPACK_IMPORTED_MODULE_3__.DetalleSrvFactComponent, {
      size: 'xl',
      backdropClass: 'back-z-index',
      windowClass: 'modal-z-index',
      backdrop: 'static',
      keyboard: false,
      scrollable: true
    });
    modalRef.componentInstance.servicios = this.servicios;
  }
  static #_ = this.ɵfac = function FormFactMasivaComponent_Factory(t) {
    return new (t || FormFactMasivaComponent)(_angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵdirectiveInject"](_angular_forms__WEBPACK_IMPORTED_MODULE_10__.FormBuilder), _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵdirectiveInject"](src_app_core_services_core_pto_venta_service__WEBPACK_IMPORTED_MODULE_4__.PtoVentaService), _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵdirectiveInject"](src_app_core_services_core_canal_service__WEBPACK_IMPORTED_MODULE_5__.CanalService), _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵdirectiveInject"](_ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_13__.NgbModal), _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵdirectiveInject"](src_app_core_services_core_viewHelper_service__WEBPACK_IMPORTED_MODULE_2__.ViewHelperService), _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵdirectiveInject"](src_app_core_services_auth_service__WEBPACK_IMPORTED_MODULE_6__.AuthService));
  };
  static #_2 = this.ɵcmp = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵdefineComponent"]({
    type: FormFactMasivaComponent,
    selectors: [["app-form-fact-masiva"]],
    inputs: {
      servicios: "servicios",
      totalNeto: "totalNeto",
      totalFact: "totalFact"
    },
    features: [_angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵProvidersFeature"]([src_app_core_services_core_viewHelper_service__WEBPACK_IMPORTED_MODULE_2__.ViewHelperService]), _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵNgOnChangesFeature"]],
    decls: 70,
    vars: 32,
    consts: [[1, "card"], [1, "card-header", "bg-transparent"], [1, "mb-0", "flex-grow-1", "d-flex", "flex-row"], ["tourAnchor", "factMasivaForm.anchor.id", 1, "mb-1", "align-self-center"], [1, "card-body", "border-bottom"], [1, "row"], [1, "col-lg-3"], [1, "card-header", "position-relative"], [1, "card-title", "my-2"], [1, "position-absolute", "end-0", "top-0", "mt-2", "me-2"], ["pTooltip", "Ver Detalle", 1, "btn", "btn-sm", "btn-info", 3, "click"], [1, "mdi", "mdi-eye", "font-size-16"], [1, "card-body", 2, "max-height", "300px"], ["class", "row justify-content-center mx-1", 4, "ngIf"], [1, "list-group"], [1, "list-group-item", "d-flex"], [1, "col-lg-9"], [3, "formGroup"], [1, "form-group", "row"], [1, "col-lg-4", "pb-2"], [1, "control-label"], ["tourAnchor", "searchEmpleado.anchor.id", 1, "input-group"], ["type", "search", "formControlName", "Empleado", "placeholder", "Seleccionar Empleado", "readonly", "", 1, "form-control"], ["class", "btn btn-secondary", 3, "click", 4, "ngIf"], [1, "btn", "btn-primary", 3, "click"], [1, "bx", "bx-search-alt-2"], ["tourAnchor", "searchVendedor.anchor.id", 1, "input-group"], ["type", "search", "formControlName", "Vendedor", "placeholder", "Seleccionar Vendedor", "readonly", "", 1, "form-control"], ["tourAnchor", "searchDeposito.anchor.id", 1, "input-group"], ["type", "search", "formControlName", "Deposito", "placeholder", "Seleccionar Dep\u00F3sito", "readonly", "", 1, "form-control"], ["defaultString", "Seleccionar Canal", 3, "defaultValue", "items", "valueSelected", "loading", "valueSelect"], ["colorUncheked", "danger", "colorChecked", "success", 1, "my-2", 3, "value", "title", "emitAction"], [1, "row", "justify-content-center", "mx-1"], ["role", "alert", 1, "col-12", "alert", "alert-info", "py-3", "text-center"], [1, "btn", "btn-secondary", 3, "click"], [1, "bx", "bx-x"]],
    template: function FormFactMasivaComponent_Template(rf, ctx) {
      if (rf & 1) {
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](0, "div", 0)(1, "div", 1)(2, "span", 2)(3, "h5", 3);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtext"](4, " Datos de facturaci\u00F3n ");
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]()()();
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](5, "div", 4)(6, "div", 5)(7, "div", 6)(8, "div", 0)(9, "div", 7)(10, "h5", 8);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtext"](11, "Servicios");
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](12, "div", 9)(13, "button", 10);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵlistener"]("click", function FormFactMasivaComponent_Template_button_click_13_listener() {
          return ctx.verDetalle();
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelement"](14, "i", 11);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]()()();
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](15, "div", 12);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtemplate"](16, FormFactMasivaComponent_div_16_Template, 3, 0, "div", 13);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](17, "ul", 14)(18, "li", 15)(19, "span");
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtext"](20, "Cant. de Servicios a Facturar: ");
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](21, "b");
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtext"](22);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]()()();
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](23, "li", 15)(24, "span");
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtext"](25, "Total Neto: ");
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](26, "b");
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtext"](27);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵpipe"](28, "currency");
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]()()();
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](29, "li", 15)(30, "span");
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtext"](31, "Total a Facturar: ");
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](32, "b");
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtext"](33);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵpipe"](34, "currency");
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]()()()()()()();
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](35, "div", 16)(36, "form", 17)(37, "div", 18)(38, "div", 19)(39, "label", 20);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtext"](40, "Empleado");
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](41, "div", 21);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelement"](42, "input", 22);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtemplate"](43, FormFactMasivaComponent_a_43_Template, 2, 0, "a", 23);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](44, "a", 24);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵlistener"]("click", function FormFactMasivaComponent_Template_a_click_44_listener() {
          return ctx.buscarComp("Empleado");
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelement"](45, "i", 25);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]()()();
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](46, "div", 19)(47, "label", 20);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtext"](48, "Vendedor");
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](49, "div", 26);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelement"](50, "input", 27);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtemplate"](51, FormFactMasivaComponent_a_51_Template, 2, 0, "a", 23);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](52, "a", 24);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵlistener"]("click", function FormFactMasivaComponent_Template_a_click_52_listener() {
          return ctx.buscarComp("Vendedor");
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelement"](53, "i", 25);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]()()();
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](54, "div", 19)(55, "label", 20);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtext"](56, "Dep\u00F3sito");
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](57, "div", 28);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelement"](58, "input", 29);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtemplate"](59, FormFactMasivaComponent_a_59_Template, 2, 0, "a", 23);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](60, "a", 24);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵlistener"]("click", function FormFactMasivaComponent_Template_a_click_60_listener() {
          return ctx.buscarComp("Deposito");
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelement"](61, "i", 25);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]()()();
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](62, "div", 19)(63, "label", 20);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtext"](64, "Canal");
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](65, "select-loading", 30);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵlistener"]("valueSelect", function FormFactMasivaComponent_Template_select_loading_valueSelect_65_listener($event) {
          return ctx.formGroup.controls.IdCanal.setValue($event);
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵpipe"](66, "async");
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]()();
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](67, "div", 19);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelement"](68, "label", 20);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](69, "app-checkbox", 31);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵlistener"]("emitAction", function FormFactMasivaComponent_Template_app_checkbox_emitAction_69_listener() {
          return ctx.setAgrupCli();
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]()()()()()()()();
      }
      if (rf & 2) {
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵadvance"](16);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵproperty"]("ngIf", !ctx.servicios || (ctx.servicios == null ? null : ctx.servicios.length) == 0);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵadvance"](6);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtextInterpolate"](ctx.servicios == null ? null : ctx.servicios.length);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵadvance"](5);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtextInterpolate1"]("$ ", _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵpipeBindV"](28, 14, _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵpureFunction1"](28, _c0, ctx.totalNeto)), "");
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵadvance"](6);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtextInterpolate1"]("$ ", _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵpipeBindV"](34, 20, _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵpureFunction1"](30, _c0, ctx.totalFact)), "");
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵadvance"](3);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵproperty"]("formGroup", ctx.formGroup);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵadvance"](7);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵproperty"]("ngIf", ctx.getComp("Empleado"));
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵadvance"](8);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵproperty"]("ngIf", ctx.getComp("Vendedor"));
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵadvance"](8);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵproperty"]("ngIf", ctx.getComp("Deposito"));
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵadvance"](6);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵproperty"]("defaultValue", -1)("items", ctx.canales)("valueSelected", ctx.formGroup.controls.IdCanal.value)("loading", _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵpipeBind1"](66, 26, ctx.canalService.isLoading$));
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵadvance"](4);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵproperty"]("value", ctx.getAgrupCli())("title", "Agrupar por Clientes");
      }
    },
    dependencies: [_angular_common__WEBPACK_IMPORTED_MODULE_11__.NgIf, primeng_tooltip__WEBPACK_IMPORTED_MODULE_14__.Tooltip, _angular_forms__WEBPACK_IMPORTED_MODULE_10__["ɵNgNoValidate"], _angular_forms__WEBPACK_IMPORTED_MODULE_10__.DefaultValueAccessor, _angular_forms__WEBPACK_IMPORTED_MODULE_10__.NgControlStatus, _angular_forms__WEBPACK_IMPORTED_MODULE_10__.NgControlStatusGroup, _angular_forms__WEBPACK_IMPORTED_MODULE_10__.FormGroupDirective, _angular_forms__WEBPACK_IMPORTED_MODULE_10__.FormControlName, ngx_ui_tour_ng_bootstrap__WEBPACK_IMPORTED_MODULE_15__.TourAnchorNgBootstrapDirective, _shared_ui_checkbox_checkbox_component__WEBPACK_IMPORTED_MODULE_7__.CheckboxComponent, _shared_ui_select_loading_select_loading_component__WEBPACK_IMPORTED_MODULE_8__.SelectLoadingComponent, _angular_common__WEBPACK_IMPORTED_MODULE_11__.AsyncPipe, _angular_common__WEBPACK_IMPORTED_MODULE_11__.CurrencyPipe]
  });
}

/***/ }),

/***/ 9586:
/*!*********************************************************************************************************!*\
  !*** ./src/app/pages/servicios/facturacion-masiva/listado-fact-masiva/listado-fact-masiva.component.ts ***!
  \*********************************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   ListadoFactMasivaComponent: () => (/* binding */ ListadoFactMasivaComponent)
/* harmony export */ });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! @angular/core */ 65879);
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! rxjs */ 37398);
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! rxjs */ 94664);
/* harmony import */ var src_app_core_utils_constantes_constantes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! src/app/core/utils/constantes/constantes */ 74506);
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! @angular/forms */ 56223);
/* harmony import */ var src_app_core_utils_metodos_metodos__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../core/utils/metodos/metodos */ 38002);
/* harmony import */ var src_app_core_services_alertCustom_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! src/app/core/services/alertCustom.service */ 53206);
/* harmony import */ var src_app_core_utils_constantes_constantes_servicios__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! src/app/core/utils/constantes/constantes-servicios */ 50864);
/* harmony import */ var _angular_common_locales_es__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! @angular/common/locales/es */ 46828);
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! @angular/common */ 96814);
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! lodash */ 6990);
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var _srv_auditoria_srv_auditoria_component__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../srv-auditoria/srv-auditoria.component */ 10966);
/* harmony import */ var src_app_core_utils_validators_dateValidators__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! src/app/core/utils/validators/dateValidators */ 49545);
/* harmony import */ var ngx_toastr__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ngx-toastr */ 2425);
/* harmony import */ var src_app_core_services_servicios_srvContratado_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! src/app/core/services/servicios/srvContratado.service */ 2158);
/* harmony import */ var src_app_core_services_core_pto_venta_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! src/app/core/services/core/pto-venta.service */ 62534);
/* harmony import */ var src_app_core_services_exportacion_service__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! src/app/core/services/exportacion.service */ 18969);
/* harmony import */ var src_app_core_services_stateful_service__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! src/app/core/services/stateful.service */ 689);
/* harmony import */ var src_app_core_services_auth_service__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! src/app/core/services/auth.service */ 90304);
/* harmony import */ var ngx_ui_tour_ng_bootstrap__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ngx-ui-tour-ng-bootstrap */ 58469);
/* harmony import */ var _ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! @ng-bootstrap/ng-bootstrap */ 85406);
/* harmony import */ var _shared_widget_tour_tour_component__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../../shared/widget/tour/tour.component */ 63481);
/* harmony import */ var _shared_ui_checkbox_checkbox_component__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../../shared/ui/checkbox/checkbox.component */ 79468);
/* harmony import */ var _shared_ui_select_loading_select_loading_component__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../../shared/ui/select-loading/select-loading.component */ 24718);
/* harmony import */ var _shared_ui_table2_table2_component__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../../../shared/ui/table2/table2.component */ 63033);
/* harmony import */ var _shared_ui_input_periodo_input_periodo_component__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../../../shared/ui/input-periodo/input-periodo.component */ 77947);






























function ListadoFactMasivaComponent_option_36_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵelementStart"](0, "option", 35);
    _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵtext"](1);
    _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵelementEnd"]();
  }
  if (rf & 2) {
    const option_r5 = ctx.$implicit;
    _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵproperty"]("value", option_r5.id);
    _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵtextInterpolate1"](" ", option_r5.nombre, " ");
  }
}
function ListadoFactMasivaComponent_div_37_option_4_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵelementStart"](0, "option", 35);
    _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵtext"](1);
    _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵelementEnd"]();
  }
  if (rf & 2) {
    const option_r7 = ctx.$implicit;
    _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵproperty"]("value", option_r7.id);
    _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵtextInterpolate1"](" ", option_r7.nombre, " ");
  }
}
function ListadoFactMasivaComponent_div_37_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵelementStart"](0, "div", 18)(1, "p", 19);
    _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵtext"](2, "D\u00E9bito Autom\u00E1tico");
    _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵelementStart"](3, "select", 36);
    _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵtemplate"](4, ListadoFactMasivaComponent_div_37_option_4_Template, 2, 2, "option", 22);
    _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵelementEnd"]()();
  }
  if (rf & 2) {
    const ctx_r1 = _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵnextContext"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵadvance"](4);
    _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵproperty"]("ngForOf", ctx_r1.todosOptions);
  }
}
function ListadoFactMasivaComponent_option_62_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵelementStart"](0, "option", 35);
    _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵtext"](1);
    _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵelementEnd"]();
  }
  if (rf & 2) {
    const option_r8 = ctx.$implicit;
    _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵproperty"]("value", option_r8.id);
    _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵtextInterpolate1"](" ", option_r8.nombre, " ");
  }
}
function ListadoFactMasivaComponent_ng_template_66_ng_container_3_Template(rf, ctx) {
  if (rf & 1) {
    const _r13 = _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵgetCurrentView"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵelementContainerStart"](0);
    _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵelementStart"](1, "app-checkbox", 40);
    _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵlistener"]("emitAction", function ListadoFactMasivaComponent_ng_template_66_ng_container_3_Template_app_checkbox_emitAction_1_listener() {
      const restoredCtx = _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵrestoreView"](_r13);
      const i_r11 = restoredCtx.index;
      const ctx_r12 = _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵnextContext"](2);
      return _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵresetView"](ctx_r12.setDisabled(i_r11));
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵelementContainerEnd"]();
  }
  if (rf & 2) {
    const config_r10 = ctx.$implicit;
    const i_r11 = ctx.index;
    const ctx_r9 = _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵnextContext"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵproperty"]("title", config_r10)("value", ctx_r9.getDisabled(i_r11));
  }
}
function ListadoFactMasivaComponent_ng_template_66_Template(rf, ctx) {
  if (rf & 1) {
    const _r15 = _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵgetCurrentView"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵelementStart"](0, "div", 37)(1, "div")(2, "app-checkbox", 38);
    _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵlistener"]("emitAction", function ListadoFactMasivaComponent_ng_template_66_Template_app_checkbox_emitAction_2_listener() {
      _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵrestoreView"](_r15);
      const ctx_r14 = _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵnextContext"]();
      return _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵresetView"](ctx_r14.setSelectTodos());
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵtemplate"](3, ListadoFactMasivaComponent_ng_template_66_ng_container_3_Template, 2, 2, "ng-container", 39);
    _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵelementEnd"]()();
  }
  if (rf & 2) {
    const ctx_r3 = _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵnextContext"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵproperty"]("formGroup", ctx_r3.configForm);
    _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵproperty"]("value", ctx_r3.getSelectTodos());
    _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵproperty"]("ngForOf", ctx_r3.configOptions);
  }
}
class ListadoFactMasivaComponent {
  constructor(fb, toast, srvContratadoService, ptoVentaService, exportacion, sf, alert, authService, tourService, modalService) {
    this.fb = fb;
    this.toast = toast;
    this.srvContratadoService = srvContratadoService;
    this.ptoVentaService = ptoVentaService;
    this.exportacion = exportacion;
    this.sf = sf;
    this.alert = alert;
    this.authService = authService;
    this.tourService = tourService;
    this.modalService = modalService;
    this.serviciosFactSelect = new _angular_core__WEBPACK_IMPORTED_MODULE_17__.EventEmitter();
    this.serviciosFact = [];
    this.ptosVenta = [];
    this.srvFactSeleccionados = [];
    this.total = [];
    this.filtro = true;
    this.filtroMobile = false;
    this._unsubscribe = [];
    //config
    this.config = false;
    this.configMobile = false;
    //public configOptions: string[] = constantesSERV.columnasFactMasiva;
    //filtros
    this.filterPeriodo = '';
    /**
     * SP SINWEB-319 nuevo filtro deb automatico
     */
    this.filterDebAuto = '';
    this.filterFactActiva = '';
    this.filterPtoVenta = -1;
    this.filterPeriodoValido = 'S';
    //paginacion
    this.cantSearch = src_app_core_utils_constantes_constantes__WEBPACK_IMPORTED_MODULE_0__.CANT_SEARCH;
    //SP arreglo paginas seleccionables pasadas al app-select component
    this.pageOptions = src_app_core_utils_constantes_constantes__WEBPACK_IMPORTED_MODULE_0__.PAGE_OPTIONS;
    this.order = 2;
    this.sentido = src_app_core_utils_constantes_constantes__WEBPACK_IMPORTED_MODULE_0__.INIT_SENTIDO;
    this.totalItems = 0;
    //permisos
    //Input busqueda
    this.serviciosFactHeader = src_app_core_utils_constantes_constantes_servicios__WEBPACK_IMPORTED_MODULE_3__.serviciosFactHeader;
    this.filterForm = this.fb.group({
      //SP SINWEB
      Periodo: [(0,src_app_core_utils_metodos_metodos__WEBPACK_IMPORTED_MODULE_1__.formatMMYYYY)((0,src_app_core_utils_metodos_metodos__WEBPACK_IMPORTED_MODULE_1__.formatMMYYYYCompActual)()), _angular_forms__WEBPACK_IMPORTED_MODULE_18__.Validators.compose([(0,src_app_core_utils_validators_dateValidators__WEBPACK_IMPORTED_MODULE_6__.periodoIncompleto)()])],
      /**
       * SP SINWEB-319 nuevo filtro deb automatico
       */
      DebAuto: ['N'],
      FactActiva: ['S'],
      IdPtoVenta: [-1],
      PeriodoValido: ['S']
    });
    this.todosOptions = [
    //{id: '', nombre: "Todos"},
    {
      id: 'N',
      nombre: 'No'
    }, {
      id: 'S',
      nombre: 'Si'
    }];
    this.configForm = this.fb.group({
      config: this.fb.array(new Array(29).fill(false)),
      todos: [false]
    });
  }
  ngOnInit() {
    (0,_angular_common__WEBPACK_IMPORTED_MODULE_19__.registerLocaleData)(_angular_common_locales_es__WEBPACK_IMPORTED_MODULE_20__["default"]);
    this.page = 1;
    this.previousPage = 1;
    this.stateInicioConfig = this.sf.pagenamesSERV.FACT_MASIVA_STATES;
    this.inicializarEstado();
    this.configuracionFilter();
    this.cargarTodo();
    //this.loadPage();
  }
  ngOnDestroy() {
    this._unsubscribe.forEach(sb => sb.unsubscribe());
  }
  /**
   * PM SINWEB-93 Inicializa el estado de los componentes que permite almacenar su estado
   */
  inicializarEstado() {
    this.sf.states = this.sf.pagenamesSERV.FACT_MASIVA_STATES;
    //config
    // this.sf.getState(this.sf.states.FACT_MASIVA_F_CONFIG).split(",").forEach((element,index) => {
    //   (this.configForm.get('config') as FormArray).at(index).setValue(element == 'true');
    //   this.serviciosFactHeader[index].Disabled = element == 'true' ? false: true;
    // })
    //busqueda
    //select component
    //filtros
    this.filterPeriodo = this.sf.getState(this.sf.states.FACT_MASIVA_F_PERIODO) == '' ? (0,src_app_core_utils_metodos_metodos__WEBPACK_IMPORTED_MODULE_1__.formatMMYYYY)((0,src_app_core_utils_metodos_metodos__WEBPACK_IMPORTED_MODULE_1__.formatMMYYYYCompActual)()) : this.sf.getState(this.sf.states.FACT_MASIVA_F_PERIODO);
    this.filterForm.controls.Periodo.setValue(this.filterPeriodo, {
      emitEvent: false
    });
    //SP SINWEB-471 nuevo filtro periodo valido
    this.filterPeriodoValido = this.sf.getState(this.sf.states.FACT_MASIVA_F_PERIODO_VALIDO);
    this.filterForm.controls.PeriodoValido.setValue(this.filterPeriodoValido, {
      emitEvent: false
    });
    this.filterFactActiva = this.sf.getState(this.sf.states.FACT_MASIVA_F_FACT_ACTIVA);
    this.filterForm.controls.FactActiva.setValue(this.filterFactActiva, {
      emitEvent: false
    });
    this.filterDebAuto = this.sf.getState(this.sf.states.FACT_MASIVA_F_DEB_AUTO);
    this.filterForm.controls.DebAuto.setValue(this.filterDebAuto, {
      emitEvent: false
    });
    this.filterPtoVenta = this.sf.getState(this.sf.states.FACT_MASIVA_F_PTO_VENTA);
    this.filterForm.controls.IdPtoVenta.setValue(this.filterPtoVenta, {
      emitEvent: false
    });
    //listado
    this.page = Number(this.sf.getState(this.sf.states.FACT_MASIVA_L_PAGE));
    this.cantSearch = Number(this.sf.getState(this.sf.states.FACT_MASIVA_L_PAGESIZE));
    //this.order       = Number(this.sf.getState(this.sf.states.FACT_MASIVA_L_ORDER));
    //this.sentido     = this.sf.getState(this.sf.states.FACT_MASIVA_L_SENTIDO);
  }
  /**
   * Método para escuchar a los cambios en el formulario de filtros
   */
  configuracionFilter() {
    this._unsubscribe.push(this.filterForm.controls.Periodo.valueChanges.subscribe(periodo => {
      //SP SINWEB-599 control de periodo valido
      if (this.filterForm.controls.Periodo.valid) {
        this.filterPeriodo = periodo;
        this.page = 1;
        this.srvFactSeleccionados = [];
        this.serviciosFactSelect.emit(this.srvFactSeleccionados);
        this.loadPage();
      }
    }));
    this._unsubscribe.push(this.filterForm.controls.FactActiva.valueChanges.subscribe(fact => {
      this.filterFactActiva = fact;
      this.page = 1;
      this.srvFactSeleccionados = [];
      this.serviciosFactSelect.emit(this.srvFactSeleccionados);
      this.cargarTodo();
    }));
    this._unsubscribe.push(this.filterForm.controls.DebAuto.valueChanges.subscribe(debAuto => {
      this.filterDebAuto = debAuto;
      this.page = 1;
      this.srvFactSeleccionados = [];
      this.serviciosFactSelect.emit(this.srvFactSeleccionados);
      this.loadPage();
    }));
    this._unsubscribe.push(this.filterForm.controls.IdPtoVenta.valueChanges.subscribe(pto => {
      this.filterPtoVenta = pto;
      this.page = 1;
      this.srvFactSeleccionados = [];
      this.serviciosFactSelect.emit(this.srvFactSeleccionados);
      this.loadPage();
    }));
    this._unsubscribe.push(this.filterForm.controls.PeriodoValido.valueChanges.subscribe(periodoValido => {
      this.filterPeriodoValido = periodoValido;
      this.page = 1;
      this.loadPage();
    }));
  }
  /**
   * Método para limpiar los filtros
   */
  cleanStates() {
    this.sf.cleanAllStates();
    this.resetComp();
  }
  /**
   * SP SINWEB-166 metodo llamado pro clean estate que reinicia los estados y filtros
   */
  resetComp() {
    this._unsubscribe.forEach(sub => {
      sub.unsubscribe();
    });
    this.page = 1;
    this.previousPage = 1;
    this.srvFactSeleccionados = [];
    this.serviciosFactSelect.emit(this.srvFactSeleccionados);
    this.inicializarEstado();
    this.configuracionFilter();
    this.cargarTodo();
    //this.loadPage();
  }
  /**
   * Método para cargar los datos de la página
   */
  loadPage() {
    this.onSearch(this.cargarFiltros(this.page, this.order, this.sentido));
  }
  /**
   * Método que cambia el tamaño de página y actualiza la búsqueda
   * @param {any} event Evento con la cantidad de registros a mostrar
   */
  setPage(event) {
    this.page = 1;
    this.cantSearch = event;
    this.loadPage();
  }
  /**
   * Método que setea el orden página y actualiza la búsqueda
   * @param {any} event Evento con el orden y sentido de la búsqueda
   */
  setOrder(event) {
    this.page = 1;
    this.order = event.id;
    this.sentido = event.sentido;
    this.loadPage();
  }
  /**
   * SP SINWEB-347 metodo que maneja paginacion , orden , cant regs de la tabla
   * @param $event
   */
  lazyLoadChange($event) {
    this.page = $event.page;
    this.order = $event.order;
    this.cantSearch = $event.cant;
    this.sentido = $event.sentido;
    this.loadPage();
  }
  /**
   * Método que trae las máquinas del servicio
   * @param {object} datos Datos de búsqueda
   */
  onSearch(datos) {
    const susc = this.srvContratadoService.getServFact(datos).pipe((0,rxjs__WEBPACK_IMPORTED_MODULE_21__.map)(resp => {
      return {
        TotalRecords: resp.TotalRecords,
        Data: lodash__WEBPACK_IMPORTED_MODULE_4__.map(resp.Data, value => {
          if (value.SrvContratado) {
            return lodash__WEBPACK_IMPORTED_MODULE_4__.extend(value, {
              Bonificado: value.SrvBonificacion ? 'S' : 'N',
              Id: value.SrvContratado.Id
            });
          } else {
            return lodash__WEBPACK_IMPORTED_MODULE_4__.extend(value, {
              Bonificado: value.SrvBonificacion ? 'S' : 'N'
            });
          }
        })
      };
    })).subscribe(data => {
      this.serviciosFact = data.Data;
      if (data.Data != undefined) {
        this.totalItems = data.TotalRecords;
      } else {
        this.totalItems = 0;
      }
    });
    susc.unsubscribe;
  }
  cargarTodo() {
    let datos = {
      PageNumber: 1,
      PageSize: 1000,
      Orden: 2,
      SentidoOrden: 'ASC',
      Activo: this.filterFactActiva,
      BajaLogica: 'N',
      IdsComprobantesHabilitados: '1',
      IdEmpresa: this.authService.usuario.IdEmpresa,
      IdSucursal: this.authService.usuario.IdSucursal
    };
    const sb = this.ptoVentaService.fetch(datos).pipe((0,rxjs__WEBPACK_IMPORTED_MODULE_22__.switchMap)(data => {
      if (data.Data.length > 0) {
        this.ptosVenta = data.Data.map(pto => {
          return {
            Id: pto.Id,
            Nombre: pto.Numero
          };
        });
        let hayPtoVenta = this.ptosVenta.find(pto => pto.Id == this.filterPtoVenta);
        if (!hayPtoVenta) {
          this.sf.changeState(this.sf.states.FACT_MASIVA_F_PTO_VENTA, this.ptosVenta[0].Id);
          this.filterPtoVenta = this.ptosVenta[0].Id;
          this.filterForm.controls.IdPtoVenta.setValue(this.ptosVenta[0].Id, {
            emitEvent: false
          });
        }
      } else {
        this.ptosVenta = [];
      }
      return this.srvContratadoService.getServFact(this.cargarFiltros(this.page, this.order, this.sentido)).pipe((0,rxjs__WEBPACK_IMPORTED_MODULE_21__.map)(resp => {
        return {
          TotalRecords: resp.TotalRecords,
          Data: lodash__WEBPACK_IMPORTED_MODULE_4__.map(resp.Data, value => {
            if (value.SrvContratado) {
              return lodash__WEBPACK_IMPORTED_MODULE_4__.extend(value, {
                Bonificado: value.SrvBonificacion ? 'S' : 'N',
                Id: value.SrvContratado.Id
              });
            } else {
              return lodash__WEBPACK_IMPORTED_MODULE_4__.extend(value, {
                Bonificado: value.SrvBonificacion ? 'S' : 'N'
              });
            }
          })
        };
      }));
    })).subscribe(data => {
      this.serviciosFact = data.Data;
      if (data.Data != undefined) {
        this.totalItems = data.TotalRecords;
      } else {
        this.totalItems = 0;
      }
    });
    sb.unsubscribe;
  }
  /**
   * Método que carga los filtros de búsqueda para realizar la petición
   * @param {any} page Página actual
   * @param {any} order Orden
   * @param {any} sentido Sentido (ascendente o descendente)
   * @returns {object} Datos de búsqueda
   */
  cargarFiltros(page, order, sentido) {
    let datos = {};
    //paginacion
    datos.PageNumber = page;
    datos.PageSize = this.cantSearch;
    datos.IdEmpresa = this.authService.usuario.IdEmpresa;
    datos.IdSucursal = this.authService.usuario.IdSucursal;
    //parametros de orden
    //datos.Orden = order;
    //datos.OrdenAscDesc = sentido;
    //busqueda
    //select comp
    //filtros
    if (this.filterPeriodo !== undefined && this.filterPeriodo != '') {
      datos.Periodo = this.filterPeriodo;
    }
    if (this.filterFactActiva !== undefined && this.filterFactActiva != '') {
      datos.FacturacionActiva = this.filterFactActiva;
    }
    if (this.filterDebAuto !== undefined && this.filterDebAuto != '' && this.filterFactActiva != 'N') {
      datos.DebitoAutomatico = this.filterDebAuto;
    }
    if (this.filterPtoVenta != undefined && this.filterPtoVenta != -1) {
      datos.IdPtoVenta = this.filterPtoVenta;
    }
    if (this.filterPeriodoValido != undefined && this.filterPeriodoValido != '') {
      datos.PeriodoValido = this.filterPeriodoValido;
    }
    //Almacenar el cambio de estado de los componentes
    if (datos.PageNumber != -1) {
      this.changeStates(datos);
    }
    return datos;
  }
  /**
   * PM SINWEB-93 Método que realiza el cambio de los estados segun los valores elegidos
   * @param {any} datos Datos de búsqueda
   */
  changeStates(datos) {
    //busqueda
    //select comp
    //filtros
    this.sf.changeState(this.sf.states.FACT_MASIVA_F_PERIODO_VALIDO, datos.PeriodoValido ? this.sf.states.FACT_MASIVA_F_PERIODO_VALIDO.default : this.filterForm.controls.PeriodoValido.value);
    this.sf.changeState(this.sf.states.FACT_MASIVA_F_PERIODO, !datos.Periodo ? this.sf.states.FACT_MASIVA_F_PERIODO.default : this.filterForm.controls.Periodo.value);
    this.sf.changeState(this.sf.states.FACT_MASIVA_F_FACT_ACTIVA, !datos.FacturacionActiva ? this.sf.states.FACT_MASIVA_F_FACT_ACTIVA.default : this.filterForm.controls.FactActiva.value);
    this.sf.changeState(this.sf.states.FACT_MASIVA_F_DEB_AUTO, !datos.DebitoAutomatico ? this.sf.states.FACT_MASIVA_F_DEB_AUTO.default : this.filterForm.controls.DebAuto.value);
    this.sf.changeState(this.sf.states.FACT_MASIVA_F_PTO_VENTA, datos.IdPtoVenta == undefined ? this.sf.states.FACT_MASIVA_F_PTO_VENTA.default : this.filterForm.controls.IdPtoVenta.value);
    //listado
    this.sf.changeState(this.sf.states.FACT_MASIVA_L_PAGE, datos.PageNumber);
    this.sf.changeState(this.sf.states.FACT_MASIVA_L_PAGESIZE, datos.PageSize);
    //this.sf.changeState(this.sf.states.FACT_MASIVA_L_ORDER,(datos.Orden));
    //this.sf.changeState(this.sf.states.FACT_MASIVA_L_SENTIDO,(datos.OrdenAscDesc));
  }
  /**
   * Método para cambio de página
   * @param {any} event Evento con la pagina
   */
  pageChange(event) {
    this.page = event;
    this.loadPage();
  }
  /**
   * Método para exportar a Excel
   */
  exportTo(extension) {
    let datos = this.cargarFiltros(-1, this.order, this.sentido);
    delete datos.PageSize;
    //delete datos.PageNumber;
    //SP se arman las columnas y keys para buscar datos y armar el excel
    // MC SINWEB-378
    const columns = ['Número', '(Cod) Cliente', '(Cod) Cliente Fact.', '(Cod) Artículo', 'Último Periodo Fact.', 'Frecuencia Fact.', 'Cant. Fact.', 'Fact. Activa', 'Mes Adelantado', 'Bonificado', 'Vigente', 'Pausado', 'Débito Auto.', 'Fecha Alta', 'Fecha Fin', 'Observación', 'Subconcepto', 'Tipo Bonif.', 'Nombre Precio', 'Fecha Lista', 'Cant. Bonif.', '% Desc. Bonif', 'Precio Neto', 'Total Neto', '% Iva', '% Desc. Gral.', 'Precio Final', 'Total Final'];
    const keys = ['SrvContratado.NroSrvContratado', 'CodCliente', 'CodClienteFact', 'CodArticulo', 'UltimoPeriodoFact', 'SrvContratado.FrecuenciaFact', 'Cantidad', 'SrvContratado.FacturacionActiva', 'SrvContratado.MesAdelantado', 'Bonificado', 'SrvContratado.Vigente', 'SrvContratado.Pausado', 'SrvContratado.DebitoAutomatico', 'SrvContratado.FechaAlta', 'SrvContratado.FechaFin', 'SrvContratado.Observacion', 'SrvContratado.Subconcepto', 'TipoBonif', 'NombrePrecio.Nombre', 'FechaLista', 'CantidadBonif', 'PjeDtoBonif', 'PrecioNeto', 'TotalNeto', 'PjeIva', 'PjeDtoGral', 'PrecioFinal', 'TotalFinal'];
    this.alert.showLoadingAlert('Exportando Servicios a Facturar', 'Generando archivo ' + extension + ', este proceso puede tardar unos minutos');
    //SP llamada al recurso correspondiente de la api
    this.srvContratadoService.getServFact(datos).subscribe(data => {
      // MC SINWEB-378 Exportación a Pdf
      let result = data.Data.map(item => ({
        ...item,
        CodCliente: `(${item.Cliente.Codigo}) ${item.Cliente.Nombre}`,
        CodClienteFact: `(${item.ClienteFact.Codigo}) ${item.ClienteFact.Nombre}`,
        CodArticulo: `(${item.Articulo.Codigo}) ${item.Articulo.Nombre}`,
        UltimoPeriodoFact: `${item.SrvContratado.UltimoPeriodoMes}/${item.SrvContratado.UltimoPeriodoAnio}`,
        Bonificado: item.SrvBonificacion ? 'S' : 'N'
      }));
      this.alert.closeLoadingAlert();
      this.alert.showBasicAlert('Servicios a Facturar Exportados', 'Generando archivo ' + extension, 'success');
      if (extension === 'Excel') {
        this.exportacion.exportToExcel(result, columns, keys, 'Listado de Servicios a Facturar');
      } else {
        const columnsReduced = ['Número', '(Cod) Cliente', '(Cod) Cliente Fact.', '(Cod) Artículo', 'Último Periodo Fact.', 'Frecuencia Fact.', 'Cant. Fact.', 'Vigente', 'Total Final'];
        const keysReduced = ['SrvContratado.NroSrvContratado', 'CodCliente', 'CodClienteFact', 'CodArticulo', 'UltimoPeriodoFact', 'SrvContratado.FrecuenciaFact', 'Cantidad', 'SrvContratado.Vigente', 'TotalFinal'];
        this.exportacion.exportToPdf(result, columnsReduced, keysReduced, 'Listado de Servicios a Facturar');
      }
    });
  }
  getSelectTodos() {
    return this.configForm.controls.todos.value;
  }
  setSelectTodos() {
    this.configForm.controls.todos.setValue(!this.getSelectTodos());
    this.configForm.get('config').controls.forEach((control, pos) => {
      control.setValue(this.getSelectTodos());
      this.serviciosFactHeader[pos].Disabled = this.getDisabled(pos) == true ? false : true;
    });
    this.sf.changeState(this.sf.states.FACT_MASIVA_F_CONFIG, this.configForm.get('config').value.join(','));
  }
  /**
   * Metodo para mostrar u ocultar columnas
   * @param pos
   */
  setDisabled(pos) {
    this.configForm.get('config').at(pos).setValue(!this.getDisabled(pos));
    this.serviciosFactHeader[pos].Disabled = this.getDisabled(pos) == true ? false : true;
    this.sf.changeState(this.sf.states.FACT_MASIVA_F_CONFIG, this.configForm.get('config').value.join(','));
    this.configForm.controls.todos.setValue(false);
  }
  getDisabled(pos) {
    return this.configForm.get('config').at(pos).value;
  }
  buscarValor(dato, key) {
    return (0,src_app_core_utils_metodos_metodos__WEBPACK_IMPORTED_MODULE_1__.buscarValor)(dato, key);
  }
  buscarValoresAcciones(datos, valores) {
    let resultado = [];
    valores.forEach(valor => resultado.push(this.buscarValor(datos, valor)));
    return resultado;
  }
  buscarSeleccionado(id) {
    return this.srvFactSeleccionados.find(srv => srv.SrvContratado.Id == id) ? 'S' : 'N';
  }
  // selectSvrFact(event, servicio){
  //   if (event.checked == 'S'){
  //       if (!this.srvFactSeleccionados.includes(srv => srv.SrvContratado.Id == servicio.SrvContratado.Id)){
  //         this.srvFactSeleccionados.push(servicio);
  //       }
  //   }else{
  //       this.srvFactSeleccionados = this.srvFactSeleccionados.filter(srv => srv.SrvContratado.Id != servicio.SrvContratado.Id);
  //   }
  //   this.serviciosFactSelect.emit(this.srvFactSeleccionados);
  // }
  selectSrvFact($event) {
    if ($event.selectTodos) {
      //SP SINWEB-347 agrega todos los servicios a facturar siempre que sean seleccionables
      let datos = this.cargarFiltros(-1, this.order, this.sentido);
      this.srvContratadoService.getServFact(datos).pipe((0,rxjs__WEBPACK_IMPORTED_MODULE_21__.map)(resp => {
        return lodash__WEBPACK_IMPORTED_MODULE_4__.filter(lodash__WEBPACK_IMPORTED_MODULE_4__.map(resp.Data, value => {
          if (value.SrvContratado) {
            return lodash__WEBPACK_IMPORTED_MODULE_4__.extend(value, {
              Bonificado: value.SrvBonificacion ? 'S' : 'N',
              Id: value.SrvContratado.Id
            });
          } else {
            return lodash__WEBPACK_IMPORTED_MODULE_4__.extend(value, {
              Bonificado: value.SrvBonificacion ? 'S' : 'N'
            });
          }
        }), srv => srv.PeriodoValido == 'S');
      })).subscribe(res => {
        this.srvFactSeleccionados = res;
        this.serviciosFactSelect.emit(this.srvFactSeleccionados);
      });
    } else {
      this.srvFactSeleccionados = $event.rows.filter(servicio => servicio.PeriodoValido == 'S');
    }
    this.serviciosFactSelect.emit(this.srvFactSeleccionados);
  }
  // pushArticuloPage(agregar : boolean){
  //   this.serviciosFact.forEach(srv => {
  //     const pos = this.srvFactSeleccionados.findIndex(servicio => servicio.SrvContratado.Id == srv.SrvContratado.Id)
  //     if (agregar){
  //       if (pos == -1){
  //         this.srvFactSeleccionados.push(srv);
  //       }
  //     }else{
  //       if (pos != -1){
  //         this.srvFactSeleccionados.splice(pos,1);
  //       }
  //     }
  //   })
  //   this.serviciosFactSelect.emit(this.srvFactSeleccionados);
  // }
  // /**
  //  * SP Metodo que agrega todos los art existentes a los seleccionados
  //  */
  // pushTodos(){
  //   let datos : any = this.cargarFiltros(-1,this.order,this.sentido);
  //   delete datos.PageSize;
  //   this.srvContratadoService.getServFact(datos).subscribe(data => {
  //     this.srvFactSeleccionados = data.Data;
  //     this.serviciosFactSelect.emit(this.srvFactSeleccionados);
  //   })
  // }
  // /**
  //  * SP Metodo que limpia todos los seleccionados
  //  */
  // removeTodos(){
  //   this.srvFactSeleccionados = [];
  //   this.serviciosFactSelect.emit(this.srvFactSeleccionados);
  // }
  // /**
  //  * SP Metodo para controlar si todos los elementos de la pagina estan seleccionados
  //  * @returns {boolean}
  //  */
  // isPageSelect(){
  //   return this.serviciosFact.every(srv => this.srvFactSeleccionados.find(srvSel => srvSel.SrvContratado.Id == srv.SrvContratado.Id) != undefined)
  // }
  getDiccionario(diccionario, valor) {
    let elementoEncontrado = diccionario.find(elemDicc => elemDicc.Id == valor);
    return elementoEncontrado;
  }
  getColorRegistro(articulo) {
    if (articulo.Suspendido == 'N' && articulo.Discontinuo == 'S') {
      return ' bg-warning-subtle';
    }
    if (articulo.Suspendido == 'N' && articulo.BajaLogica == 'S') {
      return ' bg-danger-subtle';
    }
    if (articulo.Suspendido != 'N') {
      return ' bg-primary-subtle';
    }
    return '';
  }
  //SP SINWEB-311 metodo para obtener el mes maximo del input
  maxMonth() {
    return (0,src_app_core_utils_metodos_metodos__WEBPACK_IMPORTED_MODULE_1__.agregarMesAFechaYYYYMM)((0,src_app_core_utils_metodos_metodos__WEBPACK_IMPORTED_MODULE_1__.YYYYMMActual)());
  }
  colorVencimiento(dato) {
    if (dato.SrvContratado.UltimoPeriodoMes == null || dato.SrvContratado.UltimoPeriodoAnio == null) {
      return 'bg-info-subtle';
    }
    let periodoActual = (0,src_app_core_utils_metodos_metodos__WEBPACK_IMPORTED_MODULE_1__.MMYYYYYActual)();
    let mesesDif = (0,src_app_core_utils_metodos_metodos__WEBPACK_IMPORTED_MODULE_1__.calcularDiferenciaMeses)(periodoActual, dato.SrvContratado.UltimoPeriodoMes + '-' + dato.SrvContratado.UltimoPeriodoAnio);
    if (mesesDif == 0 || mesesDif == 1) {
      return '';
    }
    if (1 < mesesDif && mesesDif <= 3) {
      return 'bg-warning-subtle';
    } else {
      return 'bg-danger-subtle';
    }
  }
  eval(formula, dataFormula, item) {
    const keys = Object.keys(dataFormula);
    const values = keys.map(key => {
      return this.buscarValor(item, dataFormula[key]);
    });
    //SP control si todos los valores encontrados son null no es necesario armar la formula
    if (values.every(value => value === null)) {
      return '';
    }
    let newData = {};
    keys.forEach((key, index) => {
      Object.assign(newData, {
        [key]: values[index]
      });
    });
    let replacedFormula = this.replaceMultiple(formula, newData);
    return replacedFormula;
  }
  replaceMultiple(text, valuesDict) {
    const valuesList = Object.keys(valuesDict).sort((a, b) => b.length - a.length);
    let result = text;
    for (const value of valuesList) {
      const replacement = valuesDict[value] || valuesDict[value] == '0' ? valuesDict[value] : '';
      result = result.replace(new RegExp(value, 'g'), replacement);
    }
    return result;
  }
  validCheckbox(value, validator) {
    return lodash__WEBPACK_IMPORTED_MODULE_4__.get(value, 'PeriodoValido', false) == 'S';
  }
  cargarAuditoria() {
    const modal = this.modalService.open(_srv_auditoria_srv_auditoria_component__WEBPACK_IMPORTED_MODULE_5__.SrvAuditoriaComponent, {
      size: 'xl',
      backdrop: 'static',
      keyboard: false,
      scrollable: true
    });
    modal.componentInstance.Periodo = this.filterPeriodo;
  }
  /**
   * SP SINWEB-599 metodo para obtener el periodo de facturacion
   * @returns
   */
  getPeriodoFact() {
    return this.filterForm.controls.Periodo.value;
  }
  /**
   * SP SINWEB-599 metodo para setear el periodo de facturacion
   * @param $event
   */
  setPeriodoFact($event) {
    this.filterForm.controls.Periodo.setValue($event);
  }
  static #_ = this.ɵfac = function ListadoFactMasivaComponent_Factory(t) {
    return new (t || ListadoFactMasivaComponent)(_angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵdirectiveInject"](_angular_forms__WEBPACK_IMPORTED_MODULE_18__.FormBuilder), _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵdirectiveInject"](ngx_toastr__WEBPACK_IMPORTED_MODULE_23__.ToastrService), _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵdirectiveInject"](src_app_core_services_servicios_srvContratado_service__WEBPACK_IMPORTED_MODULE_7__.SrvContratadoService), _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵdirectiveInject"](src_app_core_services_core_pto_venta_service__WEBPACK_IMPORTED_MODULE_8__.PtoVentaService), _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵdirectiveInject"](src_app_core_services_exportacion_service__WEBPACK_IMPORTED_MODULE_9__.ExportacionService), _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵdirectiveInject"](src_app_core_services_stateful_service__WEBPACK_IMPORTED_MODULE_10__.StatefulService), _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵdirectiveInject"](src_app_core_services_alertCustom_service__WEBPACK_IMPORTED_MODULE_2__.AlertCustomService), _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵdirectiveInject"](src_app_core_services_auth_service__WEBPACK_IMPORTED_MODULE_11__.AuthService), _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵdirectiveInject"](ngx_ui_tour_ng_bootstrap__WEBPACK_IMPORTED_MODULE_24__.TourService), _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵdirectiveInject"](_ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_25__.NgbModal));
  };
  static #_2 = this.ɵcmp = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵdefineComponent"]({
    type: ListadoFactMasivaComponent,
    selectors: [["app-listado-fact-masiva"]],
    outputs: {
      serviciosFactSelect: "serviciosFactSelect"
    },
    features: [_angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵProvidersFeature"]([src_app_core_services_alertCustom_service__WEBPACK_IMPORTED_MODULE_2__.AlertCustomService])],
    decls: 69,
    vars: 35,
    consts: [[1, "row"], [1, "col-lg-12"], [1, "card"], [1, "card-body", "border-bottom"], [1, "d-flex", "flex-column", "flex-sm-row", "gap-2", "align-items-center"], [1, "mb-0", "flex-grow-1", "d-flex", "flex-row"], ["tourAnchor", "factMasivaList.anchor.id", 1, "mb-1", "align-self-center"], [1, "flex-shrink-0", "d-flex", "gap-1"], [1, "btn", "btn-warning", 3, "click"], ["tourAnchor", "refresh.anchor.id", 1, "btn", "btn-light", 3, "click"], [3, "ngClass"], ["data-cy", "limpiar-filtros", "tourAnchor", "filtroReset.anchor.id", 3, "ngClass", "click"], ["ngbDropdown", "", 1, "dropdown", "d-inline-block"], ["tourAnchor", "export.anchor.id", "type", "menu", "id", "dropdownMenuButton1", "data-bs-toggle", "dropdown", "aria-expanded", "false", "ngbDropdownToggle", "", 1, "btn", "btn-success"], [1, "mdi", "mdi-dots-vertical"], ["aria-labelledby", "dropdownMenuButton1", "ngbDropdownMenu", "", 1, "dropdown-menu"], ["href", "javascript:void(0);", 1, "dropdown-item", 3, "click"], ["tourAnchor", "filtroFactMasiva.anchor.id", 1, "card-body", "border-bottom", 3, "formGroup"], [1, "col-lg-3"], [1, "text-muted"], ["maxDate", "12/3000", 3, "valor", "valorEmit"], ["formControlName", "FactActiva", 1, "form-select"], [3, "value", 4, "ngFor", "ngForOf"], ["class", "col-lg-3", 4, "ngIf"], ["defaultString", "Seleccionar Punto de Venta", 3, "defaultValue", "items", "valueSelected", "loading", "valueSelect"], [1, "card-body"], [1, "d-flex", "flex-md-row", "flex-column", "gap-3"], [1, "box", "bg-warning-subtle", "shadow-sm", "text-muted"], [1, "box", "bg-danger-subtle", "shadow-sm"], [1, "box", "bg-info-subtle", "shadow-sm", "text-muted"], [1, "card-body", "border-bottom", 3, "formGroup"], ["formControlName", "PeriodoValido", 1, "form-select"], ["value", ""], ["styleTableClass", "p-datatable-gridlines", "stateConfig", "FACT_MASIVA_F_CONFIG", 3, "columns", "datos", "page", "order", "sentido", "cant_search", "totalItems", "apiTable", "isLoading", "claseRow", "claseRowFunc", "configColumns", "state", "selectRows", "selectedRows", "validateCheckFunc", "lazyLoad", "selectRowsAction"], ["CONFIG", ""], [3, "value"], ["formControlName", "DebAuto", 1, "form-select"], [3, "formGroup"], ["title", "Selecci\u00F3nar todo", "colorChecked", "success", "colorUncheked", "primary", 3, "value", "emitAction"], [4, "ngFor", "ngForOf"], ["colorChecked", "success", "colorUncheked", "primary", 3, "title", "value", "emitAction"]],
    template: function ListadoFactMasivaComponent_Template(rf, ctx) {
      if (rf & 1) {
        _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵelementStart"](0, "div", 0)(1, "div", 1)(2, "div", 2)(3, "div", 3)(4, "div", 4)(5, "span", 5)(6, "h5", 6);
        _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵtext"](7, " Servicios a facturar ");
        _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵelementEnd"]()();
        _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵelementStart"](8, "div", 7)(9, "button", 8);
        _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵlistener"]("click", function ListadoFactMasivaComponent_Template_button_click_9_listener() {
          return ctx.cargarAuditoria();
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵtext"](10, " Auditor\u00EDa ");
        _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵelementStart"](11, "a", 9);
        _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵlistener"]("click", function ListadoFactMasivaComponent_Template_a_click_11_listener() {
          return ctx.loadPage();
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵelement"](12, "i", 10);
        _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵpipe"](13, "async");
        _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵelementStart"](14, "a", 11);
        _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵlistener"]("click", function ListadoFactMasivaComponent_Template_a_click_14_listener() {
          return ctx.cleanStates();
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵelement"](15, "i", 10);
        _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵelementStart"](16, "div", 12)(17, "button", 13);
        _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵelement"](18, "i", 14);
        _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵelementStart"](19, "ul", 15)(20, "li")(21, "a", 16);
        _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵlistener"]("click", function ListadoFactMasivaComponent_Template_a_click_21_listener() {
          return ctx.exportTo("Excel");
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵtext"](22, "Exportar Excel");
        _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵelementEnd"]()();
        _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵelementStart"](23, "li")(24, "a", 16);
        _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵlistener"]("click", function ListadoFactMasivaComponent_Template_a_click_24_listener() {
          return ctx.exportTo("Pdf");
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵtext"](25, "Exportar Pdf");
        _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵelementEnd"]()()()()()()();
        _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵelementStart"](26, "div", 17)(27, "div", 0)(28, "div", 18)(29, "p", 19);
        _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵtext"](30, "Periodo");
        _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵelementStart"](31, "app-input-periodo", 20);
        _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵlistener"]("valorEmit", function ListadoFactMasivaComponent_Template_app_input_periodo_valorEmit_31_listener($event) {
          return ctx.setPeriodoFact($event);
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵelementEnd"]()();
        _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵelementStart"](32, "div", 18)(33, "p", 19);
        _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵtext"](34, "Fact. Activa");
        _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵelementStart"](35, "select", 21);
        _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵtemplate"](36, ListadoFactMasivaComponent_option_36_Template, 2, 2, "option", 22);
        _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵelementEnd"]()();
        _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵtemplate"](37, ListadoFactMasivaComponent_div_37_Template, 5, 1, "div", 23);
        _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵelementStart"](38, "div", 18)(39, "p", 19);
        _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵtext"](40, "Punto de Venta");
        _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵelementStart"](41, "select-loading", 24);
        _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵlistener"]("valueSelect", function ListadoFactMasivaComponent_Template_select_loading_valueSelect_41_listener($event) {
          return ctx.filterForm.controls.IdPtoVenta.setValue($event);
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵpipe"](42, "async");
        _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵelementEnd"]()()()();
        _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵelementStart"](43, "div", 25)(44, "div", 26)(45, "div");
        _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵelement"](46, "span", 27);
        _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵtext"](47, " No facturado hace m\u00E1s de 1 mes ");
        _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵelementStart"](48, "div");
        _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵelement"](49, "span", 28);
        _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵtext"](50, " No facturado hace m\u00E1s de 3 meses ");
        _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵelementStart"](51, "div");
        _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵelement"](52, "span", 29);
        _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵtext"](53, " Factura por primera vez ");
        _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵelementEnd"]()()();
        _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵelementStart"](54, "div", 30)(55, "div", 0)(56, "div", 18)(57, "p", 19);
        _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵtext"](58, "Ver Servicios con Periodo V\u00E1lido");
        _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵelementStart"](59, "select", 31)(60, "option", 32);
        _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵtext"](61, "Todos");
        _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵtemplate"](62, ListadoFactMasivaComponent_option_62_Template, 2, 2, "option", 22);
        _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵelementEnd"]()()()();
        _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵelementStart"](63, "div", 25)(64, "app-table2", 33);
        _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵlistener"]("lazyLoad", function ListadoFactMasivaComponent_Template_app_table2_lazyLoad_64_listener($event) {
          return ctx.lazyLoadChange($event);
        })("selectRowsAction", function ListadoFactMasivaComponent_Template_app_table2_selectRowsAction_64_listener($event) {
          return ctx.selectSrvFact($event);
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵpipe"](65, "async");
        _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵelementEnd"]()()()()();
        _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵtemplate"](66, ListadoFactMasivaComponent_ng_template_66_Template, 4, 3, "ng-template", null, 34, _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵtemplateRefExtractor"]);
        _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵelement"](68, "app-tour");
      }
      if (rf & 2) {
        _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵadvance"](12);
        _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵproperty"]("ngClass", _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵpipeBind1"](13, 29, ctx.srvContratadoService.isLoading$) ? "bx bx-sync bx-spin font-size-16 align-middle" : "bx bx-sync font-size-16 align-middle");
        _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵadvance"](2);
        _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵproperty"]("ngClass", ctx.sf.getCantCustomStates() > 0 ? "btn btn-danger" : "btn bg-danger bg-soft");
        _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵadvance"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵproperty"]("ngClass", "mdi mdi-filter-remove-outline mdi-16px align-middle");
        _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵadvance"](11);
        _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵproperty"]("formGroup", ctx.filterForm);
        _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵadvance"](5);
        _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵproperty"]("valor", ctx.getPeriodoFact());
        _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵadvance"](5);
        _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵproperty"]("ngForOf", ctx.todosOptions);
        _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵadvance"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵproperty"]("ngIf", ctx.filterForm.controls.FactActiva.value != "N");
        _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵadvance"](4);
        _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵproperty"]("defaultValue", -1)("items", ctx.ptosVenta)("valueSelected", ctx.filterForm.controls.IdPtoVenta.value)("loading", _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵpipeBind1"](42, 31, ctx.ptoVentaService.isLoading$));
        _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵadvance"](13);
        _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵproperty"]("formGroup", ctx.filterForm);
        _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵadvance"](8);
        _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵproperty"]("ngForOf", ctx.todosOptions);
        _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵadvance"](2);
        _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵproperty"]("columns", ctx.serviciosFactHeader)("datos", ctx.serviciosFact)("page", ctx.page)("order", ctx.order)("sentido", ctx.sentido)("cant_search", ctx.cantSearch)("totalItems", ctx.totalItems)("apiTable", true)("isLoading", _angular_core__WEBPACK_IMPORTED_MODULE_17__["ɵɵpipeBind1"](65, 33, ctx.srvContratadoService.isLoading$))("claseRow", true)("claseRowFunc", ctx.colorVencimiento)("configColumns", true)("state", ctx.stateInicioConfig)("selectRows", true)("selectedRows", ctx.srvFactSeleccionados)("validateCheckFunc", ctx.validCheckbox);
      }
    },
    dependencies: [_angular_common__WEBPACK_IMPORTED_MODULE_19__.NgClass, _angular_common__WEBPACK_IMPORTED_MODULE_19__.NgForOf, _angular_common__WEBPACK_IMPORTED_MODULE_19__.NgIf, _angular_forms__WEBPACK_IMPORTED_MODULE_18__.NgSelectOption, _angular_forms__WEBPACK_IMPORTED_MODULE_18__["ɵNgSelectMultipleOption"], _angular_forms__WEBPACK_IMPORTED_MODULE_18__.SelectControlValueAccessor, _angular_forms__WEBPACK_IMPORTED_MODULE_18__.NgControlStatus, _angular_forms__WEBPACK_IMPORTED_MODULE_18__.NgControlStatusGroup, _ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_25__.NgbDropdown, _ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_25__.NgbDropdownToggle, _ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_25__.NgbDropdownMenu, _angular_forms__WEBPACK_IMPORTED_MODULE_18__.FormGroupDirective, _angular_forms__WEBPACK_IMPORTED_MODULE_18__.FormControlName, ngx_ui_tour_ng_bootstrap__WEBPACK_IMPORTED_MODULE_24__.TourAnchorNgBootstrapDirective, _shared_widget_tour_tour_component__WEBPACK_IMPORTED_MODULE_12__.TourComponent, _shared_ui_checkbox_checkbox_component__WEBPACK_IMPORTED_MODULE_13__.CheckboxComponent, _shared_ui_select_loading_select_loading_component__WEBPACK_IMPORTED_MODULE_14__.SelectLoadingComponent, _shared_ui_table2_table2_component__WEBPACK_IMPORTED_MODULE_15__.Table2Component, _shared_ui_input_periodo_input_periodo_component__WEBPACK_IMPORTED_MODULE_16__.InputPeriodoComponent, _angular_common__WEBPACK_IMPORTED_MODULE_19__.AsyncPipe],
    styles: [".no-button[_ngcontent-%COMP%] {\n  cursor: default !important;\n}\n\n.box[_ngcontent-%COMP%] {\n  padding: 2.5px 12px 2.5px 12px;\n  box-shadow: #d4daf9;\n  border-radius: 5px;\n  margin-right: 8px;\n}\n\n[data-layout-mode=dark][_ngcontent-%COMP%]   .bg-danger-subtle[_ngcontent-%COMP%] {\n  background-color: rgb(252, 217, 217) !important;\n}\n[data-layout-mode=dark][_ngcontent-%COMP%]   .bg-warning-subtle[_ngcontent-%COMP%] {\n  background-color: rgba(252, 236, 210, 0.4) !important;\n}\n[data-layout-mode=dark][_ngcontent-%COMP%]   .bg-primary-subtle[_ngcontent-%COMP%] {\n  background-color: rgb(212, 218, 249) !important;\n}\n\n[data-layout-mode=light][_ngcontent-%COMP%]   .bg-danger-subtle[_ngcontent-%COMP%] {\n  background-color: #fcd9d9 !important;\n}\n[data-layout-mode=light][_ngcontent-%COMP%]   .bg-warning-subtle[_ngcontent-%COMP%] {\n  background-color: #fcecd2 !important;\n}\n[data-layout-mode=light][_ngcontent-%COMP%]   .bg-primary-subtle[_ngcontent-%COMP%] {\n  background-color: #d4daf9 !important;\n}"]
  });
}

/***/ }),

/***/ 92548:
/*!********************************************************************************!*\
  !*** ./src/app/pages/servicios/inicio-servicios/inicio-servicios.component.ts ***!
  \********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   InicioServiciosComponent: () => (/* binding */ InicioServiciosComponent)
/* harmony export */ });
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @angular/common */ 96814);
/* harmony import */ var _angular_common_locales_es_AR__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @angular/common/locales/es-AR */ 57414);
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! rxjs */ 9315);
/* harmony import */ var _dashboards_core_seleccionar_cliente_seleccionar_cliente_component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../dashboards/core/seleccionar-cliente/seleccionar-cliente.component */ 45198);
/* harmony import */ var _dashboards_core_seleccionar_articulo_seleccionar_articulo_component__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../dashboards/core/seleccionar-articulo/seleccionar-articulo.component */ 62656);
/* harmony import */ var src_app_layouts_layouts_model__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! src/app/layouts/layouts.model */ 45660);
/* harmony import */ var _formkit_tempo__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @formkit/tempo */ 58444);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/core */ 65879);
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @angular/forms */ 56223);
/* harmony import */ var src_app_core_services_servicios_srvContratado_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! src/app/core/services/servicios/srvContratado.service */ 2158);
/* harmony import */ var _ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @ng-bootstrap/ng-bootstrap */ 85406);
/* harmony import */ var src_app_core_services_configGeneral_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! src/app/core/services/configGeneral.service */ 99757);
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @angular/router */ 75187);
/* harmony import */ var simplebar_angular__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! simplebar-angular */ 63744);
/* harmony import */ var ngx_ui_tour_ng_bootstrap__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ngx-ui-tour-ng-bootstrap */ 58469);
/* harmony import */ var _shared_ui_input_date_time_input_date_time_component__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../shared/ui/input-date-time/input-date-time.component */ 75871);

















function InicioServiciosComponent_div_26_ng_container_11_Template(rf, ctx) {
  if (rf & 1) {
    const _r16 = _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵgetCurrentView"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementContainerStart"](0);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementStart"](1, "button", 93);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵlistener"]("click", function InicioServiciosComponent_div_26_ng_container_11_Template_button_click_1_listener() {
      _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵrestoreView"](_r16);
      const ctx_r15 = _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵnextContext"](2);
      return _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵresetView"](ctx_r15.setPeriodo("anual"));
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵtext"](2, " Anual ");
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementStart"](3, "button", 93);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵlistener"]("click", function InicioServiciosComponent_div_26_ng_container_11_Template_button_click_3_listener() {
      _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵrestoreView"](_r16);
      const ctx_r17 = _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵnextContext"](2);
      return _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵresetView"](ctx_r17.setPeriodo("mensual"));
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵtext"](4, " Mensual ");
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementStart"](5, "button", 93);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵlistener"]("click", function InicioServiciosComponent_div_26_ng_container_11_Template_button_click_5_listener() {
      _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵrestoreView"](_r16);
      const ctx_r18 = _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵnextContext"](2);
      return _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵresetView"](ctx_r18.setPeriodo("diario"));
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵtext"](6, " Diario ");
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementContainerEnd"]();
  }
}
function InicioServiciosComponent_div_26_ng_container_12_Template(rf, ctx) {
  if (rf & 1) {
    const _r20 = _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵgetCurrentView"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementContainerStart"](0);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementStart"](1, "button", 93);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵlistener"]("click", function InicioServiciosComponent_div_26_ng_container_12_Template_button_click_1_listener() {
      _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵrestoreView"](_r20);
      const ctx_r19 = _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵnextContext"](2);
      return _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵresetView"](ctx_r19.setMes(12));
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵtext"](2, " 12 meses ");
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementStart"](3, "button", 93);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵlistener"]("click", function InicioServiciosComponent_div_26_ng_container_12_Template_button_click_3_listener() {
      _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵrestoreView"](_r20);
      const ctx_r21 = _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵnextContext"](2);
      return _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵresetView"](ctx_r21.setMes(6));
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵtext"](4, " 6 meses ");
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementStart"](5, "button", 93);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵlistener"]("click", function InicioServiciosComponent_div_26_ng_container_12_Template_button_click_5_listener() {
      _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵrestoreView"](_r20);
      const ctx_r22 = _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵnextContext"](2);
      return _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵresetView"](ctx_r22.setMes(3));
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵtext"](6, " 3 meses ");
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementContainerEnd"]();
  }
}
function InicioServiciosComponent_div_26_a_28_Template(rf, ctx) {
  if (rf & 1) {
    const _r24 = _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵgetCurrentView"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementStart"](0, "a", 94);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵlistener"]("click", function InicioServiciosComponent_div_26_a_28_Template_a_click_0_listener() {
      _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵrestoreView"](_r24);
      const ctx_r23 = _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵnextContext"](2);
      return _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵresetView"](ctx_r23.borrarArticulo());
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelement"](1, "i", 95);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementEnd"]();
  }
}
function InicioServiciosComponent_div_26_a_35_Template(rf, ctx) {
  if (rf & 1) {
    const _r26 = _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵgetCurrentView"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementStart"](0, "a", 94);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵlistener"]("click", function InicioServiciosComponent_div_26_a_35_Template_a_click_0_listener() {
      _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵrestoreView"](_r26);
      const ctx_r25 = _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵnextContext"](2);
      return _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵresetView"](ctx_r25.borrarCliente());
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelement"](1, "i", 95);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementEnd"]();
  }
}
function InicioServiciosComponent_div_26_Conditional_139_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵtext"](0, " Servicios m\u00E1s contratados ");
  }
}
function InicioServiciosComponent_div_26_Conditional_140_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵtext"](0, " Clientes con m\u00E1s servicios ");
  }
}
function InicioServiciosComponent_div_26_option_143_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementStart"](0, "option", 96);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵtext"](1);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementEnd"]();
  }
  if (rf & 2) {
    const r_r27 = ctx.$implicit;
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵproperty"]("value", r_r27.id);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵtextInterpolate1"](" ", r_r27.nombre, " ");
  }
}
function InicioServiciosComponent_div_26_ng_template_149_ng_template_0_Template(rf, ctx) {}
function InicioServiciosComponent_div_26_ng_template_149_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵtemplate"](0, InicioServiciosComponent_div_26_ng_template_149_ng_template_0_Template, 0, 0, "ng-template", 97);
  }
  if (rf & 2) {
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵnextContext"](2);
    const _r2 = _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵreference"](28);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵproperty"]("ngTemplateOutlet", _r2);
  }
}
function InicioServiciosComponent_div_26_ng_template_153_ng_template_0_Template(rf, ctx) {}
function InicioServiciosComponent_div_26_ng_template_153_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵtemplate"](0, InicioServiciosComponent_div_26_ng_template_153_ng_template_0_Template, 0, 0, "ng-template", 97);
  }
  if (rf & 2) {
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵnextContext"](2);
    const _r4 = _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵreference"](30);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵproperty"]("ngTemplateOutlet", _r4);
  }
}
const _c0 = a0 => ({
  "shadow-lg": a0
});
function InicioServiciosComponent_div_26_Template(rf, ctx) {
  if (rf & 1) {
    const _r31 = _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵgetCurrentView"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementStart"](0, "div", 22)(1, "div", 23)(2, "div", 2)(3, "div", 3)(4, "div", 24)(5, "div", 25)(6, "h5", 26);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵtext"](7, "Filtros globales");
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementStart"](8, "span", 27);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵtext"](9);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementEnd"]()();
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementStart"](10, "div", 28);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵtemplate"](11, InicioServiciosComponent_div_26_ng_container_11_Template, 7, 0, "ng-container", 29)(12, InicioServiciosComponent_div_26_ng_container_12_Template, 7, 0, "ng-container", 29);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementStart"](13, "button", 30);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵlistener"]("click", function InicioServiciosComponent_div_26_Template_button_click_13_listener() {
      _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵrestoreView"](_r31);
      const ctx_r30 = _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵnextContext"]();
      return _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵresetView"](ctx_r30.changeFiltrosIniciales());
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementEnd"]()();
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementStart"](14, "div", 31)(15, "app-input-date-time", 32);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵlistener"]("valorEmit", function InicioServiciosComponent_div_26_Template_app_input_date_time_valorEmit_15_listener($event) {
      _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵrestoreView"](_r31);
      const ctx_r32 = _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵnextContext"]();
      return _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵresetView"](ctx_r32.setFechaDesde($event));
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementStart"](16, "app-input-date-time", 32);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵlistener"]("valorEmit", function InicioServiciosComponent_div_26_Template_app_input_date_time_valorEmit_16_listener($event) {
      _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵrestoreView"](_r31);
      const ctx_r33 = _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵnextContext"]();
      return _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵresetView"](ctx_r33.setFechaHasta($event));
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementStart"](17, "button", 33);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵlistener"]("click", function InicioServiciosComponent_div_26_Template_button_click_17_listener() {
      _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵrestoreView"](_r31);
      const ctx_r34 = _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵnextContext"]();
      return _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵresetView"](ctx_r34.loadIndicadores());
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelement"](18, "i", 34);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementStart"](19, "button", 35);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵlistener"]("click", function InicioServiciosComponent_div_26_Template_button_click_19_listener() {
      _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵrestoreView"](_r31);
      const ctx_r35 = _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵnextContext"]();
      return _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵresetView"](ctx_r35.cleanFechas());
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelement"](20, "i", 36);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementEnd"]()()()()()();
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementStart"](21, "div", 37)(22, "div", 2)(23, "div", 3)(24, "div", 38)(25, "div", 39)(26, "div", 40);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelement"](27, "input", 41);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵtemplate"](28, InicioServiciosComponent_div_26_a_28_Template, 2, 0, "a", 42);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementStart"](29, "a", 33);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵlistener"]("click", function InicioServiciosComponent_div_26_Template_a_click_29_listener() {
      _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵrestoreView"](_r31);
      const ctx_r36 = _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵnextContext"]();
      return _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵresetView"](ctx_r36.buscarArticulo());
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelement"](30, "i", 43);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementEnd"]()()();
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementStart"](31, "div", 39)(32, "div", 44);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelement"](33, "input", 45);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementContainerStart"](34);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵtemplate"](35, InicioServiciosComponent_div_26_a_35_Template, 2, 0, "a", 42);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementStart"](36, "a", 33);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵlistener"]("click", function InicioServiciosComponent_div_26_Template_a_click_36_listener() {
      _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵrestoreView"](_r31);
      const ctx_r37 = _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵnextContext"]();
      return _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵresetView"](ctx_r37.buscarCliente());
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelement"](37, "i", 43);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementContainerEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementEnd"]()()()()()();
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementStart"](38, "div", 46)(39, "div", 0)(40, "div", 23)(41, "div", 47)(42, "div", 3)(43, "h4", 48);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵtext"](44, "Servicios");
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementEnd"]()()();
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementStart"](45, "div", 49)(46, "div", 50)(47, "div", 51)(48, "div", 3)(49, "h5", 52);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵtext"](50, "Estados");
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementStart"](51, "div", 53)(52, "div", 54);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelement"](53, "i", 55);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementStart"](54, "h3");
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵtext"](55);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementStart"](56, "p");
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵtext"](57, "Total de servicios");
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementEnd"]()();
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementStart"](58, "div", 56)(59, "table", 57)(60, "tbody")(61, "tr")(62, "td", 58)(63, "p", 59);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵtext"](64, "Vigentes");
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementEnd"]()();
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementStart"](65, "td", 60)(66, "h5", 59);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵtext"](67);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementEnd"]()();
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementStart"](68, "td")(69, "div", 61);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelement"](70, "div", 62);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementEnd"]()()();
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementStart"](71, "tr")(72, "td", 58)(73, "p", 59);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵtext"](74, "No vigentes");
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementEnd"]()();
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementStart"](75, "td", 60)(76, "h5", 59);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵtext"](77);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementEnd"]()();
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementStart"](78, "td")(79, "div", 61);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelement"](80, "div", 63);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementEnd"]()()();
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementStart"](81, "tr");
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelement"](82, "td")(83, "td")(84, "td");
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementStart"](85, "tr")(86, "td", 58)(87, "p", 59);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵtext"](88, "Facturaci\u00F3n activa");
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementEnd"]()();
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementStart"](89, "td", 60)(90, "h5", 59);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵtext"](91);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementEnd"]()();
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementStart"](92, "td")(93, "div", 61);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelement"](94, "div", 64);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementEnd"]()()();
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementStart"](95, "tr")(96, "td", 58)(97, "p", 59);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵtext"](98, "Facturaci\u00F3n inactiva");
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementEnd"]()();
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementStart"](99, "td", 60)(100, "h5", 59);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵtext"](101);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementEnd"]()();
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementStart"](102, "td")(103, "div", 61);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelement"](104, "div", 65);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementEnd"]()()();
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementStart"](105, "tr");
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelement"](106, "td")(107, "td")(108, "td");
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementStart"](109, "tr")(110, "td", 66)(111, "p", 67)(112, "a", 68);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵtext"](113, "D\u00E9bito Autom\u00E1tico");
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementEnd"]()()();
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelement"](114, "td");
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementStart"](115, "td", 69)(116, "div")(117, "ul", 70)(118, "li", 71)(119, "span", 72);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵtext"](120);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementEnd"]()()()()()();
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementStart"](121, "tr")(122, "td", 66)(123, "p", 67)(124, "a", 68);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵtext"](125, "Prom. servicios por cliente");
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementEnd"]()()();
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelement"](126, "td");
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementStart"](127, "td", 69)(128, "div")(129, "ul", 70)(130, "li", 71)(131, "span", 72);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵtext"](132);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵpipe"](133, "number");
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementEnd"]()()()()()()()()()()()();
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementStart"](134, "div", 50)(135, "div", 73)(136, "div", 3)(137, "div", 74)(138, "h5", 75);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵtemplate"](139, InicioServiciosComponent_div_26_Conditional_139_Template, 1, 0)(140, InicioServiciosComponent_div_26_Conditional_140_Template, 1, 0);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementStart"](141, "div", 76)(142, "select", 77);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵlistener"]("change", function InicioServiciosComponent_div_26_Template_select_change_142_listener() {
      _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵrestoreView"](_r31);
      const ctx_r38 = _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵnextContext"]();
      return _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵresetView"](ctx_r38.cargarRankings());
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵtemplate"](143, InicioServiciosComponent_div_26_option_143_Template, 2, 2, "option", 78);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementEnd"]()()();
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementStart"](144, "ul", 79, 80);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵlistener"]("navChange", function InicioServiciosComponent_div_26_Template_ul_navChange_144_listener($event) {
      _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵrestoreView"](_r31);
      const ctx_r39 = _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵnextContext"]();
      return _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵresetView"](ctx_r39.changeTab($event));
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementStart"](146, "li", 81)(147, "a", 82);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵtext"](148, "Servicios");
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵtemplate"](149, InicioServiciosComponent_div_26_ng_template_149_Template, 1, 1, "ng-template", 83);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementStart"](150, "li", 81)(151, "a", 82);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵtext"](152, "Clientes");
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵtemplate"](153, InicioServiciosComponent_div_26_ng_template_153_Template, 1, 1, "ng-template", 83);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementEnd"]()();
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelement"](154, "div", 84);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementEnd"]()()()()()()();
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementStart"](155, "div", 85)(156, "div", 47)(157, "div", 3)(158, "h4", 48);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵtext"](159, "\u00CDtems");
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementEnd"]()()();
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementStart"](160, "div", 49)(161, "div", 23)(162, "div", 51)(163, "div", 3)(164, "div", 86)(165, "h5", 87);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵtext"](166, "Estados");
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementStart"](167, "div", 88)(168, "app-input-date-time", 32);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵlistener"]("valorEmit", function InicioServiciosComponent_div_26_Template_app_input_date_time_valorEmit_168_listener($event) {
      _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵrestoreView"](_r31);
      const ctx_r40 = _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵnextContext"]();
      return _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵresetView"](ctx_r40.setFechaRefParaCantItems($event));
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementStart"](169, "button", 33);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵlistener"]("click", function InicioServiciosComponent_div_26_Template_button_click_169_listener() {
      _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵrestoreView"](_r31);
      const ctx_r41 = _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵnextContext"]();
      return _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵresetView"](ctx_r41.cargarKpis());
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelement"](170, "i", 89);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementEnd"]()()();
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementStart"](171, "div", 53)(172, "div", 54);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelement"](173, "i", 55);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementStart"](174, "h3");
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵtext"](175);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementStart"](176, "p");
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵtext"](177, "Total de \u00CDtems");
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementEnd"]()();
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementStart"](178, "div", 56)(179, "table", 57)(180, "tbody")(181, "tr")(182, "td", 58)(183, "p", 59);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵtext"](184, "Activos");
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementEnd"]()();
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementStart"](185, "td", 60)(186, "h5", 59);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵtext"](187);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementEnd"]()();
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementStart"](188, "td")(189, "div", 61);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelement"](190, "div", 90);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementEnd"]()()();
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementStart"](191, "tr")(192, "td", 58)(193, "p", 59);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵtext"](194, "Inactivos");
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementEnd"]()();
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementStart"](195, "td", 60)(196, "h5", 59);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵtext"](197);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementEnd"]()();
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementStart"](198, "td")(199, "div", 61);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelement"](200, "div", 91);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementEnd"]()()();
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementStart"](201, "tr")(202, "td", 66)(203, "p", 67)(204, "a", 68);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵtext"](205, "Movimientos altas");
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementEnd"]()()();
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelement"](206, "td");
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementStart"](207, "td", 69)(208, "div")(209, "ul", 70)(210, "li", 71)(211, "span", 72);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵtext"](212);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementEnd"]()()()()()();
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementStart"](213, "tr")(214, "td", 66)(215, "p", 67)(216, "a", 68);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵtext"](217, "Movimientos bajas");
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementEnd"]()()();
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelement"](218, "td");
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementStart"](219, "td", 69)(220, "div")(221, "ul", 70)(222, "li", 71)(223, "span", 92);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵtext"](224);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementEnd"]()()()()()()()()()()()()()()();
  }
  if (rf & 2) {
    const _r12 = _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵreference"](145);
    const ctx_r0 = _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵnextContext"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵproperty"]("ngClass", _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵpureFunction1"](53, _c0, ctx_r0.useLargeShadow));
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵadvance"](7);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵtextInterpolate2"]("Desde el ", ctx_r0.fechaHoraDesdeFiltrada, " hasta el ", ctx_r0.fechaHoraHastaFiltrada, "");
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵproperty"]("ngIf", ctx_r0.filtrosIniciales);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵproperty"]("ngIf", !ctx_r0.filtrosIniciales);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵproperty"]("formGroup", ctx_r0.searchForm);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵproperty"]("valor", ctx_r0.getFechaDesde());
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵproperty"]("valor", ctx_r0.getFechaHasta());
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵadvance"](6);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵproperty"]("ngClass", _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵpureFunction1"](55, _c0, ctx_r0.useLargeShadow));
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵproperty"]("formGroup", ctx_r0.searchForm);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵadvance"](4);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵproperty"]("ngIf", ctx_r0.getArticulo());
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵadvance"](7);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵproperty"]("ngIf", ctx_r0.getCliente());
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵadvance"](6);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵproperty"]("ngClass", _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵpureFunction1"](57, _c0, ctx_r0.useLargeShadow));
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵadvance"](6);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵproperty"]("ngClass", _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵpureFunction1"](59, _c0, ctx_r0.useLargeShadow));
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵadvance"](8);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵtextInterpolate"](ctx_r0.kpis == null ? null : ctx_r0.kpis.CantidadTotal);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵadvance"](12);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵtextInterpolate"](ctx_r0.kpis == null ? null : ctx_r0.kpis.CantidadVigentes);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵadvance"](3);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵstyleMap"](ctx_r0.calcularProgreso(ctx_r0.kpis == null ? null : ctx_r0.kpis.CantidadVigentes, ctx_r0.kpis == null ? null : ctx_r0.kpis.CantidadTotal, "porcentaje"));
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵadvance"](7);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵtextInterpolate"](ctx_r0.kpis == null ? null : ctx_r0.kpis.CantidadNoVigentes);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵadvance"](3);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵstyleMap"](ctx_r0.calcularProgreso(ctx_r0.kpis == null ? null : ctx_r0.kpis.CantidadNoVigentes, ctx_r0.kpis == null ? null : ctx_r0.kpis.CantidadTotal, "porcentaje"));
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵadvance"](11);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵtextInterpolate1"](" ", ctx_r0.kpis == null ? null : ctx_r0.kpis.CantidadFacturacionActiva, " ");
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵadvance"](3);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵstyleMap"](ctx_r0.calcularProgreso(ctx_r0.kpis == null ? null : ctx_r0.kpis.CantidadFacturacionActiva, ctx_r0.kpis == null ? null : ctx_r0.kpis.CantidadTotal, "porcentaje"));
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵadvance"](7);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵtextInterpolate1"](" ", ctx_r0.kpis == null ? null : ctx_r0.kpis.CantidadFacturacionInactiva, " ");
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵadvance"](3);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵstyleMap"](ctx_r0.calcularProgreso(ctx_r0.kpis == null ? null : ctx_r0.kpis.CantidadFacturacionInactiva, ctx_r0.kpis == null ? null : ctx_r0.kpis.CantidadTotal, "porcentaje"));
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵadvance"](16);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵtextInterpolate1"](" ", ctx_r0.kpis == null ? null : ctx_r0.kpis.CantidadDebitoAutomatico, " ");
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵadvance"](12);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵtextInterpolate1"](" ", _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵpipeBind2"](133, 50, ctx_r0.kpis == null ? null : ctx_r0.kpis.PromedioServiciosPorCliente, "1.0-0"), " ");
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵadvance"](3);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵproperty"]("ngClass", _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵpureFunction1"](61, _c0, ctx_r0.useLargeShadow));
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵadvance"](4);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵconditional"](139, ctx_r0.activeNav == 1 ? 139 : 140);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵproperty"]("formGroup", ctx_r0.searchForm);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵproperty"]("ngForOf", ctx_r0.rankOptions);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵproperty"]("activeId", 1);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵproperty"]("ngbNavItem", 1);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵadvance"](4);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵproperty"]("ngbNavItem", 2);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵadvance"](4);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵproperty"]("ngbNavOutlet", _r12);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵproperty"]("ngClass", _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵpureFunction1"](63, _c0, ctx_r0.useLargeShadow));
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵadvance"](6);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵproperty"]("ngClass", _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵpureFunction1"](65, _c0, ctx_r0.useLargeShadow));
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵadvance"](5);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵproperty"]("formGroup", ctx_r0.searchForm);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵproperty"]("valor", ctx_r0.getFechaRefParaCantItems());
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵadvance"](7);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵtextInterpolate"](ctx_r0.kpis == null ? null : ctx_r0.kpis.CantidadItems);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵadvance"](12);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵtextInterpolate"](ctx_r0.kpis == null ? null : ctx_r0.kpis.CantidadItemsActivos);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵadvance"](3);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵstyleMap"](ctx_r0.calcularProgreso(ctx_r0.kpis == null ? null : ctx_r0.kpis.CantidadItemsActivos, ctx_r0.kpis == null ? null : ctx_r0.kpis.CantidadItems, "porcentaje"));
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵadvance"](7);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵtextInterpolate"](ctx_r0.kpis == null ? null : ctx_r0.kpis.CantidadItemsInactivos);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵadvance"](3);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵstyleMap"](ctx_r0.calcularProgreso(ctx_r0.kpis == null ? null : ctx_r0.kpis.CantidadItemsInactivos, ctx_r0.kpis == null ? null : ctx_r0.kpis.CantidadItems, "porcentaje"));
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵadvance"](12);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵtextInterpolate1"](" ", ctx_r0.kpis == null ? null : ctx_r0.kpis.CantidadMovimientosAltas, " ");
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵadvance"](12);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵtextInterpolate1"](" ", ctx_r0.kpis == null ? null : ctx_r0.kpis.CantidadMovimientosBajas, " ");
  }
}
function InicioServiciosComponent_ng_template_27_ng_container_0_ng_container_5_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementContainerStart"](0);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementStart"](1, "tr")(2, "td", 66)(3, "h5", 102)(4, "a", 68);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵtext"](5);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementEnd"]()()();
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementStart"](6, "td", 103)(7, "div")(8, "ul", 70)(9, "li", 71)(10, "span", 72);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵtext"](11);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementEnd"]()()()()()();
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementContainerEnd"]();
  }
  if (rf & 2) {
    const srv_r44 = ctx.$implicit;
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵadvance"](5);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵtextInterpolate2"]("(", srv_r44.CodigoArticulo, ") ", srv_r44.NombreArticulo, " ");
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵadvance"](6);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵtextInterpolate1"](" ", srv_r44.Cantidad, " ");
  }
}
function InicioServiciosComponent_ng_template_27_ng_container_0_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementContainerStart"](0);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementStart"](1, "ngx-simplebar", 98)(2, "div", 99)(3, "table", 100)(4, "tbody");
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵtemplate"](5, InicioServiciosComponent_ng_template_27_ng_container_0_ng_container_5_Template, 12, 3, "ng-container", 101);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementEnd"]()()()();
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementContainerEnd"]();
  }
  if (rf & 2) {
    const ctx_r42 = _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵnextContext"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵadvance"](5);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵproperty"]("ngForOf", ctx_r42.rankServicios);
  }
}
function InicioServiciosComponent_ng_template_27_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵtemplate"](0, InicioServiciosComponent_ng_template_27_ng_container_0_Template, 6, 1, "ng-container", 29);
  }
  if (rf & 2) {
    const ctx_r1 = _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵnextContext"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵproperty"]("ngIf", ctx_r1.rankServicios.length > 0);
  }
}
function InicioServiciosComponent_ng_template_29_ng_container_0_ng_container_5_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementContainerStart"](0);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementStart"](1, "tr")(2, "td", 66)(3, "h5", 102)(4, "a", 68);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵtext"](5);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementEnd"]()()();
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementStart"](6, "td", 103)(7, "div")(8, "ul", 70)(9, "li", 71)(10, "span", 72);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵtext"](11);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementEnd"]()()()()()();
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementContainerEnd"]();
  }
  if (rf & 2) {
    const cli_r48 = ctx.$implicit;
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵadvance"](5);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵtextInterpolate2"]("(", cli_r48.CodigoCliente, ") ", cli_r48.NombreCliente, " ");
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵadvance"](6);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵtextInterpolate1"](" ", cli_r48.Cantidad, " ");
  }
}
function InicioServiciosComponent_ng_template_29_ng_container_0_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementContainerStart"](0);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementStart"](1, "ngx-simplebar", 98)(2, "div", 99)(3, "table", 100)(4, "tbody");
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵtemplate"](5, InicioServiciosComponent_ng_template_29_ng_container_0_ng_container_5_Template, 12, 3, "ng-container", 101);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementEnd"]()()()();
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementContainerEnd"]();
  }
  if (rf & 2) {
    const ctx_r46 = _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵnextContext"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵadvance"](5);
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵproperty"]("ngForOf", ctx_r46.rankClientes);
  }
}
function InicioServiciosComponent_ng_template_29_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵtemplate"](0, InicioServiciosComponent_ng_template_29_ng_container_0_Template, 6, 1, "ng-container", 29);
  }
  if (rf & 2) {
    const ctx_r3 = _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵnextContext"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵproperty"]("ngIf", ctx_r3.rankClientes.length > 0);
  }
}
const _c1 = () => ["/servicios/facturacion-masiva"];
const _c2 = () => ["/servicios/lotes-facturacion"];
const _c3 = () => ["/servicios/serviciosContratados"];
class InicioServiciosComponent {
  constructor(fb, srvContratadoService, modalService, configGral) {
    this.fb = fb;
    this.srvContratadoService = srvContratadoService;
    this.modalService = modalService;
    this.configGral = configGral;
    this.standalone = true;
    this.rankServicios = [];
    //public pageRankSrv: number = 1;
    //public pageRankSrvSize: number = 10;
    this.totalSrvRank = 0;
    this.rankClientes = [];
    //public pageRankCli: number = 1;
    //public pageRankCliSize: number = 10;
    this.totalCliRank = 0;
    this.subscriptions = []; // almacena las subscripciones
    this.permisosSRV = {
      VerIndicadores: false
    };
    this.loading = false;
    this.filtrosIniciales = true;
    this.activeNav = 1;
    //filtros
    this.searchForm = this.fb.group({
      fechaDesde: [''],
      fechaHasta: [''],
      cantidad: [10],
      articuloId: [-1],
      articulo: [''],
      clienteId: [-1],
      cliente: [''],
      fechaRefParaCantItems: [(0,_formkit_tempo__WEBPACK_IMPORTED_MODULE_3__.format)(new Date(), 'DD/MM/YYYY HH:mm')]
    });
    this.rankOptions = [{
      id: 10,
      nombre: '10'
    }, {
      id: 20,
      nombre: '20'
    }, {
      id: 50,
      nombre: '50'
    }, {
      id: 100,
      nombre: '100'
    }, {
      id: 200,
      nombre: '200'
    }];
    this.useLargeShadow = false;
  }
  ngOnInit() {
    (0,_angular_common__WEBPACK_IMPORTED_MODULE_8__.registerLocaleData)(_angular_common_locales_es_AR__WEBPACK_IMPORTED_MODULE_9__["default"]); //permite dar formatos a numeros
    this.cargarPermisos();
    if (this.permisosSRV.VerIndicadores) {
      this.cargarIndicadores('', '', true);
      ///this.inicializarSearchForm();
    }
    this.darkMode = document.querySelector('html').getAttribute('data-bs-theme') === src_app_layouts_layouts_model__WEBPACK_IMPORTED_MODULE_2__.THEME_DARK;
    this.useLargeShadow = this.darkMode && window.location.href.includes('/estadistica/inicio');
  }
  /**
   * SP SINWEB-348 metodo para cargar permisos por el momento siempre true
   */
  cargarPermisos() {
    this.permisosSRV = {
      //VerIndicadores: this.authService.hasPermiso(PERMISOS.PERMISO_INDICADORES_RECLAMO)
      VerIndicadores: true
    };
  }
  /**
   * Metodo principal para cargar todos los indicadores
   * @param fechadesde
   * @param fechaHasta
   * @param general
   */
  cargarIndicadores(fechadesde, fechaHasta, general) {
    let datosRank = {};
    let datosKpis = {};
    datosRank.PageNumber = -1;
    datosRank.SentidoOrden = 'desc';
    datosRank.Cantidad = this.searchForm.controls.cantidad.value;
    if (this.searchForm.controls.articuloId.value != -1 && this.searchForm.controls.articuloId.value != undefined) {
      datosKpis.IdArticulo = this.searchForm.controls.articuloId.value;
    }
    if (this.searchForm.controls.clienteId.value != -1 && this.searchForm.controls.clienteId.value != undefined) {
      datosKpis.IdCliente = this.searchForm.controls.clienteId.value;
    }
    //fechas
    if (fechadesde != '' && fechadesde != undefined) {
      datosKpis.FechaDesde = fechadesde;
      datosRank.FechaDesde = fechadesde;
    }
    if (fechaHasta != '' && fechaHasta != undefined) {
      datosKpis.FechaHasta = fechaHasta;
      datosRank.FechaHasta = fechaHasta;
    }
    if (this.searchForm.controls.fechaRefParaCantItems.value != '' && this.searchForm.controls.fechaRefParaCantItems.value != undefined) {
      datosKpis.FechaReferenciaParaCantidadItems = this.searchForm.controls.fechaRefParaCantItems.value;
    }
    /**
     * SP SINWEB-348 - Se realiza un forkJoin para cargar todos los indicadores al mismo tiempo y no en cascada
     */
    const susc1 = (0,rxjs__WEBPACK_IMPORTED_MODULE_10__.forkJoin)({
      rankSrv: this.srvContratadoService.getRankingServicios(datosRank),
      rankCli: this.srvContratadoService.getRankingClientesMasServicios(datosRank),
      kpis: this.srvContratadoService.getIndicadoresKpis(datosKpis)
    }).subscribe({
      next: resp => {
        if (resp != undefined) {
          this.rankServicios = resp.rankSrv.Data;
          this.totalSrvRank = resp.rankSrv.TotalRecords;
          this.rankClientes = resp.rankCli.Data;
          this.totalCliRank = resp.rankCli.TotalRecords;
          this.kpis = resp.kpis.Data;
        }
      },
      complete: () => {
        this.loading = false;
        this.fechaHoraDesdeFiltrada = datosKpis.FechaDesde ? datosKpis.FechaDesde : 'inicio';
        this.fechaHoraHastaFiltrada = datosKpis.FechaHasta ? datosKpis.FechaHasta : 'fin';
        console.log('completo carga todo');
      }
    });
    this.subscriptions.push(susc1);
  }
  /**
   * SP SINWEB-348 - Metodo auxiliar para inicializar el formulario de busqueda
   */
  // inicializarSearchForm(){
  //   this.searchForm = this.fb.group({
  //     fechaDesde : [fechaHoraActualmenosAños(1)],
  //     fechaHasta : [fechaHoraActual()],
  //     cantidad: [10]
  //   });
  //   this.loadIndicadores();
  // }
  /**
   * SP SINWEB-348 - Metodo para cargar los indicadores segun las fechas seleccionadas
   */
  loadIndicadores() {
    let fechaDesde = this.searchForm.controls.fechaDesde.value;
    let fechaHasta = this.searchForm.controls.fechaHasta.value;
    this.cargarIndicadores(fechaDesde, fechaHasta, false);
  }
  /**
   * SP SINWEB-348 - Metodo para cargar los indicadores de rankings solamente
   */
  cargarRankings() {
    let datos = {};
    datos.PageNumber = -1;
    datos.SentidoOrden = 'desc';
    datos.Cantidad = this.searchForm.controls.cantidad.value;
    if (this.searchForm.controls.fechaDesde.value != '' && this.searchForm.controls.fechaDesde.value != undefined) {
      datos.FechaDesde = this.searchForm.controls.fechaDesde.value;
    }
    if (this.searchForm.controls.fechaHasta.value != '' && this.searchForm.controls.fechaHasta.value != undefined) {
      datos.FechaHasta = this.searchForm.controls.fechaHasta.value;
    }
    const susc1 = (0,rxjs__WEBPACK_IMPORTED_MODULE_10__.forkJoin)({
      rankSrv: this.srvContratadoService.getRankingServicios(datos),
      rankCli: this.srvContratadoService.getRankingClientesMasServicios(datos)
    }).subscribe({
      next: resp => {
        if (resp != undefined) {
          this.rankServicios = resp.rankSrv.Data;
          this.totalSrvRank = resp.rankSrv.TotalRecords;
          this.rankClientes = resp.rankCli.Data;
          this.totalCliRank = resp.rankCli.TotalRecords;
        }
      },
      complete: () => {
        this.loading = false;
        console.log('completo carga ranking');
      }
    });
  }
  // cargarRankServicios(type: string){
  //   let datos : any = {};
  //   datos.PageNumber = -1;
  //   datos.SentidoOrden = 'desc';
  //   datos.Cantidad = this.searchForm.controls.cantidad.value;
  //   if(this.searchForm.controls.fechaDesde.value != '' && this.searchForm.controls.fechaDesde.value != undefined){
  //     datos.FechaDesde = formatFechaHora(this.searchForm.controls.fechaDesde.value);
  //   }
  //   if(this.searchForm.controls.fechaHasta.value != '' && this.searchForm.controls.fechaHasta.value != undefined){
  //     datos.FechaHasta = formatFechaHora(this.searchForm.controls.fechaHasta.value);
  //   }
  //   const susc1 = this.srvContratadoService.getRankingServicios(datos).subscribe(resp =>{
  //     if (resp != undefined){
  //       type == 'add' ? _.concat(this.rankServicios,resp.Data) : this.rankServicios = resp.Data;
  //       this.totalSrvRank = resp.TotalRecords;
  //     }
  //   })
  // }
  // agregarRankServicios(){
  //   if(this.rankServicios.length < this.totalSrvRank){
  //     this.pageRankSrv++;
  //     this.cargarRankServicios('add');
  //   }
  // }
  // cargarRankClientes(type){
  //   let datos : any = {};
  //   datos.PageNumber = -1;
  //   datos.SentidoOrden = 'desc';
  //   datos.Cantidad = this.searchForm.controls.cantidad.value;
  //   if(this.searchForm.controls.fechaDesde.value != '' && this.searchForm.controls.fechaDesde.value != undefined){
  //     datos.FechaDesde = formatFechaHora(this.searchForm.controls.fechaDesde.value);
  //   }
  //   if(this.searchForm.controls.fechaHasta.value != '' && this.searchForm.controls.fechaHasta.value != undefined){
  //     datos.FechaHasta = formatFechaHora(this.searchForm.controls.fechaHasta.value);
  //   }
  //   const susc1 = this.srvContratadoService.getRankingClientesMasServicios(datos).subscribe(resp =>{
  //     if (resp != undefined){
  //       type == 'add' ? _.concat(this.rankClientes,resp.Data) : this.rankClientes = resp.Data;
  //       this.totalCliRank = resp.TotalRecords;
  //     }
  //   })
  // }
  // agregarRankClientes(){
  //   if(this.rankServicios.length < this.totalCliRank){
  //     this.pageRankCli++;
  //     this.cargarRankClientes('add');
  //   }
  // }
  /**
   * SP SINWEB-348 - Metodo para cargar los indicadores de KPIs
   */
  cargarKpis() {
    let datos = {};
    if (this.searchForm.controls.fechaDesde.value != '' && this.searchForm.controls.fechaDesde.value != undefined) {
      datos.FechaDesde = this.searchForm.controls.fechaDesde.value;
    }
    if (this.searchForm.controls.fechaHasta.value != '' && this.searchForm.controls.fechaHasta.value != undefined) {
      datos.FechaHasta = this.searchForm.controls.fechaHasta.value;
    }
    if (this.searchForm.controls.articuloId.value != -1 && this.searchForm.controls.articuloId.value != undefined) {
      datos.IdArticulo = this.searchForm.controls.articuloId.value;
    }
    if (this.searchForm.controls.clienteId.value != -1 && this.searchForm.controls.clienteId.value != undefined) {
      datos.IdCliente = this.searchForm.controls.clienteId.value;
    }
    if (this.searchForm.controls.fechaRefParaCantItems.value != '' && this.searchForm.controls.fechaRefParaCantItems.value != undefined) {
      datos.FechaReferenciaParaCantidadItems = this.searchForm.controls.fechaRefParaCantItems.value;
    }
    const susc1 = this.srvContratadoService.getIndicadoresKpis(datos).subscribe(resp => {
      if (resp != undefined) {
        this.kpis = resp.Data;
      }
    });
  }
  /**
   * SP SINWEB-348 - Metodo para setear el periodo de busqueda de los indicadores (BOTONES DIARIO, MENSUAL, ANUAL)
   * @param tipo
   */
  setPeriodo(tipo) {
    //SP SINWEB-416 correciones de formateos de fecha para uso del componente input-date-time
    if (tipo == 'diario') {
      this.searchForm.controls.fechaDesde.setValue((0,_formkit_tempo__WEBPACK_IMPORTED_MODULE_3__.format)((0,_formkit_tempo__WEBPACK_IMPORTED_MODULE_3__.dayStart)(new Date()), 'DD/MM/YYYY HH:mm'), {
        emitEvent: false
      });
      this.searchForm.controls.fechaHasta.setValue((0,_formkit_tempo__WEBPACK_IMPORTED_MODULE_3__.format)((0,_formkit_tempo__WEBPACK_IMPORTED_MODULE_3__.dayEnd)(new Date()), 'DD/MM/YYYY HH:mm'), {
        emitEvent: false
      });
    } else {
      if (tipo == 'mensual') {
        this.searchForm.controls.fechaDesde.setValue((0,_formkit_tempo__WEBPACK_IMPORTED_MODULE_3__.format)((0,_formkit_tempo__WEBPACK_IMPORTED_MODULE_3__.monthStart)(new Date()), 'DD/MM/YYYY HH:mm'), {
          emitEvent: false
        });
        this.searchForm.controls.fechaHasta.setValue((0,_formkit_tempo__WEBPACK_IMPORTED_MODULE_3__.format)(new Date(), 'DD/MM/YYYY HH:mm'), {
          emitEvent: false
        });
      } else {
        //anual
        this.searchForm.controls.fechaDesde.setValue((0,_formkit_tempo__WEBPACK_IMPORTED_MODULE_3__.format)((0,_formkit_tempo__WEBPACK_IMPORTED_MODULE_3__.yearStart)(new Date()), 'DD/MM/YYYY HH:mm'), {
          emitEvent: false
        });
        this.searchForm.controls.fechaHasta.setValue((0,_formkit_tempo__WEBPACK_IMPORTED_MODULE_3__.format)(new Date(), 'DD/MM/YYYY HH:mm'), {
          emitEvent: false
        });
      }
    }
    this.loadIndicadores();
  }
  /**
   * SP SINWEB-348 - Metodo para setear el periodo de busqueda de los indicadores (BOTONES 3 MESES, 6 MESES, 12 MESES)
   * @param meses
   */
  setMes(meses) {
    this.searchForm.controls.fechaDesde.setValue((0,_formkit_tempo__WEBPACK_IMPORTED_MODULE_3__.format)((0,_formkit_tempo__WEBPACK_IMPORTED_MODULE_3__.addMonth)(new Date(), -meses), 'DD/MM/YYYY HH:mm'), {
      emitEvent: false
    });
    this.searchForm.controls.fechaHasta.setValue((0,_formkit_tempo__WEBPACK_IMPORTED_MODULE_3__.format)(new Date(), 'DD/MM/YYYY HH:mm'), {
      emitEvent: false
    });
    this.loadIndicadores();
  }
  /**
   * SP SINWEB-348 - Metodo para intercambiar botones de fechas
   * @param anios
   */
  changeFiltrosIniciales() {
    this.filtrosIniciales = !this.filtrosIniciales;
  }
  /**
   * SP SINWEB-348 - Metodo para calcular el progreso de una operacion para la barra de progreso
   * @param cant_realizada
   * @param cant_solicitada
   * @param responseType
   * @returns
   */
  /* Funcion que realiza el calculo del progreso de la operacion segun dos parametros de cantidad: realizada y solicitada */
  calcularProgreso(cant_realizada, cant_solicitada, responseType) {
    let retorno = 0;
    if (cant_solicitada > 0) {
      retorno = cant_realizada * 100 / cant_solicitada;
    }
    if (responseType === 'numero') {
      return retorno;
    } else {
      return {
        width: `${retorno}%`,
        'min-width': retorno == 0 ? '0%' : '10%'
      };
    }
  }
  borrarArticulo() {
    this.searchForm.get('articulo').reset('');
    this.searchForm.get('articuloId').reset('');
    this.cargarKpis();
  }
  getArticulo() {
    return this.searchForm.get('articulo').value;
  }
  buscarArticulo() {
    const modalRef = this.modalService.open(_dashboards_core_seleccionar_articulo_seleccionar_articulo_component__WEBPACK_IMPORTED_MODULE_1__.SeleccionarArticuloComponent, {
      size: 'xl',
      backdropClass: 'back-z-index',
      windowClass: 'modal-z-index',
      backdrop: 'static',
      keyboard: false,
      scrollable: true
    });
    modalRef.componentInstance.filtros = {
      FamiliasArticulo: {
        Ids: [this.configGral._config.FamiliaArtSrv].join(','),
        Ocultar: true
      }
    };
    modalRef.result.then(resolve => {
      if (resolve !== undefined) {
        this.searchForm.controls.articuloId.setValue(resolve.IdArticulo);
        this.searchForm.controls.articulo.setValue(resolve.Articulo);
        this.cargarKpis();
      }
    });
  }
  borrarCliente() {
    this.searchForm.get('cliente').reset('');
    this.searchForm.get('clienteId').reset(-1);
    this.cargarKpis();
  }
  getCliente() {
    return this.searchForm.get('cliente').value;
  }
  /**
   * MC SINWEB-174 - Método para buscar un cliente
   */
  buscarCliente() {
    const modalRef = this.modalService.open(_dashboards_core_seleccionar_cliente_seleccionar_cliente_component__WEBPACK_IMPORTED_MODULE_0__.SeleccionarClienteComponent, {
      size: 'xl',
      backdropClass: 'back-z-index',
      windowClass: 'modal-z-index',
      backdrop: 'static',
      keyboard: false,
      scrollable: true
    });
    modalRef.result.then(resolve => {
      if (resolve !== undefined) {
        this.searchForm.controls.clienteId.setValue(resolve.IdCliente);
        this.searchForm.controls.cliente.setValue(resolve.Cliente);
        this.cargarKpis();
      }
    });
  }
  /**
   * SP SINWEB-340 - Metodo controlar tab de rankings activa
   * @param $event
   */
  changeTab($event) {
    this.activeNav = $event.nextId;
  }
  //SP SINWEB-416 metodos para filtros fecha y hora
  getFechaHasta() {
    return this.searchForm.get('fechaHasta').value;
  }
  setFechaHasta(fecha) {
    this.searchForm.get('fechaHasta').setValue(fecha);
  }
  getFechaDesde() {
    return this.searchForm.get('fechaDesde').value;
  }
  setFechaDesde(fecha) {
    this.searchForm.get('fechaDesde').setValue(fecha);
  }
  /**
   * SP SINWEB-614 - Limpia filtros y busca
   */
  cleanFechas() {
    this.searchForm.get('fechaDesde').setValue('');
    this.searchForm.get('fechaHasta').setValue('');
    this.loadIndicadores();
  }
  getFechaRefParaCantItems() {
    return this.searchForm.get('fechaRefParaCantItems').value;
  }
  setFechaRefParaCantItems(fecha) {
    this.searchForm.get('fechaRefParaCantItems').setValue(fecha);
  }
  static #_ = this.ɵfac = function InicioServiciosComponent_Factory(t) {
    return new (t || InicioServiciosComponent)(_angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵdirectiveInject"](_angular_forms__WEBPACK_IMPORTED_MODULE_11__.FormBuilder), _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵdirectiveInject"](src_app_core_services_servicios_srvContratado_service__WEBPACK_IMPORTED_MODULE_4__.SrvContratadoService), _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵdirectiveInject"](_ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_12__.NgbModal), _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵdirectiveInject"](src_app_core_services_configGeneral_service__WEBPACK_IMPORTED_MODULE_5__.ConfigGeneralService));
  };
  static #_2 = this.ɵcmp = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵdefineComponent"]({
    type: InicioServiciosComponent,
    selectors: [["app-inicio-servicios"]],
    inputs: {
      standalone: "standalone"
    },
    decls: 31,
    vars: 10,
    consts: [[1, "row"], [1, "col-lg-12"], [1, "card", 3, "ngClass"], [1, "card-body"], [1, "row", "justify-content-between"], [1, "col-lg-4"], [1, "media", "text-md-start", "text-center"], [1, "text-center", "text-md-start", "me-md-3"], [1, "bx", "bx-briefcase-alt-2", "text-primary", 2, "font-size", "2.25rem"], [1, "media-body", "align-self-center"], [1, "text-muted"], [1, "my-2"], [1, "col-lg-3", "d-none", "d-lg-block"], [1, "clearfix", "mt-4", "mt-lg-0"], ["ngbDropdown", "", 1, "dropdown", "float-end"], ["type", "button", "data-toggle", "dropdown", "aria-haspopup", "true", "aria-expanded", "false", "ngbDropdownToggle", "", 1, "btn", "btn-primary", "dropdown-toggle"], [1, "bx", "bxs-share", "align-middle", "mr-1"], ["ngbDropdownMenu", "", 1, "dropdown-menu", "dropdown-menu-end"], ["href", "javascript: void(0);", 1, "dropdown-item", 3, "routerLink"], ["class", "row pt-1", 4, "ngIf"], ["SRV_RANK_TAB", ""], ["CLI_RANK_TAB", ""], [1, "row", "pt-1"], [1, "col-xl-12"], [1, "d-flex", "flex-column", "flex-sm-row", "align-items-center", "flex-wrap", "gap-2"], [1, "flex-grow-1"], [1, "mb-0", "card-title"], [1, "text-muted", "font-size-10"], [1, "align-self-end", "d-flex", "gap-2"], [4, "ngIf"], [1, "btn", "btn-outline-warning", "mdi", "mdi-swap-horizontal", "mdi-18px", "align-middle", 3, "click"], [1, "flex-shrink-0", "d-flex", "gap-1", 3, "formGroup"], ["maxDate", "31/12/3000", 3, "valor", "valorEmit"], [1, "btn", "btn-primary", 3, "click"], [1, "mdi", "mdi-refresh"], [1, "btn", "btn-danger", 3, "click"], [1, "mdi", "mdi-trash-can-outline"], [1, "col-12"], [1, "row", "g-3", 3, "formGroup"], [1, "col-12", "col-lg-6"], ["tourAnchor", "searchArt.anchor.id", 1, "input-group"], ["type", "search", "formControlName", "articulo", "placeholder", "Seleccionar Art\u00EDculo", "readonly", "", 1, "form-control"], ["class", "btn btn-secondary", 3, "click", 4, "ngIf"], [1, "bx", "bx-search-alt-2"], ["tourAnchor", "searchCliente.anchor.id", 1, "input-group"], ["type", "search", "formControlName", "cliente", "placeholder", "Seleccionar Cliente", "readonly", "", 1, "form-control"], [1, "col-xl-8"], [1, "card", "mb-1", 3, "ngClass"], [1, "card-title"], [1, "row", "g-1"], [1, "col-xl-6"], [1, "card", "mb-0", 2, "min-height", "700px", 3, "ngClass"], [1, "text-muted", "mb-4"], [1, "text-center"], [1, "mb-4"], [1, "bx", "bx-briefcase-alt-2", "text-primary", "display-4"], [1, "table-responsive", "mt-4"], [1, "table", "table-centered", "table-nowrap"], [2, "width", "30%"], [1, "mb-0"], [2, "width", "25%"], [1, "progress", "bg-transparent", "progress-sm"], ["role", "progressbar", "aria-valuenow", "calcularProgreso(kpis.CantidadVigentes, kpis.CantidadTotal,'numero')", "aria-valuemin", "0", "aria-valuemax", "100", 1, "progress-bar", "bg-success", "rounded"], ["role", "progressbar", "aria-valuenow", "calcularProgreso(kpis.CantidadNoVigentes, kpis.CantidadTotal,'numero')", "aria-valuemin", "0", "aria-valuemax", "100", 1, "progress-bar", "bg-danger", "rounded"], ["role", "progressbar", "aria-valuenow", "calcularProgreso(kpis.CantidadFacturacionActiva, kpis.CantidadTotal,'numero')", "aria-valuemin", "0", "aria-valuemax", "100", 1, "progress-bar", "bg-success", "rounded"], ["role", "progressbar", "aria-valuenow", "calcularProgreso(kpis.CantidadFacturacionInactiva, kpis.CantidadTotal,'numero')", "aria-valuemin", "0", "aria-valuemax", "100", 1, "progress-bar", "bg-danger", "rounded"], [2, "max-width", "110px"], [1, "mb-1"], [1, "text-dark"], [1, "text-end", 2, "width", "75px"], [1, "list-inline", "mb-0", "font-size-16"], [1, "list-inline-item"], [1, "badge", "badge-soft-success", "font-size-16"], [1, "card", 2, "min-height", "700px", 3, "ngClass"], [1, "d-flex", "flex-column", "flex-sm-row", "align-items-center", "flex-wrap", "gap-2", "mb-4"], [1, "mb-0", "text-muted", "flex-grow-1"], [1, "align-self-end", "d-flex", "gap-2", 3, "formGroup"], ["formControlName", "cantidad", 1, "form-select", 3, "change"], [3, "value", 4, "ngFor", "ngForOf"], ["ngbNav", "", 1, "nav-pills", "bg-light", "rounded", 3, "activeId", "navChange"], ["nav1", "ngbNav"], [3, "ngbNavItem"], ["ngbNavLink", ""], ["ngbNavContent", ""], [1, "mt-4", 3, "ngbNavOutlet"], [1, "col-xl-4"], [1, "d-flex", "flex-column", "flex-sm-row", "align-items-center", "justify-content-sm-between", "flex-wrap", "gap-2", "pb-4"], [1, "card-title", "mb-4"], [1, "align-self-end", "d-flex", "gap-1", 3, "formGroup"], [1, "bx", "bx-search"], ["role", "progressbar", "aria-valuenow", "calcularProgreso(kpis?.CantidadItemsActivos, kpis?.CantidadItems,'numero')", "aria-valuemin", "0", "aria-valuemax", "100", 1, "progress-bar", "bg-success", "rounded"], ["role", "progressbar", "aria-valuenow", "calcularProgreso(kpis?.CantidadItemsInactivos, kpis?.CantidadItems,'numero')", "aria-valuemin", "0", "aria-valuemax", "100", 1, "progress-bar", "bg-danger", "rounded"], [1, "badge", "badge-soft-warning", "font-size-16"], [1, "btn", "btn-outline-primary", 3, "click"], [1, "btn", "btn-secondary", 3, "click"], [1, "bx", "bx-x"], [3, "value"], [3, "ngTemplateOutlet"], [2, "height", "542px"], [1, "table-responsive", "mb-0"], [1, "table", "table-nowrap", "table-centered", "table-hover"], [4, "ngFor", "ngForOf"], [1, "text-truncate", "font-size-14", "mb-1"], [2, "width", "75px"]],
    template: function InicioServiciosComponent_Template(rf, ctx) {
      if (rf & 1) {
        _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementStart"](0, "div", 0)(1, "div", 1)(2, "div", 2)(3, "div", 3)(4, "div", 4)(5, "div", 5)(6, "div", 6)(7, "div", 7);
        _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelement"](8, "i", 8);
        _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementStart"](9, "div", 9)(10, "div", 10)(11, "h5", 11);
        _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵtext"](12, "M\u00F3dulo Servicios");
        _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementEnd"]()()()()();
        _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementStart"](13, "div", 12)(14, "div", 13)(15, "div", 14)(16, "button", 15);
        _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelement"](17, "i", 16);
        _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵtext"](18, " Accesos directos ");
        _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementStart"](19, "div", 17)(20, "a", 18);
        _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵtext"](21, " Facturacion masiva ");
        _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementStart"](22, "a", 18);
        _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵtext"](23, " Lotes de facturaci\u00F3n ");
        _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementStart"](24, "a", 18);
        _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵtext"](25, " Servicios contratados ");
        _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵelementEnd"]()()()()()()()()()();
        _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵtemplate"](26, InicioServiciosComponent_div_26_Template, 225, 67, "div", 19)(27, InicioServiciosComponent_ng_template_27_Template, 1, 1, "ng-template", null, 20, _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵtemplateRefExtractor"])(29, InicioServiciosComponent_ng_template_29_Template, 1, 1, "ng-template", null, 21, _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵtemplateRefExtractor"]);
      }
      if (rf & 2) {
        _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵadvance"](2);
        _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵproperty"]("ngClass", _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵpureFunction1"](5, _c0, ctx.useLargeShadow));
        _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵadvance"](18);
        _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵproperty"]("routerLink", _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵpureFunction0"](7, _c1));
        _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵadvance"](2);
        _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵproperty"]("routerLink", _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵpureFunction0"](8, _c2));
        _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵadvance"](2);
        _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵproperty"]("routerLink", _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵpureFunction0"](9, _c3));
        _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵadvance"](2);
        _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵproperty"]("ngIf", ctx.permisosSRV.VerIndicadores);
      }
    },
    dependencies: [_angular_common__WEBPACK_IMPORTED_MODULE_8__.NgClass, _angular_common__WEBPACK_IMPORTED_MODULE_8__.NgForOf, _angular_common__WEBPACK_IMPORTED_MODULE_8__.NgIf, _angular_common__WEBPACK_IMPORTED_MODULE_8__.NgTemplateOutlet, _angular_router__WEBPACK_IMPORTED_MODULE_13__.RouterLink, _angular_forms__WEBPACK_IMPORTED_MODULE_11__.NgSelectOption, _angular_forms__WEBPACK_IMPORTED_MODULE_11__["ɵNgSelectMultipleOption"], _angular_forms__WEBPACK_IMPORTED_MODULE_11__.DefaultValueAccessor, _angular_forms__WEBPACK_IMPORTED_MODULE_11__.SelectControlValueAccessor, _angular_forms__WEBPACK_IMPORTED_MODULE_11__.NgControlStatus, _angular_forms__WEBPACK_IMPORTED_MODULE_11__.NgControlStatusGroup, _ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_12__.NgbDropdown, _ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_12__.NgbDropdownToggle, _ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_12__.NgbDropdownMenu, _ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_12__.NgbNavContent, _ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_12__.NgbNav, _ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_12__.NgbNavItem, _ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_12__.NgbNavItemRole, _ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_12__.NgbNavLink, _ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_12__.NgbNavLinkBase, _ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_12__.NgbNavOutlet, _angular_forms__WEBPACK_IMPORTED_MODULE_11__.FormGroupDirective, _angular_forms__WEBPACK_IMPORTED_MODULE_11__.FormControlName, simplebar_angular__WEBPACK_IMPORTED_MODULE_14__.SimplebarAngularComponent, ngx_ui_tour_ng_bootstrap__WEBPACK_IMPORTED_MODULE_15__.TourAnchorNgBootstrapDirective, _shared_ui_input_date_time_input_date_time_component__WEBPACK_IMPORTED_MODULE_6__.InputDateTimeComponent, _angular_common__WEBPACK_IMPORTED_MODULE_8__.DecimalPipe]
  });
}

/***/ }),

/***/ 57907:
/*!**********************************************************************************!*\
  !*** ./src/app/pages/servicios/lotes-facturacion/lotes-facturacion.component.ts ***!
  \**********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   LotesFacturacionComponent: () => (/* binding */ LotesFacturacionComponent)
/* harmony export */ });
/* harmony import */ var src_app_core_utils_constantes_constantes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! src/app/core/utils/constantes/constantes */ 74506);
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! @angular/forms */ 56223);
/* harmony import */ var src_app_core_services_alertCustom_service__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! src/app/core/services/alertCustom.service */ 53206);
/* harmony import */ var src_app_core_utils_metodos_metodos__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! src/app/core/utils/metodos/metodos */ 38002);
/* harmony import */ var _dashboards_core_seleccionar_empleado_seleccionar_empleado_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../dashboards/core/seleccionar-empleado/seleccionar-empleado.component */ 53317);
/* harmony import */ var _dashboards_core_seleccionar_sucursal_seleccionar_sucursal_component__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../dashboards/core/seleccionar-sucursal/seleccionar-sucursal.component */ 49208);
/* harmony import */ var _visualizar_lote_visualizar_lote_component__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./visualizar-lote/visualizar-lote.component */ 27747);
/* harmony import */ var src_app_core_utils_permisos_permisos_servicios__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! src/app/core/utils/permisos/permisos-servicios */ 52788);
/* harmony import */ var src_app_core_utils_validators_dateValidators__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! src/app/core/utils/validators/dateValidators */ 49545);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @angular/core */ 65879);
/* harmony import */ var ngx_toastr__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ngx-toastr */ 2425);
/* harmony import */ var _ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! @ng-bootstrap/ng-bootstrap */ 85406);
/* harmony import */ var src_app_core_services_exportacion_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! src/app/core/services/exportacion.service */ 18969);
/* harmony import */ var _core_services_servicios_svrLoteFacturacion_service__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../core/services/servicios/svrLoteFacturacion.service */ 50145);
/* harmony import */ var src_app_core_services_stateful_service__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! src/app/core/services/stateful.service */ 689);
/* harmony import */ var src_app_core_services_auth_service__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! src/app/core/services/auth.service */ 90304);
/* harmony import */ var ngx_ui_tour_ng_bootstrap__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ngx-ui-tour-ng-bootstrap */ 58469);
/* harmony import */ var primeng_accordion__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! primeng/accordion */ 65389);
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! @angular/common */ 96814);
/* harmony import */ var ngx_mask__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ngx-mask */ 43735);
/* harmony import */ var primeng_sidebar__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! primeng/sidebar */ 99246);
/* harmony import */ var _shared_widget_tour_tour_component__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../shared/widget/tour/tour.component */ 63481);
/* harmony import */ var _shared_ui_table2_table2_component__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../shared/ui/table2/table2.component */ 63033);
/* harmony import */ var _shared_ui_input_periodo_input_periodo_component__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../shared/ui/input-periodo/input-periodo.component */ 77947);


























function LotesFacturacionComponent_ng_template_3_Template(rf, ctx) {}
function LotesFacturacionComponent_div_4_ng_template_3_Template(rf, ctx) {}
function LotesFacturacionComponent_div_4_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](0, "div", 42)(1, "div", 43)(2, "div", 44);
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵtemplate"](3, LotesFacturacionComponent_div_4_ng_template_3_Template, 0, 0, "ng-template", 3);
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementEnd"]()()();
  }
  if (rf & 2) {
    const ctx_r1 = _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵnextContext"]();
    const _r6 = _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵreference"](62);
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵproperty"]("formGroup", ctx_r1.filterForm);
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵproperty"]("ngTemplateOutlet", _r6);
  }
}
function LotesFacturacionComponent_a_43_Template(rf, ctx) {
  if (rf & 1) {
    const _r9 = _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵgetCurrentView"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](0, "a", 45);
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵlistener"]("click", function LotesFacturacionComponent_a_43_Template_a_click_0_listener() {
      _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵrestoreView"](_r9);
      const ctx_r8 = _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵnextContext"]();
      return _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵresetView"](ctx_r8.borrarNumero());
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelement"](1, "i", 46);
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementEnd"]();
  }
}
function LotesFacturacionComponent_a_49_Template(rf, ctx) {
  if (rf & 1) {
    const _r11 = _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵgetCurrentView"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](0, "a", 45);
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵlistener"]("click", function LotesFacturacionComponent_a_49_Template_a_click_0_listener() {
      _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵrestoreView"](_r11);
      const ctx_r10 = _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵnextContext"]();
      return _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵresetView"](ctx_r10.borrarEmpleado());
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelement"](1, "i", 46);
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementEnd"]();
  }
}
function LotesFacturacionComponent_a_55_Template(rf, ctx) {
  if (rf & 1) {
    const _r13 = _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵgetCurrentView"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](0, "a", 45);
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵlistener"]("click", function LotesFacturacionComponent_a_55_Template_a_click_0_listener() {
      _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵrestoreView"](_r13);
      const ctx_r12 = _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵnextContext"]();
      return _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵresetView"](ctx_r12.borrarSucursal());
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelement"](1, "i", 46);
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementEnd"]();
  }
}
const _c0 = () => [0];
function LotesFacturacionComponent_ng_template_61_Template(rf, ctx) {
  if (rf & 1) {
    const _r15 = _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵgetCurrentView"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](0, "div", 21)(1, "p-accordion", 47)(2, "p-accordionTab", 48)(3, "div", 49)(4, "p", 50);
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵtext"](5, "Fecha");
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](6, "label", 51);
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵtext"](7, "Desde");
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelement"](8, "input", 52);
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](9, "label", 51);
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵtext"](10, "Hasta");
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelement"](11, "input", 53);
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](12, "div", 49)(13, "p", 50);
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵtext"](14, "Periodo");
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](15, "label", 51);
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵtext"](16, "Desde");
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](17, "app-input-periodo", 54);
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵlistener"]("valorEmit", function LotesFacturacionComponent_ng_template_61_Template_app_input_periodo_valorEmit_17_listener($event) {
      _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵrestoreView"](_r15);
      const ctx_r14 = _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵnextContext"]();
      return _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵresetView"](ctx_r14.setPeriodoFactDesde($event));
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](18, "label", 51);
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵtext"](19, "Hasta");
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](20, "app-input-periodo", 54);
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵlistener"]("valorEmit", function LotesFacturacionComponent_ng_template_61_Template_app_input_periodo_valorEmit_20_listener($event) {
      _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵrestoreView"](_r15);
      const ctx_r16 = _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵnextContext"]();
      return _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵresetView"](ctx_r16.setPeriodoFactHasta($event));
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementEnd"]()()()()();
  }
  if (rf & 2) {
    const ctx_r5 = _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵnextContext"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵproperty"]("formGroup", ctx_r5.filterForm);
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵproperty"]("multiple", true)("activeIndex", _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵpureFunction0"](5, _c0));
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵadvance"](16);
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵproperty"]("valor", ctx_r5.getPeriodoFactDesde());
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵadvance"](3);
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵproperty"]("valor", ctx_r5.getPeriodoFactHasta());
  }
}
class LotesFacturacionComponent {
  constructor(fb, toast, modalService, alert, exportacion, srvLoteFacturacionService, sf, authService, tourService) {
    this.fb = fb;
    this.toast = toast;
    this.modalService = modalService;
    this.alert = alert;
    this.exportacion = exportacion;
    this.srvLoteFacturacionService = srvLoteFacturacionService;
    this.sf = sf;
    this.authService = authService;
    this.tourService = tourService;
    this.lotes = [];
    this.total = [];
    this.filtro = true;
    this.filtroMobile = false;
    this._unsubscribe = [];
    //paginacion
    this.cantSearch = src_app_core_utils_constantes_constantes__WEBPACK_IMPORTED_MODULE_0__.CANT_SEARCH;
    //SP arreglo paginas seleccionables pasadas al app-select component
    this.pageOptions = src_app_core_utils_constantes_constantes__WEBPACK_IMPORTED_MODULE_0__.PAGE_OPTIONS;
    this.order = 3;
    this.sentido = 'desc';
    this.totalItems = 0;
    //permisos
    this.permisosVisLote = false;
    this.lotesHeader = [{
      Nombre: 'Número Lote',
      Order: 2,
      Key: 'Numero',
      WCol: '5%'
    }, {
      Nombre: '(Cod) Empleado',
      Type: 'template',
      Data: {
        Template: '(a) b',
        ArrayKeys: {
          a: 'Empleado.Codigo',
          b: 'Empleado.Nombre'
        }
      },
      WCol: '25%'
    }, {
      Nombre: '(Cod) Sucursal',
      Type: 'template',
      Data: {
        Template: '(a) b',
        ArrayKeys: {
          a: 'Sucursal.Codigo',
          b: 'Sucursal.Nombre'
        }
      },
      WCol: '25%'
    }, {
      Nombre: 'Empresa',
      Key: 'Sucursal.Empresa.NombreComercial',
      WCol: '15%'
    }, {
      Nombre: 'Fecha',
      Order: 3,
      Key: 'Fecha',
      WCol: '10%'
    }, {
      Nombre: 'Periodo',
      Order: 4,
      Type: 'template',
      Data: {
        Template: 'a/b',
        ArrayKeys: {
          a: 'PeriodoMes',
          b: 'PeriodoAnio'
        }
      },
      WCol: '10%'
    }];
    this.searchForm = this.fb.group({
      numero: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_16__.Validators.maxLength(50)],
      empleado: [''],
      empleadoId: [-1],
      sucursalId: [-1],
      sucursal: ['']
    });
    this.filterForm = this.fb.group({
      PeriodoDesde: ['', (0,src_app_core_utils_validators_dateValidators__WEBPACK_IMPORTED_MODULE_7__.periodoIncompleto)()],
      PeriodoHasta: ['', (0,src_app_core_utils_validators_dateValidators__WEBPACK_IMPORTED_MODULE_7__.periodoIncompleto)()],
      FechaDesde: [''],
      FechaHasta: ['']
    });
  }
  ngOnInit() {
    this.page = 1;
    this.previousPage = 1;
    this.permisosVisLote = this.authService.hasPermiso(src_app_core_utils_permisos_permisos_servicios__WEBPACK_IMPORTED_MODULE_6__.PERMISO_VIS_LOTE_FACTURACION);
    this.inicializarSteps();
    this.inicializarEstado();
    this.configuracionFilter();
    this.loadPage();
    this.controlarTour();
  }
  ngOnDestroy() {
    this._unsubscribe.forEach(sb => sb.unsubscribe());
  }
  /**
   * PM Inicializa el estado de los componentes que permite almacenar su estado
   */
  inicializarEstado() {
    this.sf.states = this.sf.pagenamesSERV.LOTE_FACTURACION_STATES;
    //busqueda
    this.searchForm.controls.numero.setValue(this.sf.getState(this.sf.states.LOTE_FACTURACION_S_NUMERO));
    this.buscarNumero = this.sf.getState(this.sf.states.LOTE_FACTURACION_S_NUMERO);
    this.searchForm.controls.empleadoId.setValue(this.sf.getState(this.sf.states.LOTE_FACTURACION_S_EMPLEADOID));
    this.searchForm.controls.empleado.setValue(this.sf.getState(this.sf.states.LOTE_FACTURACION_S_EMPLEADO));
    this.searchForm.controls.sucursalId.setValue(this.sf.getState(this.sf.states.LOTE_FACTURACION_S_SUCURSALID));
    this.searchForm.controls.sucursal.setValue(this.sf.getState(this.sf.states.LOTE_FACTURACION_S_SUCURSAL));
    //filtros
    this.filterPeriodoDesde = this.sf.getState(this.sf.states.LOTE_FACTURACION_F_PERIODO_DESDE);
    this.filterForm.controls.PeriodoDesde.setValue(this.filterPeriodoDesde);
    this.filterPeriodoHasta = this.sf.getState(this.sf.states.LOTE_FACTURACION_F_PERIODO_HASTA);
    this.filterForm.controls.PeriodoHasta.setValue(this.filterPeriodoHasta);
    this.filterFechaDesde = this.sf.getState(this.sf.states.LOTE_FACTURACION_F_FECHA_DESDE);
    this.filterForm.controls.FechaDesde.setValue(this.filterFechaDesde);
    this.filterFechaHasta = this.sf.getState(this.sf.states.LOTE_FACTURACION_F_FECHA_HASTA);
    this.filterForm.controls.FechaHasta.setValue(this.filterFechaHasta);
    //listado
    this.page = Number(this.sf.getState(this.sf.states.LOTE_FACTURACION_L_PAGE));
    this.cantSearch = Number(this.sf.getState(this.sf.states.LOTE_FACTURACION_L_PAGESIZE));
    this.order = this.sf.getState(this.sf.states.LOTE_FACTURACION_L_ORDER);
    this.sentido = this.sf.getState(this.sf.states.LOTE_FACTURACION_L_SENTIDO);
  }
  /**
   * Método para escuchar a los cambios en el formulario de filtros
   */
  configuracionFilter() {
    this._unsubscribe.push(this.filterForm.controls.PeriodoDesde.valueChanges.subscribe(desde => {
      if (this.filtro || this.filtroMobile) {
        //SP SINWEB-599 Validación de periodo incompleto
        if (this.filterForm.controls.PeriodoDesde.valid) {
          this.filterPeriodoDesde = desde;
          this.page = 1;
          this.loadPage();
        }
      }
    }));
    this._unsubscribe.push(this.filterForm.controls.PeriodoHasta.valueChanges.subscribe(hasta => {
      if (this.filtro || this.filtroMobile) {
        //SP SINWEB-599 Validación de periodo incompleto
        if (this.filterForm.controls.PeriodoHasta.valid) {
          this.filterPeriodoHasta = hasta;
          this.page = 1;
          this.loadPage();
        }
      }
    }));
    this._unsubscribe.push(this.filterForm.controls.FechaDesde.valueChanges.subscribe(desde => {
      if (this.filtro || this.filtroMobile) {
        this.filterFechaDesde = desde;
        this.page = 1;
        this.loadPage();
      }
    }));
    this._unsubscribe.push(this.filterForm.controls.FechaHasta.valueChanges.subscribe(hasta => {
      if (this.filtro || this.filtroMobile) {
        this.filterFechaHasta = hasta;
        this.page = 1;
        this.loadPage();
      }
    }));
  }
  /**
   * Método para limpiar los filtros
   */
  cleanStates() {
    this.sf.cleanAllStates();
    this.resetComp();
  }
  /**
   * SP metodo llamado pro clean estate que reinicia los estados y filtros
   */
  resetComp() {
    this._unsubscribe.forEach(sub => {
      sub.unsubscribe();
    });
    this.page = 1;
    this.previousPage = 1;
    this.buscarNumero = '';
    this.inicializarEstado();
    this.configuracionFilter();
    this.loadPage();
  }
  /**
   * Método para cargar los datos de la página
   */
  loadPage() {
    this.onSearch(this.cargarFiltros(this.page, this.order, this.sentido));
  }
  /**
   * SP Método que cambia el tamaño de página y actualiza la búsqueda
   * @param {any} event Evento con la cantidad de registros a mostrar
   */
  setPage(event) {
    this.page = 1;
    this.cantSearch = event;
    this.loadPage();
  }
  /**
   * SP Método que setea el orden página y actualiza la búsqueda
   * @param {any} event Evento con el orden y sentido de la búsqueda
   */
  setOrder(event) {
    this.page = 1;
    this.order = event.id;
    this.sentido = event.sentido;
    this.loadPage();
  }
  /**
   * Método que trae los lotes
   * @param {object} datos Datos de búsqueda
   */
  onSearch(datos) {
    const susc = this.srvLoteFacturacionService.fetch(datos).subscribe(data => {
      this.lotes = data.Data;
      if (data.Data != undefined) {
        this.totalItems = data.TotalRecords;
      } else {
        this.totalItems = 0;
      }
    });
    susc.unsubscribe;
  }
  /**
   * SP SINWEB-346 Nuevo metodo usado al cambiar a la nueva tabla
   * @param $event
   */
  lazyLoadChange($event) {
    this.page = $event.page;
    this.order = $event.order;
    this.cantSearch = $event.cant;
    this.sentido = $event.sentido;
    this.loadPage();
  }
  /**
   * Método que carga los filtros de búsqueda para realizar la petición
   * @param {any} page Página actual
   * @param {any} order Orden
   * @param {any} sentido Sentido (ascendente o descendente)
   * @returns {object} Datos de búsqueda
   */
  cargarFiltros(page, order, sentido) {
    let datos = {};
    //paginacion
    datos.PageNumber = page;
    datos.PageSize = this.cantSearch;
    //SP SINWEB-38 parametros de orden
    datos.Orden = order;
    datos.SentidoOrden = sentido;
    //busqueda
    if (this.buscarNumero != undefined && this.buscarNumero != '') {
      datos.Numero = this.buscarNumero;
    }
    //filtros
    if (this.filterPeriodoDesde != undefined && this.filterPeriodoDesde != '') {
      datos.PeriodoDesde = this.filterPeriodoDesde;
    }
    if (this.filterPeriodoHasta != undefined && this.filterPeriodoHasta != '') {
      datos.PeriodoHasta = this.filterPeriodoHasta;
    }
    if (this.filterFechaDesde != undefined && this.filterFechaDesde != '') {
      datos.FechaDesde = (0,src_app_core_utils_metodos_metodos__WEBPACK_IMPORTED_MODULE_2__.formatFecha)(this.filterFechaDesde).concat(' 00:00');
    }
    if (this.filterFechaHasta != undefined && this.filterFechaHasta != '') {
      datos.FechaHasta = (0,src_app_core_utils_metodos_metodos__WEBPACK_IMPORTED_MODULE_2__.formatFecha)(this.filterFechaHasta).concat(' 23:59');
    }
    if (this.searchForm.controls.empleadoId.value != undefined && this.searchForm.controls.empleadoId.value != -1) {
      datos.IdEmpleado = this.searchForm.controls.empleadoId.value.toString();
    }
    if (this.searchForm.controls.sucursalId.value != undefined && this.searchForm.controls.sucursalId.value != -1) {
      datos.IdSucursal = this.searchForm.controls.sucursalId.value.toString();
    }
    //Almacenar el cambio de estado de los componentes
    if (datos.PageNumber != -1) {
      this.changeStates(datos);
    }
    return datos;
  }
  /**
   * PM  Método que realiza el cambio de los estados segun los valores elegidos
   * @param {any} datos Datos de búsqueda
   */
  changeStates(datos) {
    //busqueda
    this.sf.changeState(this.sf.states.LOTE_FACTURACION_S_NUMERO, !datos.Numero ? this.sf.states.LOTE_FACTURACION_S_NUMERO.default : datos.Numero);
    this.sf.changeState(this.sf.states.LOTE_FACTURACION_S_EMPLEADOID, !datos.IdEmpleado ? this.sf.states.LOTE_FACTURACION_S_EMPLEADOID.default : datos.IdEmpleado);
    this.sf.changeState(this.sf.states.LOTE_FACTURACION_S_EMPLEADO, !datos.IdEmpleado ? this.sf.states.LOTE_FACTURACION_S_EMPLEADO.default : this.searchForm.controls.empleado?.value);
    this.sf.changeState(this.sf.states.LOTE_FACTURACION_S_SUCURSALID, !datos.IdSucursal ? this.sf.states.LOTE_FACTURACION_S_SUCURSALID.default : datos.IdSucursal);
    this.sf.changeState(this.sf.states.LOTE_FACTURACION_S_SUCURSAL, !datos.IdSucursal ? this.sf.states.LOTE_FACTURACION_S_SUCURSAL.default : this.searchForm.controls.sucursal?.value);
    //filtros
    this.sf.changeState(this.sf.states.LOTE_FACTURACION_F_PERIODO_DESDE, !datos.PeriodoDesde ? this.sf.states.LOTE_FACTURACION_F_PERIODO_DESDE.default : this.filterPeriodoDesde);
    this.sf.changeState(this.sf.states.LOTE_FACTURACION_F_PERIODO_HASTA, !datos.PeriodoHasta ? this.sf.states.LOTE_FACTURACION_F_PERIODO_HASTA.default : this.filterPeriodoHasta);
    this.sf.changeState(this.sf.states.LOTE_FACTURACION_F_FECHA_DESDE, !datos.FechaDesde ? this.sf.states.LOTE_FACTURACION_F_FECHA_DESDE.default : this.filterFechaDesde);
    this.sf.changeState(this.sf.states.LOTE_FACTURACION_F_FECHA_HASTA, !datos.FechaHasta ? this.sf.states.LOTE_FACTURACION_F_FECHA_HASTA.default : this.filterFechaHasta);
    //listado
    this.sf.changeState(this.sf.states.LOTE_FACTURACION_L_PAGE, datos.PageNumber);
    this.sf.changeState(this.sf.states.LOTE_FACTURACION_L_PAGESIZE, datos.PageSize);
    this.sf.changeState(this.sf.states.LOTE_FACTURACION_L_ORDER, datos.Orden);
    this.sf.changeState(this.sf.states.LOTE_FACTURACION_L_SENTIDO, datos.SentidoOrden);
  }
  /**
   * SP Método para activar acción
   * @param {any} event Evento con la acción a realizar
   */
  acciones(event) {
    switch (event.accion) {
      case 'view':
        this.visualizar(event.registro);
        break;
      default:
        console.log(`La accion ${event.accion} no esta disponible`);
    }
  }
  visualizar(lote) {
    let modalRef;
    modalRef = this.modalService.open(_visualizar_lote_visualizar_lote_component__WEBPACK_IMPORTED_MODULE_5__.VisualizarLoteComponent, {
      size: 'xl',
      backdrop: 'static',
      keyboard: false,
      scrollable: true,
      backdropClass: 'back-z-index',
      windowClass: 'modal-z-index'
    });
    modalRef.componentInstance.loteId = lote.Id;
    modalRef.result.then(() => {});
  }
  /**
   * SP Método para cambio de página
   * @param {any} event Evento con la pagina
   */
  pageChange(event) {
    this.page = event;
    this.loadPage();
  }
  /**
   * Método para exportar a Excel
   */
  exportTo(extension) {
    let datos = this.cargarFiltros(-1, this.order, this.sentido);
    //datos.PageSize= this.totalItems;
    delete datos.PageSize;
    //SP se arman las columnas y keys para buscar datos y armar el excel
    const columns = ['Número', '(Cod) Empleado', '(Cod) Sucursal', 'Empresa', 'Fecha', 'Periodo'];
    const keys = ['Numero', 'CodEmpleado', 'CodSucursal', 'Sucursal.Empresa.NombreComercial', 'Fecha', 'Periodo'];
    this.alert.showLoadingAlert('Exportando Lotes de Facturación', 'Generando archivo ' + extension + ', este proceso puede tardar unos minutos');
    //SPllamada al recurso correspondiente de la api
    this.srvLoteFacturacionService.fetch(datos).subscribe(data => {
      // MC SINWEB-378 Exportación a Pdf
      let result = data.Data.map(item => {
        return {
          ...item,
          CodEmpleado: `(${item.Empleado.Codigo}) ${item.Empleado.Nombre}`,
          CodSucursal: `(${item.Sucursal.Codigo}) ${item.Sucursal.Nombre}`,
          Periodo: `${item.PeriodoMes}/${item.PeriodoAnio}`
        };
      });
      this.alert.closeLoadingAlert();
      this.alert.showBasicAlert('Lotes de Facturación Exportados', 'Generando archivo ' + extension, 'success');
      if (extension === 'Excel') {
        this.exportacion.exportToExcel(result, columns, keys, 'Listado de Lotes de Facturación');
      } else {
        this.exportacion.exportToPdf(result, columns, keys, 'Listado de Lotes de Facturación');
      }
    });
  }
  /**
   * SP Método get para obtener campo Lote
   * @returns {string} Número de Lote
   */
  getNumero() {
    return this.searchForm.controls.numero.value;
  }
  /**
   * SP Método para limpiar filtro
   */
  borrarNumero() {
    this.searchForm.get('numero').reset('');
    this.page = 1;
    this.buscarNumero = '';
    this.loadPage();
  }
  buscarPorNumero() {
    this.page = 1;
    this.buscarNumero = this.getNumero();
    this.loadPage();
  }
  /**
   * SP control de filtro no reactivo
   */
  busquedaNumero() {
    return this.buscarNumero != undefined && this.buscarNumero != '';
  }
  /**
   * SP Método para buscar empleados
   */
  buscarEmpleados() {
    const modalRef = this.modalService.open(_dashboards_core_seleccionar_empleado_seleccionar_empleado_component__WEBPACK_IMPORTED_MODULE_3__.SeleccionarEmpleadoComponent, {
      size: 'xl',
      backdropClass: 'back-z-index',
      windowClass: 'modal-z-index',
      backdrop: 'static',
      keyboard: false,
      scrollable: true
    });
    modalRef.componentInstance.filtros = {
      Multiple: false
    };
    modalRef.result.then(resolve => {
      if (resolve !== undefined) {
        this.searchForm.controls.empleadoId.setValue(resolve.IdEmpleado);
        this.searchForm.controls.empleado.setValue(resolve.Empleado);
        this.page = 1;
        this.loadPage();
      }
    });
  }
  /**
   * Método get para obtener campo empleado
   * @returns {any} Artículo
   */
  getEmpleado() {
    return this.searchForm.get('empleado').value;
  }
  /**
   * Método para limpiar filtro
   */
  borrarEmpleado() {
    this.searchForm.get('empleado').reset('');
    this.searchForm.get('empleadoId').reset(-1);
    this.page = 1;
    this.loadPage();
  }
  buscarSucursal() {
    const modalRef = this.modalService.open(_dashboards_core_seleccionar_sucursal_seleccionar_sucursal_component__WEBPACK_IMPORTED_MODULE_4__.SeleccionarSucursalComponent, {
      size: 'xl',
      backdropClass: 'back-z-index',
      windowClass: 'modal-z-index',
      backdrop: 'static',
      keyboard: false,
      scrollable: true
    });
    modalRef.componentInstance.filtros = {
      Multiple: false
    };
    modalRef.result.then(resolve => {
      if (resolve !== undefined) {
        this.searchForm.controls.sucursalId.setValue(resolve.IdSucursal);
        this.searchForm.controls.sucursal.setValue(resolve.Sucursal);
        this.page = 1;
        this.loadPage();
      }
    });
  }
  /**
   * Método get para obtener campo de sucursal
   * @returns {any} Artículo
   */
  getSucursal() {
    return this.searchForm.get('sucursal').value;
  }
  /**
   * Método para limpiar filtro
   */
  borrarSucursal() {
    this.searchForm.get('sucursal').reset('');
    this.searchForm.get('sucursalId').reset(-1);
    this.page = 1;
    this.loadPage();
  }
  /**
   * SP Método que inicia tour de la vista
   */
  iniciarTour() {
    this.tourService.start();
  }
  /**
   * SP Método para inicializar el objecto de pasos del tour
   */
  inicializarSteps() {
    //Traigo el json con los pasos del tour
    fetch('./assets/tours/servicios/lotes-facturacion.json').then(response => response.json()).then(tourLotesFact => {
      this.tourSteps = tourLotesFact;
      this.tourService.initialize(this.tourSteps);
    });
  }
  /**
   * SP Observable para realizar acciones durante los pasos
   */
  controlarTour() {
    this._unsubscribe.push(this.tourService.stepHide$.subscribe(step => {
      if (step.step.anchorId == 'searchSuc.anchor.id') {
        this.filtro = true;
      }
    }));
  }
  /**
   * SP SINWEB-599 Método para obtener el periodo de facturación desde
   */
  getPeriodoFactDesde() {
    return this.filterForm.controls.PeriodoDesde.value;
  }
  /**
   * SP SINWEB-599 Método para obtener el periodo de facturación hasta
   */
  getPeriodoFactHasta() {
    return this.filterForm.controls.PeriodoHasta.value;
  }
  /**
   * SP SINWEB-599 Método para setear el periodo de facturación desde
   * @param $event
   */
  setPeriodoFactDesde($event) {
    this.filterForm.controls.PeriodoDesde.setValue($event);
  }
  /**
   * SP SINWEB-599 Método para setear el periodo de facturación hasta
   * @param $event
   */
  setPeriodoFactHasta($event) {
    this.filterForm.controls.PeriodoHasta.setValue($event);
  }
  static #_ = this.ɵfac = function LotesFacturacionComponent_Factory(t) {
    return new (t || LotesFacturacionComponent)(_angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵdirectiveInject"](_angular_forms__WEBPACK_IMPORTED_MODULE_16__.FormBuilder), _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵdirectiveInject"](ngx_toastr__WEBPACK_IMPORTED_MODULE_17__.ToastrService), _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵdirectiveInject"](_ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_18__.NgbModal), _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵdirectiveInject"](src_app_core_services_alertCustom_service__WEBPACK_IMPORTED_MODULE_1__.AlertCustomService), _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵdirectiveInject"](src_app_core_services_exportacion_service__WEBPACK_IMPORTED_MODULE_8__.ExportacionService), _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵdirectiveInject"](_core_services_servicios_svrLoteFacturacion_service__WEBPACK_IMPORTED_MODULE_9__.SrvLoteFacturacionService), _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵdirectiveInject"](src_app_core_services_stateful_service__WEBPACK_IMPORTED_MODULE_10__.StatefulService), _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵdirectiveInject"](src_app_core_services_auth_service__WEBPACK_IMPORTED_MODULE_11__.AuthService), _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵdirectiveInject"](ngx_ui_tour_ng_bootstrap__WEBPACK_IMPORTED_MODULE_19__.TourService));
  };
  static #_2 = this.ɵcmp = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵdefineComponent"]({
    type: LotesFacturacionComponent,
    selectors: [["app-lotes-facturacion"]],
    features: [_angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵProvidersFeature"]([src_app_core_services_alertCustom_service__WEBPACK_IMPORTED_MODULE_1__.AlertCustomService])],
    decls: 64,
    vars: 28,
    consts: [[1, "row"], ["position", "left", 1, "d-block", "d-lg-none", 3, "visible", "visibleChange"], [1, "m-2"], [3, "ngTemplateOutlet"], ["class", "d-none d-lg-block col-xxl-2 col-xl-3", 4, "ngIf"], [3, "ngClass"], [1, "card"], [1, "card-body", "border-bottom"], [1, "d-flex", "flex-column", "flex-sm-row", "gap-2", "align-items-center"], [1, "mb-0", "card-title", "flex-grow-1", "d-flex", "flex-row"], ["tourAnchor", "lotes.anchor.id", 1, "mb-1", "align-self-center"], [1, "text-primary", 2, "cursor", "pointer", 3, "click"], [1, "bx", "bx-info-circle", "font-size-24", "align-self-center"], [1, "flex-shrink-0", "d-flex", "gap-1"], ["tourAnchor", "refresh.anchor.id", 1, "btn", "btn-light", 3, "click"], ["data-cy", "limpiar-filtros", "tourAnchor", "filtroReset.anchor.id", 3, "ngClass", "click"], ["ngbDropdown", "", 1, "dropdown", "d-inline-block"], ["tourAnchor", "export.anchor.id", "type", "menu", "id", "dropdownMenuButton1", "data-bs-toggle", "dropdown", "aria-expanded", "false", "ngbDropdownToggle", "", 1, "btn", "btn-success"], [1, "mdi", "mdi-dots-vertical"], ["aria-labelledby", "dropdownMenuButton1", "ngbDropdownMenu", "", 1, "dropdown-menu"], ["href", "javascript:void(0);", 1, "dropdown-item", 3, "click"], [3, "formGroup"], [1, "row", "g-3", "justify-content-center", "justify-content-lg-start"], [1, "col-auto", "d-none", "d-lg-block"], ["data-cy", "boton-filtro", 1, "btn", "btn-icon", "btn-soft-secondary", "w-100", 3, "click"], [1, "col-auto", "d-block", "d-lg-none"], ["data-cy", "boton-filtroMobile", 1, "btn", "btn-icon", "btn-soft-secondary", "w-100", 3, "click"], [1, "col-xxl-2", "col-lg-3"], ["tourAnchor", "searchNroLote.anchor.id", 1, "input-group"], ["mask", "0*", "type", "text", "formControlName", "numero", "placeholder", "Buscar por N\u00FAmero de Lote", "maxlength", "50", 1, "form-control", 3, "keyup.enter"], ["class", "btn btn-secondary", 3, "click", 4, "ngIf"], ["data-cy", "buscar-nroSerie-boton", 1, "btn", "btn-primary", 3, "click"], [1, "bx", "bx-search-alt-2"], [1, "col-xxl-3", "col-lg-4"], ["tourAnchor", "searchEmpl.anchor.id", 1, "input-group"], ["type", "search", "formControlName", "empleado", "placeholder", "Seleccionar Empleado", "readonly", "", 1, "form-control"], [1, "btn", "btn-primary", 3, "click"], ["tourAnchor", "searchSuc.anchor.id", 1, "input-group"], ["type", "search", "formControlName", "sucursal", "placeholder", "Seleccionar Sucursal", "readonly", "", 1, "form-control"], [1, "card-body"], ["anchorPaginacion", "paginasTablaLotes.anchor.id", "anchorRegistros", "registrosTablaLotes.anchor.id", 3, "columns", "datos", "page", "order", "sentido", "cant_search", "totalItems", "apiTable", "isLoading", "view", "acciones", "lazyLoad", "emitAction"], ["FILTRO", ""], [1, "d-none", "d-lg-block", "col-xxl-2", "col-xl-3"], ["tourAnchor", "filtroLotes.anchor.id", 1, "card", 3, "formGroup"], [1, "card-body", "p-2"], [1, "btn", "btn-secondary", 3, "click"], [1, "bx", "bx-x"], [3, "multiple", "activeIndex"], ["header", "Avanzados"], [1, "border", "border-1", "rounded", "border-opacity-10", "p-2", "mb-2"], [1, "text-muted"], [1, "text-muted", "font-size-12"], ["type", "date", "formControlName", "FechaDesde", "onkeypress", "return false", "onkeydown", "return false", 1, "form-control", "digits"], ["type", "date", "formControlName", "FechaHasta", "onkeypress", "return false", "onkeydown", "return false", 1, "form-control", "digits"], ["maxDate", "12/3000", 3, "valor", "valorEmit"]],
    template: function LotesFacturacionComponent_Template(rf, ctx) {
      if (rf & 1) {
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](0, "div", 0)(1, "p-sidebar", 1);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵlistener"]("visibleChange", function LotesFacturacionComponent_Template_p_sidebar_visibleChange_1_listener($event) {
          return ctx.filtroMobile = $event;
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](2, "div", 2);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵtemplate"](3, LotesFacturacionComponent_ng_template_3_Template, 0, 0, "ng-template", 3);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementEnd"]()();
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵtemplate"](4, LotesFacturacionComponent_div_4_Template, 4, 2, "div", 4);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](5, "div", 5)(6, "div", 6)(7, "div", 7)(8, "div", 8)(9, "span", 9)(10, "h5", 10);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵtext"](11, " Lotes de Facturaci\u00F3n ");
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵtext"](12, " \u00A0 ");
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](13, "a", 11);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵlistener"]("click", function LotesFacturacionComponent_Template_a_click_13_listener() {
          return ctx.iniciarTour();
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelement"](14, "i", 12);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementEnd"]()();
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](15, "div", 13)(16, "a", 14);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵlistener"]("click", function LotesFacturacionComponent_Template_a_click_16_listener() {
          return ctx.loadPage();
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelement"](17, "i", 5);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵpipe"](18, "async");
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](19, "a", 15);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵlistener"]("click", function LotesFacturacionComponent_Template_a_click_19_listener() {
          return ctx.cleanStates();
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelement"](20, "i", 5);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](21, "div", 16)(22, "button", 17);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelement"](23, "i", 18);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](24, "ul", 19)(25, "li")(26, "a", 20);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵlistener"]("click", function LotesFacturacionComponent_Template_a_click_26_listener() {
          return ctx.exportTo("Excel");
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵtext"](27, "Exportar Excel");
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementEnd"]()();
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](28, "li")(29, "a", 20);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵlistener"]("click", function LotesFacturacionComponent_Template_a_click_29_listener() {
          return ctx.exportTo("Pdf");
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵtext"](30, "Exportar Pdf");
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementEnd"]()()()()()()();
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](31, "div", 7);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementContainerStart"](32, 21);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](33, "div", 22)(34, "div", 23)(35, "a", 24);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵlistener"]("click", function LotesFacturacionComponent_Template_a_click_35_listener() {
          return ctx.filtro = !ctx.filtro;
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelement"](36, "i", 5);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementEnd"]()();
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](37, "div", 25)(38, "a", 26);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵlistener"]("click", function LotesFacturacionComponent_Template_a_click_38_listener() {
          return ctx.filtroMobile = !ctx.filtroMobile;
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelement"](39, "i", 5);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementEnd"]()();
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](40, "div", 27)(41, "div", 28)(42, "input", 29);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵlistener"]("keyup.enter", function LotesFacturacionComponent_Template_input_keyup_enter_42_listener() {
          return ctx.buscarPorNumero();
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵtemplate"](43, LotesFacturacionComponent_a_43_Template, 2, 0, "a", 30);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](44, "a", 31);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵlistener"]("click", function LotesFacturacionComponent_Template_a_click_44_listener() {
          return ctx.buscarPorNumero();
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelement"](45, "i", 32);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementEnd"]()()();
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](46, "div", 33)(47, "div", 34);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelement"](48, "input", 35);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵtemplate"](49, LotesFacturacionComponent_a_49_Template, 2, 0, "a", 30);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](50, "a", 36);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵlistener"]("click", function LotesFacturacionComponent_Template_a_click_50_listener() {
          return ctx.buscarEmpleados();
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelement"](51, "i", 32);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementEnd"]()()();
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](52, "div", 33)(53, "div", 37);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelement"](54, "input", 38);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵtemplate"](55, LotesFacturacionComponent_a_55_Template, 2, 0, "a", 30);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](56, "a", 36);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵlistener"]("click", function LotesFacturacionComponent_Template_a_click_56_listener() {
          return ctx.buscarSucursal();
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelement"](57, "i", 32);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementEnd"]()()()();
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementContainerEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](58, "div", 39)(59, "app-table2", 40);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵlistener"]("lazyLoad", function LotesFacturacionComponent_Template_app_table2_lazyLoad_59_listener($event) {
          return ctx.lazyLoadChange($event);
        })("emitAction", function LotesFacturacionComponent_Template_app_table2_emitAction_59_listener($event) {
          return ctx.acciones($event);
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵpipe"](60, "async");
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementEnd"]()()()()();
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵtemplate"](61, LotesFacturacionComponent_ng_template_61_Template, 21, 6, "ng-template", null, 41, _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵtemplateRefExtractor"]);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelement"](63, "app-tour");
      }
      if (rf & 2) {
        const _r6 = _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵreference"](62);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵadvance"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵproperty"]("visible", ctx.filtroMobile);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵadvance"](2);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵproperty"]("ngTemplateOutlet", _r6);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵadvance"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵproperty"]("ngIf", ctx.filtro);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵadvance"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵproperty"]("ngClass", ctx.filtro ? "col-xxl-10 col-xl-9" : "col-lg-12");
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵadvance"](12);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵproperty"]("ngClass", _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵpipeBind1"](18, 24, ctx.srvLoteFacturacionService.isLoading$) ? "bx bx-sync bx-spin font-size-16 align-middle" : "bx bx-sync font-size-16 align-middle");
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵadvance"](2);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵproperty"]("ngClass", ctx.sf.getCantCustomStates() > 0 ? "btn btn-danger" : "btn bg-danger bg-soft");
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵadvance"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵproperty"]("ngClass", "mdi mdi-filter-remove-outline mdi-16px align-middle");
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵadvance"](12);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵproperty"]("formGroup", ctx.searchForm);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵadvance"](4);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵproperty"]("ngClass", !ctx.filtro ? "mdi mdi-filter-outline mdi-18px align-middle" : "mdi mdi-filter-off-outline mdi-18px align-middle");
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵadvance"](3);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵproperty"]("ngClass", !ctx.filtroMobile ? "mdi mdi-filter-outline mdi-18px align-middle" : "mdi mdi-filter-off-outline mdi-18px align-middle");
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵadvance"](4);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵproperty"]("ngIf", ctx.busquedaNumero());
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵadvance"](6);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵproperty"]("ngIf", ctx.getEmpleado());
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵadvance"](6);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵproperty"]("ngIf", ctx.getSucursal());
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵadvance"](4);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵproperty"]("columns", ctx.lotesHeader)("datos", ctx.lotes)("page", ctx.page)("order", ctx.order)("sentido", ctx.sentido)("cant_search", ctx.cantSearch)("totalItems", ctx.totalItems)("apiTable", true)("isLoading", _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵpipeBind1"](60, 26, ctx.srvLoteFacturacionService.isLoading$))("view", ctx.permisosVisLote)("acciones", ctx.permisosVisLote);
      }
    },
    dependencies: [primeng_accordion__WEBPACK_IMPORTED_MODULE_20__.Accordion, primeng_accordion__WEBPACK_IMPORTED_MODULE_20__.AccordionTab, _angular_common__WEBPACK_IMPORTED_MODULE_21__.NgClass, _angular_common__WEBPACK_IMPORTED_MODULE_21__.NgIf, _angular_common__WEBPACK_IMPORTED_MODULE_21__.NgTemplateOutlet, _angular_forms__WEBPACK_IMPORTED_MODULE_16__.DefaultValueAccessor, _angular_forms__WEBPACK_IMPORTED_MODULE_16__.NgControlStatus, _angular_forms__WEBPACK_IMPORTED_MODULE_16__.NgControlStatusGroup, _angular_forms__WEBPACK_IMPORTED_MODULE_16__.MaxLengthValidator, _ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_18__.NgbDropdown, _ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_18__.NgbDropdownToggle, _ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_18__.NgbDropdownMenu, ngx_mask__WEBPACK_IMPORTED_MODULE_22__.NgxMaskDirective, _angular_forms__WEBPACK_IMPORTED_MODULE_16__.FormGroupDirective, _angular_forms__WEBPACK_IMPORTED_MODULE_16__.FormControlName, primeng_sidebar__WEBPACK_IMPORTED_MODULE_23__.Sidebar, ngx_ui_tour_ng_bootstrap__WEBPACK_IMPORTED_MODULE_19__.TourAnchorNgBootstrapDirective, _shared_widget_tour_tour_component__WEBPACK_IMPORTED_MODULE_12__.TourComponent, _shared_ui_table2_table2_component__WEBPACK_IMPORTED_MODULE_13__.Table2Component, _shared_ui_input_periodo_input_periodo_component__WEBPACK_IMPORTED_MODULE_14__.InputPeriodoComponent, _angular_common__WEBPACK_IMPORTED_MODULE_21__.AsyncPipe]
  });
}

/***/ }),

/***/ 27747:
/*!************************************************************************************************!*\
  !*** ./src/app/pages/servicios/lotes-facturacion/visualizar-lote/visualizar-lote.component.ts ***!
  \************************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   VisualizarLoteComponent: () => (/* binding */ VisualizarLoteComponent)
/* harmony export */ });
/* harmony import */ var src_app_core_utils_metodos_metodos__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../core/utils/metodos/metodos */ 38002);
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/common */ 96814);
/* harmony import */ var _angular_common_locales_es__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/common/locales/es */ 46828);
/* harmony import */ var src_app_core_services_alertCustom_service__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! src/app/core/services/alertCustom.service */ 53206);
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash */ 6990);
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/core */ 65879);
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @angular/forms */ 56223);
/* harmony import */ var _ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @ng-bootstrap/ng-bootstrap */ 85406);
/* harmony import */ var src_app_core_services_servicios_svrLoteFacturacion_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! src/app/core/services/servicios/svrLoteFacturacion.service */ 50145);
/* harmony import */ var src_app_core_services_exportacion_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! src/app/core/services/exportacion.service */ 18969);
/* harmony import */ var primeng_api__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! primeng/api */ 85219);
/* harmony import */ var primeng_button__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! primeng/button */ 40707);
/* harmony import */ var primeng_table__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! primeng/table */ 94267);
/* harmony import */ var ngx_ui_tour_ng_bootstrap__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ngx-ui-tour-ng-bootstrap */ 58469);

















function VisualizarLoteComponent_ng_container_5_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementContainerStart"](0);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementStart"](1, "div", 6)(2, "div", 7)(3, "label", 8);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵtext"](4, "N\u00B0 Lote");
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelement"](5, "input", 9);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementStart"](6, "div", 7)(7, "label", 10);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵtext"](8, "Fecha");
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelement"](9, "input", 11);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementStart"](10, "div", 7)(11, "label", 10);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵtext"](12, "Periodo");
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelement"](13, "input", 12);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementStart"](14, "div", 7)(15, "label", 8);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵtext"](16, "Empleado");
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelement"](17, "input", 13);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementStart"](18, "div", 7)(19, "label", 8);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵtext"](20, "Sucursal");
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelement"](21, "input", 14);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementStart"](22, "div", 7)(23, "label", 8);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵtext"](24, "Empresa");
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelement"](25, "input", 15);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementEnd"]()();
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementContainerEnd"]();
  }
  if (rf & 2) {
    const ctx_r0 = _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵnextContext"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵadvance"](5);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵproperty"]("ngModel", ctx_r0.loteDetalle.Numero);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵadvance"](4);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵproperty"]("ngModel", ctx_r0.getFechaComp(ctx_r0.loteDetalle.Fecha))("disabled", true);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵadvance"](4);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵproperty"]("ngModel", ctx_r0.getFechaMAComp(ctx_r0.loteDetalle.PeriodoMes + "/" + ctx_r0.loteDetalle.PeriodoAnio))("disabled", true);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵadvance"](4);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵproperty"]("ngModel", "(" + ctx_r0.loteDetalle.Empleado.Codigo + ") " + ctx_r0.loteDetalle.Empleado.Nombre);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵadvance"](4);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵproperty"]("ngModel", "(" + ctx_r0.loteDetalle.Sucursal.Codigo + ") " + ctx_r0.loteDetalle.Sucursal.Nombre);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵadvance"](4);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵproperty"]("ngModel", ctx_r0.loteDetalle.Sucursal.Empresa == null ? null : ctx_r0.loteDetalle.Sucursal.Empresa.NombreComercial);
  }
}
function VisualizarLoteComponent_ng_container_7_ng_template_8_Template(rf, ctx) {
  if (rf & 1) {
    const _r9 = _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵgetCurrentView"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementStart"](0, "div", 24)(1, "div", 25)(2, "input", 26);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵlistener"]("input", function VisualizarLoteComponent_ng_container_7_ng_template_8_Template_input_input_2_listener($event) {
      _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵrestoreView"](_r9);
      _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵnextContext"]();
      const _r3 = _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵreference"](7);
      return _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵresetView"](_r3.filterGlobal($event.target.value, "contains"));
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementStart"](3, "button", 27);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵlistener"]("click", function VisualizarLoteComponent_ng_container_7_ng_template_8_Template_button_click_3_listener() {
      _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵrestoreView"](_r9);
      _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵnextContext"]();
      const _r3 = _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵreference"](7);
      const ctx_r10 = _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵnextContext"]();
      return _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵresetView"](ctx_r10.clear(_r3));
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementEnd"]()();
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementStart"](4, "div", 28)(5, "button", 29);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelement"](6, "i", 30);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementStart"](7, "ul", 31)(8, "li")(9, "a", 32);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵlistener"]("click", function VisualizarLoteComponent_ng_container_7_ng_template_8_Template_a_click_9_listener() {
      _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵrestoreView"](_r9);
      const ctx_r11 = _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵnextContext"](2);
      return _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵresetView"](ctx_r11.exportTo("Excel"));
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵtext"](10, "Exportar Excel");
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementEnd"]()();
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementStart"](11, "li")(12, "a", 32);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵlistener"]("click", function VisualizarLoteComponent_ng_container_7_ng_template_8_Template_a_click_12_listener() {
      _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵrestoreView"](_r9);
      const ctx_r12 = _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵnextContext"](2);
      return _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵresetView"](ctx_r12.exportTo("Pdf"));
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵtext"](13, "Exportar Pdf");
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementEnd"]()()()()();
  }
}
function VisualizarLoteComponent_ng_container_7_ng_template_9_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementStart"](0, "tr");
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelement"](1, "th", 33);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementStart"](2, "th");
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵtext"](3, "N\u00FAmero");
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementStart"](4, "th");
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵtext"](5, "(Cod) Cliente");
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementStart"](6, "th");
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵtext"](7, "% Desc.");
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementStart"](8, "th");
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵtext"](9, "Total Final");
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementEnd"]()();
  }
}
const _c0 = a0 => [a0, "", "", ".2-2", "es"];
function VisualizarLoteComponent_ng_container_7_ng_template_10_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementStart"](0, "tr", 34)(1, "td");
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelement"](2, "button", 35);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementStart"](3, "td");
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵtext"](4);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementStart"](5, "td");
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵtext"](6);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementStart"](7, "td", 36);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵtext"](8);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵpipe"](9, "number");
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementStart"](10, "td", 36);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵtext"](11);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵpipe"](12, "currency");
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementEnd"]()();
  }
  if (rf & 2) {
    const item_r13 = ctx.$implicit;
    const expanded_r14 = ctx.expanded;
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵproperty"]("pRowToggler", item_r13)("icon", expanded_r14 ? "pi pi-chevron-down" : "pi pi-chevron-right");
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵtextInterpolate"](item_r13.Numero);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵtextInterpolate2"]("(", item_r13.Cliente.Codigo, ") ", item_r13.Cliente.Nombre, "");
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵtextInterpolate1"](" ", _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵpipeBind3"](9, 7, item_r13.PjeDescuento, "1.2-5", "es"), " % ");
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵadvance"](3);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵtextInterpolate1"](" $ ", _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵpipeBindV"](12, 11, _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵpureFunction1"](17, _c0, item_r13.Total)), " ");
  }
}
function VisualizarLoteComponent_ng_container_7_ng_template_11_ng_template_4_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementStart"](0, "tr")(1, "th");
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵtext"](2, "(Cod) Art\u00EDculo");
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementStart"](3, "th");
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵtext"](4, "Descripci\u00F3n");
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementStart"](5, "th");
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵtext"](6, "Cantidad");
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementStart"](7, "th");
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵtext"](8, "% Iva");
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementStart"](9, "th");
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵtext"](10, "% Desc");
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementStart"](11, "th");
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵtext"](12, "Total Neto");
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementStart"](13, "th");
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵtext"](14, "Total Final");
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementEnd"]()();
  }
}
function VisualizarLoteComponent_ng_container_7_ng_template_11_ng_template_5_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementStart"](0, "tr")(1, "td");
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵtext"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementStart"](3, "td");
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵtext"](4);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementStart"](5, "td", 36);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵtext"](6);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementStart"](7, "td", 36);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵtext"](8);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵpipe"](9, "number");
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementStart"](10, "td", 36);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵtext"](11);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵpipe"](12, "number");
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementStart"](13, "td", 36);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵtext"](14);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵpipe"](15, "number");
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementStart"](16, "td", 36);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵtext"](17);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵpipe"](18, "currency");
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementEnd"]()();
  }
  if (rf & 2) {
    const item_r19 = ctx.$implicit;
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵtextInterpolate2"]("(", item_r19.Codigo, ") ", item_r19.NombreCorto, "");
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵtextInterpolate"](item_r19.Descripcion);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵtextInterpolate"](item_r19.Cantidad);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵtextInterpolate1"](" ", _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵpipeBind3"](9, 8, item_r19.PjeIva, "1.2-5", "es"), " % ");
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵadvance"](3);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵtextInterpolate1"](" ", _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵpipeBind3"](12, 12, item_r19.PjeDescuento, "1.2-5", "es"), " % ");
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵadvance"](3);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵtextInterpolate1"](" $ ", _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵpipeBind3"](15, 16, item_r19.TotalNeto, "1.2-5", "es"), " ");
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵadvance"](3);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵtextInterpolate1"](" $ ", _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵpipeBindV"](18, 20, _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵpureFunction1"](26, _c0, item_r19.TotalFinal)), " ");
  }
}
function VisualizarLoteComponent_ng_container_7_ng_template_11_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementStart"](0, "tr", 37)(1, "td")(2, "div", 38)(3, "p-table", 39);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵtemplate"](4, VisualizarLoteComponent_ng_container_7_ng_template_11_ng_template_4_Template, 15, 0, "ng-template", 21)(5, VisualizarLoteComponent_ng_container_7_ng_template_11_ng_template_5_Template, 19, 28, "ng-template", 22);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementEnd"]()()()();
  }
  if (rf & 2) {
    const item_r16 = ctx.$implicit;
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵattribute"]("colspan", 24);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵproperty"]("value", item_r16.Articulos)("rowHover", true)("scrollable", true)("responsive", true);
  }
}
const _c1 = () => [10, 20, 50, 100, 200];
const _c2 = () => ({
  "min-width": "50rem"
});
const _c3 = () => ["Numero", "Cliente.Nombre", "Cliente.Codigo"];
function VisualizarLoteComponent_ng_container_7_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementContainerStart"](0);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementStart"](1, "div", 6)(2, "div", 2);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵtext"](3, " Ventas ");
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementStart"](4, "div", 16)(5, "div", 17)(6, "p-table", 18, 19);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵtemplate"](8, VisualizarLoteComponent_ng_container_7_ng_template_8_Template, 14, 0, "ng-template", 20)(9, VisualizarLoteComponent_ng_container_7_ng_template_9_Template, 10, 0, "ng-template", 21)(10, VisualizarLoteComponent_ng_container_7_ng_template_10_Template, 13, 19, "ng-template", 22)(11, VisualizarLoteComponent_ng_container_7_ng_template_11_Template, 6, 5, "ng-template", 23);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementEnd"]()()()();
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementContainerEnd"]();
  }
  if (rf & 2) {
    const ctx_r1 = _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵnextContext"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵadvance"](6);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵproperty"]("value", ctx_r1.loteDetalle.Ventas)("paginator", true)("rows", 10)("showCurrentPageReport", true)("rowsPerPageOptions", _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵpureFunction0"](11, _c1))("tableStyle", _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵpureFunction0"](12, _c2))("scrollable", true)("responsive", true)("expandedRowKeys", ctx_r1.expandedRows)("resetPageOnSort", true)("globalFilterFields", _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵpureFunction0"](13, _c3));
  }
}
function VisualizarLoteComponent_ng_container_9_Template(rf, ctx) {
  if (rf & 1) {
    const _r21 = _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵgetCurrentView"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementContainerStart"](0);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementStart"](1, "button", 40);
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵlistener"]("click", function VisualizarLoteComponent_ng_container_9_Template_button_click_1_listener() {
      _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵrestoreView"](_r21);
      const ctx_r20 = _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵnextContext"]();
      return _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵresetView"](ctx_r20.modal.dismiss());
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵtext"](2, " Aceptar ");
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementContainerEnd"]();
  }
}
class VisualizarLoteComponent {
  constructor(fb, modal, srvLoteFacturacionService, alert, exportacion) {
    this.fb = fb;
    this.modal = modal;
    this.srvLoteFacturacionService = srvLoteFacturacionService;
    this.alert = alert;
    this.exportacion = exportacion;
    this.subscriptions = [];
    this.btnActivo = true;
    this.expandedRows = {};
  }
  ngOnInit() {
    (0,_angular_common__WEBPACK_IMPORTED_MODULE_6__.registerLocaleData)(_angular_common_locales_es__WEBPACK_IMPORTED_MODULE_7__["default"]);
    this.cargarLoteDetalle();
  }
  cargarLoteDetalle() {
    this.srvLoteFacturacionService.SerchById(this.loteId).subscribe(resp => {
      if (resp != undefined) {
        this.loteDetalle = resp;
      }
    });
  }
  ngOnDestroy() {
    this.subscriptions.forEach(sb => sb.unsubscribe());
  }
  getFechaComp(fecha) {
    return (0,src_app_core_utils_metodos_metodos__WEBPACK_IMPORTED_MODULE_0__.formatFechaComp)(fecha);
  }
  getFechaMAComp(fecha) {
    return (0,src_app_core_utils_metodos_metodos__WEBPACK_IMPORTED_MODULE_0__.formatMMYYYYComp)(fecha);
  }
  allCollapse() {
    this.expandedRows = {};
  }
  //SP SINWEB-187 metodo para controlar si hay algo expandido
  someExpanded() {
    return Object.keys(this.expandedRows).length > 0;
  }
  clear(table) {
    table.clear();
  }
  exportTo(extension) {
    //SP se arman las columnas y keys para buscar datos y armar el excel
    const columns = ['Número Fact.', '(Cod) Cliente', '% Desc Fact.', 'Total Final Fact.', '(Cod) Artículo', 'Descrición', 'Cant. Ítem Fact.', '% Iva Ítem Fact.', '% Desc Ítem Fact.', 'Total Neto Ítem Fact.', 'Total Final Ítem Fact.'];
    const keys = ['Numero', 'CodCliente', 'PjeDescuento', 'TotalFinal', 'CodArticulo', 'Descripcion', 'CantidadItem', 'PjeIvaItem', 'PjeDescuentoItem', 'TotalNetoItem', 'TotalFinalItem'];
    this.alert.showLoadingAlert('Exportando Ventas del Lote', 'Generando archivo ' + extension + ', este proceso puede tardar unos minutos');
    let result = lodash__WEBPACK_IMPORTED_MODULE_2__.flatMap(this.loteDetalle.Ventas, factura => {
      return lodash__WEBPACK_IMPORTED_MODULE_2__.map(factura.Articulos, articulo => {
        return lodash__WEBPACK_IMPORTED_MODULE_2__.merge({}, {
          Numero: factura.Numero,
          CodCliente: '(' + factura.Cliente.Codigo + ') ' + factura.Cliente.Nombre,
          PjeDescuento: factura.PjeDescuento + ' %',
          TotalFinal: '$ ' + factura.Total
        }, {
          CodArticulo: '(' + articulo.Codigo + ') ' + articulo.NombreCorto,
          Descripcion: articulo.Descripcion,
          CantidadItem: articulo.Cantidad,
          PjeIvaItem: articulo.PjeIva + ' %',
          PjeDescuentoItem: articulo.PjeDescuento + ' %',
          TotalNetoItem: '$ ' + articulo.TotalNeto,
          TotalFinalItem: '$ ' + articulo.TotalFinal
        });
      });
    });
    this.alert.closeLoadingAlert();
    this.alert.showBasicAlert('Ventas del lote Exportadas', 'Generando archivo ' + extension, 'success');
    if (extension === 'Excel') {
      this.exportacion.exportToExcel(result, columns, keys, 'Ventas del lote');
    } else {
      this.exportacion.exportToPdf(result, columns, keys, 'Listado de Ventas del lote');
    }
  }
  static #_ = this.ɵfac = function VisualizarLoteComponent_Factory(t) {
    return new (t || VisualizarLoteComponent)(_angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵdirectiveInject"](_angular_forms__WEBPACK_IMPORTED_MODULE_8__.FormBuilder), _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵdirectiveInject"](_ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_9__.NgbActiveModal), _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵdirectiveInject"](src_app_core_services_servicios_svrLoteFacturacion_service__WEBPACK_IMPORTED_MODULE_3__.SrvLoteFacturacionService), _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵdirectiveInject"](src_app_core_services_alertCustom_service__WEBPACK_IMPORTED_MODULE_1__.AlertCustomService), _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵdirectiveInject"](src_app_core_services_exportacion_service__WEBPACK_IMPORTED_MODULE_4__.ExportacionService));
  };
  static #_2 = this.ɵcmp = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵdefineComponent"]({
    type: VisualizarLoteComponent,
    selectors: [["app-visualizar-lote"]],
    inputs: {
      loteId: "loteId"
    },
    features: [_angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵProvidersFeature"]([src_app_core_services_alertCustom_service__WEBPACK_IMPORTED_MODULE_1__.AlertCustomService])],
    decls: 10,
    vars: 3,
    consts: [[1, "modal-content"], [1, "modal-header"], ["id", "example-modal-sizes-title-lg", 1, "modal-title", "h4"], [1, "overlay", "overlay-block", "cursor-default", "modal-body", 2, "min-height", "200px"], [4, "ngIf"], [1, "modal-footer"], [1, "form-group", "row"], [1, "col-lg-4", "p-2"], [1, "form-label"], ["type", "text", "name", "SrvContratado", "autocomplete", "off", "disabled", "", 1, "form-control", "form-control-solid", 3, "ngModel"], [1, "text-muted"], ["type", "date", 1, "form-control", "digits", 3, "ngModel", "disabled"], ["type", "month", 1, "form-control", "digits", 3, "ngModel", "disabled"], ["type", "text", "name", "empleado", "autocomplete", "off", "disabled", "", 1, "form-control", "form-control-solid", 3, "ngModel"], ["type", "text", "name", "sucursal", "autocomplete", "off", "disabled", "", 1, "form-control", "form-control-solid", 3, "ngModel"], ["type", "text", "name", "empresa", "autocomplete", "off", "disabled", "", 1, "form-control", "form-control-solid", 3, "ngModel"], [1, "col-lg-12"], [1, "table-responsive"], ["first", "0", "currentPageReportTemplate", "P\u00E1gina {currentPage} con {rows} de {totalRecords}", "styleClass", "p-datatable-gridlines", "dataKey", "Id", 3, "value", "paginator", "rows", "showCurrentPageReport", "rowsPerPageOptions", "tableStyle", "scrollable", "responsive", "expandedRowKeys", "resetPageOnSort", "globalFilterFields"], ["dt1", ""], ["pTemplate", "caption"], ["pTemplate", "header"], ["pTemplate", "body"], ["pTemplate", "rowexpansion"], [1, "d-flex", "gap-2"], [1, "input-group"], ["pInputText", "", "type", "text", "placeholder", "Buscar por n\u00FAmero, Cliente, Cliente Cod.", 1, "form-control", 3, "input"], ["pButton", "", "label", "Borrar", "icon", "pi pi-filter-slash", 1, "btn", "btn-outline-primary", 3, "click"], ["ngbDropdown", "", 1, "dropdown", "d-inline-block"], ["tourAnchor", "export.anchor.id", "type", "menu", "id", "dropdownMenuButton1", "data-bs-toggle", "dropdown", "aria-expanded", "false", "ngbDropdownToggle", "", 1, "btn", "btn-success"], [1, "mdi", "mdi-dots-vertical"], ["aria-labelledby", "dropdownMenuButton1", "ngbDropdownMenu", "", 1, "dropdown-menu"], ["href", "javascript:void(0);", 1, "dropdown-item", 3, "click"], [2, "width", "3rem"], [1, "animate__animated", "animate__fadeIn"], ["type", "button", "pButton", "", "pRipple", "", 1, "p-button-text", "p-button-rounded", "p-button-plain", 3, "pRowToggler", "icon"], [1, "text-end"], [1, "bg-info", "bg-soft"], [1, "p-p-3", "animate__animated", "animate__fadeIn", "animate__faster"], ["scrollDirection", "horizontal", "frozenWidth", "300px", 3, "value", "rowHover", "scrollable", "responsive"], ["type", "button", 1, "btn", "btn-success", "btn-elevate", "mr-2", 3, "click"]],
    template: function VisualizarLoteComponent_Template(rf, ctx) {
      if (rf & 1) {
        _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementStart"](0, "div", 0)(1, "div", 1)(2, "div", 2);
        _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵtext"](3, " Lote de Facturaci\u00F3n ");
        _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementEnd"]()();
        _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementStart"](4, "div", 3);
        _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵtemplate"](5, VisualizarLoteComponent_ng_container_5_Template, 26, 8, "ng-container", 4);
        _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementStart"](6, "div", 3);
        _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵtemplate"](7, VisualizarLoteComponent_ng_container_7_Template, 12, 14, "ng-container", 4);
        _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementStart"](8, "div", 5);
        _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵtemplate"](9, VisualizarLoteComponent_ng_container_9_Template, 3, 0, "ng-container", 4);
        _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementEnd"]()();
      }
      if (rf & 2) {
        _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵadvance"](5);
        _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵproperty"]("ngIf", ctx.loteDetalle);
        _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵadvance"](2);
        _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵproperty"]("ngIf", ctx.loteDetalle);
        _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵadvance"](2);
        _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵproperty"]("ngIf", ctx.loteDetalle);
      }
    },
    dependencies: [primeng_api__WEBPACK_IMPORTED_MODULE_10__.PrimeTemplate, primeng_button__WEBPACK_IMPORTED_MODULE_11__.ButtonDirective, _angular_common__WEBPACK_IMPORTED_MODULE_6__.NgIf, _angular_forms__WEBPACK_IMPORTED_MODULE_8__.DefaultValueAccessor, _angular_forms__WEBPACK_IMPORTED_MODULE_8__.NgControlStatus, _angular_forms__WEBPACK_IMPORTED_MODULE_8__.NgModel, _ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_9__.NgbDropdown, _ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_9__.NgbDropdownToggle, _ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_9__.NgbDropdownMenu, primeng_table__WEBPACK_IMPORTED_MODULE_12__.Table, primeng_table__WEBPACK_IMPORTED_MODULE_12__.RowToggler, ngx_ui_tour_ng_bootstrap__WEBPACK_IMPORTED_MODULE_13__.TourAnchorNgBootstrapDirective, _angular_common__WEBPACK_IMPORTED_MODULE_6__.DecimalPipe, _angular_common__WEBPACK_IMPORTED_MODULE_6__.CurrencyPipe],
    styles: [".p-paginator {\n  justify-content: end;\n}\n@media (max-width: 576px) {\n   .p-paginator {\n    margin-top: 30px;\n    justify-content: center;\n  }\n}\n\n  .p-paginator {\n  justify-content: end;\n}\n@media (max-width: 576px) {\n    .p-paginator {\n    justify-content: center;\n  }\n}\n\n  .p-paginator .p-paginator-pages .p-paginator-page,   .p-paginator .p-paginator-first,  .p-paginator .p-paginator-prev,   .p-paginator .p-paginator-next,  .p-paginator .p-paginator-last,  .p-paginator .p-dropdown {\n  justify-self: flex-end;\n  border: 1px solid rgba(73, 80, 87, 0.25);\n  border-radius: initial !important;\n  background-color: initial !important;\n  height: 37px;\n  min-width: 35px;\n  margin: 0;\n  padding: 0;\n  font-size: 13px;\n}\n@media (max-width: 576px) {\n    .p-paginator .p-paginator-pages .p-paginator-page,   .p-paginator .p-paginator-first,  .p-paginator .p-paginator-prev,   .p-paginator .p-paginator-next,  .p-paginator .p-paginator-last,  .p-paginator .p-dropdown {\n    font-size: 11.375px;\n    height: 27px;\n    min-width: 21px;\n  }\n}\n  .p-paginator .p-paginator-pages .p-paginator-page.p-link:hover:active,   .p-paginator .p-paginator-first.p-link:hover:active,  .p-paginator .p-paginator-prev.p-link:hover:active,   .p-paginator .p-paginator-next.p-link:hover:active,  .p-paginator .p-paginator-last.p-link:hover:active,  .p-paginator .p-dropdown.p-link:hover:active {\n  border: 1px solid rgba(73, 80, 87, 0.25) !important;\n}\n  .p-paginator .p-paginator-pages .p-paginator-page.p-link:hover:not(:active),   .p-paginator .p-paginator-first.p-link:hover:not(:active),  .p-paginator .p-paginator-prev.p-link:hover:not(:active),   .p-paginator .p-paginator-next.p-link:hover:not(:active),  .p-paginator .p-paginator-last.p-link:hover:not(:active),  .p-paginator .p-dropdown.p-link:hover:not(:active) {\n  border: 1px solid rgba(73, 80, 87, 0.25) !important;\n}\n  .p-paginator .p-paginator-pages .p-paginator-page .p-link:focus,   .p-paginator .p-paginator-first .p-link:focus,  .p-paginator .p-paginator-prev .p-link:focus,   .p-paginator .p-paginator-next .p-link:focus,  .p-paginator .p-paginator-last .p-link:focus,  .p-paginator .p-dropdown .p-link:focus {\n  outline: 0 none;\n  outline-offset: 0;\n  \n\n}\n  .p-paginator .p-paginator-pages .p-paginator-page.p-highlight,   .p-paginator .p-paginator-first.p-highlight,  .p-paginator .p-paginator-prev.p-highlight,   .p-paginator .p-paginator-next.p-highlight,  .p-paginator .p-paginator-last.p-highlight,  .p-paginator .p-dropdown.p-highlight {\n  background-color: #0070af !important;\n  color: #fff;\n  border: 1px solid rgba(73, 80, 87, 0.25);\n}\n  .p-paginator .p-paginator-pages .p-paginator-page .pi,   .p-paginator .p-paginator-first .pi,  .p-paginator .p-paginator-prev .pi,   .p-paginator .p-paginator-next .pi,  .p-paginator .p-paginator-last .pi,  .p-paginator .p-dropdown .pi {\n  font-size: 13px;\n}\n@media (max-width: 576px) {\n    .p-paginator .p-paginator-pages .p-paginator-page .pi,   .p-paginator .p-paginator-first .pi,  .p-paginator .p-paginator-prev .pi,   .p-paginator .p-paginator-next .pi,  .p-paginator .p-paginator-last .pi,  .p-paginator .p-dropdown .pi {\n    font-size: 11.375px;\n  }\n}\n\n .p-paginator .p-dropdown .p-dropdown-label {\n  padding: 8px;\n  align-self: center;\n  font-size: 13px;\n}\n@media (max-width: 576px) {\n   .p-paginator .p-dropdown .p-dropdown-label {\n    padding: 6px;\n    font-size: 11.375px;\n  }\n}\n\n  .p-datatable .p-paginator-bottom {\n  border: none;\n}\n\n  .p-datatable.p-datatable-gridlines .p-paginator-bottom {\n  justify-content: end;\n}\n@media (max-width: 576px) {\n    .p-datatable.p-datatable-gridlines .p-paginator-bottom {\n    margin-top: 30px;\n    justify-content: center;\n  }\n}\n\n  .p-dropdown-items-wrapper .p-dropdown-items {\n  padding: 0.5rem;\n}\n\n .p-paginator .p-paginator-current {\n  position: absolute;\n  left: 0;\n  font-size: 13px;\n}\n@media (max-width: 576px) {\n   .p-paginator .p-paginator-current {\n    left: 50%;\n    bottom: 4%;\n    transform: translateX(-50%);\n  }\n}"]
  });
}

/***/ }),

/***/ 64282:
/*!******************************************************************************************!*\
  !*** ./src/app/pages/servicios/movimientos/movimiento-edit/movimiento-edit.component.ts ***!
  \******************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   MovimientoEditComponent: () => (/* binding */ MovimientoEditComponent)
/* harmony export */ });
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/forms */ 56223);
/* harmony import */ var src_app_core_services_viewHelper_service__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! src/app/core/services/viewHelper.service */ 90556);
/* harmony import */ var src_app_core_utils_metodos_metodos__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../core/utils/metodos/metodos */ 38002);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/core */ 65879);
/* harmony import */ var _core_services_servicios_srvContratadoConcepto_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../core/services/servicios/srvContratadoConcepto.service */ 26157);
/* harmony import */ var _ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @ng-bootstrap/ng-bootstrap */ 85406);
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @angular/common */ 96814);
/* harmony import */ var _core_directives_campo_obligatorio_directive__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../core/directives/campo-obligatorio.directive */ 61528);
/* harmony import */ var _shared_ui_checkbox_checkbox_component__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../shared/ui/checkbox/checkbox.component */ 79468);
/* harmony import */ var _shared_ui_input_number_input_number_component__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../shared/ui/input-number/input-number.component */ 62271);













function MovimientoEditComponent_ng_container_3_ng_container_1_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementContainerStart"](0);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](1, "Editar");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementContainerEnd"]();
  }
}
function MovimientoEditComponent_ng_container_3_ng_container_2_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementContainerStart"](0);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](1, "Nuevo");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementContainerEnd"]();
  }
}
function MovimientoEditComponent_ng_container_3_ng_container_4_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementContainerStart"](0);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](1);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementContainerEnd"]();
  }
  if (rf & 2) {
    const ctx_r7 = _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵnextContext"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtextInterpolate1"]("'", ctx_r7.movimiento.Nombre, "'");
  }
}
function MovimientoEditComponent_ng_container_3_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementContainerStart"](0);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtemplate"](1, MovimientoEditComponent_ng_container_3_ng_container_1_Template, 2, 0, "ng-container", 3)(2, MovimientoEditComponent_ng_container_3_ng_container_2_Template, 2, 0, "ng-container", 3);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](3, " movimiento ");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtemplate"](4, MovimientoEditComponent_ng_container_3_ng_container_4_Template, 2, 1, "ng-container", 3);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementContainerEnd"]();
  }
  if (rf & 2) {
    const ctx_r0 = _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵnextContext"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵproperty"]("ngIf", ctx_r0.movimiento.Id);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵproperty"]("ngIf", !ctx_r0.movimiento.Id);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵproperty"]("ngIf", ctx_r0.movimiento.Id);
  }
}
function MovimientoEditComponent_ng_container_5_div_35_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](0, "div", 27);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](1, " Observaci\u00F3n correcta ");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]();
  }
}
function MovimientoEditComponent_ng_container_5_div_36_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](0, "div", 28);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](1, " Observaci\u00F3n no debe tener m\u00E1s de 200 caracteres ");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]();
  }
}
function MovimientoEditComponent_ng_container_5_Template(rf, ctx) {
  if (rf & 1) {
    const _r11 = _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵgetCurrentView"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementContainerStart"](0);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](1, "form", 8)(2, "div", 9)(3, "div", 10)(4, "label", 11);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](5, "Servicio Contratado");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelement"](6, "input", 12);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](7, "div", 10)(8, "label", 11);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](9, "Cliente");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelement"](10, "input", 13);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](11, "div", 14)(12, "label", 11);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](13, "Observaci\u00F3n Serv. Contratado");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelement"](14, "input", 15);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](15, "div", 16)(16, "label", 17);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](17, "Cantidad de Items");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](18, "app-input-number", 18);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵlistener"]("emitValue", function MovimientoEditComponent_ng_container_5_Template_app_input_number_emitValue_18_listener($event) {
      _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵrestoreView"](_r11);
      const ctx_r10 = _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵnextContext"]();
      return _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵresetView"](ctx_r10.setCantidad($event));
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]()();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](19, "div", 19);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelement"](20, "label", 11);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](21, "app-checkbox", 20);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵlistener"]("emitAction", function MovimientoEditComponent_ng_container_5_Template_app_checkbox_emitAction_21_listener() {
      _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵrestoreView"](_r11);
      const ctx_r12 = _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵnextContext"]();
      return _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵresetView"](ctx_r12.setMov());
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]()();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](22, "div", 10)(23, "label", 21);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](24, "Fecha");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelement"](25, "input", 22);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](26, "div", 10)(27, "label", 21);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](28, "Fecha de Inicio de Facturaci\u00F3n");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelement"](29, "input", 22);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](30, "div", 14)(31, "label", 23);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](32, "Observaci\u00F3n");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](33, "textarea", 24);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](34, "            ");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtemplate"](35, MovimientoEditComponent_ng_container_5_div_35_Template, 2, 0, "div", 25)(36, MovimientoEditComponent_ng_container_5_div_36_Template, 2, 0, "div", 26);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]()()();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementContainerEnd"]();
  }
  if (rf & 2) {
    const ctx_r1 = _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵnextContext"]();
    const _r4 = _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵreference"](11);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵproperty"]("formGroup", ctx_r1.formGroup);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"](17);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵproperty"]("value", ctx_r1.getCantidad())("isInvalid", ctx_r1.getCantidad() == null)("isValid", ctx_r1.getCantidad() != null)("decimals", 0)("templateErrors", _r4);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"](3);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵproperty"]("title", ctx_r1.getMov() ? "Alta" : "Baja")("value", ctx_r1.getMov());
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"](4);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵclassProp"]("is-invalid", ctx_r1.vh.controlHasError("required", "Fecha"))("is-valid", ctx_r1.vh.isControlValid("Fecha"));
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵproperty"]("formControlName", "Fecha");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"](4);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵclassProp"]("is-invalid", ctx_r1.vh.controlHasError("required", "FechaInicioFact"))("is-valid", ctx_r1.vh.isControlValid("FechaInicioFact"));
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵproperty"]("formControlName", "FechaInicioFact");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"](4);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵclassProp"]("is-invalid", ctx_r1.vh.controlHasError("maxlength", "Observacion"))("is-valid", ctx_r1.vh.isControlValid("Observacion"));
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵproperty"]("ngIf", ctx_r1.vh.isControlValid("Observacion"));
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵproperty"]("ngIf", ctx_r1.vh.controlHasError("maxlength", "Observacion"));
  }
}
function MovimientoEditComponent_ng_container_9_i_4_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelement"](0, "i", 31);
  }
}
function MovimientoEditComponent_ng_container_9_Template(rf, ctx) {
  if (rf & 1) {
    const _r15 = _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵgetCurrentView"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementContainerStart"](0);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](1, "button", 29);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵlistener"]("click", function MovimientoEditComponent_ng_container_9_Template_button_click_1_listener() {
      _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵrestoreView"](_r15);
      const ctx_r14 = _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵnextContext"]();
      return _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵresetView"](ctx_r14.save());
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵpipe"](2, "async");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](3, " Guardar ");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtemplate"](4, MovimientoEditComponent_ng_container_9_i_4_Template, 1, 0, "i", 30);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵpipe"](5, "async");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementContainerEnd"]();
  }
  if (rf & 2) {
    const ctx_r2 = _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵnextContext"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵproperty"]("disabled", ctx_r2.formGroup.invalid || _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵpipeBind1"](2, 2, ctx_r2.srvContratadoConceptoService.isLoading$));
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"](3);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵproperty"]("ngIf", _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵpipeBind1"](5, 4, ctx_r2.srvContratadoConceptoService.isLoading$));
  }
}
function MovimientoEditComponent_ng_template_10_div_0_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](0, "div", 27);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](1, " Cantidad correcta ");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]();
  }
}
function MovimientoEditComponent_ng_template_10_div_1_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](0, "div", 28);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](1, " Cantidad requerida ");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]();
  }
}
function MovimientoEditComponent_ng_template_10_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtemplate"](0, MovimientoEditComponent_ng_template_10_div_0_Template, 2, 0, "div", 25)(1, MovimientoEditComponent_ng_template_10_div_1_Template, 2, 0, "div", 26);
  }
  if (rf & 2) {
    const ctx_r3 = _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵnextContext"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵproperty"]("ngIf", ctx_r3.getCantidad() != null);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵproperty"]("ngIf", ctx_r3.getCantidad() == null);
  }
}
class MovimientoEditComponent {
  constructor(srvContratadoConceptoService, fb, modal, vh) {
    this.srvContratadoConceptoService = srvContratadoConceptoService;
    this.fb = fb;
    this.modal = modal;
    this.vh = vh;
    this.subscriptions = [];
    this.btnActivo = true;
  }
  ngOnInit() {
    if (this.movimiento == undefined) {
      this.movimiento = {
        Id: undefined,
        IdSrvContratado: this.srvContratadoId,
        Movimiento: 'A',
        Cantidad: 0,
        Fecha: (0,src_app_core_utils_metodos_metodos__WEBPACK_IMPORTED_MODULE_1__.fechaActual)(),
        FechaInicioFact: (0,src_app_core_utils_metodos_metodos__WEBPACK_IMPORTED_MODULE_1__.fechaActual)(),
        Observacion: ''
      };
    }
    this.loadForm();
  }
  /**
   * SP carga el formulario
   */
  loadForm() {
    this.formGroup = this.fb.group({
      SrvContratadoId: [this.movimiento.IdSrvContratado],
      SrvContratado: ['(' + this.srvContratadoData.Articulo.Codigo + ') ' + this.srvContratadoData.Articulo.Nombre],
      SrvCliente: ['(' + this.srvContratadoData.Cliente.Codigo + ') ' + this.srvContratadoData.Cliente.Nombre],
      SrvObservacion: [this.srvContratadoData.Observacion],
      Movimiento: [this.movimiento.Movimiento == 'A' ? true : false],
      Cantidad: [this.movimiento.Cantidad, _angular_forms__WEBPACK_IMPORTED_MODULE_7__.Validators.required],
      Fecha: [this.movimiento.Fecha, _angular_forms__WEBPACK_IMPORTED_MODULE_7__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_7__.Validators.required])],
      FechaInicioFact: [this.movimiento.FechaInicioFact, _angular_forms__WEBPACK_IMPORTED_MODULE_7__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_7__.Validators.required])],
      Observacion: [this.movimiento.Observacion, _angular_forms__WEBPACK_IMPORTED_MODULE_7__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_7__.Validators.maxLength(200)])]
    });
    this.vh.inicializar();
    this.vh.formGroup = this.formGroup;
  }
  ngOnDestroy() {
    this.subscriptions.forEach(sb => sb.unsubscribe());
  }
  /**
   * SP metodo que llama a editar o guardar
   */
  save() {
    this.formGroup.markAllAsTouched();
    if (!this.formGroup.valid) {
      return;
    }
    this.prepararAtributo();
    if (this.movimiento.Id) {
      this.edit();
    } else {
      this.create();
    }
  }
  /**
   * SP llama a endpoint de la api y edita CRUD
   */
  edit() {
    const sbUpdate = this.srvContratadoConceptoService.editar(this.movimiento, this.movimiento.Id).subscribe(res => {
      if (res.Errors == null) {
        this.modal.close();
      }
    });
    this.subscriptions.push(sbUpdate);
  }
  /**
   * SPllama a endpoint de la api y guarda crud
   */
  create() {
    this.btnActivo = false;
    const sbCreate = this.srvContratadoConceptoService.nuevo(this.movimiento).subscribe(res => {
      this.btnActivo = true;
      if (res.Errors == null) {
        this.modal.close();
      }
    });
    this.subscriptions.push(sbCreate);
  }
  /**
   * SP SINWEB-243 prepara el objeto a insertar modificar
   */
  prepararAtributo() {
    const formData = this.formGroup.value;
    this.movimiento.IdSrvContratado = formData.SrvContratadoId;
    this.movimiento.Movimiento = formData.Movimiento ? 'A' : 'B';
    this.movimiento.Cantidad = formData.Cantidad;
    this.movimiento.Observacion = formData.Observacion;
    this.movimiento.Fecha = (0,src_app_core_utils_metodos_metodos__WEBPACK_IMPORTED_MODULE_1__.formatFecha)(formData.Fecha).concat(' 00:00:00');
    this.movimiento.FechaInicioFact = (0,src_app_core_utils_metodos_metodos__WEBPACK_IMPORTED_MODULE_1__.formatFecha)(formData.FechaInicioFact).concat(' 00:00:00');
  }
  getCantidad() {
    return this.formGroup.controls.Cantidad.value;
  }
  setCantidad($event) {
    this.formGroup.controls.Cantidad.setValue($event);
  }
  getMov() {
    return this.formGroup.controls.Movimiento.value;
  }
  setMov() {
    this.formGroup.controls.Movimiento.setValue(!this.getMov());
  }
  static #_ = this.ɵfac = function MovimientoEditComponent_Factory(t) {
    return new (t || MovimientoEditComponent)(_angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵdirectiveInject"](_core_services_servicios_srvContratadoConcepto_service__WEBPACK_IMPORTED_MODULE_2__.SrvContratadoConceptoService), _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵdirectiveInject"](_angular_forms__WEBPACK_IMPORTED_MODULE_7__.FormBuilder), _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵdirectiveInject"](_ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_8__.NgbActiveModal), _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵdirectiveInject"](src_app_core_services_viewHelper_service__WEBPACK_IMPORTED_MODULE_0__.ViewHelperService));
  };
  static #_2 = this.ɵcmp = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵdefineComponent"]({
    type: MovimientoEditComponent,
    selectors: [["app-movimiento-edit"]],
    inputs: {
      movimiento: "movimiento",
      srvContratadoId: "srvContratadoId",
      srvContratadoData: "srvContratadoData"
    },
    features: [_angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵProvidersFeature"]([src_app_core_services_viewHelper_service__WEBPACK_IMPORTED_MODULE_0__.ViewHelperService])],
    decls: 12,
    vars: 3,
    consts: [[1, "modal-content"], [1, "modal-header"], ["id", "example-modal-sizes-title-lg", 1, "modal-title", "h4"], [4, "ngIf"], [1, "overlay", "overlay-block", "cursor-default", "modal-body", 2, "min-height", "200px"], [1, "modal-footer"], ["type", "button", 1, "btn", "btn-light", "btn-elevate", "mr-2", 3, "click"], ["CANT_ERRORS", ""], ["action", "#", 1, "form", "form-label-right", 3, "formGroup"], [1, "form-group", "row"], [1, "col-lg-6", "p-2"], [1, "form-label"], ["type", "text", "name", "SrvContratado", "autocomplete", "off", "formControlName", "SrvContratado", "readonly", "", 1, "form-control", "form-control-solid"], ["type", "text", "name", "SrvCliente", "autocomplete", "off", "formControlName", "SrvCliente", "readonly", "", 1, "form-control", "form-control-solid"], [1, "col-lg-12", "p-2"], ["type", "text", "name", "SrvObservacion", "autocomplete", "off", "formControlName", "SrvObservacion", "readonly", "", 1, "form-control", "form-control-solid"], [1, "col-lg-4", "p-2"], ["campoObligatorio", "", 1, "form-label"], [3, "value", "isInvalid", "isValid", "decimals", "templateErrors", "emitValue"], [1, "col-lg-4", "p-2", "align-self-center"], ["colorChecked", "success", "colorUncheked", "danger", 3, "title", "value", "emitAction"], ["campoObligatorio", "", 1, "text-muted"], ["type", "date", 1, "form-control", "digits", 3, "formControlName"], [1, "text-muted"], ["rows", "2", "name", "Observacion", "formControlName", "Observacion", 1, "form-control", "form-control-solid"], ["class", "valid-feedback", 4, "ngIf"], ["class", "invalid-feedback animate__animated animate__shakeX", 4, "ngIf"], [1, "valid-feedback"], [1, "invalid-feedback", "animate__animated", "animate__shakeX"], ["data-cy", "save-movimiento", "type", "submit", 1, "btn", "btn-success", "btn-elevate", 3, "disabled", "click"], ["Class", "bx bx-sync bx-spin font-size-16 align-middle", 4, "ngIf"], ["Class", "bx bx-sync bx-spin font-size-16 align-middle"]],
    template: function MovimientoEditComponent_Template(rf, ctx) {
      if (rf & 1) {
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](0, "div", 0)(1, "div", 1)(2, "div", 2);
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtemplate"](3, MovimientoEditComponent_ng_container_3_Template, 5, 3, "ng-container", 3);
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]()();
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](4, "div", 4);
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtemplate"](5, MovimientoEditComponent_ng_container_5_Template, 37, 24, "ng-container", 3);
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](6, "div", 5)(7, "button", 6);
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵlistener"]("click", function MovimientoEditComponent_Template_button_click_7_listener() {
          return ctx.modal.dismiss();
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](8, " Cancelar ");
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtemplate"](9, MovimientoEditComponent_ng_container_9_Template, 6, 6, "ng-container", 3);
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]()();
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtemplate"](10, MovimientoEditComponent_ng_template_10_Template, 2, 2, "ng-template", null, 7, _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtemplateRefExtractor"]);
      }
      if (rf & 2) {
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"](3);
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵproperty"]("ngIf", ctx.movimiento);
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"](2);
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵproperty"]("ngIf", ctx.movimiento);
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"](4);
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵproperty"]("ngIf", ctx.movimiento);
      }
    },
    dependencies: [_angular_common__WEBPACK_IMPORTED_MODULE_9__.NgIf, _core_directives_campo_obligatorio_directive__WEBPACK_IMPORTED_MODULE_3__.CampoObligatorioDirective, _angular_forms__WEBPACK_IMPORTED_MODULE_7__["ɵNgNoValidate"], _angular_forms__WEBPACK_IMPORTED_MODULE_7__.DefaultValueAccessor, _angular_forms__WEBPACK_IMPORTED_MODULE_7__.NgControlStatus, _angular_forms__WEBPACK_IMPORTED_MODULE_7__.NgControlStatusGroup, _angular_forms__WEBPACK_IMPORTED_MODULE_7__.FormGroupDirective, _angular_forms__WEBPACK_IMPORTED_MODULE_7__.FormControlName, _shared_ui_checkbox_checkbox_component__WEBPACK_IMPORTED_MODULE_4__.CheckboxComponent, _shared_ui_input_number_input_number_component__WEBPACK_IMPORTED_MODULE_5__.InputNumberComponent, _angular_common__WEBPACK_IMPORTED_MODULE_9__.AsyncPipe]
  });
}

/***/ }),

/***/ 50328:
/*!**********************************************************************!*\
  !*** ./src/app/pages/servicios/movimientos/movimientos.component.ts ***!
  \**********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   MovimientosComponent: () => (/* binding */ MovimientosComponent)
/* harmony export */ });
/* harmony import */ var src_app_core_utils_constantes_constantes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! src/app/core/utils/constantes/constantes */ 74506);
/* harmony import */ var src_app_core_utils_constantes_constantes_servicios__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! src/app/core/utils/constantes/constantes-servicios */ 50864);
/* harmony import */ var _ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! @ng-bootstrap/ng-bootstrap */ 85406);
/* harmony import */ var src_app_core_services_alertCustom_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! src/app/core/services/alertCustom.service */ 53206);
/* harmony import */ var src_app_core_utils_permisos_permisos_servicios__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! src/app/core/utils/permisos/permisos-servicios */ 52788);
/* harmony import */ var _movimiento_edit_movimiento_edit_component__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./movimiento-edit/movimiento-edit.component */ 64282);
/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! rxjs/operators */ 94664);
/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! rxjs/operators */ 37398);
/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! rxjs/operators */ 99397);
/* harmony import */ var src_app_core_utils_metodos_metodos__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../core/utils/metodos/metodos */ 38002);
/* harmony import */ var _dashboards_core_seleccionar_srv_contratado_seleccionar_srv_contratado_component__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../dashboards/core/seleccionar-srv-contratado/seleccionar-srv-contratado.component */ 63378);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @angular/core */ 65879);
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! @angular/forms */ 56223);
/* harmony import */ var ngx_toastr__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ngx-toastr */ 2425);
/* harmony import */ var _core_services_servicios_srvContratado_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../core/services/servicios/srvContratado.service */ 2158);
/* harmony import */ var src_app_core_services_servicios_srvContratadoConcepto_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! src/app/core/services/servicios/srvContratadoConcepto.service */ 26157);
/* harmony import */ var src_app_core_services_exportacion_service__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! src/app/core/services/exportacion.service */ 18969);
/* harmony import */ var src_app_core_services_stateful_service__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! src/app/core/services/stateful.service */ 689);
/* harmony import */ var src_app_core_services_auth_service__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! src/app/core/services/auth.service */ 90304);
/* harmony import */ var primeng_accordion__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! primeng/accordion */ 65389);
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! @angular/common */ 96814);
/* harmony import */ var primeng_sidebar__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! primeng/sidebar */ 99246);
/* harmony import */ var ngx_ui_tour_ng_bootstrap__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ngx-ui-tour-ng-bootstrap */ 58469);
/* harmony import */ var _shared_widget_tour_tour_component__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../shared/widget/tour/tour.component */ 63481);
/* harmony import */ var _shared_ui_input_number_input_number_component__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../shared/ui/input-number/input-number.component */ 62271);
/* harmony import */ var _shared_ui_table2_table2_component__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../shared/ui/table2/table2.component */ 63033);



























function MovimientosComponent_button_7_Template(rf, ctx) {
  if (rf & 1) {
    const _r10 = _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵgetCurrentView"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](0, "button", 38);
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵlistener"]("click", function MovimientosComponent_button_7_Template_button_click_0_listener() {
      _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵrestoreView"](_r10);
      const ctx_r9 = _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵnextContext"]();
      return _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵresetView"](ctx_r9.nuevo());
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵpipe"](1, "async");
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵpipe"](2, "async");
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](3, "span", 39);
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵtext"](4, "Nuevo Movimiento");
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelement"](5, "i", 40);
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementEnd"]();
  }
  if (rf & 2) {
    const ctx_r0 = _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵnextContext"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵproperty"]("disabled", _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵpipeBind1"](1, 1, ctx_r0.srvContratadoService.isLoading$) || _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵpipeBind1"](2, 3, ctx_r0.srvContratadoConceptoService.isLoading$));
  }
}
function MovimientosComponent_ng_template_27_Template(rf, ctx) {}
function MovimientosComponent_div_28_ng_template_3_Template(rf, ctx) {}
function MovimientosComponent_div_28_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](0, "div", 41)(1, "div", 42)(2, "div", 43);
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵtemplate"](3, MovimientosComponent_div_28_ng_template_3_Template, 0, 0, "ng-template", 18);
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementEnd"]()()();
  }
  if (rf & 2) {
    const ctx_r2 = _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵnextContext"]();
    const _r8 = _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵreference"](53);
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵproperty"]("formGroup", ctx_r2.filterForm);
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵproperty"]("ngTemplateOutlet", _r8);
  }
}
function MovimientosComponent_div_40_a_3_Template(rf, ctx) {
  if (rf & 1) {
    const _r14 = _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵgetCurrentView"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](0, "a", 46);
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵlistener"]("click", function MovimientosComponent_div_40_a_3_Template_a_click_0_listener() {
      _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵrestoreView"](_r14);
      const ctx_r13 = _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵnextContext"](2);
      return _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵresetView"](ctx_r13.borrarSrvContratado());
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelement"](1, "i", 47);
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementEnd"]();
  }
}
function MovimientosComponent_div_40_Template(rf, ctx) {
  if (rf & 1) {
    const _r16 = _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵgetCurrentView"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](0, "div", 28)(1, "div", 44);
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelement"](2, "input", 45);
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵtemplate"](3, MovimientosComponent_div_40_a_3_Template, 2, 0, "a", 31);
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](4, "a", 32);
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵlistener"]("click", function MovimientosComponent_div_40_Template_a_click_4_listener() {
      _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵrestoreView"](_r16);
      const ctx_r15 = _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵnextContext"]();
      return _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵresetView"](ctx_r15.buscarSrvContratados());
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelement"](5, "i", 33);
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementEnd"]()()();
  }
  if (rf & 2) {
    const ctx_r3 = _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵnextContext"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵadvance"](3);
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵproperty"]("ngIf", ctx_r3.getSrvContratado());
  }
}
function MovimientosComponent_div_41_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](0, "div", 28)(1, "div", 48);
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelement"](2, "input", 45);
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementEnd"]()();
  }
}
function MovimientosComponent_a_45_Template(rf, ctx) {
  if (rf & 1) {
    const _r18 = _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵgetCurrentView"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](0, "a", 46);
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵlistener"]("click", function MovimientosComponent_a_45_Template_a_click_0_listener() {
      _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵrestoreView"](_r18);
      const ctx_r17 = _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵnextContext"]();
      return _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵresetView"](ctx_r17.borrarCantidad());
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelement"](1, "i", 49);
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementEnd"]();
  }
}
function MovimientosComponent_div_51_Template(rf, ctx) {
  if (rf & 1) {
    const _r20 = _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵgetCurrentView"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](0, "div", 50)(1, "button", 51);
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵlistener"]("click", function MovimientosComponent_div_51_Template_button_click_1_listener() {
      _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵrestoreView"](_r20);
      const ctx_r19 = _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵnextContext"]();
      return _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵresetView"](ctx_r19.modal.close());
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵtext"](2, " Aceptar ");
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementEnd"]()();
  }
}
function MovimientosComponent_ng_template_52_option_7_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](0, "option", 64);
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵtext"](1);
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementEnd"]();
  }
  if (rf & 2) {
    const option_r22 = ctx.$implicit;
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵproperty"]("value", option_r22.id);
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵtextInterpolate1"](" ", option_r22.nombre, " ");
  }
}
const _c0 = () => [0];
function MovimientosComponent_ng_template_52_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](0, "div", 21)(1, "p-accordion", 52)(2, "p-accordionTab", 53)(3, "div")(4, "p", 54);
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵtext"](5, "Tipo de Movimientos");
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](6, "select", 55);
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵtemplate"](7, MovimientosComponent_ng_template_52_option_7_Template, 2, 2, "option", 56);
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementEnd"]()()();
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](8, "p-accordionTab", 57)(9, "div", 58)(10, "p", 54);
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵtext"](11, "Fecha Movimiento");
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](12, "label", 59);
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵtext"](13, "Desde");
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelement"](14, "input", 60);
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](15, "label", 59);
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵtext"](16, "Hasta");
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelement"](17, "input", 61);
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](18, "div", 58)(19, "p", 54);
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵtext"](20, "F. Mov. Inicio Fact.");
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](21, "label", 59);
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵtext"](22, "Desde");
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelement"](23, "input", 62);
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](24, "label", 59);
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵtext"](25, "Hasta");
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelement"](26, "input", 63);
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementEnd"]()()()();
  }
  if (rf & 2) {
    const ctx_r7 = _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵnextContext"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵproperty"]("formGroup", ctx_r7.filterForm);
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵproperty"]("multiple", true)("activeIndex", _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵpureFunction0"](4, _c0));
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵadvance"](6);
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵproperty"]("ngForOf", ctx_r7.tipoMovOptions);
  }
}
class MovimientosComponent {
  constructor(fb, toast, srvContratadoService, srvContratadoConceptoService, modalService, alert, exportacion, sf, authService,
  //public tourService : TourService,
  injector) {
    this.fb = fb;
    this.toast = toast;
    this.srvContratadoService = srvContratadoService;
    this.srvContratadoConceptoService = srvContratadoConceptoService;
    this.modalService = modalService;
    this.alert = alert;
    this.exportacion = exportacion;
    this.sf = sf;
    this.authService = authService;
    this.injector = injector;
    this.MSJ_EXITO_INSERCION = 'Se insertó correctamente un movimiento.';
    this.MSJ_EXITO_EDICION = 'Se modificó correctamente el movimiento seleccionado.';
    this.MSJ_EXITO_ELIM = 'Se eliminó correctamente el movimiento seleccionado.';
    this.movimientos = [];
    this.serviciosContratados = [];
    this.total = [];
    this.filtro = true;
    this.filtroMobile = false;
    this._unsubscribe = [];
    //busqueda
    this.buscarCantidad = null;
    //filtros
    this.filterTipoMovimiento = '';
    //paginacion
    this.cantSearch = src_app_core_utils_constantes_constantes__WEBPACK_IMPORTED_MODULE_0__.CANT_SEARCH;
    //arreglo paginas seleccionables pasadas al app-select component
    this.pageOptions = src_app_core_utils_constantes_constantes__WEBPACK_IMPORTED_MODULE_0__.PAGE_OPTIONS;
    this.order = 2;
    this.sentido = 'Desc';
    this.totalItems = 0;
    //permisos
    this.permisoInsMov = false;
    this.permisoModifMov = false;
    this.permisoElimMov = false;
    /**
     * filtros no reactivos
     */
    //public buscar:string;
    this.movimientosHeader = [{
      Nombre: '(Cod) Cliente',
      Type: 'template',
      Data: {
        Template: '(a) b',
        ArrayKeys: {
          a: 'SrvContratado.Cliente.Codigo',
          b: 'SrvContratado.Cliente.Nombre'
        }
      },
      WCol: '15%'
    }, {
      Nombre: '(Cod) Cliente a Fact.',
      Type: 'template',
      Data: {
        Template: '(a) b',
        ArrayKeys: {
          a: 'SrvContratado.ClienteFact.Codigo',
          b: 'SrvContratado.ClienteFact.Nombre'
        }
      },
      WCol: '15%'
    }, {
      Nombre: '(Cod) Artículo',
      Type: 'template',
      Data: {
        Template: '(a) b',
        ArrayKeys: {
          a: 'SrvContratado.Articulo.Codigo',
          b: 'SrvContratado.Articulo.Nombre'
        }
      },
      WCol: '15%'
    }, {
      Nombre: 'Movimiento',
      Type: 'dictionary',
      Diccionario: src_app_core_utils_constantes_constantes_servicios__WEBPACK_IMPORTED_MODULE_1__.DICCIONARIO_SERVICIOS_MOVIMIENTOS,
      Key: 'Movimiento',
      WCol: '10%'
    }, {
      Nombre: 'Cantidad',
      Key: 'Cantidad',
      Type: 'number',
      Pipe: '1.2-2',
      WCol: '10%'
    }, {
      Nombre: 'Fecha',
      Key: 'Fecha',
      Order: 2,
      WCol: '10%'
    }, {
      Nombre: 'Fecha Inicio Fact.',
      Order: 3,
      Key: 'FechaInicioFact',
      WCol: '10%'
    }, {
      Nombre: 'Observación',
      Key: 'Observacion',
      WCol: '15%'
    }];
    this.tipoMovOptions = [{
      id: '',
      nombre: 'Todos'
    }, {
      id: 'A',
      nombre: 'Alta'
    }, {
      id: 'B',
      nombre: 'Baja'
    }];
    this.searchForm = this.fb.group({
      cantidad: [''],
      srvContratadoId: [-1],
      srvContratado: ['']
    });
    this.filterForm = this.fb.group({
      tipoMovimiento: [''],
      filterFechaDesde: [''],
      filterFechaHasta: [''],
      filterFechaInicioFactDesde: [''],
      filterFechaInicioFactHasta: ['']
    });
  }
  ngOnInit() {
    if (this.srvContratado) {
      this.modal = this.injector.get(_ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_16__.NgbActiveModal);
    }
    this.page = 1;
    this.previousPage = 1;
    // if (!this.srvContratado){
    //   this.inicializarSteps();
    // }
    this.permisoInsMov = this.authService.hasPermiso(src_app_core_utils_permisos_permisos_servicios__WEBPACK_IMPORTED_MODULE_3__.PERMISO_INS_MOV);
    this.permisoModifMov = this.authService.hasPermiso(src_app_core_utils_permisos_permisos_servicios__WEBPACK_IMPORTED_MODULE_3__.PERMISO_MODIF_MOV);
    this.permisoElimMov = this.authService.hasPermiso(src_app_core_utils_permisos_permisos_servicios__WEBPACK_IMPORTED_MODULE_3__.PERMISO_ELIM_MOV);
    /**
     * SP SINWEB-320 condicional , si esta en modo modal en srvContratado no guarda cookies , en caso de pagina de movmientos si guarsa
     */
    if (!this.srvContratado) {
      this.inicializarEstado();
    } else {
      this.searchForm.controls.srvContratadoId.setValue(this.srvContratado.Id);
      this.searchForm.controls.srvContratado.setValue('(' + this.srvContratado.Articulo.Codigo + ') ' + this.srvContratado.Articulo.Nombre);
      this.srvContratadoSeleccionado = this.srvContratado;
    }
    this.configuracionFilter();
    this.srvContratado ? this.loadPage() : this.cargarServicioYMovimientos();
  }
  ngOnDestroy() {
    this._unsubscribe.forEach(sb => sb.unsubscribe());
  }
  /**
   * Inicializa el estado de los componentes que permite almacenar su estado
   */
  inicializarEstado() {
    this.sf.states = this.sf.pagenamesSERV.MOV_STATES;
    //busqueda
    this.buscarCantidad = this.sf.getState(this.sf.states.MOV_S_CANTIDAD) == -1 ? null : this.sf.getState(this.sf.states.MOV_S_CANTIDAD);
    this.searchForm.controls.cantidad.setValue(this.buscarCantidad);
    this.searchForm.controls.srvContratadoId.setValue(this.sf.getState(this.sf.states.MOV_S_SERV_CONTRATADO_ID));
    this.searchForm.controls.srvContratado.setValue(this.sf.getState(this.sf.states.MOV_S_SERV_CONTRATADO));
    //filtros
    this.filterTipoMovimiento = this.sf.getState(this.sf.states.MOV_F_TIPO);
    this.filterForm.controls.tipoMovimiento.setValue(this.filterTipoMovimiento);
    this.filterForm.controls.filterFechaDesde.setValue(this.sf.getState(this.sf.states.MOV_F_FECHA_DESDE));
    this.filterForm.controls.filterFechaHasta.setValue(this.sf.getState(this.sf.states.MOV_F_FECHA_HASTA));
    this.filterForm.controls.filterFechaInicioFactDesde.setValue(this.sf.getState(this.sf.states.MOV_F_FECHA_INI_FACT_DESDE));
    this.filterForm.controls.filterFechaInicioFactHasta.setValue(this.sf.getState(this.sf.states.MOV_F_FECHA_INI_FACT_HASTA));
    //listado
    this.page = Number(this.sf.getState(this.sf.states.MOV_L_PAGE));
    this.cantSearch = Number(this.sf.getState(this.sf.states.MOV_L_PAGESIZE));
    this.order = Number(this.sf.getState(this.sf.states.MOV_L_ORDER));
    this.sentido = this.sf.getState(this.sf.states.MOV_L_SENTIDO);
  }
  /**
   * Método para escuchar a los cambios en el formulario de filtros
   */
  configuracionFilter() {
    this._unsubscribe.push(this.filterForm.controls.tipoMovimiento.valueChanges.subscribe(IdTipoMovimiento => {
      if (this.filtro || this.filtroMobile) {
        this.filterTipoMovimiento = IdTipoMovimiento;
        this.page = 1;
        this.loadPage();
      }
    }));
    this._unsubscribe.push(this.filterForm.controls.filterFechaDesde.valueChanges.subscribe(fechaDesde => {
      if (this.filtro || this.filtroMobile) {
        this.filterFechaDesde = fechaDesde;
        this.page = 1;
        this.loadPage();
      }
    }));
    this._unsubscribe.push(this.filterForm.controls.filterFechaHasta.valueChanges.subscribe(fechaHasta => {
      if (this.filtro || this.filtroMobile) {
        this.filterFechaHasta = fechaHasta;
        this.page = 1;
        this.loadPage();
      }
    }));
    this._unsubscribe.push(this.filterForm.controls.filterFechaInicioFactDesde.valueChanges.subscribe(fechaDesde => {
      if (this.filtro || this.filtroMobile) {
        this.filterFechaInicioFactDesde = fechaDesde;
        this.page = 1;
        this.loadPage();
      }
    }));
    this._unsubscribe.push(this.filterForm.controls.filterFechaInicioFactHasta.valueChanges.subscribe(fechaHasta => {
      if (this.filtro || this.filtroMobile) {
        this.filterFechaInicioFactHasta = fechaHasta;
        this.page = 1;
        this.loadPage();
      }
    }));
  }
  /**
   * Método para limpiar los filtros
   */
  cleanStates() {
    if (!this.srvContratado) {
      this.sf.cleanAllStates();
    }
    this.resetComp();
  }
  /**
   * SP metodo llamado pro clean estate que reinicia los estados y filtros
   */
  resetComp() {
    this._unsubscribe.forEach(sub => {
      sub.unsubscribe();
    });
    this.page = 1;
    this.previousPage = 1;
    this.buscarCantidad = null;
    this.filterTipoMovimiento = '';
    if (this.srvContratado) {
      this.searchForm.controls.srvContratadoId.setValue(this.srvContratado.Id);
      this.searchForm.controls.srvContratado.setValue('(' + (this.srvContratado.Articulo.Codigo + ') ' + this.srvContratado.Articulo.Nombre));
      this.searchForm.controls.cantidad.setValue('');
      this.srvContratadoSeleccionado = this.srvContratado;
      this.filterForm.reset({
        tipoMovimiento: '',
        filterFechaDesde: '',
        filterFechaHasta: '',
        filterFechaInicioFactDesde: '',
        filterFechaInicioFactHasta: ''
      });
    } else {
      this.searchForm.controls.srvContratadoId.setValue(this.serviciosContratados[0].Id);
      this.searchForm.controls.srvContratado.setValue('(' + (this.serviciosContratados[0].Articulo.Codigo + ') ' + this.serviciosContratados[0].Articulo.Nombre));
      this.srvContratadoSeleccionado = this.serviciosContratados[0];
      this.sf.changeState(this.sf.states.MOV_S_SERV_CONTRATADO, this.searchForm.controls.srvContratado.value);
      this.sf.changeState(this.sf.states.MOV_S_SERV_CONTRATADO_ID, this.searchForm.controls.srvContratadoId.value);
      this.inicializarEstado();
    }
    this.configuracionFilter();
    this.loadPage();
  }
  /**
   * Método para cargar los datos de la página
   */
  loadPage() {
    this.onSearch(this.cargarFiltros(this.page, this.order, this.sentido));
  }
  /**
   * SINWEB-345 Metodo para el manejo de la tabla generica nueva , maneja la pagina , orden ,sentido de orden y cantidad de registros
   * @param $event
   */
  lazyLoadChange($event) {
    this.page = $event.page;
    this.order = $event.order;
    this.cantSearch = $event.cant;
    this.sentido = $event.sentido;
    this.loadPage();
  }
  cargarServicioYMovimientos() {
    let datos = {
      Orden: 2,
      PageNumber: -1,
      SentidoOrden: 'asc'
    };
    const susc = this.srvContratadoService.fetch(datos).pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_17__.switchMap)(resp => {
      this.serviciosContratados = resp.Data;
      //SP SINWEB-221 seteo por defecto el primer valor de las plataforma recibidas
      this.setSrvContratado(this.sf.getState(this.sf.states.MOV_S_SERV_CONTRATADO_ID) != -1 ? this.sf.getState(this.sf.states.MOV_S_SERV_CONTRATADO_ID) : this.serviciosContratados[0].Id, false);
      this.sf.changeState(this.sf.states.MOV_S_SERV_CONTRATADO_ID, this.getSrvContratado());
      this.searchForm.controls.srvContratado.setValue(this.sf.getState(this.sf.states.MOV_S_SERV_CONTRATADO) != '' ? this.sf.getState(this.sf.states.MOV_S_SERV_CONTRATADO) : '(' + this.serviciosContratados[0].Articulo.Codigo + ') ' + this.serviciosContratados[0].Articulo.Nombre);
      this.sf.changeState(this.sf.states.MOV_S_SERV_CONTRATADO, this.searchForm.controls.srvContratado.value);
      this.srvContratadoSeleccionado = this.serviciosContratados[0];
      return this.onSearchObs(this.cargarFiltros(this.page, this.order, this.sentido));
    })).subscribe(data => {
      this.movimientos = data;
      if (data != undefined) {
        this.totalItems = data.length;
      } else {
        this.totalItems = 0;
      }
    });
    susc.unsubscribe;
  }
  onSearchObs(datos) {
    return this.srvContratadoConceptoService.fetch(datos).pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_18__.map)(data => {
      return data.Data;
    }));
  }
  /**
   * Método que trae los movimientos
   * @param {any} datos Datos de búsqueda
   */
  onSearch(datos) {
    const susc = this.srvContratadoConceptoService.fetch(datos).subscribe(data => {
      this.movimientos = data.Data;
      if (data.Data != undefined) {
        this.totalItems = data.TotalRecords;
      } else {
        this.totalItems = 0;
      }
    });
    susc.unsubscribe;
  }
  /**
   * Método que carga los filtros de búsqueda para realizar la petición
   * @param {any} page Página actual
   * @param {any} order Orden
   * @param {any} sentido Sentido (ascendente o descendente)
   * @returns {object} Datos de búsqueda
   */
  cargarFiltros(page, order, sentido) {
    let datos = {};
    //paginacion
    datos.PageNumber = page;
    datos.PageSize = this.cantSearch;
    // parametros de orden
    datos.Orden = order;
    datos.SentidoOrden = sentido;
    //busqueda
    if (this.buscarCantidad != -1 && this.buscarCantidad != null) {
      datos.Cantidad = this.buscarCantidad;
    }
    //filtros
    if (this.getSrvContratado() >= 0) {
      datos.IdSrvContratado = this.getSrvContratado();
    }
    if (this.filterTipoMovimiento != '') {
      datos.Movimiento = this.filterTipoMovimiento;
    }
    this.filterForm.get('filterFechaDesde')?.value !== '' ? datos.FechaDesde = (0,src_app_core_utils_metodos_metodos__WEBPACK_IMPORTED_MODULE_5__.formatFecha)(this.filterForm.get('filterFechaDesde')?.value).concat(' 00:00') : delete datos.FechaDesde;
    this.filterForm.get('filterFechaHasta')?.value !== '' ? datos.FechaHasta = (0,src_app_core_utils_metodos_metodos__WEBPACK_IMPORTED_MODULE_5__.formatFecha)(this.filterForm.get('filterFechaHasta')?.value).concat(' 23:59') : delete datos.FechaHasta;
    this.filterForm.get('filterFechaInicioFactDesde')?.value !== '' ? datos.FechaInicioFactDesde = (0,src_app_core_utils_metodos_metodos__WEBPACK_IMPORTED_MODULE_5__.formatFecha)(this.filterForm.get('filterFechaInicioFactDesde')?.value).concat(' 00:00') : delete datos.FechaInicioFactDesde;
    this.filterForm.get('filterFechaInicioFactHasta')?.value !== '' ? datos.FechaInicioFactHasta = (0,src_app_core_utils_metodos_metodos__WEBPACK_IMPORTED_MODULE_5__.formatFecha)(this.filterForm.get('filterFechaInicioFactHasta')?.value).concat(' 23:59') : delete datos.FechaInicioFactHasta;
    //Almacenar el cambio de estado de los componentes
    if (datos.PageNumber != -1 && !this.srvContratado) {
      this.changeStates(datos);
    }
    return datos;
  }
  /**
   * Método que realiza el cambio de los estados segun los valores elegidos
   * @param {any} datos Datos de búsqueda
   */
  changeStates(datos) {
    //busqueda
    this.sf.changeState(this.sf.states.MOV_S_CANTIDAD, !datos.Cantidad ? this.sf.states.MOV_S_CANTIDAD.default : datos.Cantidad);
    this.sf.changeState(this.sf.states.MOV_S_SERV_CONTRATADO_ID, !datos.IdSrvContratado ? this.sf.states.MOV_S_SERV_CONTRATADO_ID.default : datos.IdSrvContratado);
    this.sf.changeState(this.sf.states.MOV_S_SERV_CONTRATADO, !datos.IdSrvContratado ? this.sf.states.MOV_S_SERV_CONTRATADO.default : this.searchForm.get('srvContratado')?.value);
    //filtros
    this.sf.changeState(this.sf.states.MOV_F_TIPO, !datos.Movimiento ? this.sf.states.MOV_F_TIPO.default : datos.Movimiento);
    this.sf.changeState(this.sf.states.MOV_F_FACT_ACTIVA, !datos.FacturacionActiva ? this.sf.states.MOV_F_FACT_ACTIVA.default : datos.FacturacionActiva);
    this.sf.changeState(this.sf.states.MOV_F_FECHA_DESDE, !datos.FechaDesde ? this.sf.states.MOV_F_FECHA_DESDE.default : this.filterForm.get('filterFechaDesde')?.value);
    this.sf.changeState(this.sf.states.MOV_F_FECHA_HASTA, !datos.FechaHasta ? this.sf.states.MOV_F_FECHA_HASTA.default : this.filterForm.get('filterFechaHasta')?.value);
    this.sf.changeState(this.sf.states.MOV_F_FECHA_INI_FACT_DESDE, !datos.FechaInicioFactDesde ? this.sf.states.MOV_F_FECHA_INI_FACT_DESDE.default : this.filterForm.get('filterFechaInicioFactDesde')?.value);
    this.sf.changeState(this.sf.states.MOV_F_FECHA_INI_FACT_HASTA, !datos.FechaInicioFactHasta ? this.sf.states.MOV_F_FECHA_INI_FACT_HASTA.default : this.filterForm.get('filterFechaInicioFactHasta')?.value);
    //listado
    this.sf.changeState(this.sf.states.MOV_L_PAGE, datos.PageNumber);
    this.sf.changeState(this.sf.states.MOV_L_PAGESIZE, datos.PageSize);
    this.sf.changeState(this.sf.states.MOV_L_ORDER, datos.Orden);
    this.sf.changeState(this.sf.states.MOV_L_SENTIDO, datos.SentidoOrden);
  }
  /**
   * Método que abre el modal para crear una nueva máquina
   */
  nuevo() {
    this.editar(undefined, false);
  }
  /**
   * Método que abre el modal para editar una máquina
   * @param {any} maquina movimiento a editar
   * @param {boolean} esEditar Indica si es una edición (true) o una creación (false)
   */
  editar(movimiento, esEditar) {
    const modalRef = this.modalService.open(_movimiento_edit_movimiento_edit_component__WEBPACK_IMPORTED_MODULE_4__.MovimientoEditComponent, {
      size: 'lg',
      backdropClass: 'back-z-index-3',
      windowClass: 'modal-z-index-3',
      backdrop: 'static',
      keyboard: false,
      scrollable: true
    });
    if (movimiento) {
      modalRef.componentInstance.movimiento = {
        Id: movimiento.Id,
        IdSrvContratado: movimiento.SrvContratado.Id,
        Movimiento: movimiento.Movimiento,
        Cantidad: movimiento.Cantidad,
        Fecha: (0,src_app_core_utils_metodos_metodos__WEBPACK_IMPORTED_MODULE_5__.formatFechaComp)(movimiento.Fecha),
        FechaInicioFact: (0,src_app_core_utils_metodos_metodos__WEBPACK_IMPORTED_MODULE_5__.formatFechaComp)(movimiento.FechaInicioFact),
        Observacion: movimiento.Observacion
      };
    }
    modalRef.componentInstance.srvContratadoId = this.getSrvContratado();
    modalRef.componentInstance.srvContratadoData = this.srvContratadoSeleccionado;
    modalRef.result.then(() => {
      this.loadPage();
      if (esEditar) {
        this.alert.showBasicAlert(this.MSJ_EXITO_EDICION, '', 'success');
      } else {
        this.alert.showBasicAlert(this.MSJ_EXITO_INSERCION, '', 'success');
      }
    }, () => {});
  }
  /**
   * Método que abre el modal para eliminar un movimiento
   * @param {number} idMMovimiento Id del movimiento a eliminar
   * @param {string} nroSerie Número de serie de la máquina a eliminar
   */
  eliminar(idMovimiento, srvContratado) {
    this.alert.showReturnAlert('Eliminación de movimiento.', "¿Está seguro de eliminar el movimiento del servicio: '(" + srvContratado.Articulo.Codigo + ') ' + srvContratado.Articulo.Nombre + "' ?", 'warning', 'Eliminar', 'Cancelar', true).then(result => {
      if (result.value) {
        this.eliminarMovimiento(idMovimiento);
      }
    });
  }
  /**
   * Método que elimina un movimiento una vez confirmada la acción
   * @param idMovimiento Id del movimiento  a eliminar
   */
  eliminarMovimiento(idMovimiento) {
    const sb = this.srvContratadoConceptoService.eliminar(idMovimiento).pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_19__.tap)(elem => {
      if (!elem.error) {
        this.alert.showBasicAlert(this.MSJ_EXITO_ELIM, '', 'success');
        this.loadPage();
      }
    })).subscribe();
    sb.unsubscribe;
  }
  /**
   * Método para activar acción
   * @param {any} event Evento con la acción a realizar
   */
  acciones(event) {
    switch (event.accion) {
      case 'edit':
        this.editar(event.registro, true);
        break;
      case 'delete':
        this.eliminar(event.registro.Id, event.registro.SrvContratado);
        break;
      default:
        console.log(`La accion ${event.accion} no esta disponible`);
    }
  }
  /**
   * Método para exportar a Excel
   */
  exportTo(extension) {
    let datos = this.cargarFiltros(-1, this.order, this.sentido);
    //datos.PageSize= this.totalItems;
    delete datos.PageSize;
    //se arman las columnas y keys para buscar datos y armar el excel
    const columns = ['(Cod) Cliente', '(Cod) Cliente Fact.', '(Cod) Artículo', 'Movimiento', 'Cantidad', 'Fecha', 'Fecha Ini. Fact.', 'Observacíon'];
    const keys = ['CodCliente', 'CodClienteFact', 'CodArticulo', 'Movimiento', 'Cantidad', 'Fecha', 'FechaInicioFact', 'Observacion'];
    this.alert.showLoadingAlert('Exportando Movimientos', 'Generando archivo ' + extension + ', este proceso puede tardar unos minutos');
    //llamada al recurso correspondiente de la api
    this.srvContratadoConceptoService.fetch(datos).subscribe(data => {
      // MC SINWEB-378 Exportación a Pdf
      let result = data.Data.map(item => ({
        ...item,
        CodCliente: `(${item.SrvContratado.Cliente.Codigo}) ${item.SrvContratado.Cliente.Nombre}`,
        CodClienteFact: `(${item.SrvContratado.ClienteFact.Codigo}) ${item.SrvContratado.ClienteFact.Nombre}`,
        CodArticulo: `(${item.SrvContratado.Articulo.Codigo}) ${item.SrvContratado.Articulo.Nombre}`,
        Movimiento: src_app_core_utils_constantes_constantes_servicios__WEBPACK_IMPORTED_MODULE_1__.DICCIONARIO_SERVICIOS_MOVIMIENTOS.find(mov => mov.Id == item.Movimiento).Nombre
      }));
      this.alert.closeLoadingAlert();
      this.alert.showBasicAlert('Movimientos Exportados', 'Generando archivo ' + extension, 'success');
      if (extension === 'Excel') {
        this.exportacion.exportToExcel(result, columns, keys, 'Listado de Movimientos');
      } else {
        this.exportacion.exportToPdf(result, columns, keys, 'Listado de Movimientos');
      }
    });
  }
  /**
   * Get de cantidad
   */
  getCantidad() {
    return this.searchForm.controls.cantidad.value;
  }
  setCantidad(event) {
    this.searchForm.controls.cantidad.setValue(event);
  }
  /**
   * Limpieza de input de cantidad
   */
  borrarCantidad() {
    this.searchForm.get('cantidad').reset('');
    this.page = 1;
    this.buscarCantidad = undefined;
    this.loadPage();
  }
  buscarPorCantidad() {
    this.page = 1;
    this.buscarCantidad = this.getCantidad();
    this.loadPage();
  }
  busquedaCantidad() {
    return this.buscarCantidad != undefined;
  }
  /**
   *
   * @param srvContratado
   * @param evento
   */
  setSrvContratado(srvContratado, evento) {
    this.searchForm.controls.srvContratadoId.setValue(srvContratado, {
      emitEvent: evento != undefined ? evento : true
    });
  }
  getSrvContratado() {
    return this.searchForm.controls.srvContratadoId.value;
  }
  borrarSrvContratado() {
    this.searchForm.get('srvContratado').reset('(' + this.serviciosContratados[0].Articulo.Codigo + ') ' + this.serviciosContratados[0].Articulo.Nombre);
    this.searchForm.get('srvContratadoId').reset(this.serviciosContratados[0].Id);
    this.srvContratadoSeleccionado = this.serviciosContratados[0];
    this.page = 1;
    this.loadPage();
  }
  //SP SINWEB-77 metodo para llamar al mordal de seleccionar articulo
  buscarSrvContratados() {
    const modalRef = this.modalService.open(_dashboards_core_seleccionar_srv_contratado_seleccionar_srv_contratado_component__WEBPACK_IMPORTED_MODULE_6__.SeleccionarSrvContratadoComponent, {
      size: 'xl',
      backdropClass: 'back-z-index-3',
      windowClass: 'modal-z-index-3',
      backdrop: 'static',
      keyboard: false,
      scrollable: true
    });
    modalRef.result.then(resolve => {
      if (resolve !== undefined) {
        this.searchForm.controls.srvContratadoId.setValue(resolve.IdSrvContratado);
        this.searchForm.controls.srvContratado.setValue(resolve.ServContratado);
        this.srvContratadoSeleccionado = resolve.SrvContratadoObj;
        this.page = 1;
        this.loadPage();
      }
    });
  }
  static #_ = this.ɵfac = function MovimientosComponent_Factory(t) {
    return new (t || MovimientosComponent)(_angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵdirectiveInject"](_angular_forms__WEBPACK_IMPORTED_MODULE_20__.FormBuilder), _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵdirectiveInject"](ngx_toastr__WEBPACK_IMPORTED_MODULE_21__.ToastrService), _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵdirectiveInject"](_core_services_servicios_srvContratado_service__WEBPACK_IMPORTED_MODULE_7__.SrvContratadoService), _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵdirectiveInject"](src_app_core_services_servicios_srvContratadoConcepto_service__WEBPACK_IMPORTED_MODULE_8__.SrvContratadoConceptoService), _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵdirectiveInject"](_ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_16__.NgbModal), _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵdirectiveInject"](src_app_core_services_alertCustom_service__WEBPACK_IMPORTED_MODULE_2__.AlertCustomService), _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵdirectiveInject"](src_app_core_services_exportacion_service__WEBPACK_IMPORTED_MODULE_9__.ExportacionService), _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵdirectiveInject"](src_app_core_services_stateful_service__WEBPACK_IMPORTED_MODULE_10__.StatefulService), _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵdirectiveInject"](src_app_core_services_auth_service__WEBPACK_IMPORTED_MODULE_11__.AuthService), _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_15__.Injector));
  };
  static #_2 = this.ɵcmp = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵdefineComponent"]({
    type: MovimientosComponent,
    selectors: [["app-movimientos"]],
    inputs: {
      srvContratado: "srvContratado"
    },
    features: [_angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵProvidersFeature"]([src_app_core_services_alertCustom_service__WEBPACK_IMPORTED_MODULE_2__.AlertCustomService])],
    decls: 55,
    vars: 35,
    consts: [[1, "modal-content"], [1, "modal-header"], [1, "mb-0", "card-title", "flex-grow-1", "d-flex", "flex-row"], ["tourAnchor", "movimientos.anchor.id", 1, "mb-1", "align-self-center"], [1, "flex-shrink-0", "d-flex", "gap-1"], ["tourAnchor", "newMov.anchor.id", "class", "btn btn-primary", 3, "disabled", "click", 4, "ngIf"], ["tourAnchor", "refreshMov.anchor.id", 1, "btn", "btn-light", 3, "click"], [3, "ngClass"], ["data-cy", "limpiar-filtros", "tourAnchor", "filtroResetMov.anchor.id", 3, "ngClass", "click"], ["ngbDropdown", "", 1, "dropdown", "d-inline-block"], ["tourAnchor", "exportMov.anchor.id", "type", "menu", "id", "dropdownMenuButton1", "data-bs-toggle", "dropdown", "aria-expanded", "false", "ngbDropdownToggle", "", 1, "btn", "btn-success"], [1, "mdi", "mdi-dots-vertical"], ["aria-labelledby", "dropdownMenuButton1", "ngbDropdownMenu", "", 1, "dropdown-menu"], ["href", "javascript:void(0);", 1, "dropdown-item", 3, "click"], [1, "modal-body"], [1, "row"], ["position", "left", 1, "d-block", "d-lg-none", 3, "visible", "visibleChange"], [1, "m-2"], [3, "ngTemplateOutlet"], ["class", "col-xxl-2 col-lg-3 d-none d-lg-block", 4, "ngIf"], [1, "card-body", "border-bottom"], [3, "formGroup"], [1, "row", "g-3", "justify-content-center", "justify-content-lg-start"], [1, "col-auto", "d-none", "d-lg-block"], ["data-cy", "boton-filtro", 1, "btn", "btn-icon", "btn-soft-secondary", "w-100", 3, "click"], [1, "col-auto", "d-block", "d-lg-none"], ["data-cy", "boton-filtroMobile", 1, "btn", "btn-icon", "btn-soft-secondary", "w-100", 3, "click"], ["class", "col-xxl-4 col-lg-6", 4, "ngIf"], [1, "col-xxl-4", "col-lg-6"], ["tourAnchor", "searchMovCant.anchor.id", 1, "input-group"], ["placeholder", "Buscar Por Cant. de Items", 3, "value", "decimals", "allowNegatives", "emitValue", "emitKeyAction"], ["class", "btn btn-secondary", 3, "click", 4, "ngIf"], [1, "btn", "btn-primary", 3, "click"], [1, "bx", "bx-search-alt-2"], [1, "card-body"], ["styleTableClass", "p-datatable-gridlines", 3, "columns", "datos", "page", "order", "sentido", "cant_search", "totalItems", "apiTable", "isLoading", "edit", "delete", "acciones", "lazyLoad", "emitAction"], ["class", "modal-footer text-end", 4, "ngIf"], ["FILTRO", ""], ["tourAnchor", "newMov.anchor.id", 1, "btn", "btn-primary", 3, "disabled", "click"], [1, "d-none", "d-md-block"], [1, "d-block", "d-md-none", "mdi", "mdi-plus", "mdi-16"], [1, "col-xxl-2", "col-lg-3", "d-none", "d-lg-block"], ["tourAnchor", "filtroMov.anchor.id", 1, "card", 3, "formGroup"], [1, "card-body", "p-2"], ["tourAnchor", "searchMovServ.anchor.id", 1, "input-group"], ["type", "search", "formControlName", "srvContratado", "placeholder", "Seleccionar Servicio contratado", "readonly", "", 1, "form-control"], [1, "btn", "btn-secondary", 3, "click"], [1, "bx", "bx-undo"], [1, "input-group"], [1, "bx", "bx-x"], [1, "modal-footer", "text-end"], ["type", "button", 1, "btn", "btn-success", "btn-elevate", "mr-2", 3, "click"], [3, "multiple", "activeIndex"], ["header", "B\u00E1sicos"], [1, "text-muted"], ["formControlName", "tipoMovimiento", 1, "form-select"], [3, "value", 4, "ngFor", "ngForOf"], ["header", "Avanzados"], [1, "border", "border-1", "rounded", "border-opacity-10", "p-2", "mb-2"], [1, "text-muted", "font-size-12"], ["type", "date", "formControlName", "filterFechaDesde", "onkeypress", "return false", "onkeydown", "return false", 1, "form-control", "digits"], ["type", "date", "formControlName", "filterFechaHasta", "onkeypress", "return false", "onkeydown", "return false", 1, "form-control", "digits"], ["type", "date", "formControlName", "filterFechaInicioFactDesde", "onkeypress", "return false", "onkeydown", "return false", 1, "form-control", "digits"], ["type", "date", "formControlName", "filterFechaInicioFactHasta", "onkeypress", "return false", "onkeydown", "return false", 1, "form-control", "digits"], [3, "value"]],
    template: function MovimientosComponent_Template(rf, ctx) {
      if (rf & 1) {
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](0, "div", 0)(1, "div", 1)(2, "span", 2)(3, "h5", 3);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵtext"](4, " Movimientos de Servicios Contratados ");
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵtext"](5, " \u00A0 ");
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](6, "div", 4);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵtemplate"](7, MovimientosComponent_button_7_Template, 6, 5, "button", 5);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](8, "a", 6);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵlistener"]("click", function MovimientosComponent_Template_a_click_8_listener() {
          return ctx.loadPage();
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelement"](9, "i", 7);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵpipe"](10, "async");
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](11, "a", 8);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵlistener"]("click", function MovimientosComponent_Template_a_click_11_listener() {
          return ctx.cleanStates();
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelement"](12, "i", 7);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](13, "div", 9)(14, "button", 10);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelement"](15, "i", 11);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](16, "ul", 12)(17, "li")(18, "a", 13);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵlistener"]("click", function MovimientosComponent_Template_a_click_18_listener() {
          return ctx.exportTo("Excel");
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵtext"](19, "Exportar Excel");
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementEnd"]()();
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](20, "li")(21, "a", 13);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵlistener"]("click", function MovimientosComponent_Template_a_click_21_listener() {
          return ctx.exportTo("Pdf");
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵtext"](22, "Exportar Pdf");
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementEnd"]()()()()()();
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](23, "div", 14)(24, "div", 15)(25, "p-sidebar", 16);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵlistener"]("visibleChange", function MovimientosComponent_Template_p_sidebar_visibleChange_25_listener($event) {
          return ctx.filtroMobile = $event;
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](26, "div", 17);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵtemplate"](27, MovimientosComponent_ng_template_27_Template, 0, 0, "ng-template", 18);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementEnd"]()();
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵtemplate"](28, MovimientosComponent_div_28_Template, 4, 2, "div", 19);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](29, "div", 7)(30, "div", 7)(31, "div", 20);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementContainerStart"](32, 21);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](33, "div", 22)(34, "div", 23)(35, "a", 24);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵlistener"]("click", function MovimientosComponent_Template_a_click_35_listener() {
          return ctx.filtro = !ctx.filtro;
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelement"](36, "i", 7);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementEnd"]()();
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](37, "div", 25)(38, "a", 26);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵlistener"]("click", function MovimientosComponent_Template_a_click_38_listener() {
          return ctx.filtroMobile = !ctx.filtroMobile;
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelement"](39, "i", 7);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementEnd"]()();
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵtemplate"](40, MovimientosComponent_div_40_Template, 6, 1, "div", 27)(41, MovimientosComponent_div_41_Template, 3, 0, "div", 27);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](42, "div", 28)(43, "div", 29)(44, "app-input-number", 30);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵlistener"]("emitValue", function MovimientosComponent_Template_app_input_number_emitValue_44_listener($event) {
          return ctx.setCantidad($event);
        })("emitKeyAction", function MovimientosComponent_Template_app_input_number_emitKeyAction_44_listener() {
          return ctx.buscarPorCantidad();
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵtemplate"](45, MovimientosComponent_a_45_Template, 2, 0, "a", 31);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](46, "a", 32);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵlistener"]("click", function MovimientosComponent_Template_a_click_46_listener() {
          return ctx.buscarPorCantidad();
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelement"](47, "i", 33);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementEnd"]()()()();
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementContainerEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](48, "div", 34)(49, "app-table2", 35);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵlistener"]("lazyLoad", function MovimientosComponent_Template_app_table2_lazyLoad_49_listener($event) {
          return ctx.lazyLoadChange($event);
        })("emitAction", function MovimientosComponent_Template_app_table2_emitAction_49_listener($event) {
          return ctx.acciones($event);
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵpipe"](50, "async");
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementEnd"]()()()()()();
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵtemplate"](51, MovimientosComponent_div_51_Template, 3, 0, "div", 36);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵtemplate"](52, MovimientosComponent_ng_template_52_Template, 27, 5, "ng-template", null, 37, _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵtemplateRefExtractor"]);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelement"](54, "app-tour");
      }
      if (rf & 2) {
        const _r8 = _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵreference"](53);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵadvance"](7);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵproperty"]("ngIf", ctx.permisoInsMov);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵadvance"](2);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵproperty"]("ngClass", _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵpipeBind1"](10, 31, ctx.srvContratadoConceptoService.isLoading$) ? "bx bx-sync bx-spin font-size-16 align-middle" : "bx bx-sync font-size-16 align-middle");
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵadvance"](2);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵproperty"]("ngClass", ctx.sf.getCantCustomStates() > 0 ? "btn btn-danger" : "btn bg-danger bg-soft");
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵadvance"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵproperty"]("ngClass", "mdi mdi-filter-remove-outline mdi-16px align-middle");
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵadvance"](13);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵproperty"]("visible", ctx.filtroMobile);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵadvance"](2);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵproperty"]("ngTemplateOutlet", _r8);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵadvance"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵproperty"]("ngIf", ctx.filtro);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵadvance"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵproperty"]("ngClass", ctx.filtro ? "col-xxl-10 col-lg-9" : "col-12");
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵadvance"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵproperty"]("ngClass", ctx.srvContratado ? "card mb-0" : "card");
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵadvance"](2);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵproperty"]("formGroup", ctx.searchForm);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵadvance"](4);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵproperty"]("ngClass", !ctx.filtro ? "mdi mdi-filter-outline mdi-18px align-middle" : "mdi mdi-filter-off-outline mdi-18px align-middle");
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵadvance"](3);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵproperty"]("ngClass", !ctx.filtroMobile ? "mdi mdi-filter-outline mdi-18px align-middle" : "mdi mdi-filter-off-outline mdi-18px align-middle");
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵadvance"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵproperty"]("ngIf", !ctx.srvContratado);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵadvance"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵproperty"]("ngIf", ctx.srvContratado);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵadvance"](3);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵproperty"]("value", ctx.getCantidad())("decimals", 0)("allowNegatives", false);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵadvance"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵproperty"]("ngIf", ctx.busquedaCantidad());
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵadvance"](4);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵproperty"]("columns", ctx.movimientosHeader)("datos", ctx.movimientos)("page", ctx.page)("order", ctx.order)("sentido", ctx.sentido)("cant_search", ctx.cantSearch)("totalItems", ctx.totalItems)("apiTable", true)("isLoading", _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵpipeBind1"](50, 33, ctx.srvContratadoConceptoService.isLoading$))("edit", ctx.permisoModifMov)("delete", ctx.permisoElimMov)("acciones", ctx.permisoModifMov || ctx.permisoElimMov);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵadvance"](2);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵproperty"]("ngIf", ctx.srvContratado);
      }
    },
    dependencies: [primeng_accordion__WEBPACK_IMPORTED_MODULE_22__.Accordion, primeng_accordion__WEBPACK_IMPORTED_MODULE_22__.AccordionTab, _angular_common__WEBPACK_IMPORTED_MODULE_23__.NgClass, _angular_common__WEBPACK_IMPORTED_MODULE_23__.NgForOf, _angular_common__WEBPACK_IMPORTED_MODULE_23__.NgIf, _angular_common__WEBPACK_IMPORTED_MODULE_23__.NgTemplateOutlet, _angular_forms__WEBPACK_IMPORTED_MODULE_20__.NgSelectOption, _angular_forms__WEBPACK_IMPORTED_MODULE_20__["ɵNgSelectMultipleOption"], _angular_forms__WEBPACK_IMPORTED_MODULE_20__.DefaultValueAccessor, _angular_forms__WEBPACK_IMPORTED_MODULE_20__.SelectControlValueAccessor, _angular_forms__WEBPACK_IMPORTED_MODULE_20__.NgControlStatus, _angular_forms__WEBPACK_IMPORTED_MODULE_20__.NgControlStatusGroup, _ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_16__.NgbDropdown, _ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_16__.NgbDropdownToggle, _ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_16__.NgbDropdownMenu, _angular_forms__WEBPACK_IMPORTED_MODULE_20__.FormGroupDirective, _angular_forms__WEBPACK_IMPORTED_MODULE_20__.FormControlName, primeng_sidebar__WEBPACK_IMPORTED_MODULE_24__.Sidebar, ngx_ui_tour_ng_bootstrap__WEBPACK_IMPORTED_MODULE_25__.TourAnchorNgBootstrapDirective, _shared_widget_tour_tour_component__WEBPACK_IMPORTED_MODULE_12__.TourComponent, _shared_ui_input_number_input_number_component__WEBPACK_IMPORTED_MODULE_13__.InputNumberComponent, _shared_ui_table2_table2_component__WEBPACK_IMPORTED_MODULE_14__.Table2Component, _angular_common__WEBPACK_IMPORTED_MODULE_23__.AsyncPipe],
    styles: [".back-z-index-3 {\n  z-index: 1061 !important;\n}\n\n .modal-z-index-3 {\n  z-index: 1062 !important;\n}"],
    changeDetection: 0
  });
}

/***/ }),

/***/ 14315:
/*!*************************************************************!*\
  !*** ./src/app/pages/servicios/servicios-routing.module.ts ***!
  \*************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   ServiciosRoutingModule: () => (/* binding */ ServiciosRoutingModule)
/* harmony export */ });
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @angular/router */ 75187);
/* harmony import */ var _core_guards_auth_guard__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../core/guards/auth.guard */ 8036);
/* harmony import */ var src_app_core_utils_permisos_permisos_servicios__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! src/app/core/utils/permisos/permisos-servicios */ 52788);
/* harmony import */ var src_app_pages_servicios_inicio_servicios_inicio_servicios_component__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! src/app/pages/servicios/inicio-servicios/inicio-servicios.component */ 92548);
/* harmony import */ var _srv_contratados_srv_contratados_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./srv-contratados/srv-contratados.component */ 11683);
/* harmony import */ var _lotes_facturacion_lotes_facturacion_component__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./lotes-facturacion/lotes-facturacion.component */ 57907);
/* harmony import */ var _facturacion_masiva_facturacion_masiva_component__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./facturacion-masiva/facturacion-masiva.component */ 79893);
/* harmony import */ var _srv_contratados_carga_masiva_srv_carga_masiva_srv_component__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./srv-contratados/carga-masiva-srv/carga-masiva-srv.component */ 55028);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/core */ 65879);










const PERMISO_LIS_SRV_CONTRATADOS = src_app_core_utils_permisos_permisos_servicios__WEBPACK_IMPORTED_MODULE_1__.PERMISO_LIS_SRV_CONTRATADOS;
const PERMISO_LIS_LOTE_FACT = src_app_core_utils_permisos_permisos_servicios__WEBPACK_IMPORTED_MODULE_1__.PERMISO_LIS_LOTE_FACTURACION;
const PERMISO_LIS_FACT_MASIVA = src_app_core_utils_permisos_permisos_servicios__WEBPACK_IMPORTED_MODULE_1__.PERMISO_LIS_FACT_MASIVA;
const PERMISO_POST_MASIVO_SRV_CONTRATADOS = src_app_core_utils_permisos_permisos_servicios__WEBPACK_IMPORTED_MODULE_1__.PERMISO_POST_MASIVO_SRV_CONTRATADOS;
const routes = [{
  path: 'inicio',
  component: src_app_pages_servicios_inicio_servicios_inicio_servicios_component__WEBPACK_IMPORTED_MODULE_2__.InicioServiciosComponent
}, {
  path: 'lotes-facturacion',
  component: _lotes_facturacion_lotes_facturacion_component__WEBPACK_IMPORTED_MODULE_4__.LotesFacturacionComponent,
  //Permite acceso a la ruta si tiene permisos
  canActivate: [_core_guards_auth_guard__WEBPACK_IMPORTED_MODULE_0__.AuthGuard],
  data: {
    permiso: PERMISO_LIS_LOTE_FACT
  }
}, {
  path: 'serviciosContratados',
  component: _srv_contratados_srv_contratados_component__WEBPACK_IMPORTED_MODULE_3__.SrvContratadosComponent,
  //Permite acceso a la ruta si tiene permisos
  canActivate: [_core_guards_auth_guard__WEBPACK_IMPORTED_MODULE_0__.AuthGuard],
  data: {
    permiso: PERMISO_LIS_SRV_CONTRATADOS
  }
}, {
  path: 'facturacion-masiva',
  component: _facturacion_masiva_facturacion_masiva_component__WEBPACK_IMPORTED_MODULE_5__.FacturacionMasivaComponent,
  //Permite acceso a la ruta si tiene permisos
  canActivate: [_core_guards_auth_guard__WEBPACK_IMPORTED_MODULE_0__.AuthGuard],
  data: {
    permiso: PERMISO_LIS_FACT_MASIVA
  }
}, {
  path: 'serviciosContratados/cargaMasiva',
  component: _srv_contratados_carga_masiva_srv_carga_masiva_srv_component__WEBPACK_IMPORTED_MODULE_6__.CargaMasivaSrvComponent,
  canActivate: [_core_guards_auth_guard__WEBPACK_IMPORTED_MODULE_0__.AuthGuard],
  data: {
    permiso: PERMISO_POST_MASIVO_SRV_CONTRATADOS
  }
}];
/**
 * SP SINWEB-151 rutas correspondientes a modulo rma
 */
class ServiciosRoutingModule {
  static #_ = this.ɵfac = function ServiciosRoutingModule_Factory(t) {
    return new (t || ServiciosRoutingModule)();
  };
  static #_2 = this.ɵmod = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵdefineNgModule"]({
    type: ServiciosRoutingModule
  });
  static #_3 = this.ɵinj = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵdefineInjector"]({
    imports: [_angular_router__WEBPACK_IMPORTED_MODULE_8__.RouterModule.forChild(routes), _angular_router__WEBPACK_IMPORTED_MODULE_8__.RouterModule]
  });
}
(function () {
  (typeof ngJitMode === "undefined" || ngJitMode) && _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵsetNgModuleScope"](ServiciosRoutingModule, {
    imports: [_angular_router__WEBPACK_IMPORTED_MODULE_8__.RouterModule],
    exports: [_angular_router__WEBPACK_IMPORTED_MODULE_8__.RouterModule]
  });
})();

/***/ }),

/***/ 32895:
/*!*****************************************************!*\
  !*** ./src/app/pages/servicios/servicios.module.ts ***!
  \*****************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   ServiciosModule: () => (/* binding */ ServiciosModule)
/* harmony export */ });
/* harmony import */ var _inicio_servicios_inicio_servicios_component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./inicio-servicios/inicio-servicios.component */ 92548);
/* harmony import */ var _servicios_routing_module__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./servicios-routing.module */ 14315);
/* harmony import */ var _movimientos_movimientos_component__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./movimientos/movimientos.component */ 50328);
/* harmony import */ var _movimientos_movimiento_edit_movimiento_edit_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./movimientos/movimiento-edit/movimiento-edit.component */ 64282);
/* harmony import */ var ngx_mask__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ngx-mask */ 43735);
/* harmony import */ var _srv_contratados_srv_contratados_component__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./srv-contratados/srv-contratados.component */ 11683);
/* harmony import */ var _srv_contratados_edit_srv_contratado_edit_srv_contratado_component__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./srv-contratados/edit-srv-contratado/edit-srv-contratado.component */ 63903);
/* harmony import */ var _srv_contratados_edit_srv_bonificacion_edit_srv_bonificacion_component__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./srv-contratados/edit-srv-bonificacion/edit-srv-bonificacion.component */ 41003);
/* harmony import */ var _lotes_facturacion_lotes_facturacion_component__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./lotes-facturacion/lotes-facturacion.component */ 57907);
/* harmony import */ var _lotes_facturacion_visualizar_lote_visualizar_lote_component__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./lotes-facturacion/visualizar-lote/visualizar-lote.component */ 27747);
/* harmony import */ var _facturacion_masiva_facturacion_masiva_component__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./facturacion-masiva/facturacion-masiva.component */ 79893);
/* harmony import */ var _facturacion_masiva_listado_fact_masiva_listado_fact_masiva_component__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./facturacion-masiva/listado-fact-masiva/listado-fact-masiva.component */ 9586);
/* harmony import */ var _facturacion_masiva_form_fact_masiva_form_fact_masiva_component__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./facturacion-masiva/form-fact-masiva/form-fact-masiva.component */ 75629);
/* harmony import */ var _srv_contratados_carga_masiva_srv_carga_masiva_srv_component__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./srv-contratados/carga-masiva-srv/carga-masiva-srv.component */ 55028);
/* harmony import */ var _srv_contratados_carga_masiva_srv_edit_srv_seleccionado_edit_srv_seleccionado_component__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./srv-contratados/carga-masiva-srv/edit-srv-seleccionado/edit-srv-seleccionado.component */ 16413);
/* harmony import */ var _srv_contratados_carga_masiva_srv_envio_masivo_srv_envio_masivo_srv_component__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./srv-contratados/carga-masiva-srv/envio-masivo-srv/envio-masivo-srv.component */ 20780);
/* harmony import */ var _facturacion_masiva_form_fact_masiva_detalle_srv_fact_detalle_srv_fact_component__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./facturacion-masiva/form-fact-masiva/detalle-srv-fact/detalle-srv-fact.component */ 45416);
/* harmony import */ var src_app_shared_shared_module__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! src/app/shared/shared.module */ 56208);
/* harmony import */ var _srv_auditoria_srv_auditoria_component__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./srv-auditoria/srv-auditoria.component */ 10966);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! @angular/core */ 65879);




















/**
 * PM  modulo de WEB
 */
class ServiciosModule {
  static #_ = this.ɵfac = function ServiciosModule_Factory(t) {
    return new (t || ServiciosModule)();
  };
  static #_2 = this.ɵmod = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_18__["ɵɵdefineNgModule"]({
    type: ServiciosModule
  });
  static #_3 = this.ɵinj = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_18__["ɵɵdefineInjector"]({
    providers: [(0,ngx_mask__WEBPACK_IMPORTED_MODULE_19__.provideNgxMask)()],
    imports: [src_app_shared_shared_module__WEBPACK_IMPORTED_MODULE_16__.SharedModule, _servicios_routing_module__WEBPACK_IMPORTED_MODULE_1__.ServiciosRoutingModule]
  });
}
(function () {
  (typeof ngJitMode === "undefined" || ngJitMode) && _angular_core__WEBPACK_IMPORTED_MODULE_18__["ɵɵsetNgModuleScope"](ServiciosModule, {
    declarations: [_inicio_servicios_inicio_servicios_component__WEBPACK_IMPORTED_MODULE_0__.InicioServiciosComponent, _movimientos_movimientos_component__WEBPACK_IMPORTED_MODULE_2__.MovimientosComponent, _movimientos_movimiento_edit_movimiento_edit_component__WEBPACK_IMPORTED_MODULE_3__.MovimientoEditComponent, _srv_contratados_srv_contratados_component__WEBPACK_IMPORTED_MODULE_4__.SrvContratadosComponent, _srv_contratados_edit_srv_contratado_edit_srv_contratado_component__WEBPACK_IMPORTED_MODULE_5__.EditSrvContratadoComponent, _srv_contratados_edit_srv_bonificacion_edit_srv_bonificacion_component__WEBPACK_IMPORTED_MODULE_6__.EditSrvBonificacionComponent, _lotes_facturacion_lotes_facturacion_component__WEBPACK_IMPORTED_MODULE_7__.LotesFacturacionComponent, _lotes_facturacion_visualizar_lote_visualizar_lote_component__WEBPACK_IMPORTED_MODULE_8__.VisualizarLoteComponent, _facturacion_masiva_facturacion_masiva_component__WEBPACK_IMPORTED_MODULE_9__.FacturacionMasivaComponent, _facturacion_masiva_listado_fact_masiva_listado_fact_masiva_component__WEBPACK_IMPORTED_MODULE_10__.ListadoFactMasivaComponent, _facturacion_masiva_form_fact_masiva_form_fact_masiva_component__WEBPACK_IMPORTED_MODULE_11__.FormFactMasivaComponent, _srv_contratados_carga_masiva_srv_carga_masiva_srv_component__WEBPACK_IMPORTED_MODULE_12__.CargaMasivaSrvComponent, _srv_contratados_carga_masiva_srv_edit_srv_seleccionado_edit_srv_seleccionado_component__WEBPACK_IMPORTED_MODULE_13__.EditSrvSeleccionadoComponent, _srv_contratados_carga_masiva_srv_envio_masivo_srv_envio_masivo_srv_component__WEBPACK_IMPORTED_MODULE_14__.EnvioMasivoSrvComponent, _facturacion_masiva_form_fact_masiva_detalle_srv_fact_detalle_srv_fact_component__WEBPACK_IMPORTED_MODULE_15__.DetalleSrvFactComponent, _srv_auditoria_srv_auditoria_component__WEBPACK_IMPORTED_MODULE_17__.SrvAuditoriaComponent],
    imports: [src_app_shared_shared_module__WEBPACK_IMPORTED_MODULE_16__.SharedModule, _servicios_routing_module__WEBPACK_IMPORTED_MODULE_1__.ServiciosRoutingModule],
    exports: [_inicio_servicios_inicio_servicios_component__WEBPACK_IMPORTED_MODULE_0__.InicioServiciosComponent]
  });
})();

/***/ }),

/***/ 10966:
/*!**************************************************************************!*\
  !*** ./src/app/pages/servicios/srv-auditoria/srv-auditoria.component.ts ***!
  \**************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   SrvAuditoriaComponent: () => (/* binding */ SrvAuditoriaComponent)
/* harmony export */ });
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/common */ 96814);
/* harmony import */ var _angular_common_locales_es__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/common/locales/es */ 46828);
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/forms */ 56223);
/* harmony import */ var _formkit_tempo__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @formkit/tempo */ 58444);
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ 6990);
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! rxjs */ 37398);
/* harmony import */ var src_app_core_utils_metodos_metodos__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! src/app/core/utils/metodos/metodos */ 38002);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/core */ 65879);
/* harmony import */ var src_app_core_services_servicios_srvContratado_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! src/app/core/services/servicios/srvContratado.service */ 2158);
/* harmony import */ var _ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @ng-bootstrap/ng-bootstrap */ 85406);
/* harmony import */ var primeng_api__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! primeng/api */ 85219);
/* harmony import */ var primeng_button__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! primeng/button */ 40707);
/* harmony import */ var primeng_table__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! primeng/table */ 94267);















function SrvAuditoriaComponent_li_24_ng_template_9_ng_template_0_Template(rf, ctx) {}
function SrvAuditoriaComponent_li_24_ng_template_9_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtemplate"](0, SrvAuditoriaComponent_li_24_ng_template_9_ng_template_0_Template, 0, 0, "ng-template", 35);
  }
  if (rf & 2) {
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵnextContext"](2);
    const _r9 = _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵreference"](36);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵproperty"]("ngTemplateOutlet", _r9);
  }
}
function SrvAuditoriaComponent_li_24_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](0, "li", 30);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵpipe"](1, "async");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](2, "a", 31)(3, "span", 32);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](4, "Altas");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](5, "span", 33);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](6, "Altas ");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelement"](7, "i", 9);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵpipe"](8, "async");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]()();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtemplate"](9, SrvAuditoriaComponent_li_24_ng_template_9_Template, 1, 1, "ng-template", 34);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();
  }
  if (rf & 2) {
    const ctx_r1 = _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵnextContext"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵproperty"]("ngbNavItem", 0)("disabled", _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵpipeBind1"](1, 3, ctx_r1.srvContratadoService.isLoading$) && ctx_r1.tabActive != ctx_r1.tabs.ALTAS_TAB);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"](7);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵproperty"]("ngClass", _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵpipeBind1"](8, 5, ctx_r1.srvContratadoService.isLoading$) && ctx_r1.tabActive == ctx_r1.tabs.ALTAS_TAB ? "bx bx-sync bx-spin font-size-16 align-middle" : "");
  }
}
function SrvAuditoriaComponent_li_25_ng_template_9_ng_template_0_Template(rf, ctx) {}
function SrvAuditoriaComponent_li_25_ng_template_9_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtemplate"](0, SrvAuditoriaComponent_li_25_ng_template_9_ng_template_0_Template, 0, 0, "ng-template", 35);
  }
  if (rf & 2) {
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵnextContext"](2);
    const _r11 = _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵreference"](38);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵproperty"]("ngTemplateOutlet", _r11);
  }
}
function SrvAuditoriaComponent_li_25_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](0, "li", 30);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵpipe"](1, "async");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](2, "a", 31)(3, "span", 36);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](4, "Bajas");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](5, "span", 37);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](6, "Bajas ");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelement"](7, "i", 9);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵpipe"](8, "async");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]()();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtemplate"](9, SrvAuditoriaComponent_li_25_ng_template_9_Template, 1, 1, "ng-template", 34);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();
  }
  if (rf & 2) {
    const ctx_r2 = _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵnextContext"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵproperty"]("ngbNavItem", 1)("disabled", _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵpipeBind1"](1, 3, ctx_r2.srvContratadoService.isLoading$) && ctx_r2.tabActive != ctx_r2.tabs.BAJAS_TAB);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"](7);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵproperty"]("ngClass", _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵpipeBind1"](8, 5, ctx_r2.srvContratadoService.isLoading$) && ctx_r2.tabActive == ctx_r2.tabs.BAJAS_TAB ? "bx bx-sync bx-spin font-size-16 align-middle" : "");
  }
}
function SrvAuditoriaComponent_li_26_ng_template_9_ng_template_0_Template(rf, ctx) {}
function SrvAuditoriaComponent_li_26_ng_template_9_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtemplate"](0, SrvAuditoriaComponent_li_26_ng_template_9_ng_template_0_Template, 0, 0, "ng-template", 35);
  }
  if (rf & 2) {
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵnextContext"](2);
    const _r13 = _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵreference"](40);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵproperty"]("ngTemplateOutlet", _r13);
  }
}
function SrvAuditoriaComponent_li_26_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](0, "li", 30);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵpipe"](1, "async");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](2, "a", 31)(3, "span", 32);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](4, "Nuevos");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](5, "span", 33);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](6, "Nuevos ");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelement"](7, "i", 9);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵpipe"](8, "async");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]()();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtemplate"](9, SrvAuditoriaComponent_li_26_ng_template_9_Template, 1, 1, "ng-template", 34);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();
  }
  if (rf & 2) {
    const ctx_r3 = _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵnextContext"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵproperty"]("ngbNavItem", 2)("disabled", _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵpipeBind1"](1, 3, ctx_r3.srvContratadoService.isLoading$) && ctx_r3.tabActive != ctx_r3.tabs.NUEVOS_TAB);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"](7);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵproperty"]("ngClass", _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵpipeBind1"](8, 5, ctx_r3.srvContratadoService.isLoading$) && ctx_r3.tabActive == ctx_r3.tabs.NUEVOS_TAB ? "bx bx-sync bx-spin font-size-16 align-middle" : "");
  }
}
function SrvAuditoriaComponent_li_27_ng_template_9_ng_template_0_Template(rf, ctx) {}
function SrvAuditoriaComponent_li_27_ng_template_9_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtemplate"](0, SrvAuditoriaComponent_li_27_ng_template_9_ng_template_0_Template, 0, 0, "ng-template", 35);
  }
  if (rf & 2) {
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵnextContext"](2);
    const _r15 = _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵreference"](42);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵproperty"]("ngTemplateOutlet", _r15);
  }
}
function SrvAuditoriaComponent_li_27_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](0, "li", 30);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵpipe"](1, "async");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](2, "a", 31)(3, "span", 36);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](4, "Vencidos");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](5, "span", 37);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](6, "Vencidos ");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelement"](7, "i", 9);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵpipe"](8, "async");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]()();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtemplate"](9, SrvAuditoriaComponent_li_27_ng_template_9_Template, 1, 1, "ng-template", 34);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();
  }
  if (rf & 2) {
    const ctx_r4 = _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵnextContext"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵproperty"]("ngbNavItem", 3)("disabled", _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵpipeBind1"](1, 3, ctx_r4.srvContratadoService.isLoading$) && ctx_r4.tabActive != ctx_r4.tabs.VENCIDOS_TAB);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"](7);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵproperty"]("ngClass", _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵpipeBind1"](8, 5, ctx_r4.srvContratadoService.isLoading$) && ctx_r4.tabActive == ctx_r4.tabs.VENCIDOS_TAB ? "bx bx-sync bx-spin font-size-16 align-middle" : "");
  }
}
function SrvAuditoriaComponent_li_28_ng_template_9_ng_template_0_Template(rf, ctx) {}
function SrvAuditoriaComponent_li_28_ng_template_9_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtemplate"](0, SrvAuditoriaComponent_li_28_ng_template_9_ng_template_0_Template, 0, 0, "ng-template", 35);
  }
  if (rf & 2) {
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵnextContext"](2);
    const _r17 = _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵreference"](44);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵproperty"]("ngTemplateOutlet", _r17);
  }
}
function SrvAuditoriaComponent_li_28_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](0, "li", 30);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵpipe"](1, "async");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](2, "a", 31)(3, "span", 32);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](4, "Bonif. Nuevas");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](5, "span", 33);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](6, "Bonif. Nuevas ");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelement"](7, "i", 9);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵpipe"](8, "async");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]()();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtemplate"](9, SrvAuditoriaComponent_li_28_ng_template_9_Template, 1, 1, "ng-template", 34);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();
  }
  if (rf & 2) {
    const ctx_r5 = _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵnextContext"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵproperty"]("ngbNavItem", 4)("disabled", _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵpipeBind1"](1, 3, ctx_r5.srvContratadoService.isLoading$) && ctx_r5.tabActive != ctx_r5.tabs.BONIF_NUEVAS_TAB);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"](7);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵproperty"]("ngClass", _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵpipeBind1"](8, 5, ctx_r5.srvContratadoService.isLoading$) && ctx_r5.tabActive == ctx_r5.tabs.BONIF_NUEVAS_TAB ? "bx bx-sync bx-spin font-size-16 align-middle" : "");
  }
}
function SrvAuditoriaComponent_li_29_ng_template_9_ng_template_0_Template(rf, ctx) {}
function SrvAuditoriaComponent_li_29_ng_template_9_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtemplate"](0, SrvAuditoriaComponent_li_29_ng_template_9_ng_template_0_Template, 0, 0, "ng-template", 35);
  }
  if (rf & 2) {
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵnextContext"](2);
    const _r19 = _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵreference"](46);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵproperty"]("ngTemplateOutlet", _r19);
  }
}
function SrvAuditoriaComponent_li_29_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](0, "li", 30);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵpipe"](1, "async");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](2, "a", 31)(3, "span", 36);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](4, "Bonif. Venc.");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](5, "span", 37);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](6, "Bonif. Venc. ");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelement"](7, "i", 9);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵpipe"](8, "async");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]()();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtemplate"](9, SrvAuditoriaComponent_li_29_ng_template_9_Template, 1, 1, "ng-template", 34);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();
  }
  if (rf & 2) {
    const ctx_r6 = _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵnextContext"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵproperty"]("ngbNavItem", 5)("disabled", _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵpipeBind1"](1, 3, ctx_r6.srvContratadoService.isLoading$) && ctx_r6.tabActive != ctx_r6.tabs.BONIF_VENC_TAB);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"](7);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵproperty"]("ngClass", _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵpipeBind1"](8, 5, ctx_r6.srvContratadoService.isLoading$) && ctx_r6.tabActive == ctx_r6.tabs.BONIF_VENC_TAB ? "bx bx-sync bx-spin font-size-16 align-middle" : "");
  }
}
function SrvAuditoriaComponent_div_30_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](0, "div", 38)(1, "div", 39);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](2, " No hay datos para mostrar ");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]()();
  }
}
function SrvAuditoriaComponent_ng_template_35_ng_template_2_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](0, "tr");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelement"](1, "th", 45);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](2, "th");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](3, "(Cod.) Cliente");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]()();
  }
}
function SrvAuditoriaComponent_ng_template_35_ng_template_3_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](0, "tr")(1, "td");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelement"](2, "p-button", 46);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](3, "td");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](4);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]()();
  }
  if (rf & 2) {
    const servAltas_r35 = ctx.$implicit;
    const expanded_r37 = ctx.expanded;
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵproperty"]("pRowToggler", servAltas_r35)("text", true)("rounded", true)("plain", true)("icon", expanded_r37 ? "pi pi-chevron-down" : "pi pi-chevron-right");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtextInterpolate2"](" (", servAltas_r35.Cliente.Codigo, ") ", servAltas_r35.Cliente.Nombre, " ");
  }
}
function SrvAuditoriaComponent_ng_template_35_ng_template_4_ng_template_4_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](0, "tr")(1, "th");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](2, "N\u00B0 Servicio");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](3, "th");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](4, "(Cod.) Servicio");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](5, "th");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](6, "(Cod.) Cliente a Fact.");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](7, "th");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](8, "Movimientos");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]()();
  }
}
function SrvAuditoriaComponent_ng_template_35_ng_template_4_ng_template_5_ng_container_9_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementContainerStart"](0);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](1, "div");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](3, "span", 54);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](4);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵpipe"](5, "number");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]()();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementContainerEnd"]();
  }
  if (rf & 2) {
    const concepto_r44 = ctx.$implicit;
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtextInterpolate1"](" ", concepto_r44.FechaInicioFact, " ");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtextInterpolate"](_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵpipeBind3"](5, 2, concepto_r44.Cantidad, "1.2-2", "es"));
  }
}
function SrvAuditoriaComponent_ng_template_35_ng_template_4_ng_template_5_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](0, "tr")(1, "td");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](3, "td");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](4);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](5, "td");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](6);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](7, "td")(8, "div", 51);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtemplate"](9, SrvAuditoriaComponent_ng_template_35_ng_template_4_ng_template_5_ng_container_9_Template, 6, 6, "ng-container", 52);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelement"](10, "hr");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](11, "div", 53);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](12);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵpipe"](13, "number");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]()();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelement"](14, "div");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]()();
  }
  if (rf & 2) {
    const serv_r42 = ctx.$implicit;
    const ctx_r41 = _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵnextContext"](3);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtextInterpolate"](serv_r42.NroSrvContratado);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtextInterpolate2"](" (", serv_r42.Articulo.Codigo, ") ", serv_r42.Articulo.Nombre, " ");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtextInterpolate2"](" (", serv_r42.ClienteFact.Codigo, ") ", serv_r42.ClienteFact.Nombre, " ");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"](3);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵproperty"]("ngForOf", serv_r42.Conceptos);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"](3);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtextInterpolate1"](" Total: ", _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵpipeBind3"](13, 7, ctx_r41.tratamientoConceptos(serv_r42.Conceptos), "1.2-2", "es"), " ");
  }
}
function SrvAuditoriaComponent_ng_template_35_ng_template_4_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](0, "tr", 47)(1, "td", 48)(2, "div", 49)(3, "p-table", 50);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtemplate"](4, SrvAuditoriaComponent_ng_template_35_ng_template_4_ng_template_4_Template, 9, 0, "ng-template", 42)(5, SrvAuditoriaComponent_ng_template_35_ng_template_4_ng_template_5_Template, 15, 11, "ng-template", 43);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]()()()();
  }
  if (rf & 2) {
    const servAltas_r38 = ctx.$implicit;
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"](3);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵproperty"]("value", servAltas_r38.Servicios)("scrollable", true);
  }
}
function SrvAuditoriaComponent_ng_template_35_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](0, "div", 40)(1, "p-table", 41);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtemplate"](2, SrvAuditoriaComponent_ng_template_35_ng_template_2_Template, 4, 0, "ng-template", 42)(3, SrvAuditoriaComponent_ng_template_35_ng_template_3_Template, 5, 7, "ng-template", 43)(4, SrvAuditoriaComponent_ng_template_35_ng_template_4_Template, 6, 2, "ng-template", 44);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]()();
  }
  if (rf & 2) {
    const ctx_r8 = _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵnextContext"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵproperty"]("value", ctx_r8.auditoria.ServiciosConAltas)("scrollable", true)("expandedRowKeys", ctx_r8.expandedRowsAltas);
  }
}
function SrvAuditoriaComponent_ng_template_37_ng_template_2_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](0, "tr");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelement"](1, "th", 45);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](2, "th");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](3, "(Cod.) Cliente");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]()();
  }
}
function SrvAuditoriaComponent_ng_template_37_ng_template_3_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](0, "tr")(1, "td");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelement"](2, "p-button", 46);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](3, "td");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](4);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]()();
  }
  if (rf & 2) {
    const servBajas_r49 = ctx.$implicit;
    const expanded_r51 = ctx.expanded;
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵproperty"]("pRowToggler", servBajas_r49)("text", true)("rounded", true)("plain", true)("icon", expanded_r51 ? "pi pi-chevron-down" : "pi pi-chevron-right");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtextInterpolate2"](" (", servBajas_r49.Cliente.Codigo, ") ", servBajas_r49.Cliente.Nombre, " ");
  }
}
function SrvAuditoriaComponent_ng_template_37_ng_template_4_ng_template_4_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](0, "tr")(1, "th");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](2, "N\u00B0 Servicio");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](3, "th");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](4, "(Cod.) Servicio");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](5, "th");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](6, "(Cod.) Cliente a Fact.");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](7, "th");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](8, "Movimientos");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]()();
  }
}
function SrvAuditoriaComponent_ng_template_37_ng_template_4_ng_template_5_ng_container_9_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementContainerStart"](0);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](1, "div", 55);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](3, "span", 54);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](4);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵpipe"](5, "number");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]()();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementContainerEnd"]();
  }
  if (rf & 2) {
    const concepto_r58 = ctx.$implicit;
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtextInterpolate1"](" ", concepto_r58.FechaInicioFact, " ");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtextInterpolate"](_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵpipeBind3"](5, 2, concepto_r58.Cantidad, "1.2-2", "es"));
  }
}
function SrvAuditoriaComponent_ng_template_37_ng_template_4_ng_template_5_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](0, "tr")(1, "td");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](3, "td");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](4);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](5, "td");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](6);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](7, "td")(8, "div", 51);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtemplate"](9, SrvAuditoriaComponent_ng_template_37_ng_template_4_ng_template_5_ng_container_9_Template, 6, 6, "ng-container", 52);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelement"](10, "hr");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](11, "div", 53);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](12);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵpipe"](13, "number");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]()();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelement"](14, "div");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]()();
  }
  if (rf & 2) {
    const serv_r56 = ctx.$implicit;
    const ctx_r55 = _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵnextContext"](3);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtextInterpolate"](serv_r56.NroSrvContratado);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtextInterpolate2"](" (", serv_r56.Articulo.Codigo, ") ", serv_r56.Articulo.Nombre, " ");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtextInterpolate2"](" (", serv_r56.ClienteFact.Codigo, ") ", serv_r56.ClienteFact.Nombre, " ");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"](3);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵproperty"]("ngForOf", serv_r56.Conceptos);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"](3);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtextInterpolate1"](" Total: ", _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵpipeBind3"](13, 7, ctx_r55.tratamientoConceptos(serv_r56.Conceptos), "1.2-2", "es"), " ");
  }
}
function SrvAuditoriaComponent_ng_template_37_ng_template_4_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](0, "tr", 47)(1, "td", 48)(2, "div", 49)(3, "p-table", 50);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtemplate"](4, SrvAuditoriaComponent_ng_template_37_ng_template_4_ng_template_4_Template, 9, 0, "ng-template", 42)(5, SrvAuditoriaComponent_ng_template_37_ng_template_4_ng_template_5_Template, 15, 11, "ng-template", 43);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]()()()();
  }
  if (rf & 2) {
    const servBajas_r52 = ctx.$implicit;
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"](3);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵproperty"]("value", servBajas_r52.Servicios)("scrollable", true);
  }
}
function SrvAuditoriaComponent_ng_template_37_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](0, "div", 40)(1, "p-table", 41);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtemplate"](2, SrvAuditoriaComponent_ng_template_37_ng_template_2_Template, 4, 0, "ng-template", 42)(3, SrvAuditoriaComponent_ng_template_37_ng_template_3_Template, 5, 7, "ng-template", 43)(4, SrvAuditoriaComponent_ng_template_37_ng_template_4_Template, 6, 2, "ng-template", 44);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]()();
  }
  if (rf & 2) {
    const ctx_r10 = _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵnextContext"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵproperty"]("value", ctx_r10.auditoria.ServiciosConBajas)("scrollable", true)("expandedRowKeys", ctx_r10.expandedRowsBajas);
  }
}
function SrvAuditoriaComponent_ng_template_39_ng_template_2_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](0, "tr");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelement"](1, "th", 45);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](2, "th");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](3, "(Cod.) Cliente");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]()();
  }
}
function SrvAuditoriaComponent_ng_template_39_ng_template_3_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](0, "tr")(1, "td");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelement"](2, "p-button", 46);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](3, "td");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](4);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]()();
  }
  if (rf & 2) {
    const servNuevos_r63 = ctx.$implicit;
    const expanded_r65 = ctx.expanded;
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵproperty"]("pRowToggler", servNuevos_r63)("text", true)("rounded", true)("plain", true)("icon", expanded_r65 ? "pi pi-chevron-down" : "pi pi-chevron-right");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtextInterpolate2"](" (", servNuevos_r63.Cliente.Codigo, ")", servNuevos_r63.Cliente.Nombre, " ");
  }
}
function SrvAuditoriaComponent_ng_template_39_ng_template_4_ng_template_4_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](0, "tr")(1, "th");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](2, "N\u00B0 Servicio");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](3, "th");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](4, "(Cod.) Servicio");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](5, "th");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](6, "(Cod.) Cliente a Fact.");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]()();
  }
}
function SrvAuditoriaComponent_ng_template_39_ng_template_4_ng_template_5_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](0, "tr")(1, "td");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](3, "td");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](4);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](5, "td");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](6);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]()();
  }
  if (rf & 2) {
    const serv_r70 = ctx.$implicit;
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtextInterpolate"](serv_r70.NroSrvContratado);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtextInterpolate2"](" (", serv_r70.Articulo.Codigo, ") ", serv_r70.Articulo.Nombre, " ");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtextInterpolate2"](" (", serv_r70.ClienteFact.Codigo, ") ", serv_r70.ClienteFact.Nombre, " ");
  }
}
function SrvAuditoriaComponent_ng_template_39_ng_template_4_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](0, "tr", 47)(1, "td", 48)(2, "div", 49)(3, "p-table", 50);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtemplate"](4, SrvAuditoriaComponent_ng_template_39_ng_template_4_ng_template_4_Template, 7, 0, "ng-template", 42)(5, SrvAuditoriaComponent_ng_template_39_ng_template_4_ng_template_5_Template, 7, 5, "ng-template", 43);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]()()()();
  }
  if (rf & 2) {
    const servNuevos_r66 = ctx.$implicit;
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"](3);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵproperty"]("value", servNuevos_r66.Servicios)("scrollable", true);
  }
}
function SrvAuditoriaComponent_ng_template_39_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](0, "div", 40)(1, "p-table", 41);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtemplate"](2, SrvAuditoriaComponent_ng_template_39_ng_template_2_Template, 4, 0, "ng-template", 42)(3, SrvAuditoriaComponent_ng_template_39_ng_template_3_Template, 5, 7, "ng-template", 43)(4, SrvAuditoriaComponent_ng_template_39_ng_template_4_Template, 6, 2, "ng-template", 44);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]()();
  }
  if (rf & 2) {
    const ctx_r12 = _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵnextContext"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵproperty"]("value", ctx_r12.auditoria.ServiciosNuevos)("scrollable", true)("expandedRowKeys", ctx_r12.expandedRowsNuevos);
  }
}
function SrvAuditoriaComponent_ng_template_41_ng_template_2_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](0, "tr");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelement"](1, "th", 45);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](2, "th");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](3, "(Cod.) Cliente");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]()();
  }
}
function SrvAuditoriaComponent_ng_template_41_ng_template_3_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](0, "tr")(1, "td");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelement"](2, "p-button", 46);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](3, "td");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](4);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]()();
  }
  if (rf & 2) {
    const servVencidos_r74 = ctx.$implicit;
    const expanded_r76 = ctx.expanded;
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵproperty"]("pRowToggler", servVencidos_r74)("text", true)("rounded", true)("plain", true)("icon", expanded_r76 ? "pi pi-chevron-down" : "pi pi-chevron-right");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtextInterpolate2"](" (", servVencidos_r74.Cliente.Codigo, ")", servVencidos_r74.Cliente.Nombre, " ");
  }
}
function SrvAuditoriaComponent_ng_template_41_ng_template_4_ng_template_4_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](0, "tr")(1, "th");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](2, "N\u00B0 Servicio");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](3, "th");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](4, "(Cod.) Servicio");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](5, "th");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](6, "(Cod.) Cliente a Fact.");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]()();
  }
}
function SrvAuditoriaComponent_ng_template_41_ng_template_4_ng_template_5_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](0, "tr")(1, "td");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](3, "td");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](4);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](5, "td");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](6);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]()();
  }
  if (rf & 2) {
    const serv_r81 = ctx.$implicit;
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtextInterpolate"](serv_r81.NroSrvContratado);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtextInterpolate2"](" (", serv_r81.Articulo.Codigo, ") ", serv_r81.Articulo.Nombre, " ");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtextInterpolate2"](" (", serv_r81.ClienteFact.Codigo, ") ", serv_r81.ClienteFact.Nombre, " ");
  }
}
function SrvAuditoriaComponent_ng_template_41_ng_template_4_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](0, "tr", 47)(1, "td", 48)(2, "div", 49)(3, "p-table", 50);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtemplate"](4, SrvAuditoriaComponent_ng_template_41_ng_template_4_ng_template_4_Template, 7, 0, "ng-template", 42)(5, SrvAuditoriaComponent_ng_template_41_ng_template_4_ng_template_5_Template, 7, 5, "ng-template", 43);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]()()()();
  }
  if (rf & 2) {
    const servVencidos_r77 = ctx.$implicit;
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"](3);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵproperty"]("value", servVencidos_r77.Servicios)("scrollable", true);
  }
}
function SrvAuditoriaComponent_ng_template_41_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](0, "div", 40)(1, "p-table", 41);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtemplate"](2, SrvAuditoriaComponent_ng_template_41_ng_template_2_Template, 4, 0, "ng-template", 42)(3, SrvAuditoriaComponent_ng_template_41_ng_template_3_Template, 5, 7, "ng-template", 43)(4, SrvAuditoriaComponent_ng_template_41_ng_template_4_Template, 6, 2, "ng-template", 44);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]()();
  }
  if (rf & 2) {
    const ctx_r14 = _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵnextContext"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵproperty"]("value", ctx_r14.auditoria.ServiciosVencidos)("scrollable", true)("expandedRowKeys", ctx_r14.expandedRowsVencidos);
  }
}
function SrvAuditoriaComponent_ng_template_43_ng_template_2_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](0, "tr");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelement"](1, "th", 45);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](2, "th");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](3, "(Cod.) Cliente");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]()();
  }
}
function SrvAuditoriaComponent_ng_template_43_ng_template_3_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](0, "tr")(1, "td");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelement"](2, "p-button", 46);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](3, "td");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](4);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]()();
  }
  if (rf & 2) {
    const servBonifNuevas_r85 = ctx.$implicit;
    const expanded_r87 = ctx.expanded;
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵproperty"]("pRowToggler", servBonifNuevas_r85)("text", true)("rounded", true)("plain", true)("icon", expanded_r87 ? "pi pi-chevron-down" : "pi pi-chevron-right");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtextInterpolate2"](" (", servBonifNuevas_r85.Cliente.Codigo, ")", servBonifNuevas_r85.Cliente.Nombre, " ");
  }
}
function SrvAuditoriaComponent_ng_template_43_ng_template_4_ng_template_4_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](0, "tr")(1, "th");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](2, "N\u00B0 Servicio");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](3, "th");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](4, "(Cod.) Servicio");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](5, "th");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](6, "(Cod.) Cliente a Fact.");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](7, "th");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](8, "Bonificaci\u00F3n");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]()();
  }
}
function SrvAuditoriaComponent_ng_template_43_ng_template_4_ng_template_5_Conditional_14_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](0, "b");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](1, "Fecha de Fin: ");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](2);
  }
  if (rf & 2) {
    const serv_r92 = _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵnextContext"]().$implicit;
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtextInterpolate1"]("", serv_r92.Bonificacion.FechaFin.split(" ")[0], " ");
  }
}
function SrvAuditoriaComponent_ng_template_43_ng_template_4_ng_template_5_Conditional_15_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](0, "b");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](1, "Vigencia Ilimitada");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();
  }
}
function SrvAuditoriaComponent_ng_template_43_ng_template_4_ng_template_5_Conditional_21_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](0, "div")(1, "b");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](2, "Porcentaje: ");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](3, "span", 57);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](4);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵpipe"](5, "number");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]()();
  }
  if (rf & 2) {
    const serv_r92 = _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵnextContext"]().$implicit;
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"](4);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtextInterpolate1"]("", _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵpipeBind3"](5, 1, serv_r92.Bonificacion.Valor, "1.2-2", "es"), "%");
  }
}
function SrvAuditoriaComponent_ng_template_43_ng_template_4_ng_template_5_Conditional_22_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](0, "div")(1, "b");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](2, "Cantidad: ");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](3, "span", 58);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](4);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵpipe"](5, "number");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]()();
  }
  if (rf & 2) {
    const serv_r92 = _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵnextContext"]().$implicit;
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"](4);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtextInterpolate"](_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵpipeBind3"](5, 1, serv_r92.Bonificacion.Valor, "1.2-2", "es"));
  }
}
function SrvAuditoriaComponent_ng_template_43_ng_template_4_ng_template_5_Conditional_23_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](0, "div")(1, "b");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](2, "Fecha Lista de precios: ");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](3, "span", 59);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](4);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]()();
  }
  if (rf & 2) {
    const serv_r92 = _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵnextContext"]().$implicit;
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"](4);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtextInterpolate"](serv_r92.Bonificacion.FechaListaPrecio);
  }
}
function SrvAuditoriaComponent_ng_template_43_ng_template_4_ng_template_5_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](0, "tr")(1, "td");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](3, "td");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](4);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](5, "td");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](6);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](7, "td")(8, "div", 56)(9, "div")(10, "b");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](11, "Fecha de Inicio:");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](12);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](13, "div");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtemplate"](14, SrvAuditoriaComponent_ng_template_43_ng_template_4_ng_template_5_Conditional_14_Template, 3, 1)(15, SrvAuditoriaComponent_ng_template_43_ng_template_4_ng_template_5_Conditional_15_Template, 2, 0);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](16, "div")(17, "b");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](18, "Estado: ");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](19, "span", 9);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](20);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]()();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtemplate"](21, SrvAuditoriaComponent_ng_template_43_ng_template_4_ng_template_5_Conditional_21_Template, 6, 5, "div")(22, SrvAuditoriaComponent_ng_template_43_ng_template_4_ng_template_5_Conditional_22_Template, 6, 5, "div")(23, SrvAuditoriaComponent_ng_template_43_ng_template_4_ng_template_5_Conditional_23_Template, 5, 1, "div");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]()()();
  }
  if (rf & 2) {
    const serv_r92 = ctx.$implicit;
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtextInterpolate"](serv_r92.NroSrvContratado);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtextInterpolate2"](" (", serv_r92.Articulo.Codigo, ") ", serv_r92.Articulo.Nombre, " ");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtextInterpolate2"](" (", serv_r92.ClienteFact.Codigo, ") ", serv_r92.ClienteFact.Nombre, " ");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"](6);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtextInterpolate1"](" ", serv_r92.Bonificacion.FechaInicio.split(" ")[0], " ");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵconditional"](14, serv_r92.Bonificacion.VigenciaIlimitada != "S" ? 14 : 15);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"](5);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵproperty"]("ngClass", serv_r92.Bonificacion.Activa == "S" ? "badge rounded-pill bg-success" : "badge rounded-pill bg-danger");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtextInterpolate1"](" ", serv_r92.Bonificacion.Activa == "S" ? "Activa" : "Inactiva", " ");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵconditional"](21, serv_r92.Bonificacion.TipoValor == "P" ? 21 : -1);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵconditional"](22, serv_r92.Bonificacion.TipoValor == "N" ? 22 : -1);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵconditional"](23, serv_r92.Bonificacion.TipoValor == "F" ? 23 : -1);
  }
}
function SrvAuditoriaComponent_ng_template_43_ng_template_4_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](0, "tr", 47)(1, "td", 48)(2, "div", 49)(3, "p-table", 50);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtemplate"](4, SrvAuditoriaComponent_ng_template_43_ng_template_4_ng_template_4_Template, 9, 0, "ng-template", 42)(5, SrvAuditoriaComponent_ng_template_43_ng_template_4_ng_template_5_Template, 24, 12, "ng-template", 43);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]()()()();
  }
  if (rf & 2) {
    const servBonifNuevas_r88 = ctx.$implicit;
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"](3);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵproperty"]("value", servBonifNuevas_r88.Servicios)("scrollable", true);
  }
}
function SrvAuditoriaComponent_ng_template_43_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](0, "div", 40)(1, "p-table", 41);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtemplate"](2, SrvAuditoriaComponent_ng_template_43_ng_template_2_Template, 4, 0, "ng-template", 42)(3, SrvAuditoriaComponent_ng_template_43_ng_template_3_Template, 5, 7, "ng-template", 43)(4, SrvAuditoriaComponent_ng_template_43_ng_template_4_Template, 6, 2, "ng-template", 44);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]()();
  }
  if (rf & 2) {
    const ctx_r16 = _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵnextContext"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵproperty"]("value", ctx_r16.auditoria.ServiciosConBonificacionesNuevas)("scrollable", true)("expandedRowKeys", ctx_r16.expandedRowsBonifNuevas);
  }
}
function SrvAuditoriaComponent_ng_template_45_ng_template_2_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](0, "tr");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelement"](1, "th", 45);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](2, "th");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](3, "(Cod.) Cliente");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]()();
  }
}
function SrvAuditoriaComponent_ng_template_45_ng_template_3_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](0, "tr")(1, "td");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelement"](2, "p-button", 46);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](3, "td");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](4);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]()();
  }
  if (rf & 2) {
    const servBonifVenc_r105 = ctx.$implicit;
    const expanded_r107 = ctx.expanded;
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵproperty"]("pRowToggler", servBonifVenc_r105)("text", true)("rounded", true)("plain", true)("icon", expanded_r107 ? "pi pi-chevron-down" : "pi pi-chevron-right");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtextInterpolate2"](" (", servBonifVenc_r105.Cliente.Codigo, ") ", servBonifVenc_r105.Cliente.Nombre, " ");
  }
}
function SrvAuditoriaComponent_ng_template_45_ng_template_4_ng_template_4_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](0, "tr")(1, "th");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](2, "N\u00B0 Servicio");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](3, "th");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](4, "(Cod.) Servicio");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](5, "th");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](6, "(Cod.) Cliente a Fact.");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](7, "th");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](8, "Bonificaci\u00F3n");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]()();
  }
}
function SrvAuditoriaComponent_ng_template_45_ng_template_4_ng_template_5_Conditional_14_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](0, "b");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](1, "Fecha de Fin: ");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](2);
  }
  if (rf & 2) {
    const serv_r112 = _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵnextContext"]().$implicit;
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtextInterpolate1"]("", serv_r112.Bonificacion.FechaFin.split(" ")[0], " ");
  }
}
function SrvAuditoriaComponent_ng_template_45_ng_template_4_ng_template_5_Conditional_15_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](0, "b");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](1, "Vigencia Ilimitada");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();
  }
}
function SrvAuditoriaComponent_ng_template_45_ng_template_4_ng_template_5_Conditional_21_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](0, "div")(1, "b");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](2, "Porcentaje: ");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](3, "span", 57);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](4);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵpipe"](5, "number");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]()();
  }
  if (rf & 2) {
    const serv_r112 = _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵnextContext"]().$implicit;
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"](4);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtextInterpolate1"]("", _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵpipeBind3"](5, 1, serv_r112.Bonificacion.Valor, "1.2-2", "es"), "%");
  }
}
function SrvAuditoriaComponent_ng_template_45_ng_template_4_ng_template_5_Conditional_22_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](0, "div")(1, "b");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](2, "Cantidad: ");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](3, "span", 58);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](4);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵpipe"](5, "number");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]()();
  }
  if (rf & 2) {
    const serv_r112 = _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵnextContext"]().$implicit;
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"](4);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtextInterpolate"](_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵpipeBind3"](5, 1, serv_r112.Bonificacion.Valor, "1.2-2", "es"));
  }
}
function SrvAuditoriaComponent_ng_template_45_ng_template_4_ng_template_5_Conditional_23_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](0, "div")(1, "b");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](2, "Fecha Lista de precios: ");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](3, "span", 59);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](4);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]()();
  }
  if (rf & 2) {
    const serv_r112 = _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵnextContext"]().$implicit;
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"](4);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtextInterpolate"](serv_r112.Bonificacion.FechaListaPrecio);
  }
}
function SrvAuditoriaComponent_ng_template_45_ng_template_4_ng_template_5_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](0, "tr")(1, "td");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](3, "td");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](4);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](5, "td");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](6);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](7, "td")(8, "div", 56)(9, "div")(10, "b");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](11, "Fecha de Inicio:");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](12);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](13, "div");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtemplate"](14, SrvAuditoriaComponent_ng_template_45_ng_template_4_ng_template_5_Conditional_14_Template, 3, 1)(15, SrvAuditoriaComponent_ng_template_45_ng_template_4_ng_template_5_Conditional_15_Template, 2, 0);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](16, "div")(17, "b");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](18, "Estado: ");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](19, "span", 9);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](20);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]()();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtemplate"](21, SrvAuditoriaComponent_ng_template_45_ng_template_4_ng_template_5_Conditional_21_Template, 6, 5, "div")(22, SrvAuditoriaComponent_ng_template_45_ng_template_4_ng_template_5_Conditional_22_Template, 6, 5, "div")(23, SrvAuditoriaComponent_ng_template_45_ng_template_4_ng_template_5_Conditional_23_Template, 5, 1, "div");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]()()();
  }
  if (rf & 2) {
    const serv_r112 = ctx.$implicit;
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtextInterpolate"](serv_r112.NroSrvContratado);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtextInterpolate2"](" (", serv_r112.Articulo.Codigo, ") ", serv_r112.Articulo.Nombre, " ");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtextInterpolate2"](" (", serv_r112.ClienteFact.Codigo, ") ", serv_r112.ClienteFact.Nombre, " ");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"](6);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtextInterpolate1"](" ", serv_r112.Bonificacion.FechaInicio.split(" ")[0], " ");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵconditional"](14, serv_r112.Bonificacion.VigenciaIlimitada != "S" ? 14 : 15);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"](5);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵproperty"]("ngClass", serv_r112.Bonificacion.Activa == "S" ? "badge rounded-pill bg-success" : "badge rounded-pill bg-danger");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtextInterpolate1"](" ", serv_r112.Bonificacion.Activa == "S" ? "Activa" : "Inactiva", " ");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵconditional"](21, serv_r112.Bonificacion.TipoValor == "P" ? 21 : -1);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵconditional"](22, serv_r112.Bonificacion.TipoValor == "N" ? 22 : -1);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵconditional"](23, serv_r112.Bonificacion.TipoValor == "F" ? 23 : -1);
  }
}
function SrvAuditoriaComponent_ng_template_45_ng_template_4_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](0, "tr", 47)(1, "td", 48)(2, "div", 49)(3, "p-table", 50);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtemplate"](4, SrvAuditoriaComponent_ng_template_45_ng_template_4_ng_template_4_Template, 9, 0, "ng-template", 42)(5, SrvAuditoriaComponent_ng_template_45_ng_template_4_ng_template_5_Template, 24, 12, "ng-template", 43);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]()()()();
  }
  if (rf & 2) {
    const servBonifVenc_r108 = ctx.$implicit;
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"](3);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵproperty"]("value", servBonifVenc_r108.Servicios)("scrollable", true);
  }
}
function SrvAuditoriaComponent_ng_template_45_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](0, "div", 40)(1, "p-table", 41);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtemplate"](2, SrvAuditoriaComponent_ng_template_45_ng_template_2_Template, 4, 0, "ng-template", 42)(3, SrvAuditoriaComponent_ng_template_45_ng_template_3_Template, 5, 7, "ng-template", 43)(4, SrvAuditoriaComponent_ng_template_45_ng_template_4_Template, 6, 2, "ng-template", 44);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]()();
  }
  if (rf & 2) {
    const ctx_r18 = _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵnextContext"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵproperty"]("value", ctx_r18.auditoria.ServiciosConBonificacionesVencidas)("scrollable", true)("expandedRowKeys", ctx_r18.expandedRowsBonifVenc);
  }
}
class SrvAuditoriaComponent {
  constructor(srvContratadoService, fb, modal) {
    this.srvContratadoService = srvContratadoService;
    this.fb = fb;
    this.modal = modal;
    this.expandedRowsAltas = {};
    this.expandedRowsBajas = {};
    this.expandedRowsNuevos = {};
    this.expandedRowsVencidos = {};
    this.expandedRowsBonifNuevas = {};
    this.expandedRowsBonifVenc = {};
    this.subscription = [];
    this.auditoria = {
      ServiciosConAltas: [],
      ServiciosConBajas: [],
      ServiciosVencidos: [],
      ServiciosNuevos: [],
      ServiciosConBonificacionesNuevas: [],
      ServiciosConBonificacionesVencidas: []
    };
    this.totalItems = 0;
    this.tabActive = 0;
    this.tabs = {
      ALTAS_TAB: 0,
      BAJAS_TAB: 1,
      NUEVOS_TAB: 2,
      VENCIDOS_TAB: 3,
      BONIF_NUEVAS_TAB: 4,
      BONIF_VENC_TAB: 5
    };
  }
  ngOnInit() {
    (0,_angular_common__WEBPACK_IMPORTED_MODULE_5__.registerLocaleData)(_angular_common_locales_es__WEBPACK_IMPORTED_MODULE_6__["default"]);
    this.filterForm = this.fb.group({
      fechaDesde: ['', [_angular_forms__WEBPACK_IMPORTED_MODULE_7__.Validators.required, this.dateValidator]],
      fechaHasta: ['', [_angular_forms__WEBPACK_IMPORTED_MODULE_7__.Validators.required, this.dateValidator]]
    });
    this.obtenerFechaFiltro();
    this.cargarAuditoria(true);
    this.configFiltros();
  }
  dateValidator(control) {
    const dateRegex = /^\d{4}-\d{2}-\d{2}$/;
    return dateRegex.test(control.value) ? null : {
      invalidDate: true
    };
  }
  configFiltros() {
    this.subscription.push(this.filterForm.controls.fechaDesde.valueChanges.subscribe(desde => {
      if (this.filterForm.controls.fechaDesde?.valid) {
        this.filterFechaDesde = desde;
        this.cargarAuditoria();
      }
    }));
    this.subscription.push(this.filterForm.controls.fechaHasta.valueChanges.subscribe(hasta => {
      if (this.filterForm.controls.fechaHasta?.valid) {
        this.filterFechaHasta = hasta;
        this.cargarAuditoria();
      }
    }));
  }
  obtenerFechaFiltro() {
    // if (this.Periodo.split('/')[0] == '01'){
    //   this.filterForm.controls.fechaDesde.setValue('01'+'/'+'12'+(+this.Periodo.split('/')[1]-1).toString().padStart(2,'0'));
    // }else{
    //   this.filterForm.controls.fechaDesde.setValue(('01'+'/'+(+this.Periodo.split('/')[0]-1).toString().padStart(2,'0')+'/'+(this.Periodo.split('/')[1])));
    // }
    // if (this.Periodo == format(new Date(), 'MM/YYYY')){
    //   this.filterForm.controls.fechaHasta.setValue(format(new Date(), 'DD/MM/YYYY'));
    // }else{
    //   this.filterForm.controls.fechaHasta.setValue('01'+'/'+this.Periodo);
    // }
    if (this.Periodo.split('/')[0] == '01') {
      this.filterForm.controls.fechaDesde.setValue((+this.Periodo.split('/')[1] - 1).toString().padStart(2, '0') + '12' + '-01');
    } else {
      this.filterForm.controls.fechaDesde.setValue(this.Periodo.split('/')[1] + '-' + (+this.Periodo.split('/')[0] - 1).toString().padStart(2, '0') + '-01');
    }
    this.filterFechaDesde = this.filterForm.value.fechaDesde;
    if (this.Periodo == (0,_formkit_tempo__WEBPACK_IMPORTED_MODULE_0__.format)(new Date(), 'MM/YYYY')) {
      this.filterForm.controls.fechaHasta.setValue(this.Periodo.split('/')[1] + '-' + this.Periodo.split('/')[0] + '-' + new Date().getDate());
    } else {
      this.filterForm.controls.fechaHasta.setValue(this.Periodo.split('/')[1] + '-' + this.Periodo.split('/')[0] + '-01');
    }
    this.filterFechaHasta = this.filterForm.value.fechaHasta;
  }
  cargarAuditoria(loading) {
    let datos = {
      FechaDesde: (0,src_app_core_utils_metodos_metodos__WEBPACK_IMPORTED_MODULE_2__.formatFecha)(this.filterFechaDesde) + ' 00:00:00',
      FechaHasta: (0,src_app_core_utils_metodos_metodos__WEBPACK_IMPORTED_MODULE_2__.formatFecha)(this.filterFechaHasta) + ' 23:59:59'
    };
    const susc = this.srvContratadoService.getAuditoria(datos, loading ? {
      loading: true
    } : null).pipe((0,rxjs__WEBPACK_IMPORTED_MODULE_8__.map)(resp => {
      if (resp.Data == null) {
        return null;
      }
      if (resp.Data.ServiciosConBajas.length > 0) {
        resp.Data.ServiciosConBajas = this.ObtenerServiciosPorCliente('ServiciosConBajas', resp.Data);
      }
      if (resp.Data.ServiciosConAltas.length > 0) {
        resp.Data.ServiciosConAltas = this.ObtenerServiciosPorCliente('ServiciosConAltas', resp.Data);
      }
      if (resp.Data.ServiciosVencidos.length > 0) {
        resp.Data.ServiciosVencidos = this.ObtenerServiciosPorCliente('ServiciosVencidos', resp.Data);
      }
      if (resp.Data.ServiciosNuevos.length > 0) {
        resp.Data.ServiciosNuevos = this.ObtenerServiciosPorCliente('ServiciosNuevos', resp.Data);
      }
      if (resp.Data.ServiciosConBonificacionesNuevas.length > 0) {
        resp.Data.ServiciosConBonificacionesNuevas = this.ObtenerServiciosPorCliente('ServiciosConBonificacionesNuevas', resp.Data);
      }
      if (resp.Data.ServiciosConBonificacionesVencidas.length > 0) {
        resp.Data.ServiciosConBonificacionesVencidas = this.ObtenerServiciosPorCliente('ServiciosConBonificacionesVencidas', resp.Data);
      }
      return {
        Data: resp.Data
      };
    })).subscribe(res => {
      this.auditoria = res.Data;
      if (!this.sinCambios()) {
        this.mostrarTab(this.tabActive) ? null : this.tabActive = lodash__WEBPACK_IMPORTED_MODULE_1__.find(this.tabs, tab => this.mostrarTab(tab));
      }
    });
  }
  ObtenerServiciosPorCliente(type, data) {
    let groupByCliente = lodash__WEBPACK_IMPORTED_MODULE_1__.groupBy(data[type], elem => elem.Cliente.Id);
    let arrayByCliente = Object.values(groupByCliente).reduce((acc, groupByCliente) => {
      acc.push({
        Cliente: groupByCliente[0].Cliente,
        Servicios: groupByCliente.map(elem => ({
          ...elem,
          Cliente: undefined // Eliminamos la propiedad cliente
        }))
      });
      return acc;
    }, []);
    return arrayByCliente;
  }
  mostrarTab(tab) {
    if (this.auditoria == null) {
      return false;
    } else {
      switch (tab) {
        case this.tabs.ALTAS_TAB:
          return this.auditoria.ServiciosConAltas.length > 0;
        case this.tabs.BAJAS_TAB:
          return this.auditoria.ServiciosConBajas.length > 0;
        case this.tabs.NUEVOS_TAB:
          return this.auditoria.ServiciosNuevos.length > 0;
        case this.tabs.VENCIDOS_TAB:
          return this.auditoria.ServiciosVencidos.length > 0;
        case this.tabs.BONIF_NUEVAS_TAB:
          return this.auditoria.ServiciosConBonificacionesNuevas.length > 0;
        case this.tabs.BONIF_VENC_TAB:
          return this.auditoria.ServiciosConBonificacionesVencidas.length > 0;
        default:
          return false;
      }
    }
  }
  sinCambios() {
    return this.auditoria.ServiciosConAltas.length == 0 && this.auditoria.ServiciosConBajas.length == 0 && this.auditoria.ServiciosNuevos.length == 0 && this.auditoria.ServiciosVencidos.length == 0 && this.auditoria.ServiciosConBonificacionesNuevas.length == 0 && this.auditoria.ServiciosConBonificacionesVencidas.length == 0;
  }
  navChanged(event) {
    this.tabActive = event.nextId;
    this.expandedRowsAltas = {};
    this.expandedRowsBajas = {};
    this.expandedRowsNuevos = {};
    this.expandedRowsVencidos = {};
    this.expandedRowsBonifNuevas = {};
    this.expandedRowsBonifVenc = {};
    this.cargarAuditoria();
  }
  tratamientoConceptos(conceptos) {
    return conceptos.reduce((acumulador, producto) => {
      return acumulador + producto.Cantidad;
    }, 0);
  }
  static #_ = this.ɵfac = function SrvAuditoriaComponent_Factory(t) {
    return new (t || SrvAuditoriaComponent)(_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵdirectiveInject"](src_app_core_services_servicios_srvContratado_service__WEBPACK_IMPORTED_MODULE_3__.SrvContratadoService), _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵdirectiveInject"](_angular_forms__WEBPACK_IMPORTED_MODULE_7__.FormBuilder), _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵdirectiveInject"](_ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_9__.NgbActiveModal));
  };
  static #_2 = this.ɵcmp = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵdefineComponent"]({
    type: SrvAuditoriaComponent,
    selectors: [["app-srv-auditoria"]],
    inputs: {
      Periodo: "Periodo"
    },
    decls: 47,
    vars: 13,
    consts: [[1, "modal-content"], [1, "modal-header"], ["id", "example-modal-sizes-title-lg", 1, "modal-title", "h4"], [1, "overlay", "overlay-block", "cursor-default", "modal-body", 2, "min-height", "200px"], [1, "row"], [1, "card"], [1, "card-body", "border-bottom"], [1, "d-flex", "justify-content-center", "d-lg-block", "float-lg-end", "mb-lg-0", "mb-2"], [1, "btn", "btn-light", 3, "click"], [3, "ngClass"], [3, "formGroup"], [1, "col-12", "col-lg-6"], [1, "text-muted"], [1, "d-flex", "flex-column", "flex-lg-row", "align-items-center"], ["type", "date", "formControlName", "fechaDesde", 1, "form-control", "digits"], ["type", "date", "formControlName", "fechaHasta", 1, "form-control", "digits"], [1, "card-body"], ["ngbNav", "", 1, "nav-tabs", "nav-tabs-custom", "nav-justified", 3, "activeId", "navChange"], ["mainNav", "ngbNav"], [3, "ngbNavItem", "disabled", 4, "ngIf"], ["class", "row justify-content-center mx-1", 4, "ngIf"], [3, "ngbNavOutlet"], [1, "modal-footer"], ["type", "button", 1, "btn", "btn-success", 3, "click"], ["ALTAS_TAB", ""], ["BAJAS_TAB", ""], ["NUEVOS_TAB", ""], ["VENCIDOS_TAB", ""], ["BONIF_NUEVAS_TAB", ""], ["BONIF_VENC_TAB", ""], [3, "ngbNavItem", "disabled"], ["ngbNavLink", ""], [1, "d-block", "d-sm-none", "text-success"], [1, "d-none", "d-sm-block", "text-success"], ["ngbNavContent", ""], [3, "ngTemplateOutlet"], [1, "d-block", "d-sm-none", "text-danger"], [1, "d-none", "d-sm-block", "text-danger"], [1, "row", "justify-content-center", "mx-1"], ["role", "alert", 1, "col-12", "alert", "alert-info", "py-3", "text-center"], [1, "mt-2"], ["dataKey", "Cliente.Id", "scrollHeight", "600px", "styleClass", "p-datatable-gridlines", 3, "value", "scrollable", "expandedRowKeys"], ["pTemplate", "header"], ["pTemplate", "body"], ["pTemplate", "rowexpansion"], [2, "width", "5rem"], ["type", "button", "pRipple", "", 3, "pRowToggler", "text", "rounded", "plain", "icon"], [1, "bg-info", "bg-soft"], ["colspan", "7"], [1, "p-1"], ["dataKey", "Id", "scrollHeight", "200px", 3, "value", "scrollable"], [1, "d-flex", "flex-column"], [4, "ngFor", "ngForOf"], [1, "fw-bold", "font-size-20"], [1, "badge", "rounded-pill", "font-size-14", "bg-dark"], [1, "pb-1"], [1, "d-flex", "flex-column", "gap-column-2", "font-size-14"], [1, "badge", "rounded-pill", "bg-primary"], [1, "badge", "rounded-pill", "bg-info"], [1, "badge", "rounded-pill", "bg-dark"]],
    template: function SrvAuditoriaComponent_Template(rf, ctx) {
      if (rf & 1) {
        _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](0, "div", 0)(1, "div", 1)(2, "div", 2);
        _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](3, " Auditor\u00EDa de servicios ");
        _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]()();
        _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](4, "div", 3)(5, "div", 4)(6, "div", 5)(7, "div", 6)(8, "div", 7)(9, "a", 8);
        _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵlistener"]("click", function SrvAuditoriaComponent_Template_a_click_9_listener() {
          return ctx.cargarAuditoria();
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelement"](10, "i", 9);
        _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵpipe"](11, "async");
        _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]()();
        _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](12, "div", 4);
        _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementContainerStart"](13, 10);
        _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](14, "div", 11)(15, "p", 12);
        _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](16, "Fecha Desde - Hasta:");
        _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](17, "div", 13);
        _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelement"](18, "input", 14);
        _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](19, " \u00A0 ");
        _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelement"](20, "input", 15);
        _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]()();
        _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementContainerEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]()();
        _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](21, "div", 16)(22, "ul", 17, 18);
        _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵlistener"]("navChange", function SrvAuditoriaComponent_Template_ul_navChange_22_listener($event) {
          return ctx.navChanged($event);
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtemplate"](24, SrvAuditoriaComponent_li_24_Template, 10, 7, "li", 19)(25, SrvAuditoriaComponent_li_25_Template, 10, 7, "li", 19)(26, SrvAuditoriaComponent_li_26_Template, 10, 7, "li", 19)(27, SrvAuditoriaComponent_li_27_Template, 10, 7, "li", 19)(28, SrvAuditoriaComponent_li_28_Template, 10, 7, "li", 19)(29, SrvAuditoriaComponent_li_29_Template, 10, 7, "li", 19);
        _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtemplate"](30, SrvAuditoriaComponent_div_30_Template, 3, 0, "div", 20);
        _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelement"](31, "div", 21);
        _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]()()()();
        _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](32, "div", 22)(33, "button", 23);
        _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵlistener"]("click", function SrvAuditoriaComponent_Template_button_click_33_listener() {
          return ctx.modal.dismiss();
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](34, " Aceptar ");
        _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]()()();
        _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtemplate"](35, SrvAuditoriaComponent_ng_template_35_Template, 5, 3, "ng-template", null, 24, _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtemplateRefExtractor"])(37, SrvAuditoriaComponent_ng_template_37_Template, 5, 3, "ng-template", null, 25, _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtemplateRefExtractor"])(39, SrvAuditoriaComponent_ng_template_39_Template, 5, 3, "ng-template", null, 26, _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtemplateRefExtractor"])(41, SrvAuditoriaComponent_ng_template_41_Template, 5, 3, "ng-template", null, 27, _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtemplateRefExtractor"])(43, SrvAuditoriaComponent_ng_template_43_Template, 5, 3, "ng-template", null, 28, _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtemplateRefExtractor"])(45, SrvAuditoriaComponent_ng_template_45_Template, 5, 3, "ng-template", null, 29, _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtemplateRefExtractor"]);
      }
      if (rf & 2) {
        const _r0 = _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵreference"](23);
        _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"](10);
        _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵproperty"]("ngClass", _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵpipeBind1"](11, 11, ctx.srvContratadoService.isLoading$) ? "bx bx-sync bx-spin font-size-16 align-middle" : "bx bx-sync font-size-16 align-middle");
        _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"](3);
        _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵproperty"]("formGroup", ctx.filterForm);
        _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"](9);
        _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵproperty"]("activeId", ctx.tabActive);
        _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"](2);
        _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵproperty"]("ngIf", ctx.mostrarTab(ctx.tabs.ALTAS_TAB));
        _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵproperty"]("ngIf", ctx.mostrarTab(ctx.tabs.BAJAS_TAB));
        _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵproperty"]("ngIf", ctx.mostrarTab(ctx.tabs.NUEVOS_TAB));
        _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵproperty"]("ngIf", ctx.mostrarTab(ctx.tabs.VENCIDOS_TAB));
        _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵproperty"]("ngIf", ctx.mostrarTab(ctx.tabs.BONIF_NUEVAS_TAB));
        _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵproperty"]("ngIf", ctx.mostrarTab(ctx.tabs.BONIF_VENC_TAB));
        _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵproperty"]("ngIf", ctx.sinCambios());
        _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵproperty"]("ngbNavOutlet", _r0);
      }
    },
    dependencies: [primeng_api__WEBPACK_IMPORTED_MODULE_10__.PrimeTemplate, primeng_button__WEBPACK_IMPORTED_MODULE_11__.Button, _angular_common__WEBPACK_IMPORTED_MODULE_5__.NgClass, _angular_common__WEBPACK_IMPORTED_MODULE_5__.NgForOf, _angular_common__WEBPACK_IMPORTED_MODULE_5__.NgIf, _angular_common__WEBPACK_IMPORTED_MODULE_5__.NgTemplateOutlet, _angular_forms__WEBPACK_IMPORTED_MODULE_7__.DefaultValueAccessor, _angular_forms__WEBPACK_IMPORTED_MODULE_7__.NgControlStatus, _angular_forms__WEBPACK_IMPORTED_MODULE_7__.NgControlStatusGroup, _ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_9__.NgbNavContent, _ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_9__.NgbNav, _ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_9__.NgbNavItem, _ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_9__.NgbNavItemRole, _ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_9__.NgbNavLink, _ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_9__.NgbNavLinkBase, _ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_9__.NgbNavOutlet, _angular_forms__WEBPACK_IMPORTED_MODULE_7__.FormGroupDirective, _angular_forms__WEBPACK_IMPORTED_MODULE_7__.FormControlName, primeng_table__WEBPACK_IMPORTED_MODULE_12__.Table, primeng_table__WEBPACK_IMPORTED_MODULE_12__.RowToggler, _angular_common__WEBPACK_IMPORTED_MODULE_5__.AsyncPipe, _angular_common__WEBPACK_IMPORTED_MODULE_5__.DecimalPipe]
  });
}

/***/ }),

/***/ 55028:
/*!************************************************************************************************!*\
  !*** ./src/app/pages/servicios/srv-contratados/carga-masiva-srv/carga-masiva-srv.component.ts ***!
  \************************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   CargaMasivaSrvComponent: () => (/* binding */ CargaMasivaSrvComponent)
/* harmony export */ });
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! @angular/forms */ 56223);
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! rxjs */ 37398);
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! rxjs */ 99397);
/* harmony import */ var src_app_pages_dashboards_core_seleccionar_cliente_seleccionar_cliente_component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! src/app/pages/dashboards/core/seleccionar-cliente/seleccionar-cliente.component */ 45198);
/* harmony import */ var src_app_core_utils_constantes_constantes_servicios__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../core/utils/constantes/constantes-servicios */ 50864);
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash */ 6990);
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var src_app_core_utils_permisos_permisos_servicios__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! src/app/core/utils/permisos/permisos-servicios */ 52788);
/* harmony import */ var _movimientos_movimiento_edit_movimiento_edit_component__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../movimientos/movimiento-edit/movimiento-edit.component */ 64282);
/* harmony import */ var _movimientos_movimientos_component__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../movimientos/movimientos.component */ 50328);
/* harmony import */ var _edit_srv_bonificacion_edit_srv_bonificacion_component__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../edit-srv-bonificacion/edit-srv-bonificacion.component */ 41003);
/* harmony import */ var _edit_srv_contratado_edit_srv_contratado_component__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../edit-srv-contratado/edit-srv-contratado.component */ 63903);
/* harmony import */ var src_app_core_services_alertCustom_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! src/app/core/services/alertCustom.service */ 53206);
/* harmony import */ var src_app_core_utils_metodos_metodos__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! src/app/core/utils/metodos/metodos */ 38002);
/* harmony import */ var _edit_srv_seleccionado_edit_srv_seleccionado_component__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./edit-srv-seleccionado/edit-srv-seleccionado.component */ 16413);
/* harmony import */ var _envio_masivo_srv_envio_masivo_srv_component__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./envio-masivo-srv/envio-masivo-srv.component */ 20780);
/* harmony import */ var src_app_core_utils_validators_dateValidators__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! src/app/core/utils/validators/dateValidators */ 49545);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! @angular/core */ 65879);
/* harmony import */ var _ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! @ng-bootstrap/ng-bootstrap */ 85406);
/* harmony import */ var src_app_core_services_servicios_srvContratado_service__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! src/app/core/services/servicios/srvContratado.service */ 2158);
/* harmony import */ var _core_services_auth_service__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../../core/services/auth.service */ 90304);
/* harmony import */ var src_app_core_services_servicios_srvBonificacion_service__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! src/app/core/services/servicios/srvBonificacion.service */ 53225);
/* harmony import */ var src_app_core_services_core_articulo_service__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! src/app/core/services/core/articulo.service */ 44355);
/* harmony import */ var src_app_core_services_configGeneral_service__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! src/app/core/services/configGeneral.service */ 99757);
/* harmony import */ var primeng_api__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! primeng/api */ 85219);
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! @angular/common */ 96814);
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! @angular/router */ 75187);
/* harmony import */ var primeng_tooltip__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! primeng/tooltip */ 33259);
/* harmony import */ var _core_directives_campo_obligatorio_directive__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../../../core/directives/campo-obligatorio.directive */ 61528);
/* harmony import */ var src_app_core_directives_scrollTracker_directive__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! src/app/core/directives/scrollTracker.directive */ 51559);
/* harmony import */ var primeng_picklist__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! primeng/picklist */ 28052);
/* harmony import */ var ngx_ui_tour_ng_bootstrap__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ngx-ui-tour-ng-bootstrap */ 58469);
/* harmony import */ var _shared_ui_checkbox_checkbox_component__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../../../shared/ui/checkbox/checkbox.component */ 79468);
/* harmony import */ var _shared_ui_input_number_input_number_component__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../../../shared/ui/input-number/input-number.component */ 62271);
/* harmony import */ var _shared_ui_input_periodo_input_periodo_component__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../../../shared/ui/input-periodo/input-periodo.component */ 77947);





































function CargaMasivaSrvComponent_a_20_Template(rf, ctx) {
  if (rf & 1) {
    const _r18 = _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵgetCurrentView"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementStart"](0, "a", 62);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵlistener"]("click", function CargaMasivaSrvComponent_a_20_Template_a_click_0_listener() {
      _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵrestoreView"](_r18);
      const ctx_r17 = _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵnextContext"]();
      return _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵresetView"](ctx_r17.borrarCliente("cliente"));
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelement"](1, "i", 63);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]();
  }
}
function CargaMasivaSrvComponent_a_29_Template(rf, ctx) {
  if (rf & 1) {
    const _r20 = _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵgetCurrentView"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementStart"](0, "a", 62);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵlistener"]("click", function CargaMasivaSrvComponent_a_29_Template_a_click_0_listener() {
      _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵrestoreView"](_r20);
      const ctx_r19 = _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵnextContext"]();
      return _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵresetView"](ctx_r19.borrarCliente("clienteFact"));
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelement"](1, "i", 63);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]();
  }
}
function CargaMasivaSrvComponent_a_30_Template(rf, ctx) {
  if (rf & 1) {
    const _r22 = _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵgetCurrentView"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementStart"](0, "a", 17);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵlistener"]("click", function CargaMasivaSrvComponent_a_30_Template_a_click_0_listener() {
      _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵrestoreView"](_r22);
      const ctx_r21 = _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵnextContext"]();
      return _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵresetView"](ctx_r21.buscarCliente("clienteFact"));
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelement"](1, "i", 18);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]();
  }
}
function CargaMasivaSrvComponent_option_48_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementStart"](0, "option", 64);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtext"](1);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]();
  }
  if (rf & 2) {
    const fc_r23 = ctx.$implicit;
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵproperty"]("value", fc_r23.id);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtextInterpolate1"](" ", fc_r23.nombre, " ");
  }
}
function CargaMasivaSrvComponent_div_69_Template(rf, ctx) {
  if (rf & 1) {
    const _r25 = _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵgetCurrentView"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementStart"](0, "div", 37)(1, "app-checkbox", 65);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵlistener"]("emitAction", function CargaMasivaSrvComponent_div_69_Template_app_checkbox_emitAction_1_listener() {
      _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵrestoreView"](_r25);
      const ctx_r24 = _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵnextContext"]();
      return _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵresetView"](ctx_r24.setDebitoAuto());
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]()();
  }
  if (rf & 2) {
    const ctx_r4 = _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵnextContext"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵproperty"]("value", ctx_r4.getDebitoAuto())("disabled", ctx_r4.formGroup.controls.DebitoAutomatico.disabled && ctx_r4.getCliente("Cliente") == "");
  }
}
function CargaMasivaSrvComponent_a_83_Template(rf, ctx) {
  if (rf & 1) {
    const _r27 = _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵgetCurrentView"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementStart"](0, "a", 62);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵlistener"]("click", function CargaMasivaSrvComponent_a_83_Template_a_click_0_listener() {
      _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵrestoreView"](_r27);
      const ctx_r26 = _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵnextContext"]();
      return _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵresetView"](ctx_r26.borrarFiltroSrvClientes());
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelement"](1, "i", 63);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]();
  }
}
function CargaMasivaSrvComponent_a_84_Template(rf, ctx) {
  if (rf & 1) {
    const _r29 = _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵgetCurrentView"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementStart"](0, "a", 17);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵlistener"]("click", function CargaMasivaSrvComponent_a_84_Template_a_click_0_listener() {
      _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵrestoreView"](_r29);
      const ctx_r28 = _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵnextContext"]();
      return _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵresetView"](ctx_r28.filtrarSrvClientes());
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelement"](1, "i", 18);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]();
  }
}
function CargaMasivaSrvComponent_ng_container_85_ng_container_2_div_7_div_1_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementStart"](0, "div");
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelement"](1, "div", 93);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]();
  }
}
function CargaMasivaSrvComponent_ng_container_85_ng_container_2_div_7_div_2_Template(rf, ctx) {
  if (rf & 1) {
    const _r46 = _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵgetCurrentView"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementStart"](0, "div")(1, "a", 94);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵlistener"]("click", function CargaMasivaSrvComponent_ng_container_85_ng_container_2_div_7_div_2_Template_a_click_1_listener() {
      _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵrestoreView"](_r46);
      const dropButton_r41 = _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵnextContext"]().$implicit;
      const srv_r31 = _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵnextContext"]().$implicit;
      const ctx_r44 = _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵnextContext"](2);
      return _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵresetView"](ctx_r44.acciones({
        accion: dropButton_r41.Accion,
        registro: srv_r31
      }));
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtext"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]()();
  }
  if (rf & 2) {
    const dropButton_r41 = _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵnextContext"]().$implicit;
    const srv_r31 = _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵnextContext"]().$implicit;
    const ctx_r43 = _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵnextContext"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵproperty"]("ngClass", !dropButton_r41.disabled ? dropButton_r41.activate ? dropButton_r41.activate(ctx_r43.buscarValoresAcciones(srv_r31, dropButton_r41.fieldsActivate), dropButton_r41.Accion) : "dropdown-item" : "dropdown-item disabled");
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtextInterpolate1"](" ", dropButton_r41.Title, " ");
  }
}
function CargaMasivaSrvComponent_ng_container_85_ng_container_2_div_7_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementStart"](0, "div");
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtemplate"](1, CargaMasivaSrvComponent_ng_container_85_ng_container_2_div_7_div_1_Template, 2, 0, "div", 51)(2, CargaMasivaSrvComponent_ng_container_85_ng_container_2_div_7_div_2_Template, 3, 2, "div", 51);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]();
  }
  if (rf & 2) {
    const dropButton_r41 = ctx.$implicit;
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵproperty"]("ngIf", dropButton_r41.Type == "divider" && dropButton_r41.Show !== false);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵproperty"]("ngIf", !dropButton_r41.Type && dropButton_r41.Show !== false);
  }
}
function CargaMasivaSrvComponent_ng_container_85_ng_container_2_i_19_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelement"](0, "i", 95);
  }
  if (rf & 2) {
    const srv_r31 = _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵnextContext"]().$implicit;
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵproperty"]("pTooltip", srv_r31.Observacion);
  }
}
function CargaMasivaSrvComponent_ng_container_85_ng_container_2_i_20_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelement"](0, "i", 96);
  }
  if (rf & 2) {
    const srv_r31 = _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵnextContext"]().$implicit;
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵproperty"]("pTooltip", srv_r31.Subconcepto);
  }
}
function CargaMasivaSrvComponent_ng_container_85_ng_container_2_Conditional_21_i_0_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelement"](0, "i", 98);
  }
  if (rf & 2) {
    const srv_r31 = _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵnextContext"](2).$implicit;
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵproperty"]("pTooltip", srv_r31.Bonificacion.Valor + "%");
  }
}
function CargaMasivaSrvComponent_ng_container_85_ng_container_2_Conditional_21_i_1_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelement"](0, "i", 98);
  }
  if (rf & 2) {
    const srv_r31 = _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵnextContext"](2).$implicit;
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵproperty"]("pTooltip", "F.Lista de Precio: " + srv_r31.Bonificacion.Valor);
  }
}
function CargaMasivaSrvComponent_ng_container_85_ng_container_2_Conditional_21_i_2_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelement"](0, "i", 98);
  }
  if (rf & 2) {
    const srv_r31 = _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵnextContext"](2).$implicit;
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵproperty"]("pTooltip", "N\u00B0 de \u00CDtems Bonif. : " + srv_r31.Bonificacion.Valor);
  }
}
function CargaMasivaSrvComponent_ng_container_85_ng_container_2_Conditional_21_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtemplate"](0, CargaMasivaSrvComponent_ng_container_85_ng_container_2_Conditional_21_i_0_Template, 1, 1, "i", 97)(1, CargaMasivaSrvComponent_ng_container_85_ng_container_2_Conditional_21_i_1_Template, 1, 1, "i", 97)(2, CargaMasivaSrvComponent_ng_container_85_ng_container_2_Conditional_21_i_2_Template, 1, 1, "i", 97);
  }
  if (rf & 2) {
    const srv_r31 = _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵnextContext"]().$implicit;
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵproperty"]("ngIf", srv_r31.Bonificacion.TipoValor == "P");
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵproperty"]("ngIf", srv_r31.Bonificacion.TipoValor == "F");
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵproperty"]("ngIf", srv_r31.Bonificacion.TipoValor == "N");
  }
}
function CargaMasivaSrvComponent_ng_container_85_ng_container_2_Conditional_24_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtext"](0, " No facturado ");
  }
}
function CargaMasivaSrvComponent_ng_container_85_ng_container_2_Conditional_25_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtext"](0);
  }
  if (rf & 2) {
    const srv_r31 = _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵnextContext"]().$implicit;
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtextInterpolate2"](" ", srv_r31.UltimoPeriodoMes, "/", srv_r31.UltimoPeriodoAnio, " ");
  }
}
function CargaMasivaSrvComponent_ng_container_85_ng_container_2_Conditional_30_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtext"](0, " Sin Fecha Fin ");
  }
}
function CargaMasivaSrvComponent_ng_container_85_ng_container_2_Conditional_31_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtext"](0);
  }
  if (rf & 2) {
    const srv_r31 = _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵnextContext"]().$implicit;
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtextInterpolate1"](" ", srv_r31.FechaFin, " ");
  }
}
function CargaMasivaSrvComponent_ng_container_85_ng_container_2_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementContainerStart"](0);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementStart"](1, "div", 68)(2, "div", 69)(3, "div", 70)(4, "button", 71);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelement"](5, "i", 72);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementStart"](6, "div", 73);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtemplate"](7, CargaMasivaSrvComponent_ng_container_85_ng_container_2_div_7_Template, 3, 2, "div", 67);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]()();
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementStart"](8, "div")(9, "div", 74)(10, "div")(11, "b", 75);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtext"](12);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementStart"](13, "span", 76);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtext"](14);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]()();
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementStart"](15, "div", 77);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtext"](16);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementStart"](17, "span", 78);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtext"](18);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtemplate"](19, CargaMasivaSrvComponent_ng_container_85_ng_container_2_i_19_Template, 1, 1, "i", 79)(20, CargaMasivaSrvComponent_ng_container_85_ng_container_2_i_20_Template, 1, 1, "i", 80)(21, CargaMasivaSrvComponent_ng_container_85_ng_container_2_Conditional_21_Template, 3, 3);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementStart"](22, "div", 81);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelement"](23, "i", 82);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtemplate"](24, CargaMasivaSrvComponent_ng_container_85_ng_container_2_Conditional_24_Template, 1, 0)(25, CargaMasivaSrvComponent_ng_container_85_ng_container_2_Conditional_25_Template, 1, 2);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtext"](26, " - ");
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelement"](27, "i", 83);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtext"](28);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelement"](29, "i", 84);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtemplate"](30, CargaMasivaSrvComponent_ng_container_85_ng_container_2_Conditional_30_Template, 1, 0)(31, CargaMasivaSrvComponent_ng_container_85_ng_container_2_Conditional_31_Template, 1, 1);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementStart"](32, "div", 85)(33, "div", 86)(34, "p", 87);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtext"](35, "Fact. Activa");
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelement"](36, "input", 88);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementStart"](37, "div", 86)(38, "p", 87);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtext"](39, "Vigente");
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelement"](40, "input", 89);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementStart"](41, "div", 86)(42, "p", 87);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtext"](43, "Pausado");
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelement"](44, "input", 90);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementStart"](45, "div", 86)(46, "p", 87);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtext"](47, "M. Adelantado");
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelement"](48, "input", 91);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementStart"](49, "div", 86)(50, "p", 87);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtext"](51, "Deb. Auto.");
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelement"](52, "input", 92);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]()()()()()();
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementContainerEnd"]();
  }
  if (rf & 2) {
    const srv_r31 = ctx.$implicit;
    const ctx_r30 = _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵnextContext"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵadvance"](7);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵproperty"]("ngForOf", ctx_r30.actionSrvCliente);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵadvance"](5);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtextInterpolate2"]("(", srv_r31.Articulo.Codigo, ")", srv_r31.Articulo.Nombre, "");
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtextInterpolate"](srv_r31.CantidadFact);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtextInterpolate1"](" ", srv_r31.NroSrvContratado, " - ");
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵstyleMap"](ctx_r30.getFrecFact(srv_r31.FrecuenciaFact).Style);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵproperty"]("ngClass", ctx_r30.getFrecFact(srv_r31.FrecuenciaFact).Class);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtextInterpolate"](ctx_r30.getFrecFact(srv_r31.FrecuenciaFact).Nombre);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵproperty"]("ngIf", srv_r31.Observacion);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵproperty"]("ngIf", srv_r31.Subconcepto);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵconditional"](21, srv_r31.Bonificacion !== null ? 21 : -1);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵadvance"](3);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵconditional"](24, !srv_r31.UltimoPeriodoMes || !srv_r31.UltimoPeriodoAnio ? 24 : 25);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵadvance"](4);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtextInterpolate1"](" ", srv_r31.FechaAlta, " - ");
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵconditional"](30, !srv_r31.FechaFin ? 30 : 31);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵadvance"](6);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵproperty"]("ngModel", srv_r31.FacturacionActiva == "S");
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵadvance"](4);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵproperty"]("ngModel", srv_r31.Vigente == "S");
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵadvance"](4);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵproperty"]("ngModel", srv_r31.Pausado == "S");
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵadvance"](4);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵproperty"]("ngModel", srv_r31.MesAdelantado == "S");
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵadvance"](4);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵproperty"]("ngModel", srv_r31.DebitoAutomatico == "S");
  }
}
function CargaMasivaSrvComponent_ng_container_85_Template(rf, ctx) {
  if (rf & 1) {
    const _r62 = _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵgetCurrentView"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementContainerStart"](0);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementStart"](1, "div", 66);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵlistener"]("callAction", function CargaMasivaSrvComponent_ng_container_85_Template_div_callAction_1_listener() {
      _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵrestoreView"](_r62);
      const ctx_r61 = _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵnextContext"]();
      return _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵresetView"](ctx_r61.agregarServiciosCliente());
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtemplate"](2, CargaMasivaSrvComponent_ng_container_85_ng_container_2_Template, 53, 20, "ng-container", 67);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementContainerEnd"]();
  }
  if (rf & 2) {
    const ctx_r7 = _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵnextContext"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵproperty"]("ngForOf", ctx_r7.serviciosCliente);
  }
}
const _c0 = () => ({
  width: "100%",
  height: "444px",
  "align-content": "center",
  "border-radius": "10px"
});
function CargaMasivaSrvComponent_ng_container_86_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementContainerStart"](0);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementStart"](1, "div")(2, "p", 99);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtext"](3, " No hay servicios ");
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]()();
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementContainerEnd"]();
  }
  if (rf & 2) {
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵstyleMap"](_angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵpureFunction0"](2, _c0));
  }
}
function CargaMasivaSrvComponent_ng_container_87_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementContainerStart"](0);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementStart"](1, "div")(2, "p", 99);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtext"](3, " Seleccione un cliente ");
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]()();
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementContainerEnd"]();
  }
  if (rf & 2) {
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵstyleMap"](_angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵpureFunction0"](2, _c0));
  }
}
function CargaMasivaSrvComponent_ng_template_90_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementStart"](0, "div")(1, "b");
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtext"](2, "Servicios Seleccionados");
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]()();
  }
}
function CargaMasivaSrvComponent_ng_template_91_Conditional_0_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementStart"](0, "div", 101)(1, "div", 69)(2, "b", 75);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtext"](3);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelement"](4, "span", 76);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]()();
  }
  if (rf & 2) {
    const srv_r63 = _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵnextContext"]().$implicit;
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵadvance"](3);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtextInterpolate2"]("(", srv_r63.Codigo, ")", srv_r63.Nombre, "");
  }
}
function CargaMasivaSrvComponent_ng_template_91_Conditional_1_Conditional_13_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementStart"](0, "span", 111);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtext"](1, "Sin cliente a facturar ");
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelement"](2, "i", 112);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]();
  }
}
function CargaMasivaSrvComponent_ng_template_91_Conditional_1_Conditional_14_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtext"](0);
  }
  if (rf & 2) {
    const srv_r63 = _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵnextContext"](2).$implicit;
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtextInterpolate1"](" ", srv_r63.ClienteFact, " ");
  }
}
function CargaMasivaSrvComponent_ng_template_91_Conditional_1_i_18_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelement"](0, "i", 113);
  }
  if (rf & 2) {
    const srv_r63 = _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵnextContext"](2).$implicit;
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵproperty"]("pTooltip", srv_r63.Observacion);
  }
}
function CargaMasivaSrvComponent_ng_template_91_Conditional_1_i_19_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelement"](0, "i", 114);
  }
  if (rf & 2) {
    const srv_r63 = _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵnextContext"](2).$implicit;
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵproperty"]("pTooltip", srv_r63.Subconcepto);
  }
}
function CargaMasivaSrvComponent_ng_template_91_Conditional_1_Conditional_22_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtext"](0, " No facturado ");
  }
}
function CargaMasivaSrvComponent_ng_template_91_Conditional_1_Conditional_23_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementStart"](0, "span", 78);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtext"](1);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]();
  }
  if (rf & 2) {
    const srv_r63 = _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵnextContext"](2).$implicit;
    const ctx_r73 = _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵnextContext"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵproperty"]("ngClass", ctx_r73.controlUltPeriodo(srv_r63, "class"));
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtextInterpolate2"]("", srv_r63.UltimoPeriodoMes, "/", srv_r63.UltimoPeriodoAnio, "");
  }
}
function CargaMasivaSrvComponent_ng_template_91_Conditional_1_Conditional_26_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementStart"](0, "span", 111);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtext"](1, "Sin Fecha Alta");
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelement"](2, "i", 112);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]();
  }
}
function CargaMasivaSrvComponent_ng_template_91_Conditional_1_Conditional_27_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtext"](0);
  }
  if (rf & 2) {
    const srv_r63 = _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵnextContext"](2).$implicit;
    const ctx_r75 = _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵnextContext"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtextInterpolate1"](" ", ctx_r75.formatearFecha(srv_r63.FechaAlta), " ");
  }
}
function CargaMasivaSrvComponent_ng_template_91_Conditional_1_Conditional_30_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtext"](0, " Sin Fecha Fin ");
  }
}
function CargaMasivaSrvComponent_ng_template_91_Conditional_1_Conditional_31_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtext"](0);
  }
  if (rf & 2) {
    const srv_r63 = _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵnextContext"](2).$implicit;
    const ctx_r77 = _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵnextContext"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtextInterpolate1"](" ", ctx_r77.formatearFecha(srv_r63.FechaFin), " ");
  }
}
function CargaMasivaSrvComponent_ng_template_91_Conditional_1_Conditional_34_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtext"](0, " Sin Fecha de Inicio de Fact. ");
  }
}
function CargaMasivaSrvComponent_ng_template_91_Conditional_1_Conditional_35_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementStart"](0, "span", 78);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtext"](1);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]();
  }
  if (rf & 2) {
    const srv_r63 = _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵnextContext"](2).$implicit;
    const ctx_r79 = _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵnextContext"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵproperty"]("ngClass", ctx_r79.controlFechaInicioFact(srv_r63, "class"));
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtextInterpolate"](ctx_r79.formatearFecha(srv_r63.FechaInicioFact));
  }
}
function CargaMasivaSrvComponent_ng_template_91_Conditional_1_Template(rf, ctx) {
  if (rf & 1) {
    const _r89 = _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵgetCurrentView"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementStart"](0, "div", 68)(1, "div", 69)(2, "div", 102)(3, "button", 103);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵlistener"]("click", function CargaMasivaSrvComponent_ng_template_91_Conditional_1_Template_button_click_3_listener() {
      _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵrestoreView"](_r89);
      const ctx_r88 = _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵnextContext"]();
      const index_r64 = ctx_r88.index;
      const srv_r63 = ctx_r88.$implicit;
      const ctx_r87 = _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵnextContext"]();
      return _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵresetView"](ctx_r87.editarSrvSeleccionado(index_r64, srv_r63));
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelement"](4, "i", 104);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]()();
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementStart"](5, "div", 74)(6, "div")(7, "b", 75);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtext"](8);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementStart"](9, "span", 105);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtext"](10);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]()();
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementStart"](11, "div")(12, "i", 106);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtemplate"](13, CargaMasivaSrvComponent_ng_template_91_Conditional_1_Conditional_13_Template, 3, 0, "span", 107)(14, CargaMasivaSrvComponent_ng_template_91_Conditional_1_Conditional_14_Template, 1, 1);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]()();
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementStart"](15, "div", 77)(16, "span", 78);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtext"](17);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtemplate"](18, CargaMasivaSrvComponent_ng_template_91_Conditional_1_i_18_Template, 1, 1, "i", 108)(19, CargaMasivaSrvComponent_ng_template_91_Conditional_1_i_19_Template, 1, 1, "i", 109);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementStart"](20, "div", 81);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelement"](21, "i", 110);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtemplate"](22, CargaMasivaSrvComponent_ng_template_91_Conditional_1_Conditional_22_Template, 1, 0)(23, CargaMasivaSrvComponent_ng_template_91_Conditional_1_Conditional_23_Template, 2, 3);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtext"](24, " - ");
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelement"](25, "i", 83);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtemplate"](26, CargaMasivaSrvComponent_ng_template_91_Conditional_1_Conditional_26_Template, 3, 0, "span", 107)(27, CargaMasivaSrvComponent_ng_template_91_Conditional_1_Conditional_27_Template, 1, 1);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtext"](28, " - ");
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelement"](29, "i", 84);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtemplate"](30, CargaMasivaSrvComponent_ng_template_91_Conditional_1_Conditional_30_Template, 1, 0)(31, CargaMasivaSrvComponent_ng_template_91_Conditional_1_Conditional_31_Template, 1, 1);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtext"](32, " - ");
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelement"](33, "i", 110);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtemplate"](34, CargaMasivaSrvComponent_ng_template_91_Conditional_1_Conditional_34_Template, 1, 0)(35, CargaMasivaSrvComponent_ng_template_91_Conditional_1_Conditional_35_Template, 2, 2);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementStart"](36, "div", 85)(37, "div", 86)(38, "p", 87);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtext"](39, "Fact. Activa");
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelement"](40, "input", 88);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementStart"](41, "div", 86)(42, "p", 87);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtext"](43, "Vigente");
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelement"](44, "input", 89);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementStart"](45, "div", 86)(46, "p", 87);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtext"](47, "Pausado");
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelement"](48, "input", 90);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementStart"](49, "div", 86)(50, "p", 87);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtext"](51, "M. Adelantado");
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelement"](52, "input", 91);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementStart"](53, "div", 86)(54, "p", 87);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtext"](55, "Deb. Auto.");
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelement"](56, "input", 92);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]()()()()();
  }
  if (rf & 2) {
    const srv_r63 = _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵnextContext"]().$implicit;
    const ctx_r66 = _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵnextContext"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵadvance"](8);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtextInterpolate"](srv_r63.Articulo);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵproperty"]("pTooltip", ctx_r66.controlMovimientos(srv_r63, "message"))("ngClass", ctx_r66.controlMovimientos(srv_r63, "class"));
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtextInterpolate1"](" ", srv_r63.Cantidad, " ");
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵadvance"](3);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵconditional"](13, srv_r63.IdClienteFact < 0 ? 13 : 14);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵadvance"](3);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵstyleMap"](ctx_r66.getFrecFact(srv_r63.FrecuenciaFact).Style);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵproperty"]("ngClass", ctx_r66.getFrecFact(srv_r63.FrecuenciaFact).Class);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtextInterpolate"](ctx_r66.getFrecFact(srv_r63.FrecuenciaFact).Nombre);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵproperty"]("ngIf", srv_r63.Observacion);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵproperty"]("ngIf", srv_r63.Subconcepto);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵproperty"]("ngClass", ctx_r66.controlUltPeriodo(srv_r63, "class") + " mdi mdi-calendar-blank")("pTooltip", ctx_r66.controlUltPeriodo(srv_r63, "message"));
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵconditional"](22, !srv_r63.UltimoPeriodoMes || !srv_r63.UltimoPeriodoAnio ? 22 : 23);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵadvance"](4);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵconditional"](26, !srv_r63.FechaAlta ? 26 : 27);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵadvance"](4);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵconditional"](30, !srv_r63.FechaFin ? 30 : 31);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵadvance"](3);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵproperty"]("ngClass", ctx_r66.controlFechaInicioFact(srv_r63, "class") + " mdi mdi-calendar-blank")("pTooltip", ctx_r66.controlFechaInicioFact(srv_r63, "message"));
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵconditional"](34, !srv_r63.FechaInicioFact ? 34 : 35);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵadvance"](6);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵproperty"]("ngModel", srv_r63.FacturacionActiva == "S");
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵadvance"](4);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵproperty"]("ngModel", srv_r63.Vigente == "S");
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵadvance"](4);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵproperty"]("ngModel", srv_r63.Pausado == "S");
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵadvance"](4);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵproperty"]("ngModel", srv_r63.MesAdelantado == "S");
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵadvance"](4);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵproperty"]("ngModel", srv_r63.DebitoAutomatico == "S");
  }
}
function CargaMasivaSrvComponent_ng_template_91_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtemplate"](0, CargaMasivaSrvComponent_ng_template_91_Conditional_0_Template, 5, 2, "div", 100)(1, CargaMasivaSrvComponent_ng_template_91_Conditional_1_Template, 57, 24);
  }
  if (rf & 2) {
    const srv_r63 = ctx.$implicit;
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵconditional"](0, srv_r63.Type == "source" ? 0 : 1);
  }
}
function CargaMasivaSrvComponent_ng_template_92_a_4_Template(rf, ctx) {
  if (rf & 1) {
    const _r95 = _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵgetCurrentView"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementStart"](0, "a", 62);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵlistener"]("click", function CargaMasivaSrvComponent_ng_template_92_a_4_Template_a_click_0_listener() {
      _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵrestoreView"](_r95);
      const ctx_r94 = _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵnextContext"](2);
      ctx_r94.filtersForm.controls.NomSrvDisp.reset();
      return _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵresetView"](ctx_r94.cargarServiciosDisponibles());
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelement"](1, "i", 63);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]();
  }
}
function CargaMasivaSrvComponent_ng_template_92_a_5_Template(rf, ctx) {
  if (rf & 1) {
    const _r97 = _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵgetCurrentView"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementStart"](0, "a", 17);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵlistener"]("click", function CargaMasivaSrvComponent_ng_template_92_a_5_Template_a_click_0_listener() {
      _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵrestoreView"](_r97);
      const ctx_r96 = _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵnextContext"](2);
      return _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵresetView"](ctx_r96.cargarServiciosDisponibles());
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelement"](1, "i", 18);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]();
  }
}
function CargaMasivaSrvComponent_ng_template_92_Template(rf, ctx) {
  if (rf & 1) {
    const _r99 = _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵgetCurrentView"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementStart"](0, "div", 115)(1, "form", 48)(2, "div", 14)(3, "input", 116);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵlistener"]("keyup.enter", function CargaMasivaSrvComponent_ng_template_92_Template_input_keyup_enter_3_listener() {
      _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵrestoreView"](_r99);
      const ctx_r98 = _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵnextContext"]();
      return _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵresetView"](ctx_r98.cargarServiciosDisponibles());
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtemplate"](4, CargaMasivaSrvComponent_ng_template_92_a_4_Template, 2, 0, "a", 16)(5, CargaMasivaSrvComponent_ng_template_92_a_5_Template, 2, 0, "a", 22);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]()()();
  }
  if (rf & 2) {
    const ctx_r12 = _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵnextContext"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵproperty"]("formGroup", ctx_r12.filtersForm);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵadvance"](3);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵproperty"]("ngIf", ctx_r12.filtersForm.controls.NomSrvDisp.value != "" && ctx_r12.filtersForm.controls.NomSrvDisp.value != undefined);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵproperty"]("ngIf", !ctx_r12.filtersForm.controls.NomSrvDisp.disabled);
  }
}
function CargaMasivaSrvComponent_ng_template_93_a_3_Template(rf, ctx) {
  if (rf & 1) {
    const _r104 = _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵgetCurrentView"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementStart"](0, "a", 62);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵlistener"]("click", function CargaMasivaSrvComponent_ng_template_93_a_3_Template_a_click_0_listener() {
      _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵrestoreView"](_r104);
      const options_r100 = _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵnextContext"]().options;
      const ctx_r102 = _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵnextContext"]();
      options_r100.reset();
      return _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵresetView"](ctx_r102.targetFilterValue = "");
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelement"](1, "i", 63);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]();
  }
}
function CargaMasivaSrvComponent_ng_template_93_Template(rf, ctx) {
  if (rf & 1) {
    const _r106 = _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵgetCurrentView"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementStart"](0, "div", 115)(1, "div", 14)(2, "input", 117);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵlistener"]("ngModelChange", function CargaMasivaSrvComponent_ng_template_93_Template_input_ngModelChange_2_listener($event) {
      _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵrestoreView"](_r106);
      const ctx_r105 = _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵnextContext"]();
      return _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵresetView"](ctx_r105.targetFilterValue = $event);
    })("keyup.enter", function CargaMasivaSrvComponent_ng_template_93_Template_input_keyup_enter_2_listener($event) {
      const restoredCtx = _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵrestoreView"](_r106);
      const options_r100 = restoredCtx.options;
      return _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵresetView"](options_r100.filter($event.target.value));
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtemplate"](3, CargaMasivaSrvComponent_ng_template_93_a_3_Template, 2, 0, "a", 16);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementStart"](4, "a", 17);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵlistener"]("click", function CargaMasivaSrvComponent_ng_template_93_Template_a_click_4_listener($event) {
      const restoredCtx = _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵrestoreView"](_r106);
      const options_r100 = restoredCtx.options;
      return _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵresetView"](options_r100.filter($event.target.value));
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelement"](5, "i", 18);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]()()();
  }
  if (rf & 2) {
    const ctx_r13 = _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵnextContext"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵproperty"]("ngModel", ctx_r13.targetFilterValue);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵproperty"]("ngIf", ctx_r13.targetFilterValue != undefined && ctx_r13.targetFilterValue != "");
  }
}
function CargaMasivaSrvComponent_ng_template_94_Conditional_1_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementStart"](0, "div", 28);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtext"](1, "Seleccione un cliente");
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]();
  }
}
function CargaMasivaSrvComponent_ng_template_94_Conditional_2_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementStart"](0, "div", 28);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtext"](1, "No hay servicios disponibles");
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]();
  }
}
function CargaMasivaSrvComponent_ng_template_94_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementStart"](0, "div", 118);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtemplate"](1, CargaMasivaSrvComponent_ng_template_94_Conditional_1_Template, 2, 0, "div", 119)(2, CargaMasivaSrvComponent_ng_template_94_Conditional_2_Template, 2, 0);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]();
  }
  if (rf & 2) {
    const ctx_r14 = _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵnextContext"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵconditional"](1, ctx_r14.getCliente("Cliente") == "" ? 1 : 2);
  }
}
function CargaMasivaSrvComponent_ng_template_95_Conditional_1_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementStart"](0, "div", 121);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtext"](1, " No hay servicios seleccionados, seleccione un cliente ");
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]();
  }
}
function CargaMasivaSrvComponent_ng_template_95_Conditional_2_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementStart"](0, "div", 28);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtext"](1, "No hay servicios seleccionados");
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]();
  }
}
function CargaMasivaSrvComponent_ng_template_95_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementStart"](0, "div", 118);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtemplate"](1, CargaMasivaSrvComponent_ng_template_95_Conditional_1_Template, 2, 0, "div", 120)(2, CargaMasivaSrvComponent_ng_template_95_Conditional_2_Template, 2, 0);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]();
  }
  if (rf & 2) {
    const ctx_r15 = _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵnextContext"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵconditional"](1, ctx_r15.getCliente("Cliente") == "" ? 1 : 2);
  }
}
function CargaMasivaSrvComponent_div_97_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementStart"](0, "div", 122)(1, "div", 123)(2, "p", 124);
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtext"](3, " La configuracion de los servicios seleccionados es incorrecta ");
    _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]()()();
  }
}
const _c1 = () => ({
  height: "444px",
  width: "100%",
  padding: "0 12px 0 12px"
});
class CargaMasivaSrvComponent {
  constructor(fb, modalService, srvContratados, authService, alert, srvBonificacionService, articuloService, configGral) {
    this.fb = fb;
    this.modalService = modalService;
    this.srvContratados = srvContratados;
    this.authService = authService;
    this.alert = alert;
    this.srvBonificacionService = srvBonificacionService;
    this.articuloService = articuloService;
    this.configGral = configGral;
    this.serviciosCliente = [];
    this.serviciosDisp = [];
    this.serviciosDispAux = [];
    this.serviciosEnvio = [];
    this.invalidServiciosEnvio = true;
    this.pageSrvCliente = 1;
    this.cantSearhcSrvCliente = 10;
    this.totalSrvCliente = 0;
    this.pageSrvDisp = 1;
    this.cantSearhSrvDisp = 10;
    this.totalSrvDisp = 0;
    /**
     * SP SINWEB-349 formulario para carga por defecto de servicios
     */
    this.formGroup = this.fb.group({
      Cliente: [{
        value: '',
        disabled: false
      }, _angular_forms__WEBPACK_IMPORTED_MODULE_24__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_24__.Validators.required])],
      IdCliente: [{
        value: -1,
        disabled: false
      }, _angular_forms__WEBPACK_IMPORTED_MODULE_24__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_24__.Validators.required, _angular_forms__WEBPACK_IMPORTED_MODULE_24__.Validators.min(0)])],
      ClienteFact: [{
        value: '',
        disabled: true
      }, _angular_forms__WEBPACK_IMPORTED_MODULE_24__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_24__.Validators.required])],
      IdClienteFact: [{
        value: -1,
        disabled: true
      }, _angular_forms__WEBPACK_IMPORTED_MODULE_24__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_24__.Validators.required, _angular_forms__WEBPACK_IMPORTED_MODULE_24__.Validators.min(0)])],
      FrecuenciaFact: [{
        value: 'M',
        disabled: true
      }, _angular_forms__WEBPACK_IMPORTED_MODULE_24__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_24__.Validators.required])],
      Vigente: [{
        value: true,
        disabled: true
      }, _angular_forms__WEBPACK_IMPORTED_MODULE_24__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_24__.Validators.required])],
      Observacion: [{
        value: '',
        disabled: true
      }, _angular_forms__WEBPACK_IMPORTED_MODULE_24__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_24__.Validators.maxLength(200)])],
      MesAdelantado: [{
        value: false,
        disabled: true
      }, _angular_forms__WEBPACK_IMPORTED_MODULE_24__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_24__.Validators.required])],
      DebitoAutomatico: [{
        value: false,
        disabled: true
      }, _angular_forms__WEBPACK_IMPORTED_MODULE_24__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_24__.Validators.required])],
      Pausado: [{
        value: false,
        disabled: true
      }, _angular_forms__WEBPACK_IMPORTED_MODULE_24__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_24__.Validators.required])],
      Subconcepto: [{
        value: '',
        disabled: true
      }, _angular_forms__WEBPACK_IMPORTED_MODULE_24__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_24__.Validators.maxLength(100)])],
      FechaAlta: [{
        value: (0,src_app_core_utils_metodos_metodos__WEBPACK_IMPORTED_MODULE_9__.fechaActual)(),
        disabled: true
      }, _angular_forms__WEBPACK_IMPORTED_MODULE_24__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_24__.Validators.required])],
      FechaFin: [{
        value: '',
        disabled: true
      }],
      //SP SINWEB-599 nuevas validaciones
      UltPeriodoFact: [{
        value: '',
        disabled: true
      }, _angular_forms__WEBPACK_IMPORTED_MODULE_24__.Validators.compose([(0,src_app_core_utils_validators_dateValidators__WEBPACK_IMPORTED_MODULE_12__.periodoIncompleto)(), (0,src_app_core_utils_validators_dateValidators__WEBPACK_IMPORTED_MODULE_12__.fechaPosteriorValidator)('FechaAlta', 'mes')])],
      FactActiva: [{
        value: 'S',
        disabled: true
      }, _angular_forms__WEBPACK_IMPORTED_MODULE_24__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_24__.Validators.required])],
      Cantidad: [{
        value: 1,
        disabled: true
      }, _angular_forms__WEBPACK_IMPORTED_MODULE_24__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_24__.Validators.required, _angular_forms__WEBPACK_IMPORTED_MODULE_24__.Validators.min(1)])],
      //SP SINWEB-471 nuevo campo para fecha de inicio de facturacion del movimiento que se creara con la cantidad cargada
      FechaInicioFact: [{
        value: '',
        disabled: true
      }, _angular_forms__WEBPACK_IMPORTED_MODULE_24__.Validators.compose([(0,src_app_core_utils_validators_dateValidators__WEBPACK_IMPORTED_MODULE_12__.fechaPosteriorValidator)('FechaAlta')])]
    });
    this.filtersForm = this.fb.group({
      NomSrvCliente: [{
        value: '',
        disabled: true
      }],
      NomSrvDisp: [{
        value: '',
        disabled: true
      }]
    });
    this._unsubscribe = [];
    this.frecFactOptions = src_app_core_utils_constantes_constantes_servicios__WEBPACK_IMPORTED_MODULE_1__.frecFactSrvContratado;
    this.actionSrvCliente = src_app_core_utils_constantes_constantes_servicios__WEBPACK_IMPORTED_MODULE_1__.actionSrvContratado;
    this.permisoInsSrv = false;
    this.permisoModSrv = false;
    this.permisoBajaSrv = false;
    this.permisosSRV = {
      PermisoInsSrv: false,
      PermisoModSrv: false,
      PermisoBajaSrv: false,
      linea1: false,
      PermisoInsBoni: true,
      PermisoModBoni: true,
      PermisoElimBobi: true,
      linea2: true,
      PermisoInsSrvMov: true
    };
  }
  ngOnDestroy() {
    this._unsubscribe.forEach(sb => sb.unsubscribe());
  }
  ngOnInit() {
    //Called after the constructor, initializing input properties, and the first call to ngOnChanges.
    //Add 'implements OnInit' to the class.
    this.cargarPermisos();
    this.controlForm();
  }
  controlForm() {
    this._unsubscribe.push(this.formGroup.controls.IdCliente.valueChanges.subscribe(idCliente => {
      if (idCliente != -1) {
        this.formGroup.enable({
          emitEvent: false
        });
        this.filtersForm.enable({
          emitEvent: false
        });
        this.pageSrvCliente = 1;
        this.cargarServiciosCliente();
        this.cargarServiciosDisponibles();
      } else {
        this.formGroup.disable({
          emitEvent: false
        });
        this.formGroup.controls.IdCliente.enable({
          emitEvent: false
        });
        this.formGroup.controls.Cliente.enable({
          emitEvent: false
        });
        this.filtersForm.controls.NomSrvCliente.reset({
          value: '',
          disabled: true
        }, {
          emitEvent: false
        });
        this.filtersForm.controls.NomSrvDisp.reset({
          value: '',
          disabled: true
        }, {
          emitEvent: false
        });
        this.serviciosCliente = [];
        this.serviciosDisp = [];
      }
    }));
  }
  agregarServiciosCliente() {
    if (this.serviciosCliente.length < this.totalSrvCliente) {
      ++this.pageSrvCliente;
      this.cargarServiciosCliente('add');
    }
  }
  filtrarSrvClientes() {
    this.pageSrvCliente = 1;
    this.cargarServiciosCliente();
  }
  borrarFiltroSrvClientes() {
    this.filtersForm.controls.NomSrvCliente.reset('');
    this.filtrarSrvClientes();
  }
  cargarServiciosCliente(type) {
    let params = {
      PageNumber: this.pageSrvCliente,
      PageSize: this.cantSearhcSrvCliente,
      IdsCliente: this.formGroup.controls.IdCliente.value,
      Orden: 7,
      SentidoOrden: 'Asc'
    };
    if (this.filtersForm.controls.NomSrvCliente.value != '' && this.filtersForm.controls.NomSrvCliente.value != undefined) {
      params['NombreArticulo'] = this.filtersForm.controls.NomSrvCliente.value;
    }
    const sb = this.srvContratados.fetch(params).subscribe(resp => {
      if (resp != undefined) {
        this.serviciosCliente = type == 'add' ? lodash__WEBPACK_IMPORTED_MODULE_2__.concat(this.serviciosCliente, resp.Data) : resp.Data;
        this.totalSrvCliente = resp.TotalRecords;
      }
    });
    sb.unsubscribe;
  }
  cargarServiciosDisponibles(type) {
    let params = {
      //SP SINWEB-522 correccion , no deberia venir paginado
      PageNumber: -1,
      //PageSize:this.cantSearhSrvDisp,
      IdsFliasArticulos: [this.configGral._config.FamiliaArtSrv],
      Orden: 3,
      OrdenAscDesc: 'Asc'
    };
    if (this.filtersForm.controls.NomSrvDisp.value != '' && this.filtersForm.controls.NomSrvDisp.value != undefined) {
      params['Nombre'] = this.filtersForm.controls.NomSrvDisp.value;
    }
    const sb = this.articuloService.fetch(params).pipe((0,rxjs__WEBPACK_IMPORTED_MODULE_25__.map)(res => {
      return {
        TotalRecords: res.TotalRecords,
        Data: res.Data.map(art => {
          return {
            ...art,
            Type: 'source'
          };
        })
      };
    })).subscribe(resp => {
      if (resp != undefined) {
        this.serviciosDisp = type == 'add' ? lodash__WEBPACK_IMPORTED_MODULE_2__.concat(this.serviciosDisp, resp.Data) : resp.Data;
        this.serviciosDispAux = JSON.parse(JSON.stringify(this.serviciosDisp));
        this.totalSrvDisp = resp.TotalRecords;
      }
    });
    sb.unsubscribe;
  }
  buscarCliente(tipo) {
    const modalRef = this.modalService.open(src_app_pages_dashboards_core_seleccionar_cliente_seleccionar_cliente_component__WEBPACK_IMPORTED_MODULE_0__.SeleccionarClienteComponent, {
      size: 'xl',
      backdropClass: 'back-z-index',
      windowClass: 'modal-z-index',
      backdrop: 'static',
      keyboard: false,
      scrollable: true
    });
    modalRef.result.then(resolve => {
      if (resolve !== undefined) {
        if (tipo === 'clienteFact') {
          this.formGroup.controls.IdClienteFact.setValue(resolve.IdCliente);
          this.formGroup.controls.ClienteFact.setValue(resolve.Cliente);
        } else {
          this.serviciosEnvio = [];
          this.formGroup.controls.IdCliente.setValue(resolve.IdCliente);
          this.formGroup.controls.Cliente.setValue(resolve.Cliente);
          this.formGroup.controls.IdClienteFact.setValue(resolve.IdCliente);
          this.formGroup.controls.ClienteFact.setValue(resolve.Cliente);
        }
      }
    });
  }
  confirmarCambioCliente() {
    if (this.serviciosEnvio.length > 0) {
      this.alert.showReturnAlert('¿Desea cambiar el cliente?', 'Si selecciona un nuevo cliente, se perderán todos los servicios seleccionados. ¿Desea continuar?', 'warning', 'Aceptar', 'Cancelar', true, 'success').then(result => {
        if (result.value) {
          this.buscarCliente('cliente');
        }
      });
    } else {
      this.buscarCliente('cliente');
    }
  }
  /**
   * Método get para obtener campo de cliente o clienteFact
   * @returns {any} Artículo
   */
  getCliente(tipo) {
    if (tipo === 'clienteFact') {
      return this.formGroup.get('ClienteFact').value;
    } else {
      return this.formGroup.get('Cliente').value;
    }
  }
  /**
   * Método para limpiar filtro
   */
  borrarCliente(tipo) {
    if (tipo === 'clienteFact') {
      this.formGroup.get('ClienteFact').reset('');
      this.formGroup.get('IdClienteFact').reset(-1);
    } else {
      if (this.serviciosEnvio.length > 0) {
        this.alert.showReturnAlert('¿Desea borrar el cliente?', 'Si borra el cliente, se perderán todos los servicios seleccionados. ¿Desea continuar?', 'warning', 'Aceptar', 'Cancelar', true).then(result => {
          if (result.value) {
            this.serviciosEnvio = [];
            this.formGroup.get('Cliente').reset('');
            this.formGroup.get('IdCliente').reset(-1), this.formGroup.get('ClienteFact').reset('');
            this.formGroup.get('IdClienteFact').reset(-1);
          }
        });
      } else {
        this.formGroup.get('Cliente').reset('');
        this.formGroup.get('IdCliente').reset(-1), this.formGroup.get('ClienteFact').reset('');
        this.formGroup.get('IdClienteFact').reset(-1);
      }
    }
  }
  setCantidad($event) {
    this.formGroup.controls.Cantidad.setValue($event);
  }
  getVigente() {
    return this.formGroup.controls.Vigente.value;
  }
  setVigente() {
    this.formGroup.controls.Vigente.setValue(!this.getVigente());
  }
  getPausado() {
    return this.formGroup.controls.Pausado.value;
  }
  setPausado() {
    this.formGroup.controls.Pausado.setValue(!this.getPausado());
  }
  getDebitoAuto() {
    return this.formGroup.controls.DebitoAutomatico.value;
  }
  setDebitoAuto() {
    this.formGroup.controls.DebitoAutomatico.setValue(!this.getDebitoAuto());
  }
  getMesAdelantado() {
    return this.formGroup.controls.MesAdelantado.value;
  }
  setMesAdelantado() {
    this.formGroup.controls.MesAdelantado.setValue(!this.getMesAdelantado());
  }
  getFactActiva() {
    return this.formGroup.controls.FactActiva.value;
  }
  setFactActiva() {
    this.formGroup.controls.FactActiva.setValue(!this.getFactActiva());
  }
  buscarValoresAcciones(datos, valores) {
    let resultado = [];
    valores.forEach(valor => resultado.push(lodash__WEBPACK_IMPORTED_MODULE_2__.get(datos, valor, '')));
    return resultado;
  }
  emitirAccion(accion, dato) {
    console.log(accion, dato);
  }
  cargarPermisos() {
    this.permisosSRV.PermisoInsSrv = this.authService.hasPermiso(src_app_core_utils_permisos_permisos_servicios__WEBPACK_IMPORTED_MODULE_3__.PERMISO_INS_SRV_CONTRATADOS);
    this.permisosSRV.PermisoModSrv = this.authService.hasPermiso(src_app_core_utils_permisos_permisos_servicios__WEBPACK_IMPORTED_MODULE_3__.PERMISO_MODIF_SRV_CONTRATADOS);
    this.permisosSRV.PermisoBajaSrv = this.authService.hasPermiso(src_app_core_utils_permisos_permisos_servicios__WEBPACK_IMPORTED_MODULE_3__.PERMISO_BAJA_SRV_CONTRATADOS);
    this.permisosSRV.PermisoInsSrvMov = this.authService.hasPermiso(src_app_core_utils_permisos_permisos_servicios__WEBPACK_IMPORTED_MODULE_3__.PERMISO_INS_MOV);
    /**
     * SP SINWEB-320 nuevo permiso para admin de movimientos
     */
    this.permisosSRV.PermisoAdmSrvMov = this.authService.hasPermiso(src_app_core_utils_permisos_permisos_servicios__WEBPACK_IMPORTED_MODULE_3__.PERMISO_LIS_MOVIMIENTOS);
    this.permisosSRV.PermisoInsBonif = this.authService.hasPermiso(src_app_core_utils_permisos_permisos_servicios__WEBPACK_IMPORTED_MODULE_3__.PERMISO_INS_BONIF_SRV_CONTRATADO);
    this.permisosSRV.PermisoModBonif = this.authService.hasPermiso(src_app_core_utils_permisos_permisos_servicios__WEBPACK_IMPORTED_MODULE_3__.PERMISO_MODIF_BONIF_SRV_CONTRATADO);
    this.permisosSRV.PermisoElimBonif = this.authService.hasPermiso(src_app_core_utils_permisos_permisos_servicios__WEBPACK_IMPORTED_MODULE_3__.PERMISO_ELIM_BONIF_SRV_CONTRATADO);
    this.permisosSRV.Linea1 = (this.permisosSRV.PermisoModSrv || this.permisosSRV.PermisoBajaSrv) && (this.permisosSRV.PermisoInsBonif || this.permisosSRV.PermisoModBonif || this.permisosSRV.PermisoElimBonif);
    this.permisosSRV.Linea2 = (this.permisosSRV.PermisoInsBonif || this.permisosSRV.PermisoModBonif || this.permisosSRV.PermisoElimBonif) && (this.permisosSRV.PermisoAdmSrvMov || this.permisosSRV.PermivoInsSrvMov);
    this.actionSrvCliente[1]['Show'] = this.permisosSRV.PermisoModSrv;
    this.actionSrvCliente[2]['Show'] = this.permisosSRV.PermisoBajaSrv;
    this.actionSrvCliente[3]['Show'] = this.permisosSRV.PermisoInsSrv;
    this.actionSrvCliente[4]['Show'] = this.permisosSRV.Linea1;
    this.actionSrvCliente[5]['Show'] = this.permisosSRV.PermisoInsBonif;
    this.actionSrvCliente[6]['Show'] = this.permisosSRV.PermisoModBonif;
    this.actionSrvCliente[7]['Show'] = this.permisosSRV.PermisoElimBonif;
    this.actionSrvCliente[8]['Show'] = this.permisosSRV.Linea2;
    /**
     * SP SINWEB-320 nuevo permiso para admin de movimientos
     */
    this.actionSrvCliente[9]['Show'] = this.permisosSRV.PermisoAdmSrvMov;
    this.actionSrvCliente[10]['Show'] = this.permisosSRV.PermisoInsSrvMov;
  }
  duplicar(servicio) {
    this.editar(servicio, 'duplicar');
  }
  /**
   *
   * @param servicio
   * @param esEditar
   */
  editar(servicio, tipo) {
    const modalRef = this.modalService.open(_edit_srv_contratado_edit_srv_contratado_component__WEBPACK_IMPORTED_MODULE_7__.EditSrvContratadoComponent, {
      size: 'xl',
      backdrop: 'static',
      keyboard: false,
      scrollable: true
    });
    if (servicio) {
      modalRef.componentInstance.servicio = {
        Id: servicio.Id,
        IdCliente: servicio.Cliente.Id,
        ClienteCodigo: servicio.Cliente.Codigo,
        Cliente: servicio.Cliente.Nombre,
        IdArticulo: servicio.Articulo.Id,
        Articulo: servicio.Articulo.Nombre,
        ArticuloCodigo: servicio.Articulo.Codigo,
        IdClienteFact: servicio.ClienteFact.Id,
        ClienteFactCodigo: servicio.ClienteFact.Codigo,
        ClienteFact: servicio.ClienteFact.Nombre,
        FrecuenciaFact: servicio.FrecuenciaFact,
        Vigente: servicio.Vigente,
        Observacion: servicio.Observacion,
        MesAdelantado: servicio.MesAdelantado,
        DebitoAutomatico: servicio.DebitoAutomatico,
        Pausado: servicio.Pausado,
        Subconcepto: servicio.Subconcepto,
        FechaAlta: servicio.FechaAlta,
        FechaFin: servicio.FechaFin,
        UltimoPeriodoMes: servicio.UltimoPeriodoMes,
        UltimoPeriodoAnio: servicio.UltimoPeriodoAnio,
        FacturacionActiva: servicio.FacturacionActiva,
        FueFacturado: servicio.FueFacturado,
        OrdenFact: servicio.OrdenFact
      };
    }
    if (tipo == 'visualizacion') {
      modalRef.componentInstance.esVisualizar = true;
    }
    /**
     * SP SINWEB-320 nueva condicion para la accion duplicar
     */
    if (tipo == 'duplicar') {
      modalRef.componentInstance.esDuplicar = true;
    }
    modalRef.result.then(() => {
      this.pageSrvCliente = 1;
      this.cargarServiciosCliente();
      if (tipo == 'edicion') {
        this.alert.showBasicAlert(src_app_core_utils_constantes_constantes_servicios__WEBPACK_IMPORTED_MODULE_1__.MSJ_EXITO_EDICION, '', 'success');
      }
      /**
       * SP SINWEB-320 nueva condicion para la accion duplicar
       */
      if (tipo == 'insercion' || tipo == 'duplicar') {
        this.alert.showBasicAlert(src_app_core_utils_constantes_constantes_servicios__WEBPACK_IMPORTED_MODULE_1__.MSJ_EXITO_INSERCION, '', 'success');
      }
    }, () => {});
  }
  /**
   * Método que abre el modal para dar de baja un servicio
   * @param {number} idServicio
   * @param {string} articulo
   */
  baja(servicio) {
    this.alert.showReturnAlert('Baja de servicio.', "¿Está seguro que quiere dar de baja el servicio: '" + '(' + servicio.Articulo.Codigo + ') ' + servicio.Articulo.Nombre + "' ?", 'warning', 'Anular', 'Cancelar', true).then(result => {
      if (result.value) {
        this.bajaDeServicio(servicio);
      }
    });
  }
  prepararEnvio(servicio) {
    const servicioEnvio = {
      IdClienteFact: servicio.ClienteFact.Id,
      IdCliente: servicio.Cliente.Id,
      IdArticulo: servicio.Articulo.Id,
      FrecuenciaFact: servicio.FrecuenciaFact,
      MesAdelantado: servicio.MesAdelantado,
      DebitoAutomatico: servicio.DebitoAutomatico,
      Pausado: servicio.Pausado,
      Subconcepto: servicio.Subconcepto,
      FacturacionActiva: servicio.FacturacionActiva,
      FechaAlta: servicio.FechaAlta.concat(' 00:00:00'),
      FechaFin: servicio.FechaFin == '' || servicio.FechaFin == null ? null : servicio.FechaFin.concat(' 00:00:00'),
      Vigente: 'N',
      Observacion: servicio.Observacion,
      OrdenFact: servicio.OrdenFact
    };
    return servicioEnvio;
  }
  /**
   *
   * @param idServicio
   */
  bajaDeServicio(servicio) {
    const servicioEnvio = this.prepararEnvio(servicio);
    const sb = this.srvContratados.editar(servicioEnvio, servicio.Id).pipe((0,rxjs__WEBPACK_IMPORTED_MODULE_26__.tap)(elem => {
      if (!elem.error) {
        this.alert.showBasicAlert(src_app_core_utils_constantes_constantes_servicios__WEBPACK_IMPORTED_MODULE_1__.MSJ_EXITO_BAJA, '', 'success');
        this.pageSrvCliente = 1;
        this.cargarServiciosCliente();
      }
    })).subscribe();
    sb.unsubscribe;
  }
  /**
   * SP Método para activar acción
   * @param {any} event Evento con la acción a realizar
   */
  acciones(event) {
    switch (event.accion) {
      case src_app_core_utils_constantes_constantes_servicios__WEBPACK_IMPORTED_MODULE_1__.SRV_EDITAR:
        this.editar(event.registro, 'edicion');
        break;
      case src_app_core_utils_constantes_constantes_servicios__WEBPACK_IMPORTED_MODULE_1__.SRV_DUPLICAR:
        this.duplicar(event.registro);
        break;
      case src_app_core_utils_constantes_constantes_servicios__WEBPACK_IMPORTED_MODULE_1__.SRV_ANULADA:
        this.baja(event.registro);
        break;
      case src_app_core_utils_constantes_constantes_servicios__WEBPACK_IMPORTED_MODULE_1__.SRV_VISUALIZAR:
        this.editar(event.registro, 'visualizacion');
        break;
      case src_app_core_utils_constantes_constantes_servicios__WEBPACK_IMPORTED_MODULE_1__.SRV_INS_BONIF:
        this.editarBonif(event.registro, 'insercion');
        break;
      case src_app_core_utils_constantes_constantes_servicios__WEBPACK_IMPORTED_MODULE_1__.SRV_MOD_BONIF:
        this.editarBonif(event.registro, 'edicion');
        break;
      case src_app_core_utils_constantes_constantes_servicios__WEBPACK_IMPORTED_MODULE_1__.SRV_ELIM_BONIF:
        this.ElimBonifiacion(event.registro);
        break;
      case src_app_core_utils_constantes_constantes_servicios__WEBPACK_IMPORTED_MODULE_1__.SRV_ADM_MOV:
        this.adminMovimientos(event.registro);
        break;
      case src_app_core_utils_constantes_constantes_servicios__WEBPACK_IMPORTED_MODULE_1__.SRV_INS_MOV:
        this.nuevoMovimiento(event.registro);
        break;
      default:
        console.log(`La accion ${event.accion} no esta disponible`);
    }
  }
  editarBonif(servicio, accion) {
    let modalRef;
    modalRef = this.modalService.open(_edit_srv_bonificacion_edit_srv_bonificacion_component__WEBPACK_IMPORTED_MODULE_6__.EditSrvBonificacionComponent, {
      size: 'xl',
      backdrop: 'static',
      keyboard: false,
      scrollable: true
    });
    if (accion == 'edicion') {
      modalRef.componentInstance.bonificacion = servicio.Bonificacion;
    }
    modalRef.componentInstance.servicioContratadoNombre = '(' + servicio.Articulo.Codigo + ') ' + servicio.Articulo.Nombre;
    if (accion == 'insercion') {
      modalRef.componentInstance.servicioContratadoId = servicio.Id;
    }
    modalRef.result.then(() => {
      this.pageSrvCliente = 1;
      this.cargarServiciosCliente();
      if (accion == 'edicion') {
        this.alert.showBasicAlert(src_app_core_utils_constantes_constantes_servicios__WEBPACK_IMPORTED_MODULE_1__.MSJ_EXITO_BONIF_EDICION, '', 'success');
      }
      if (accion == 'insercion') {
        this.alert.showBasicAlert(src_app_core_utils_constantes_constantes_servicios__WEBPACK_IMPORTED_MODULE_1__.MSJ_EXITO_BONIF_INSERCION, '', 'success');
      }
    }, () => {});
  }
  ElimBonifiacion(servicio) {
    this.alert.showReturnAlert('Eliminar bonificación del servicio.', "¿Está seguro que quiere eliminar la bonificación del servicio: '" + '(' + servicio.Articulo.Codigo + ') ' + servicio.Articulo.Nombre + "' ?", 'warning', 'Eliminar', 'Cancelar', true).then(result => {
      if (result.value) {
        this.elimBonif(servicio.Bonificacion.Id);
      }
    });
  }
  /**
   *
   * @param idServicio
   */
  elimBonif(servicioId) {
    const sb = this.srvBonificacionService.eliminar(servicioId).pipe((0,rxjs__WEBPACK_IMPORTED_MODULE_26__.tap)(elem => {
      if (!elem.error) {
        this.alert.showBasicAlert(src_app_core_utils_constantes_constantes_servicios__WEBPACK_IMPORTED_MODULE_1__.MSJ_EXITO_BONIF_ELIM, '', 'success');
        this.pageSrvCliente = 1;
        this.cargarServiciosCliente();
      }
    })).subscribe();
    sb.unsubscribe;
  }
  nuevoMovimiento(servicio) {
    let modalRef;
    modalRef = this.modalService.open(_movimientos_movimiento_edit_movimiento_edit_component__WEBPACK_IMPORTED_MODULE_4__.MovimientoEditComponent, {
      size: 'xl',
      backdrop: 'static',
      keyboard: false,
      scrollable: true
    });
    modalRef.componentInstance.srvContratadoId = servicio.Id;
    modalRef.componentInstance.srvContratadoData = servicio;
    modalRef.result.then(() => {
      this.pageSrvCliente = 1;
      this.cargarServiciosCliente();
      this.alert.showBasicAlert(src_app_core_utils_constantes_constantes_servicios__WEBPACK_IMPORTED_MODULE_1__.MSJ_EXITO_MOV_INSERCION, '', 'success');
    });
  }
  /**
   * SP SINWEB-320 nueva accion de admin de movimientos , abre comp de listado de movimientos
   * @param servicio
   */
  adminMovimientos(servicio) {
    let modalRef;
    modalRef = this.modalService.open(_movimientos_movimientos_component__WEBPACK_IMPORTED_MODULE_5__.MovimientosComponent, {
      size: 'xl',
      backdropClass: 'back-z-index-1',
      windowClass: 'modal-z-index-1',
      backdrop: 'static',
      keyboard: false,
      scrollable: true
    });
    modalRef.componentInstance.srvContratado = servicio;
    modalRef.result.then(() => {
      this.pageSrvCliente = 1;
      this.cargarServiciosCliente();
    });
  }
  getFrecFact(type) {
    return src_app_core_utils_constantes_constantes_servicios__WEBPACK_IMPORTED_MODULE_1__.DICCIONARIO_SRV_CONTRATADO_FREC_FACT.find(e => e.Id === type);
  }
  selectToTarget($event) {
    this.serviciosEnvio = this.serviciosEnvio.map(elem => {
      let ultPeriodo = this.formGroup.get('UltPeriodoFact').value ? this.formGroup.get('UltPeriodoFact').value.split('/') : [];
      if (elem.Type == 'target') {
        return elem;
      } else {
        return {
          Type: 'target',
          Cliente: this.formGroup.get('Cliente').value,
          IdCliente: this.formGroup.get('IdCliente').value,
          Articulo: '(' + elem.Codigo + ') ' + elem.Nombre,
          IdArticulo: elem.Id,
          ClienteFact: this.formGroup.get('ClienteFact').value,
          IdClienteFact: this.formGroup.get('IdClienteFact').value,
          FrecuenciaFact: this.formGroup.get('FrecuenciaFact').value,
          Vigente: this.formGroup.get('Vigente').value ? 'S' : 'N',
          Observacion: this.formGroup.get('Observacion').value,
          UltimoPeriodoMes: ultPeriodo.length != 0 ? ultPeriodo[0] : null,
          UltimoPeriodoAnio: ultPeriodo.length != 0 ? ultPeriodo[1] : null,
          FechaAlta: this.formGroup.get('FechaAlta').value,
          FechaFin: this.formGroup.get('FechaFin').value,
          Subconcepto: this.formGroup.get('Subconcepto').value,
          Pausado: this.formGroup.get('Pausado').value ? 'S' : 'N',
          DebitoAutomatico: this.formGroup.get('DebitoAutomatico').value ? 'S' : 'N',
          MesAdelantado: this.formGroup.get('MesAdelantado').value ? 'S' : 'N',
          FacturacionActiva: this.formGroup.get('FactActiva').value ? 'S' : 'N',
          Cantidad: this.formGroup.get('Cantidad').value,
          //SP SINWEB-471 nuevo campo para fecha de inicio de facturacion del movimiento que se creara con la cantidad cargada
          FechaInicioFact: this.formGroup.get('FechaInicioFact').value
        };
      }
    });
    this.serviciosDisp = JSON.parse(JSON.stringify(this.serviciosDispAux));
    this.invalidServiciosEnvio = lodash__WEBPACK_IMPORTED_MODULE_2__.some(this.serviciosEnvio, elem => elem.FechaAlta == '' || elem.FechaAlta == null || elem.Cantidad < 1 || elem.IdClienteFact == -1 || (elem.UltimoPeriodoMes != '' && elem.UltimoPeriodoAnio != '' ? (0,src_app_core_utils_metodos_metodos__WEBPACK_IMPORTED_MODULE_9__.fechaIncompleta)(elem.UltimoPeriodoMes + '/' + elem.UltimoPeriodoAnio) || (0,src_app_core_utils_metodos_metodos__WEBPACK_IMPORTED_MODULE_9__.compareToFecha)(elem.UltimoPeriodoMes + '/' + elem.UltimoPeriodoAnio, elem.FechaAlta, 'mes') < 0 : false) || (elem.FechaInicioFact !== '' && elem.FechaInicioFact !== null ? !this.fechaPosteriorIgualA(elem.FechaInicioFact, elem.FechaAlta) : false));
  }
  fechaPosteriorIgualA(fecha1, fecha2) {
    const fechaPosterior = new Date(fecha1);
    const fechaAnterior = new Date(fecha2);
    return fechaPosterior >= fechaAnterior;
  }
  selectAllToTarget($event) {
    this.selectToTarget($event);
  }
  deleteFromTarget($event) {
    this.serviciosDisp = this.getCliente('Cliente') != '' ? JSON.parse(JSON.stringify(this.serviciosDispAux)) : [];
    //this.invalidServiciosEnvio = _.some(this.serviciosEnvio,(elem) => elem.FechaAlta== '' || elem.FechaAlta == null || elem.Cantidad <1   || elem.IdClienteFact== null)
    //SP SINWEB faltaba completar la validacion a la hora de volver al target un srv
    this.invalidServiciosEnvio = lodash__WEBPACK_IMPORTED_MODULE_2__.some(this.serviciosEnvio, elem => elem.FechaAlta == '' || elem.FechaAlta == null || elem.Cantidad < 1 || elem.IdClienteFact == -1 || (elem.UltimoPeriodoMes != '' && elem.UltimoPeriodoAnio != '' ? (0,src_app_core_utils_metodos_metodos__WEBPACK_IMPORTED_MODULE_9__.fechaIncompleta)(elem.UltimoPeriodoMes + '/' + elem.UltimoPeriodoAnio) || (0,src_app_core_utils_metodos_metodos__WEBPACK_IMPORTED_MODULE_9__.compareToFecha)(elem.UltimoPeriodoMes + '/' + elem.UltimoPeriodoAnio, elem.FechaAlta, 'mes') < 0 : false) || (elem.FechaInicioFact !== '' && elem.FechaInicioFact !== null ? !this.fechaPosteriorIgualA(elem.FechaInicioFact, elem.FechaAlta) : false));
  }
  deleteAllFromTarget($event) {
    this.deleteFromTarget($event);
  }
  maxMonth() {
    return (0,src_app_core_utils_metodos_metodos__WEBPACK_IMPORTED_MODULE_9__.agregarMesAFechaYYYYMM)((0,src_app_core_utils_metodos_metodos__WEBPACK_IMPORTED_MODULE_9__.YYYYMMActual)());
  }
  editarSrvSeleccionado(index, srv) {
    console.log(srv);
    const modalRef = this.modalService.open(_edit_srv_seleccionado_edit_srv_seleccionado_component__WEBPACK_IMPORTED_MODULE_10__.EditSrvSeleccionadoComponent, {
      size: 'xl',
      backdropClass: 'back-z-index',
      windowClass: 'modal-z-index',
      backdrop: 'static',
      keyboard: false,
      scrollable: true
    });
    modalRef.componentInstance.srv = srv;
    modalRef.result.then(result => {
      let srvEnv = JSON.parse(JSON.stringify(this.serviciosEnvio));
      srvEnv[index] = result;
      this.serviciosEnvio = JSON.parse(JSON.stringify(srvEnv));
      //SP SINWEB faltaba completar la validacion a la hora de editar un srv
      this.invalidServiciosEnvio = lodash__WEBPACK_IMPORTED_MODULE_2__.some(this.serviciosEnvio, elem => elem.FechaAlta == '' || elem.FechaAlta == null || elem.Cantidad < 1 || elem.IdClienteFact == -1 || (elem.UltimoPeriodoMes != '' && elem.UltimoPeriodoAnio != '' ? (0,src_app_core_utils_metodos_metodos__WEBPACK_IMPORTED_MODULE_9__.fechaIncompleta)(elem.UltimoPeriodoMes + '/' + elem.UltimoPeriodoAnio) || (0,src_app_core_utils_metodos_metodos__WEBPACK_IMPORTED_MODULE_9__.compareToFecha)(elem.UltimoPeriodoMes + '/' + elem.UltimoPeriodoAnio, elem.FechaAlta, 'mes') < 0 : false) || (elem.FechaInicioFact !== '' && elem.FechaInicioFact !== null ? !this.fechaPosteriorIgualA(elem.FechaInicioFact, elem.FechaAlta) : false));
    });
  }
  enviarServicios() {
    this.alert.showReturnAlert('Carga masiva de servicios', '¿Desea asociar estos servicios al cliente ' + this.getCliente('Cliente') + ' ?', 'question', 'Aceptar', 'Cancelar', true, 'success').then(resp => {
      if (resp.value) {
        const modalRef = this.modalService.open(_envio_masivo_srv_envio_masivo_srv_component__WEBPACK_IMPORTED_MODULE_11__.EnvioMasivoSrvComponent, {
          size: 'lg',
          backdropClass: 'back-z-index-1',
          windowClass: 'modal-z-index-1',
          backdrop: 'static',
          keyboard: false,
          scrollable: true
        });
        modalRef.componentInstance.serviciosEnvio = this.serviciosEnvio;
        modalRef.result.then(result => {
          this.serviciosEnvio = this.serviciosEnvio.filter((elem, index) => result.includes(index));
          this.serviciosCliente = [];
          this.pageSrvCliente = 1;
          this.cargarServiciosCliente();
        });
      }
    });
  }
  /**
   * SP SINWEB-471 nuevo metodo para controlar la cantidad correcta y la fecha de facturacion correcta
   */
  controlMovimientos(srv, type) {
    if (srv.Cantidad > 0) {
      return type == 'class' ? 'badge bg-dark font-size-16' : 'Cantidad de ítems';
    } else {
      return type == 'class' ? 'badge bg-danger font-size-16' : 'La cantidad de ítems debe ser mayor a 0';
    }
  }
  controlUltPeriodo(srv, type) {
    if (srv.UltimoPeriodoMes == '' && srv.UltimoPeriodoAnio == '' ? true : !(0,src_app_core_utils_metodos_metodos__WEBPACK_IMPORTED_MODULE_9__.fechaIncompleta)(srv.UltimoPeriodoMes + '/' + srv.UltimoPeriodoAnio) && (0,src_app_core_utils_metodos_metodos__WEBPACK_IMPORTED_MODULE_9__.compareToFecha)(srv.UltimoPeriodoMes + '/' + srv.UltimoPeriodoAnio, srv.FechaAlta, 'mes') >= 0) {
      return type == 'class' ? 'text-dark' : '';
    } else {
      return type == 'class' ? 'text-danger' : (0,src_app_core_utils_metodos_metodos__WEBPACK_IMPORTED_MODULE_9__.fechaIncompleta)(srv.UltimoPeriodoMes + '/' + srv.UltimoPeriodoAnio) ? 'Periodo incompleto' : 'El último periodo de facturación debe ser posterior o igual a la fecha de alta';
    }
  }
  controlFechaInicioFact(srv, type) {
    if (srv.FechaInicioFact == '' ? true : (0,src_app_core_utils_metodos_metodos__WEBPACK_IMPORTED_MODULE_9__.compareToFecha)(srv.FechaInicioFact, srv.FechaAlta) >= 0) {
      return type == 'class' ? 'text-dark' : 'Fecha de Inicio de fact de los ítems cargados';
    } else {
      return type == 'class' ? 'text-danger' : 'La fecha de inicio de facturación debe ser posterior o igual a la fecha de alta';
    }
  }
  /**
   * SP SINWEB-599 metodo obtener el periodo de facturacion
   * @returns
   */
  getUltPeriodoFact() {
    return this.formGroup.get('UltPeriodoFact').value;
  }
  /**
   * SP SINWEB-599 metodo para setear el periodo de facturacion
   * @param $event
   */
  setUltPeriodoFact($event) {
    this.formGroup.get('UltPeriodoFact').setValue($event);
  }
  activateValidationUltPeriodoFact() {
    this.formGroup.get('UltPeriodoFact').markAllAsTouched();
  }
  formatearFecha(date) {
    return (0,src_app_core_utils_metodos_metodos__WEBPACK_IMPORTED_MODULE_9__.formatFecha)(date);
  }
  static #_ = this.ɵfac = function CargaMasivaSrvComponent_Factory(t) {
    return new (t || CargaMasivaSrvComponent)(_angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵdirectiveInject"](_angular_forms__WEBPACK_IMPORTED_MODULE_24__.FormBuilder), _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵdirectiveInject"](_ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_27__.NgbModal), _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵdirectiveInject"](src_app_core_services_servicios_srvContratado_service__WEBPACK_IMPORTED_MODULE_13__.SrvContratadoService), _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵdirectiveInject"](_core_services_auth_service__WEBPACK_IMPORTED_MODULE_14__.AuthService), _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵdirectiveInject"](src_app_core_services_alertCustom_service__WEBPACK_IMPORTED_MODULE_8__.AlertCustomService), _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵdirectiveInject"](src_app_core_services_servicios_srvBonificacion_service__WEBPACK_IMPORTED_MODULE_15__.SrvBonificacionService), _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵdirectiveInject"](src_app_core_services_core_articulo_service__WEBPACK_IMPORTED_MODULE_16__.ArticuloService), _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵdirectiveInject"](src_app_core_services_configGeneral_service__WEBPACK_IMPORTED_MODULE_17__.ConfigGeneralService));
  };
  static #_2 = this.ɵcmp = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵdefineComponent"]({
    type: CargaMasivaSrvComponent,
    selectors: [["app-carga-masiva-srv"]],
    features: [_angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵProvidersFeature"]([src_app_core_services_alertCustom_service__WEBPACK_IMPORTED_MODULE_8__.AlertCustomService])],
    decls: 100,
    vars: 40,
    consts: [[1, "row"], [1, "col-lg-12"], [1, "card"], [1, "card-body", "border-bottom"], [1, "d-flex", "flex-column", "flex-sm-row", "gap-2", "align-items-center", "mb-2"], [1, "mb-0", "card-title", "flex-grow-1", "d-flex", "flex-row"], ["tourAnchor", "srvContratados.anchor.id", 1, "mb-1", "align-self-center"], [1, "flex-shrink-0", "d-flex", "gap-1"], ["type", "button", "tourAnchor", "volver.anchor.id", 1, "btn", "btn-light", "btn-elevate", "ml-2", 3, "routerLink"], [1, "flex-shrink-0", "d-flex"], ["action", "#", 1, "form", "form-label-right", 3, "formGroup"], [1, "form-group", "row", "justify-content-center"], [1, "col-lg-6", "p-2"], ["campoObligatorio", "", 1, "form-label"], [1, "input-group"], ["type", "search", "formControlName", "Cliente", "placeholder", "Seleccionar Cliente", "readonly", "", 1, "form-control"], ["class", "btn btn-secondary", 3, "click", 4, "ngIf"], [1, "btn", "btn-primary", 3, "click"], [1, "bx", "bx-search-alt-2"], [1, "form-group", "row"], [1, "col-lg-4", "p-2"], ["type", "search", "formControlName", "ClienteFact", "placeholder", "Seleccionar Cliente a Facturar", "readonly", "", 1, "form-control"], ["class", "btn btn-primary", 3, "click", 4, "ngIf"], [1, "col-lg-3", "p-2"], [1, "form-label"], ["type", "text", "name", "Subconcepto", "autocomplete", "off", "formControlName", "Subconcepto", 1, "form-control", "form-control-solid"], [1, "col-lg-2", "p-2"], [3, "value", "decimals", "allowNegatives", "disabled", "emitValue"], [1, "text-muted"], ["pTooltip", "Fecha a partir de la cual entrara en vigencia la cantidad de \u00EDtems cargados", 1, "bx", "bx-info-circle", "font-size-16"], ["type", "date", "name", "FechaInicioFact", "formControlName", "FechaInicioFact", "autocomplete", "off", 1, "form-control", "form-control-digits"], ["campoObligatorio", "", 1, "text-muted"], ["formControlName", "FrecuenciaFact", 1, "form-select"], [3, "value", 4, "ngFor", "ngForOf"], ["type", "date", "name", "FechaAlta", "formControlName", "FechaAlta", "autocomplete", "off", 1, "form-control", "form-control-digits"], ["type", "date", "name", "FechaFin", "formControlName", "FechaFin", "autocomplete", "off", 1, "form-control", "form-control-digits"], ["maxDate", "12/3000", 3, "valor", "disabled", "valorEmit"], [1, "col-lg-3", "p-2", "align-self-center"], ["idCheck", "factActivaSrv", "title", "Fact. Activa", "colorChecked", "success", "colorUncheked", "danger", "colorDisabled", "secondary", 3, "value", "disabled", "emitAction"], ["idCheck", "vigenteSrv", "title", "Vigente", "colorChecked", "success", "colorUncheked", "danger", "colorDisabled", "secondary", 3, "value", "disabled", "emitAction"], ["idCheck", "pausadoSrv", "title", "Pausado", "colorChecked", "success", "colorUncheked", "danger", "colorDisabled", "secondary", 3, "value", "disabled", "emitAction"], ["idCheck", "mesAdelantadoSrv", "title", "Mes Adelantado", "colorChecked", "success", "colorUncheked", "danger", "colorDisabled", "secondary", 3, "value", "disabled", "emitAction"], ["class", "col-lg-3 p-2 align-self-center", 4, "ngIf"], [1, "col-lg-12", "p-2"], ["rows", "2", "name", "Observacion", "formControlName", "Observacion", 1, "form-control", "form-control-solid"], [1, "d-flex", "flex-column", "flex-xl-row", "pt-4", "gap-xl-0", "gap-4"], ["id", "listadoSrvCliente", 1, "col-12", "col-xl-4", "bg-secondary-subtle", 2, "height", "588px", "border-radius", "10px"], [1, "card-h"], [3, "formGroup"], [1, "input-group", "card-f"], ["type", "text", "formControlName", "NomSrvCliente", "placeholder", "Buscar por nombre", 1, "form-control", 3, "keyup.enter"], [4, "ngIf"], ["id", "listadosSrvArticulo", 1, "col-12", "col-xl-8", "ps-xl-3"], ["sourceHeader", "Servicios Disponibles", "sourceFilterPlaceholder", "Buscar por nombre", "emptymessagesource", "No hay servicios disponibles", "emptymessagetarget", "No hay servicios disponibles", "targetFilterPlaceholder", "Buscar por nombre", "filterBy", "Articulo", "breakpoint", "1200px", "styleClass", "pick-list", 3, "source", "showSourceControls", "sourceStyle", "target", "showTargetControls", "targetStyle", "responsive", "dragdrop", "disabled", "onMoveToTarget", "onMoveToSource", "onMoveAllToTarget", "onMoveAllToSource"], ["pTemplate", "targetHeader"], ["pTemplate", "item", 3, "onscroll"], ["pTemplate", "sourceFilter"], ["pTemplate", "targetFilter"], ["pTemplate", "emptymessagesource"], ["pTemplate", "emptymessagetarget"], ["class", "d-flex justify-content-center align-items-center", 4, "ngIf"], [1, "btn", "btn-success", "float-end", 3, "disabled", "click"], [1, "btn", "btn-secondary", 3, "click"], [1, "bx", "bx-x"], [3, "value"], ["idCheck", "debitoAutoSrv", "title", "D\u00E9bito Autom\u00E1tico", "colorChecked", "success", "colorUncheked", "danger", "colorDisabled", "secondary", 3, "value", "disabled", "emitAction"], ["scrollTracker", "", 2, "height", "444px", "overflow-y", "auto", 3, "callAction"], [4, "ngFor", "ngForOf"], [1, "card", "bg-white", "m-1"], [1, "card-body", 2, "min-height", "50px"], ["ngbDropdown", "", "container", "body", 1, "btn-group", "position-absolute", 2, "top", "5px", "right", "5px"], ["type", "button", "ngbDropdownToggle", "", 1, "btn-sm", "btn-soft-dark", "dropdown-toggle", 2, "border-radius", "5px"], [1, "mdi", "mdi-dots-vertical"], ["ngbDropdownMenu", "", 1, "dropdown-menu"], [1, "d-flex", "flex-column"], [1, "font-size-12", "text-wrap", "pb-1", "pe-2"], [1, "badge", "bg-dark", "font-size-16"], [1, "text-muted", "font-size-10", "py-1"], [3, "ngClass"], ["class", "mdi mdi-eye font-size-16 ps-2", 3, "pTooltip", 4, "ngIf"], ["class", "bx bx bx-comment font-size-16 ps-2", 3, "pTooltip", 4, "ngIf"], [1, "text-muted", "font-size-10"], ["pTooltip", "\u00DAltimo periodo facturado", 1, "mdi", "mdi-calendar-blank"], ["pTooltip", "Fecha de alta del servicio", 1, "mdi", "mdi-calendar-blank"], ["pTooltip", "Fecha de finalizacion del servicio", 1, "mdi", "mdi-calendar-blank"], [1, "d-flex", "justify-content-around", "pt-2"], [1, "font-size-10", "text-center"], [1, "text-muted", "mb-1"], ["id", "factActiva", "type", "checkbox", "onclick", "return false;", 1, "", 3, "ngModel"], ["id", "vigente", "type", "checkbox", "onclick", "return false;", 1, "", 3, "ngModel"], ["id", "pausado", "type", "checkbox", "onclick", "return false;", 1, "", 3, "ngModel"], ["id", "mesAdel", "type", "checkbox", "onclick", "return false;", 1, "", 3, "ngModel"], ["id", "debAuto", "type", "checkbox", "onclick", "return false;", 1, "", 3, "ngModel"], [1, "dropdown-divider"], [2, "cursor", "pointer", 3, "ngClass", "click"], [1, "mdi", "mdi-eye", "font-size-16", "ps-2", 3, "pTooltip"], [1, "bx", "bx", "bx-comment", "font-size-16", "ps-2", 3, "pTooltip"], ["class", "bx bxs-discount font-size-16 ps-2", 3, "pTooltip", 4, "ngIf"], [1, "bx", "bxs-discount", "font-size-16", "ps-2", 3, "pTooltip"], [1, "text-muted", "text-center", "font-size-16", "mt-0"], ["class", "card bg-white box-shadow-md mb-0"], [1, "card", "bg-white", "box-shadow-md", "mb-0"], [1, "float-end"], [1, "btn", "btn-primary", "btn-sm", 3, "click"], [1, "mdi", "mdi-pencil", "font-size-12"], [3, "pTooltip", "ngClass"], ["pTooltip", "Cliente a facturar", 1, "mdi", "mdi-account", "font-size-12"], ["class", "text-danger"], ["class", "mdi mdi-eye font-size-12 ps-2", 3, "pTooltip", 4, "ngIf"], ["class", "bx bx bx-comment font-size-12 ps-2", 3, "pTooltip", 4, "ngIf"], [3, "ngClass", "pTooltip"], [1, "text-danger"], [1, "mdi", "mdi-alert-circle-outline", "font-size-12"], [1, "mdi", "mdi-eye", "font-size-12", "ps-2", 3, "pTooltip"], [1, "bx", "bx", "bx-comment", "font-size-12", "ps-2", 3, "pTooltip"], [1, "p-picklist-filter", "color-pick"], ["type", "text", "formControlName", "NomSrvDisp", "placeholder", "Buscar por nombre", 1, "form-control", 3, "keyup.enter"], ["type", "text", "role", "textbox", "placeholder", "Buscar por nombre", 1, "form-control", 3, "ngModel", "ngModelChange", "keyup.enter"], [1, "h-100", "d-flex", "align-items-center", "justify-content-center"], ["class", "text-muted"], ["class", "text-muted text-wrap text-center"], [1, "text-muted", "text-wrap", "text-center"], [1, "d-flex", "justify-content-center", "align-items-center"], ["role", "alert", 1, "col-6", "alert", "alert-danger", "mt-2"], [1, "my-2", "text-center"]],
    template: function CargaMasivaSrvComponent_Template(rf, ctx) {
      if (rf & 1) {
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementStart"](0, "div", 0)(1, "div", 1)(2, "div", 2)(3, "div", 3)(4, "div", 4)(5, "span", 5)(6, "h5", 6);
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtext"](7, " Carga de servicios contratados ");
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtext"](8, " \u00A0 ");
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementStart"](9, "div", 7)(10, "button", 8);
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtext"](11, " Volver ");
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]()()();
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementStart"](12, "div", 9)(13, "form", 10)(14, "div", 11)(15, "div", 12)(16, "label", 13);
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtext"](17, "Cliente");
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementStart"](18, "div", 14);
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelement"](19, "input", 15);
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtemplate"](20, CargaMasivaSrvComponent_a_20_Template, 2, 0, "a", 16);
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementStart"](21, "a", 17);
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵlistener"]("click", function CargaMasivaSrvComponent_Template_a_click_21_listener() {
          return ctx.confirmarCambioCliente();
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelement"](22, "i", 18);
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]()()()();
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementStart"](23, "div", 19)(24, "div", 20)(25, "label", 13);
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtext"](26, "Cliente a Facturar");
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementStart"](27, "div", 14);
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelement"](28, "input", 21);
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtemplate"](29, CargaMasivaSrvComponent_a_29_Template, 2, 0, "a", 16)(30, CargaMasivaSrvComponent_a_30_Template, 2, 0, "a", 22);
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]()();
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementStart"](31, "div", 23)(32, "label", 24);
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtext"](33, "Subconcepto");
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelement"](34, "input", 25);
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementStart"](35, "div", 26)(36, "label", 13);
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtext"](37, "Cantidad de \u00CDtems");
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementStart"](38, "app-input-number", 27);
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵlistener"]("emitValue", function CargaMasivaSrvComponent_Template_app_input_number_emitValue_38_listener($event) {
          return ctx.setCantidad($event);
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]()();
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementStart"](39, "div", 23)(40, "label", 28);
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtext"](41, "Fecha Inicio Fact. ");
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelement"](42, "i", 29);
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelement"](43, "input", 30);
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementStart"](44, "div", 23)(45, "label", 31);
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtext"](46, "Frecuencia de Facturaci\u00F3n");
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementStart"](47, "select", 32);
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtemplate"](48, CargaMasivaSrvComponent_option_48_Template, 2, 2, "option", 33);
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]()();
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementStart"](49, "div", 23)(50, "label", 31);
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtext"](51, "Fecha Alta");
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelement"](52, "input", 34);
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementStart"](53, "div", 23)(54, "label", 28);
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtext"](55, "Fecha Fin");
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelement"](56, "input", 35);
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementStart"](57, "div", 23)(58, "label", 28);
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtext"](59, "\u00DAltimo Periodo Fact.");
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementStart"](60, "app-input-periodo", 36);
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵlistener"]("valorEmit", function CargaMasivaSrvComponent_Template_app_input_periodo_valorEmit_60_listener($event) {
          return ctx.setUltPeriodoFact($event);
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]()();
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementStart"](61, "div", 37)(62, "app-checkbox", 38);
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵlistener"]("emitAction", function CargaMasivaSrvComponent_Template_app_checkbox_emitAction_62_listener() {
          return ctx.setFactActiva();
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]()();
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementStart"](63, "div", 37)(64, "app-checkbox", 39);
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵlistener"]("emitAction", function CargaMasivaSrvComponent_Template_app_checkbox_emitAction_64_listener() {
          return ctx.setVigente();
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]()();
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementStart"](65, "div", 37)(66, "app-checkbox", 40);
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵlistener"]("emitAction", function CargaMasivaSrvComponent_Template_app_checkbox_emitAction_66_listener() {
          return ctx.setPausado();
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]()();
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementStart"](67, "div", 37)(68, "app-checkbox", 41);
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵlistener"]("emitAction", function CargaMasivaSrvComponent_Template_app_checkbox_emitAction_68_listener() {
          return ctx.setMesAdelantado();
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]()();
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtemplate"](69, CargaMasivaSrvComponent_div_69_Template, 2, 2, "div", 42);
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementStart"](70, "div", 43)(71, "label", 28);
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtext"](72, "Observaci\u00F3n");
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelement"](73, "textarea", 44);
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]()()()();
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementStart"](74, "div", 45)(75, "div", 46);
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementContainerStart"](76);
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementStart"](77, "div", 47);
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtext"](78, "Servicios del Cliente");
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementContainerEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementContainerStart"](79);
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementStart"](80, "form", 48)(81, "div", 49)(82, "input", 50);
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵlistener"]("keyup.enter", function CargaMasivaSrvComponent_Template_input_keyup_enter_82_listener() {
          return ctx.filtrarSrvClientes();
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtemplate"](83, CargaMasivaSrvComponent_a_83_Template, 2, 0, "a", 16)(84, CargaMasivaSrvComponent_a_84_Template, 2, 0, "a", 22);
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]()();
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementContainerEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtemplate"](85, CargaMasivaSrvComponent_ng_container_85_Template, 3, 1, "ng-container", 51)(86, CargaMasivaSrvComponent_ng_container_86_Template, 4, 3, "ng-container", 51)(87, CargaMasivaSrvComponent_ng_container_87_Template, 4, 3, "ng-container", 51);
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementStart"](88, "div", 52)(89, "p-pickList", 53);
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵlistener"]("onMoveToTarget", function CargaMasivaSrvComponent_Template_p_pickList_onMoveToTarget_89_listener($event) {
          return ctx.selectToTarget($event);
        })("onMoveToSource", function CargaMasivaSrvComponent_Template_p_pickList_onMoveToSource_89_listener($event) {
          return ctx.deleteFromTarget($event);
        })("onMoveAllToTarget", function CargaMasivaSrvComponent_Template_p_pickList_onMoveAllToTarget_89_listener($event) {
          return ctx.selectAllToTarget($event);
        })("onMoveAllToSource", function CargaMasivaSrvComponent_Template_p_pickList_onMoveAllToSource_89_listener($event) {
          return ctx.deleteAllFromTarget($event);
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtemplate"](90, CargaMasivaSrvComponent_ng_template_90_Template, 3, 0, "ng-template", 54)(91, CargaMasivaSrvComponent_ng_template_91_Template, 2, 1, "ng-template", 55);
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵlistener"]("onscroll", function CargaMasivaSrvComponent_Template_ng_template_onscroll_91_listener($event) {
          return ctx.test($event);
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtemplate"](92, CargaMasivaSrvComponent_ng_template_92_Template, 6, 3, "ng-template", 56)(93, CargaMasivaSrvComponent_ng_template_93_Template, 6, 2, "ng-template", 57)(94, CargaMasivaSrvComponent_ng_template_94_Template, 3, 1, "ng-template", 58)(95, CargaMasivaSrvComponent_ng_template_95_Template, 3, 1, "ng-template", 59);
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]()()();
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementStart"](96, "div");
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtemplate"](97, CargaMasivaSrvComponent_div_97_Template, 4, 0, "div", 60);
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementStart"](98, "button", 61);
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵlistener"]("click", function CargaMasivaSrvComponent_Template_button_click_98_listener() {
          return ctx.enviarServicios();
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵtext"](99, " Enviar ");
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵelementEnd"]()()()()()();
      }
      if (rf & 2) {
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵadvance"](10);
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵproperty"]("routerLink", "/servicios/serviciosContratados/");
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵadvance"](3);
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵproperty"]("formGroup", ctx.formGroup);
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵadvance"](7);
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵproperty"]("ngIf", ctx.getCliente("cliente"));
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵadvance"](9);
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵproperty"]("ngIf", ctx.getCliente("clienteFact"));
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵadvance"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵproperty"]("ngIf", !ctx.formGroup.controls.ClienteFact.disabled && ctx.getCliente("Cliente") != "");
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵadvance"](8);
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵproperty"]("value", ctx.formGroup.controls.Cantidad.value)("decimals", 0)("allowNegatives", false)("disabled", ctx.formGroup.controls.Cantidad.disabled);
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵadvance"](10);
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵproperty"]("ngForOf", ctx.frecFactOptions);
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵadvance"](12);
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵproperty"]("valor", ctx.getUltPeriodoFact())("disabled", ctx.formGroup.controls.UltPeriodoFact.disabled);
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵadvance"](2);
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵproperty"]("value", ctx.getFactActiva())("disabled", ctx.formGroup.controls.FactActiva.disabled && ctx.getCliente("Cliente") == "");
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵadvance"](2);
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵproperty"]("value", ctx.getVigente())("disabled", ctx.formGroup.controls.Vigente.disabled && ctx.getCliente("Cliente") == "");
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵadvance"](2);
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵproperty"]("value", ctx.getPausado())("disabled", ctx.formGroup.controls.Pausado.disabled && ctx.getCliente("Cliente") == "");
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵadvance"](2);
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵproperty"]("value", ctx.getMesAdelantado())("disabled", ctx.formGroup.controls.MesAdelantado.disabled && ctx.getCliente("Cliente") == "");
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵadvance"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵproperty"]("ngIf", ctx.getFactActiva());
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵadvance"](11);
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵproperty"]("formGroup", ctx.filtersForm);
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵadvance"](3);
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵproperty"]("ngIf", ctx.filtersForm.controls.NomSrvCliente.value != "");
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵadvance"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵproperty"]("ngIf", !ctx.filtersForm.controls.NomSrvCliente.disabled);
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵadvance"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵproperty"]("ngIf", ctx.serviciosCliente.length > 0 && ctx.getCliente("Cliente") != "");
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵadvance"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵproperty"]("ngIf", ctx.serviciosCliente.length == 0 && ctx.getCliente("Cliente") != "");
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵadvance"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵproperty"]("ngIf", ctx.getCliente("Cliente") == "");
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵadvance"](2);
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵproperty"]("source", ctx.serviciosDisp)("showSourceControls", false)("sourceStyle", _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵpureFunction0"](38, _c1))("target", ctx.serviciosEnvio)("showTargetControls", false)("targetStyle", _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵpureFunction0"](39, _c1))("responsive", true)("dragdrop", true)("disabled", ctx.getCliente("Cliente") == "");
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵadvance"](8);
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵproperty"]("ngIf", ctx.invalidServiciosEnvio && ctx.serviciosEnvio.length > 0);
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵadvance"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_23__["ɵɵproperty"]("disabled", ctx.invalidServiciosEnvio || ctx.serviciosEnvio.length < 1);
      }
    },
    dependencies: [primeng_api__WEBPACK_IMPORTED_MODULE_28__.PrimeTemplate, _angular_common__WEBPACK_IMPORTED_MODULE_29__.NgClass, _angular_common__WEBPACK_IMPORTED_MODULE_29__.NgForOf, _angular_common__WEBPACK_IMPORTED_MODULE_29__.NgIf, _angular_router__WEBPACK_IMPORTED_MODULE_30__.RouterLink, primeng_tooltip__WEBPACK_IMPORTED_MODULE_31__.Tooltip, _core_directives_campo_obligatorio_directive__WEBPACK_IMPORTED_MODULE_18__.CampoObligatorioDirective, src_app_core_directives_scrollTracker_directive__WEBPACK_IMPORTED_MODULE_19__.ScrollTrackerDirective, _angular_forms__WEBPACK_IMPORTED_MODULE_24__["ɵNgNoValidate"], _angular_forms__WEBPACK_IMPORTED_MODULE_24__.NgSelectOption, _angular_forms__WEBPACK_IMPORTED_MODULE_24__["ɵNgSelectMultipleOption"], _angular_forms__WEBPACK_IMPORTED_MODULE_24__.DefaultValueAccessor, _angular_forms__WEBPACK_IMPORTED_MODULE_24__.CheckboxControlValueAccessor, _angular_forms__WEBPACK_IMPORTED_MODULE_24__.SelectControlValueAccessor, _angular_forms__WEBPACK_IMPORTED_MODULE_24__.NgControlStatus, _angular_forms__WEBPACK_IMPORTED_MODULE_24__.NgControlStatusGroup, _angular_forms__WEBPACK_IMPORTED_MODULE_24__.NgModel, _ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_27__.NgbDropdown, _ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_27__.NgbDropdownToggle, _ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_27__.NgbDropdownMenu, primeng_picklist__WEBPACK_IMPORTED_MODULE_32__.PickList, _angular_forms__WEBPACK_IMPORTED_MODULE_24__.FormGroupDirective, _angular_forms__WEBPACK_IMPORTED_MODULE_24__.FormControlName, ngx_ui_tour_ng_bootstrap__WEBPACK_IMPORTED_MODULE_33__.TourAnchorNgBootstrapDirective, _shared_ui_checkbox_checkbox_component__WEBPACK_IMPORTED_MODULE_20__.CheckboxComponent, _shared_ui_input_number_input_number_component__WEBPACK_IMPORTED_MODULE_21__.InputNumberComponent, _shared_ui_input_periodo_input_periodo_component__WEBPACK_IMPORTED_MODULE_22__.InputPeriodoComponent],
    styles: [".card-h[_ngcontent-%COMP%] {\n  padding: 20px;\n  font-size: 1rem;\n  font-weight: 700;\n  color: #374151;\n  border: 1px solid #e5e7eb;\n}\n\n.card-f[_ngcontent-%COMP%] {\n  padding: 20px;\n  border: 1px solid #e5e7eb;\n}\n\n  .p-picklist-filter-container, .p-picklist-list-wrapper[_ngcontent-%COMP%]   .p-picklist-source-wrapper[_ngcontent-%COMP%],   .p-picklist-header,   .p-picklist-source,   .p-picklist-target {\n  background-color: var(--bs-primary-bg-subtle) !important;\n  font-family: var(--bs-body-font-family);\n}\n\n  .p-picklist-filter-container .p-inputtext:focus, .p-picklist-list-wrapper[_ngcontent-%COMP%]   .p-inputtext[_ngcontent-%COMP%]:focus, .p-picklist-source-wrapper[_ngcontent-%COMP%]   .p-inputtext[_ngcontent-%COMP%]:focus {\n  border: 1px solid #e5e7eb;\n  box-shadow: none;\n}\n  .p-picklist-filter-container .p-inputtext:hover, .p-picklist-list-wrapper[_ngcontent-%COMP%]   .p-inputtext[_ngcontent-%COMP%]:hover, .p-picklist-source-wrapper[_ngcontent-%COMP%]   .p-inputtext[_ngcontent-%COMP%]:hover {\n  border: 1px solid #e5e7eb;\n  box-shadow: none;\n}\n\n  .p-picklist-empty-message {\n  padding: 0;\n  height: 100%;\n}\n\n  .p-picklist-buttons > button {\n  background-color: var(--bs-primary-bg-subtle) !important;\n  border-color: var(--bs-primary-bg-subtle) !important;\n  color: black;\n}\n\n.text-d[_ngcontent-%COMP%] {\n  color: red;\n}"]
  });
}

/***/ }),

/***/ 16413:
/*!***************************************************************************************************************************!*\
  !*** ./src/app/pages/servicios/srv-contratados/carga-masiva-srv/edit-srv-seleccionado/edit-srv-seleccionado.component.ts ***!
  \***************************************************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   EditSrvSeleccionadoComponent: () => (/* binding */ EditSrvSeleccionadoComponent)
/* harmony export */ });
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @angular/forms */ 56223);
/* harmony import */ var src_app_core_utils_metodos_metodos__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! src/app/core/utils/metodos/metodos */ 38002);
/* harmony import */ var _core_services_core_viewHelper_service__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../core/services/core/viewHelper.service */ 4506);
/* harmony import */ var src_app_core_utils_constantes_constantes_servicios__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! src/app/core/utils/constantes/constantes-servicios */ 50864);
/* harmony import */ var src_app_pages_dashboards_core_seleccionar_cliente_seleccionar_cliente_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! src/app/pages/dashboards/core/seleccionar-cliente/seleccionar-cliente.component */ 45198);
/* harmony import */ var src_app_core_utils_validators_dateValidators__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! src/app/core/utils/validators/dateValidators */ 49545);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @angular/core */ 65879);
/* harmony import */ var _ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @ng-bootstrap/ng-bootstrap */ 85406);
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @angular/common */ 96814);
/* harmony import */ var primeng_tooltip__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! primeng/tooltip */ 33259);
/* harmony import */ var _core_directives_campo_obligatorio_directive__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../../core/directives/campo-obligatorio.directive */ 61528);
/* harmony import */ var _shared_ui_checkbox_checkbox_component__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../../shared/ui/checkbox/checkbox.component */ 79468);
/* harmony import */ var _shared_ui_input_number_input_number_component__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../../../shared/ui/input-number/input-number.component */ 62271);
/* harmony import */ var _shared_ui_input_periodo_input_periodo_component__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../../../shared/ui/input-periodo/input-periodo.component */ 77947);
















function EditSrvSeleccionadoComponent_ng_container_3_ng_container_2_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementContainerStart"](0);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtext"](1);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementContainerEnd"]();
  }
  if (rf & 2) {
    const ctx_r15 = _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵnextContext"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtextInterpolate1"]("'", ctx_r15.srv.Articulo, "'");
  }
}
function EditSrvSeleccionadoComponent_ng_container_3_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementContainerStart"](0);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtext"](1, " Editar Servicio Seleccionado ");
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtemplate"](2, EditSrvSeleccionadoComponent_ng_container_3_ng_container_2_Template, 2, 1, "ng-container", 3);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementContainerEnd"]();
  }
  if (rf & 2) {
    const ctx_r0 = _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵnextContext"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵproperty"]("ngIf", ctx_r0.srv.IdArticulo);
  }
}
function EditSrvSeleccionadoComponent_a_19_Template(rf, ctx) {
  if (rf & 1) {
    const _r17 = _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵgetCurrentView"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](0, "a", 43);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵlistener"]("click", function EditSrvSeleccionadoComponent_a_19_Template_a_click_0_listener() {
      _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵrestoreView"](_r17);
      const ctx_r16 = _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵnextContext"]();
      return _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵresetView"](ctx_r16.borrarClienteAFact());
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelement"](1, "i", 44);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]();
  }
}
function EditSrvSeleccionadoComponent_div_26_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](0, "div", 45);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtext"](1, " Subconcepto correcto ");
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]();
  }
}
function EditSrvSeleccionadoComponent_div_27_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](0, "div", 46);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtext"](1, " Subconcepto no debe tener m\u00E1s de 100 caracteres ");
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]();
  }
}
function EditSrvSeleccionadoComponent_div_37_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](0, "div", 45);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtext"](1, " Fecha correcta ");
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]();
  }
}
function EditSrvSeleccionadoComponent_div_38_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](0, "div", 46);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtext"](1, " La fecha de inicio de facturaci\u00F3n no puede ser menor a la fecha de alta ");
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]();
  }
}
function EditSrvSeleccionadoComponent_option_43_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](0, "option", 47);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtext"](1);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]();
  }
  if (rf & 2) {
    const fc_r18 = ctx.$implicit;
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵproperty"]("value", fc_r18.id);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtextInterpolate1"](" ", fc_r18.nombre, " ");
  }
}
function EditSrvSeleccionadoComponent_div_48_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](0, "div", 45);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtext"](1, " Fecha correcta ");
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]();
  }
}
function EditSrvSeleccionadoComponent_div_49_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](0, "div", 46);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtext"](1, " Fecha requerida ");
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]();
  }
}
function EditSrvSeleccionadoComponent_div_54_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](0, "div", 45);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtext"](1, " Fecha correcto ");
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]();
  }
}
function EditSrvSeleccionadoComponent_div_55_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](0, "div", 46);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtext"](1, " La fecha de finalizaci\u00F3n del servicio no puede ser menor a la fecha de alta ");
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]();
  }
}
function EditSrvSeleccionadoComponent_div_68_Template(rf, ctx) {
  if (rf & 1) {
    const _r20 = _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵgetCurrentView"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](0, "div", 33)(1, "app-checkbox", 48);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵlistener"]("emitAction", function EditSrvSeleccionadoComponent_div_68_Template_app_checkbox_emitAction_1_listener() {
      _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵrestoreView"](_r20);
      const ctx_r19 = _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵnextContext"]();
      return _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵresetView"](ctx_r19.setDebitoAuto());
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]()();
  }
  if (rf & 2) {
    const ctx_r11 = _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵnextContext"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵproperty"]("value", ctx_r11.getDebitoAuto());
  }
}
function EditSrvSeleccionadoComponent_div_73_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](0, "div", 45);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtext"](1, " Observaci\u00F3n correcta ");
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]();
  }
}
function EditSrvSeleccionadoComponent_div_74_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](0, "div", 46);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtext"](1, " Observaci\u00F3n no debe tener m\u00E1s de 200 caracteres ");
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]();
  }
}
function EditSrvSeleccionadoComponent_ng_container_78_Template(rf, ctx) {
  if (rf & 1) {
    const _r22 = _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵgetCurrentView"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementContainerStart"](0);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](1, "button", 49);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵlistener"]("click", function EditSrvSeleccionadoComponent_ng_container_78_Template_button_click_1_listener() {
      _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵrestoreView"](_r22);
      const ctx_r21 = _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵnextContext"]();
      return _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵresetView"](ctx_r21.save());
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtext"](2, " Guardar ");
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementContainerEnd"]();
  }
  if (rf & 2) {
    const ctx_r14 = _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵnextContext"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵproperty"]("disabled", ctx_r14.formGroupSrv.invalid);
  }
}
const _c0 = (a0, a1) => [a0, a1];
const _c1 = "El \u00FAltimo periodo de facturado no puede ser menor a la fecha de alta";
const _c2 = () => [_c1, "Periodo incompleto"];
class EditSrvSeleccionadoComponent {
  constructor(fb, vh, modalService, modal) {
    this.fb = fb;
    this.vh = vh;
    this.modalService = modalService;
    this.modal = modal;
    this.formGroupSrv = this.fb.group({
      Cliente: [''],
      ClienteFact: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_10__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_10__.Validators.required])],
      IdClienteFact: [-1, _angular_forms__WEBPACK_IMPORTED_MODULE_10__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_10__.Validators.required, _angular_forms__WEBPACK_IMPORTED_MODULE_10__.Validators.min(0)])],
      FrecuenciaFact: ['M', _angular_forms__WEBPACK_IMPORTED_MODULE_10__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_10__.Validators.required])],
      Vigente: [true, _angular_forms__WEBPACK_IMPORTED_MODULE_10__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_10__.Validators.required])],
      Observacion: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_10__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_10__.Validators.maxLength(200)])],
      MesAdelantado: [false, _angular_forms__WEBPACK_IMPORTED_MODULE_10__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_10__.Validators.required])],
      DebitoAutomatico: [false, _angular_forms__WEBPACK_IMPORTED_MODULE_10__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_10__.Validators.required])],
      Pausado: [false, _angular_forms__WEBPACK_IMPORTED_MODULE_10__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_10__.Validators.required])],
      Subconcepto: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_10__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_10__.Validators.maxLength(100)])],
      FechaAlta: [(0,src_app_core_utils_metodos_metodos__WEBPACK_IMPORTED_MODULE_0__.fechaActual)(), _angular_forms__WEBPACK_IMPORTED_MODULE_10__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_10__.Validators.required])],
      FechaFin: [''],
      UltPeriodoFact: [''],
      FactActiva: ['S', _angular_forms__WEBPACK_IMPORTED_MODULE_10__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_10__.Validators.required])],
      Cantidad: [1, _angular_forms__WEBPACK_IMPORTED_MODULE_10__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_10__.Validators.required, _angular_forms__WEBPACK_IMPORTED_MODULE_10__.Validators.min(1)])],
      FechaInicioFact: ['']
    });
    this.frecFactOptions = src_app_core_utils_constantes_constantes_servicios__WEBPACK_IMPORTED_MODULE_2__.frecFactSrvContratado;
  }
  ngOnInit() {
    this.loadForm();
    this.formGroupSrv.controls.FechaAlta.valueChanges.subscribe(value => {
      this.formGroupSrv.controls.FechaInicioFact.updateValueAndValidity();
      this.formGroupSrv.controls.UltPeriodoFact.updateValueAndValidity();
      this.formGroupSrv.controls.FechaFin.updateValueAndValidity;
    });
  }
  loadForm() {
    if (this.srv) {
      this.formGroupSrv = this.fb.group({
        Cliente: [this.srv.Cliente],
        ClienteFact: [this.srv.ClienteFact, _angular_forms__WEBPACK_IMPORTED_MODULE_10__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_10__.Validators.required])],
        IdClienteFact: [this.srv.IdClienteFact, _angular_forms__WEBPACK_IMPORTED_MODULE_10__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_10__.Validators.required, _angular_forms__WEBPACK_IMPORTED_MODULE_10__.Validators.min(0)])],
        FrecuenciaFact: [this.srv.FrecuenciaFact, _angular_forms__WEBPACK_IMPORTED_MODULE_10__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_10__.Validators.required])],
        Vigente: [this.srv.Vigente == 'S' ? true : false, _angular_forms__WEBPACK_IMPORTED_MODULE_10__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_10__.Validators.required])],
        Observacion: [this.srv.Observacion, _angular_forms__WEBPACK_IMPORTED_MODULE_10__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_10__.Validators.maxLength(200)])],
        MesAdelantado: [this.srv.MesAdelantado == 'S' ? true : false, _angular_forms__WEBPACK_IMPORTED_MODULE_10__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_10__.Validators.required])],
        DebitoAutomatico: [this.srv.DebitoAutomatico == 'S' ? true : false, _angular_forms__WEBPACK_IMPORTED_MODULE_10__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_10__.Validators.required])],
        Pausado: [this.srv.Pausado == 'S' ? true : false, _angular_forms__WEBPACK_IMPORTED_MODULE_10__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_10__.Validators.required])],
        Subconcepto: [this.srv.Subconcepto, _angular_forms__WEBPACK_IMPORTED_MODULE_10__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_10__.Validators.maxLength(100)])],
        FechaAlta: [this.srv.FechaAlta, _angular_forms__WEBPACK_IMPORTED_MODULE_10__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_10__.Validators.required])],
        FechaFin: [this.srv.FechaFin],
        UltPeriodoFact: [this.srv.UltimoPeriodoAnio == null || this.srv.UltimoPeriodoMes == null ? null : this.srv.UltimoPeriodoMes + '/' + this.srv.UltimoPeriodoAnio],
        FactActiva: [this.srv.FacturacionActiva == 'S' ? true : false, _angular_forms__WEBPACK_IMPORTED_MODULE_10__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_10__.Validators.required])],
        Cantidad: [this.srv.Cantidad, _angular_forms__WEBPACK_IMPORTED_MODULE_10__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_10__.Validators.required, _angular_forms__WEBPACK_IMPORTED_MODULE_10__.Validators.min(1)])],
        FechaInicioFact: [this.srv.FechaInicioFact]
      });
    }
    this.formGroupSrv.controls.FechaInicioFact.addValidators([(0,src_app_core_utils_validators_dateValidators__WEBPACK_IMPORTED_MODULE_4__.fechaPosteriorValidator)('FechaAlta')]);
    this.formGroupSrv.controls.UltPeriodoFact.addValidators([(0,src_app_core_utils_validators_dateValidators__WEBPACK_IMPORTED_MODULE_4__.fechaPosteriorValidator)('FechaAlta', 'mes'), (0,src_app_core_utils_validators_dateValidators__WEBPACK_IMPORTED_MODULE_4__.periodoIncompleto)()]);
    this.formGroupSrv.controls.FechaFin.addValidators([(0,src_app_core_utils_validators_dateValidators__WEBPACK_IMPORTED_MODULE_4__.fechaPosteriorValidator)('FechaAlta')]);
    this.vh.inicializar();
    this.vh.formGroup = this.formGroupSrv;
  }
  save() {
    let srvResult = this.prepararServicio();
    this.modal.close(srvResult);
  }
  prepararServicio() {
    const formData = this.formGroupSrv.value;
    const srvEnvio = {
      Type: 'target',
      Cliente: this.srv.Cliente,
      IdCliente: this.srv.IdCliente,
      Articulo: this.srv.Articulo,
      IdArticulo: this.srv.IdArticulo,
      ClienteFact: formData.ClienteFact,
      IdClienteFact: formData.IdClienteFact,
      FrecuenciaFact: formData.FrecuenciaFact,
      Vigente: formData.Vigente ? 'S' : 'N',
      Observacion: formData.Observacion,
      UltimoPeriodoMes: formData.UltPeriodoFact && formData.UltPeriodoFact != '' ? formData.UltPeriodoFact.split('/')[0] : null,
      UltimoPeriodoAnio: formData.UltPeriodoFact && formData.UltPeriodoFact != '' ? formData.UltPeriodoFact.split('/')[1] : null,
      FechaAlta: formData.FechaAlta,
      FechaFin: formData.FechaFin,
      Subconcepto: formData.Subconcepto,
      Pausado: formData.Pausado ? 'S' : 'N',
      DebitoAutomatico: formData.DebitoAutomatico ? 'S' : 'N',
      MesAdelantado: formData.MesAdelantado ? 'S' : 'N',
      FacturacionActiva: formData.FactActiva ? 'S' : 'N',
      Cantidad: formData.Cantidad,
      FechaInicioFact: formData.FechaInicioFact
    };
    return srvEnvio;
  }
  setCantidad($event) {
    this.formGroupSrv.controls.Cantidad.setValue($event);
  }
  getVigente() {
    return this.formGroupSrv.controls.Vigente.value;
  }
  setVigente() {
    this.formGroupSrv.controls.Vigente.setValue(!this.getVigente());
  }
  getPausado() {
    return this.formGroupSrv.controls.Pausado.value;
  }
  setPausado() {
    this.formGroupSrv.controls.Pausado.setValue(!this.getPausado());
  }
  getDebitoAuto() {
    return this.formGroupSrv.controls.DebitoAutomatico.value;
  }
  setDebitoAuto() {
    this.formGroupSrv.controls.DebitoAutomatico.setValue(!this.getDebitoAuto());
  }
  getMesAdelantado() {
    return this.formGroupSrv.controls.MesAdelantado.value;
  }
  setMesAdelantado() {
    this.formGroupSrv.controls.MesAdelantado.setValue(!this.getMesAdelantado());
  }
  getFactActiva() {
    return this.formGroupSrv.controls.FactActiva.value;
  }
  setFactActiva() {
    this.formGroupSrv.controls.FactActiva.setValue(!this.getFactActiva());
  }
  maxMonth() {
    return (0,src_app_core_utils_metodos_metodos__WEBPACK_IMPORTED_MODULE_0__.agregarMesAFechaYYYYMM)((0,src_app_core_utils_metodos_metodos__WEBPACK_IMPORTED_MODULE_0__.YYYYMMActual)());
  }
  buscarClienteAFact() {
    const modalRef = this.modalService.open(src_app_pages_dashboards_core_seleccionar_cliente_seleccionar_cliente_component__WEBPACK_IMPORTED_MODULE_3__.SeleccionarClienteComponent, {
      size: 'xl',
      backdropClass: 'back-z-index-2',
      windowClass: 'modal-z-index-2',
      backdrop: 'static',
      keyboard: false,
      scrollable: true
    });
    modalRef.result.then(resolve => {
      if (resolve !== undefined) {
        this.formGroupSrv.controls.IdClienteFact.setValue(resolve.IdCliente);
        this.formGroupSrv.controls.ClienteFact.setValue(resolve.Cliente);
      }
    });
  }
  /**
   * Método get para obtener campo clienteFact
   * @returns {any} Artículo
   */
  getClienteAFact() {
    return this.formGroupSrv.get('ClienteFact').value;
  }
  /**
   * Método para limpiar filtro
   */
  borrarClienteAFact() {
    this.formGroupSrv.get('ClienteFact').reset('');
    this.formGroupSrv.get('IdClienteFact').reset(undefined);
  }
  /**
   * SP SP SINWEB-599
   * @returns
   */
  getUltPeriodoFact() {
    return this.formGroupSrv.controls.UltPeriodoFact.value;
  }
  /**
   * SP SINWEB-599
   * @param $event
   */
  setUltPeriodoFact($event) {
    this.formGroupSrv.controls.UltPeriodoFact.setValue($event);
  }
  activateValidationUltPeriodoFact() {
    this.formGroupSrv.controls.UltPeriodoFact.markAsTouched();
  }
  static #_ = this.ɵfac = function EditSrvSeleccionadoComponent_Factory(t) {
    return new (t || EditSrvSeleccionadoComponent)(_angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵdirectiveInject"](_angular_forms__WEBPACK_IMPORTED_MODULE_10__.FormBuilder), _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵdirectiveInject"](_core_services_core_viewHelper_service__WEBPACK_IMPORTED_MODULE_1__.ViewHelperService), _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵdirectiveInject"](_ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_11__.NgbModal), _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵdirectiveInject"](_ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_11__.NgbActiveModal));
  };
  static #_2 = this.ɵcmp = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵdefineComponent"]({
    type: EditSrvSeleccionadoComponent,
    selectors: [["app-edit-srv-seleccionado"]],
    inputs: {
      indexSrv: "indexSrv",
      srv: "srv"
    },
    features: [_angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵProvidersFeature"]([_core_services_core_viewHelper_service__WEBPACK_IMPORTED_MODULE_1__.ViewHelperService])],
    decls: 79,
    vars: 51,
    consts: [[1, "modal-content"], [1, "modal-header"], ["id", "example-modal-sizes-title-lg", 1, "modal-title", "h4"], [4, "ngIf"], [1, "overlay", "overlay-block", "cursor-default", "modal-body", 2, "min-height", "200px"], ["action", "#", 1, "form", "form-label-right", 3, "formGroup"], [1, "form-group", "row", "justify-content-center"], [1, "col-lg-6", "p-2"], [1, "form-label"], [1, "input-group"], ["type", "search", "formControlName", "Cliente", "readonly", "", 1, "form-control"], [1, "form-group", "row"], [1, "col-lg-4", "p-2"], ["campoObligatorio", "", 1, "form-label"], ["type", "search", "formControlName", "ClienteFact", "placeholder", "Seleccionar Cliente a Facturar", "readonly", "", 1, "form-control"], ["class", "btn btn-secondary", 3, "click", 4, "ngIf"], [1, "btn", "btn-primary", 3, "click"], [1, "bx", "bx-search-alt-2"], [1, "col-lg-3", "p-2"], ["data-cy", "nro-serie-servicio", "type", "text", "name", "Subconcepto", "autocomplete", "off", "formControlName", "Subconcepto", 1, "form-control", "form-control-solid"], ["class", "valid-feedback", 4, "ngIf"], ["class", "invalid-feedback animate__animated animate__shakeX", 4, "ngIf"], [1, "col-lg-2", "p-2"], ["campoObligatorio", "", 1, "text-muted"], [3, "value", "decimals", "allowNegatives", "emitValue"], [1, "text-muted"], ["pTooltip", "Fecha a partir de la cual entrara en vigencia la cantidad de \u00EDtems cargados", 1, "bx", "bx-info-circle", "font-size-16"], ["type", "date", "name", "FechaInicioFact", "formControlName", "FechaInicioFact", "autocomplete", "off", 1, "form-control", "form-control-digits"], ["formControlName", "FrecuenciaFact", 1, "form-select"], [3, "value", 4, "ngFor", "ngForOf"], ["type", "date", "name", "FechaAlta", "formControlName", "FechaAlta", "autocomplete", "off", 1, "form-control", "form-control-digits"], ["type", "date", "name", "FechaFin", "formControlName", "FechaFin", "autocomplete", "off", 1, "form-control", "form-control-digits"], ["maxDate", "12/3000", 3, "valor", "showErrors", "errors", "msgErrors", "valorEmit", "touchedEmit"], [1, "col-lg-3", "p-2", "align-self-center"], ["idCheck", "factActivaSrvSelect", "title", "Fact. Activa", "colorChecked", "success", "colorUncheked", "danger", "colorDisabled", "secondary", 3, "value", "emitAction"], ["idCheck", "vigenteSrvSelect", "title", "Vigente", "colorChecked", "success", "colorUncheked", "danger", "colorDisabled", "secondary", 3, "value", "emitAction"], ["idCheck", "pausadoSrvSelect", "title", "Pausado", "colorChecked", "success", "colorUncheked", "danger", "colorDisabled", "secondary", 3, "value", "emitAction"], ["idCheck", "mesAdelantadoSrvSelect", "title", "Mes Adelantado", "colorChecked", "success", "colorUncheked", "danger", "colorDisabled", "secondary", 3, "value", "emitAction"], ["class", "col-lg-3 p-2 align-self-center", 4, "ngIf"], [1, "col-lg-12", "p-2"], ["rows", "2", "name", "Observacion", "formControlName", "Observacion", 1, "form-control", "form-control-solid"], [1, "modal-footer"], ["type", "button", 1, "btn", "btn-light", "btn-elevate", "mr-2", 3, "click"], [1, "btn", "btn-secondary", 3, "click"], [1, "bx", "bx-x"], [1, "valid-feedback"], [1, "invalid-feedback", "animate__animated", "animate__shakeX"], [3, "value"], ["idCheck", "debitoAutoSrvSelect", "title", "D\u00E9bito Autom\u00E1tico", "colorChecked", "success", "colorUncheked", "danger", "colorDisabled", "secondary", 3, "value", "emitAction"], ["type", "submit", 1, "btn", "btn-success", "btn-elevate", 3, "disabled", "click"]],
    template: function EditSrvSeleccionadoComponent_Template(rf, ctx) {
      if (rf & 1) {
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](0, "div", 0)(1, "div", 1)(2, "div", 2);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtemplate"](3, EditSrvSeleccionadoComponent_ng_container_3_Template, 3, 1, "ng-container", 3);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]()();
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](4, "div", 4);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementContainerStart"](5);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](6, "form", 5)(7, "div", 6)(8, "div", 7)(9, "label", 8);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtext"](10, "Cliente");
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](11, "div", 9);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelement"](12, "input", 10);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]()()();
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](13, "div", 11)(14, "div", 12)(15, "label", 13);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtext"](16, "Cliente a Facturar");
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](17, "div", 9);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelement"](18, "input", 14);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtemplate"](19, EditSrvSeleccionadoComponent_a_19_Template, 2, 0, "a", 15);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](20, "a", 16);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵlistener"]("click", function EditSrvSeleccionadoComponent_Template_a_click_20_listener() {
          return ctx.buscarClienteAFact();
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelement"](21, "i", 17);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]()()();
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](22, "div", 18)(23, "label", 8);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtext"](24, "Subconcepto");
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelement"](25, "input", 19);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtemplate"](26, EditSrvSeleccionadoComponent_div_26_Template, 2, 0, "div", 20)(27, EditSrvSeleccionadoComponent_div_27_Template, 2, 0, "div", 21);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](28, "div", 22)(29, "label", 23);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtext"](30, "Cantidad de \u00CDtems");
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](31, "app-input-number", 24);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵlistener"]("emitValue", function EditSrvSeleccionadoComponent_Template_app_input_number_emitValue_31_listener($event) {
          return ctx.setCantidad($event);
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]()();
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](32, "div", 18)(33, "label", 25);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtext"](34, "Fecha Inicio Fact. ");
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelement"](35, "i", 26);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelement"](36, "input", 27);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtemplate"](37, EditSrvSeleccionadoComponent_div_37_Template, 2, 0, "div", 20)(38, EditSrvSeleccionadoComponent_div_38_Template, 2, 0, "div", 21);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](39, "div", 18)(40, "label", 23);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtext"](41, "Frecuencia de Facturaci\u00F3n");
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](42, "select", 28);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtemplate"](43, EditSrvSeleccionadoComponent_option_43_Template, 2, 2, "option", 29);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]()();
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](44, "div", 18)(45, "label", 23);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtext"](46, "Fecha Alta");
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelement"](47, "input", 30);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtemplate"](48, EditSrvSeleccionadoComponent_div_48_Template, 2, 0, "div", 20)(49, EditSrvSeleccionadoComponent_div_49_Template, 2, 0, "div", 21);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](50, "div", 18)(51, "label", 25);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtext"](52, "Fecha Fin");
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelement"](53, "input", 31);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtemplate"](54, EditSrvSeleccionadoComponent_div_54_Template, 2, 0, "div", 20)(55, EditSrvSeleccionadoComponent_div_55_Template, 2, 0, "div", 21);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](56, "div", 18)(57, "label", 25);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtext"](58, "\u00DAltimo Periodo Fact.");
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](59, "app-input-periodo", 32);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵlistener"]("valorEmit", function EditSrvSeleccionadoComponent_Template_app_input_periodo_valorEmit_59_listener($event) {
          return ctx.setUltPeriodoFact($event);
        })("touchedEmit", function EditSrvSeleccionadoComponent_Template_app_input_periodo_touchedEmit_59_listener() {
          return ctx.activateValidationUltPeriodoFact();
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]()();
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](60, "div", 33)(61, "app-checkbox", 34);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵlistener"]("emitAction", function EditSrvSeleccionadoComponent_Template_app_checkbox_emitAction_61_listener() {
          return ctx.setFactActiva();
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]()();
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](62, "div", 33)(63, "app-checkbox", 35);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵlistener"]("emitAction", function EditSrvSeleccionadoComponent_Template_app_checkbox_emitAction_63_listener() {
          return ctx.setVigente();
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]()();
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](64, "div", 33)(65, "app-checkbox", 36);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵlistener"]("emitAction", function EditSrvSeleccionadoComponent_Template_app_checkbox_emitAction_65_listener() {
          return ctx.setPausado();
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]()();
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](66, "div", 33)(67, "app-checkbox", 37);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵlistener"]("emitAction", function EditSrvSeleccionadoComponent_Template_app_checkbox_emitAction_67_listener() {
          return ctx.setMesAdelantado();
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]()();
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtemplate"](68, EditSrvSeleccionadoComponent_div_68_Template, 2, 1, "div", 38);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](69, "div", 39)(70, "label", 25);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtext"](71, "Observaci\u00F3n");
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelement"](72, "textarea", 40);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtemplate"](73, EditSrvSeleccionadoComponent_div_73_Template, 2, 0, "div", 20)(74, EditSrvSeleccionadoComponent_div_74_Template, 2, 0, "div", 21);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]()()();
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementContainerEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](75, "div", 41)(76, "button", 42);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵlistener"]("click", function EditSrvSeleccionadoComponent_Template_button_click_76_listener() {
          return ctx.modal.dismiss();
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtext"](77, " Cancelar ");
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtemplate"](78, EditSrvSeleccionadoComponent_ng_container_78_Template, 3, 1, "ng-container", 3);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]()();
      }
      if (rf & 2) {
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵadvance"](3);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵproperty"]("ngIf", ctx.srv);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵadvance"](3);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵproperty"]("formGroup", ctx.formGroupSrv);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵadvance"](13);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵproperty"]("ngIf", ctx.getClienteAFact());
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵadvance"](6);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵclassProp"]("is-invalid", ctx.vh.isControlInvalid("Subconcepto"))("is-valid", ctx.vh.isControlValid("Subconcepto"));
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵadvance"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵproperty"]("ngIf", ctx.vh.isControlValid("Subconcepto"));
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵadvance"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵproperty"]("ngIf", ctx.vh.controlHasError("maxlength", "Subconcepto"));
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵadvance"](4);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵproperty"]("value", ctx.formGroupSrv.controls.Cantidad.value)("decimals", 0)("allowNegatives", false);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵadvance"](5);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵclassProp"]("is-invalid", ctx.vh.isControlInvalid("FechaInicioFact"))("is-valid", ctx.vh.isControlValid("FechaInicioFact"));
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵadvance"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵproperty"]("ngIf", ctx.vh.isControlValid("FechaInicioFact"));
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵadvance"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵproperty"]("ngIf", ctx.vh.controlHasError("fechaPosterior", "FechaInicioFact"));
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵadvance"](5);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵproperty"]("ngForOf", ctx.frecFactOptions);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵadvance"](4);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵclassProp"]("is-invalid", ctx.vh.isControlInvalid("FechaAlta"))("is-valid", ctx.vh.isControlValid("FechaAlta"));
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵadvance"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵproperty"]("ngIf", ctx.vh.isControlValid("FechaAlta"));
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵadvance"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵproperty"]("ngIf", ctx.vh.controlHasError("required", "FechaAlta"));
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵadvance"](4);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵclassProp"]("is-invalid", ctx.vh.isControlInvalid("FechaFin"))("is-valid", ctx.vh.isControlValid("FechaFin"));
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵadvance"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵproperty"]("ngIf", ctx.vh.isControlValid("FechaFin"));
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵadvance"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵproperty"]("ngIf", ctx.vh.controlHasError("fechaPosterior", "FechaFin"));
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵadvance"](4);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵproperty"]("valor", ctx.getUltPeriodoFact())("showErrors", true)("errors", _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵpureFunction2"](47, _c0, ctx.vh.controlHasError("fechaPosterior", "UltPeriodoFact"), ctx.vh.controlHasError("periodoIncompleto", "UltPeriodoFact")))("msgErrors", _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵpureFunction0"](50, _c2));
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵadvance"](2);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵproperty"]("value", ctx.getFactActiva());
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵadvance"](2);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵproperty"]("value", ctx.getVigente());
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵadvance"](2);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵproperty"]("value", ctx.getPausado());
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵadvance"](2);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵproperty"]("value", ctx.getMesAdelantado());
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵadvance"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵproperty"]("ngIf", ctx.getFactActiva());
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵadvance"](4);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵclassProp"]("is-invalid", ctx.vh.controlHasError("maxlength", "Observacion"))("is-valid", ctx.vh.isControlValid("Observacion"));
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵadvance"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵproperty"]("ngIf", ctx.vh.isControlValid("Observacion"));
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵadvance"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵproperty"]("ngIf", ctx.vh.controlHasError("maxlength", "Observacion"));
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵadvance"](4);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵproperty"]("ngIf", ctx.srv);
      }
    },
    dependencies: [_angular_common__WEBPACK_IMPORTED_MODULE_12__.NgForOf, _angular_common__WEBPACK_IMPORTED_MODULE_12__.NgIf, primeng_tooltip__WEBPACK_IMPORTED_MODULE_13__.Tooltip, _core_directives_campo_obligatorio_directive__WEBPACK_IMPORTED_MODULE_5__.CampoObligatorioDirective, _angular_forms__WEBPACK_IMPORTED_MODULE_10__["ɵNgNoValidate"], _angular_forms__WEBPACK_IMPORTED_MODULE_10__.NgSelectOption, _angular_forms__WEBPACK_IMPORTED_MODULE_10__["ɵNgSelectMultipleOption"], _angular_forms__WEBPACK_IMPORTED_MODULE_10__.DefaultValueAccessor, _angular_forms__WEBPACK_IMPORTED_MODULE_10__.SelectControlValueAccessor, _angular_forms__WEBPACK_IMPORTED_MODULE_10__.NgControlStatus, _angular_forms__WEBPACK_IMPORTED_MODULE_10__.NgControlStatusGroup, _angular_forms__WEBPACK_IMPORTED_MODULE_10__.FormGroupDirective, _angular_forms__WEBPACK_IMPORTED_MODULE_10__.FormControlName, _shared_ui_checkbox_checkbox_component__WEBPACK_IMPORTED_MODULE_6__.CheckboxComponent, _shared_ui_input_number_input_number_component__WEBPACK_IMPORTED_MODULE_7__.InputNumberComponent, _shared_ui_input_periodo_input_periodo_component__WEBPACK_IMPORTED_MODULE_8__.InputPeriodoComponent],
    styles: [".p-inputtext {\n  padding-bottom: 8px !important;\n  padding-top: 8px !important;\n}\n\n  .p-overlaypanel.p-component {\n  z-index: 1056 !important;\n}"]
  });
}

/***/ }),

/***/ 20780:
/*!*****************************************************************************************************************!*\
  !*** ./src/app/pages/servicios/srv-contratados/carga-masiva-srv/envio-masivo-srv/envio-masivo-srv.component.ts ***!
  \*****************************************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   EnvioMasivoSrvComponent: () => (/* binding */ EnvioMasivoSrvComponent)
/* harmony export */ });
/* harmony import */ var _core_utils_metodos_metodos__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../core/utils/metodos/metodos */ 38002);
/* harmony import */ var src_app_core_utils_constantes_constantes_servicios__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! src/app/core/utils/constantes/constantes-servicios */ 50864);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/core */ 65879);
/* harmony import */ var _ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @ng-bootstrap/ng-bootstrap */ 85406);
/* harmony import */ var src_app_core_services_servicios_srvContratado_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! src/app/core/services/servicios/srvContratado.service */ 2158);
/* harmony import */ var src_app_core_services_configGeneral_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! src/app/core/services/configGeneral.service */ 99757);
/* harmony import */ var primeng_accordion__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! primeng/accordion */ 65389);
/* harmony import */ var primeng_api__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! primeng/api */ 85219);
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @angular/common */ 96814);
/* harmony import */ var primeng_tooltip__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! primeng/tooltip */ 33259);
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @angular/forms */ 56223);











function EnvioMasivoSrvComponent_ng_container_10_ng_template_2_Conditional_1_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](0, "span", 14);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](1);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelement"](2, "i", 15);
  }
  if (rf & 2) {
    const srvResult_r1 = _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵnextContext"](2).$implicit;
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtextInterpolate3"]("N\u00B0 ", srvResult_r1.DatosInsercionCorrecta.NroSrvContratado, " - (", srvResult_r1.DatosInsercionCorrecta.Articulo.Codigo, ") ", srvResult_r1.DatosInsercionCorrecta.Articulo.Nombre, " ");
  }
}
function EnvioMasivoSrvComponent_ng_container_10_ng_template_2_Conditional_2_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](0, "span", 14);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](1);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelement"](2, "i", 16);
  }
  if (rf & 2) {
    const i_r2 = _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵnextContext"](2).index;
    const ctx_r6 = _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵnextContext"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtextInterpolate1"]("", ctx_r6.getServicio(i_r2).Articulo, " ");
  }
}
function EnvioMasivoSrvComponent_ng_container_10_ng_template_2_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](0, "div");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtemplate"](1, EnvioMasivoSrvComponent_ng_container_10_ng_template_2_Conditional_1_Template, 3, 3)(2, EnvioMasivoSrvComponent_ng_container_10_ng_template_2_Conditional_2_Template, 3, 1);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();
  }
  if (rf & 2) {
    const srvResult_r1 = _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵnextContext"]().$implicit;
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵconditional"](1, srvResult_r1.DatosInsercionCorrecta && srvResult_r1.MensajeError == "" ? 1 : 2);
  }
}
function EnvioMasivoSrvComponent_ng_container_10_ng_template_3_i_10_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelement"](0, "i", 38);
  }
  if (rf & 2) {
    const srvResult_r1 = _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵnextContext"](2).$implicit;
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵproperty"]("pTooltip", srvResult_r1.DatosInsercionCorrecta ? srvResult_r1.DatosInsercionCorrecta.Observacion : srvResult_r1.DatosInsercionFallida.Observacion);
  }
}
function EnvioMasivoSrvComponent_ng_container_10_ng_template_3_i_11_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelement"](0, "i", 39);
  }
  if (rf & 2) {
    const srvResult_r1 = _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵnextContext"](2).$implicit;
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵproperty"]("pTooltip", srvResult_r1.DatosInsercionCorrecta ? srvResult_r1.DatosInsercionCorrecta.Subconcepto : srvResult_r1.DatosInsercionFallida.Subconcepto);
  }
}
function EnvioMasivoSrvComponent_ng_container_10_ng_template_3_Conditional_14_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](0, " No facturado ");
  }
}
function EnvioMasivoSrvComponent_ng_container_10_ng_template_3_Conditional_15_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](0);
  }
  if (rf & 2) {
    const srvResult_r1 = _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵnextContext"](2).$implicit;
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtextInterpolate2"](" ", srvResult_r1.DatosInsercionCorrecta ? srvResult_r1.DatosInsercionCorrecta.UltimoPeriodoMes : srvResult_r1.DatosInsercionFallida.UltimoPeriodoMes, "/", srvResult_r1.DatosInsercionCorrecta ? srvResult_r1.DatosInsercionCorrecta.UltimoPeriodoAnio : srvResult_r1.DatosInsercionFallida.UltimoPeriodoAnio, " ");
  }
}
function EnvioMasivoSrvComponent_ng_container_10_ng_template_3_Conditional_20_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](0, " Sin Fecha Fin ");
  }
}
function EnvioMasivoSrvComponent_ng_container_10_ng_template_3_Conditional_21_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](0);
  }
  if (rf & 2) {
    const srvResult_r1 = _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵnextContext"](2).$implicit;
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtextInterpolate1"](" ", srvResult_r1.DatosInsercionCorrecta ? srvResult_r1.DatosInsercionCorrecta.FechaFin : srvResult_r1.DatosInsercionFallida.FechaFin, " ");
  }
}
function EnvioMasivoSrvComponent_ng_container_10_ng_template_3_Conditional_43_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](0, "div", 40)(1, "p", 41);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]()();
  }
  if (rf & 2) {
    const srvResult_r1 = _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵnextContext"](2).$implicit;
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtextInterpolate1"](" ", srvResult_r1.MensajeError, " ");
  }
}
function EnvioMasivoSrvComponent_ng_container_10_ng_template_3_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](0, "div", 17)(1, "span", 18);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]()();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](3, "div", 19)(4, "div")(5, "i", 20);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](6);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]()();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](7, "div", 21)(8, "span", 22);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](9);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtemplate"](10, EnvioMasivoSrvComponent_ng_container_10_ng_template_3_i_10_Template, 1, 1, "i", 23)(11, EnvioMasivoSrvComponent_ng_container_10_ng_template_3_i_11_Template, 1, 1, "i", 24);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](12, "div", 25);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelement"](13, "i", 26);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtemplate"](14, EnvioMasivoSrvComponent_ng_container_10_ng_template_3_Conditional_14_Template, 1, 0)(15, EnvioMasivoSrvComponent_ng_container_10_ng_template_3_Conditional_15_Template, 1, 2);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](16, " - ");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelement"](17, "i", 27);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](18);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelement"](19, "i", 28);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtemplate"](20, EnvioMasivoSrvComponent_ng_container_10_ng_template_3_Conditional_20_Template, 1, 0)(21, EnvioMasivoSrvComponent_ng_container_10_ng_template_3_Conditional_21_Template, 1, 1);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]()();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](22, "div", 29)(23, "div", 30)(24, "p", 31);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](25, "Fact. Activa");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelement"](26, "input", 32);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](27, "div", 30)(28, "p", 31);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](29, "Vigente");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelement"](30, "input", 33);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](31, "div", 30)(32, "p", 31);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](33, "Pausado");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelement"](34, "input", 34);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](35, "div", 30)(36, "p", 31);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](37, "M. Adelantado");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelement"](38, "input", 35);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](39, "div", 30)(40, "p", 31);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](41, "Deb. Auto.");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelement"](42, "input", 36);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]()();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtemplate"](43, EnvioMasivoSrvComponent_ng_container_10_ng_template_3_Conditional_43_Template, 3, 1, "div", 37);
  }
  if (rf & 2) {
    const ctx_r22 = _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵnextContext"]();
    const srvResult_r1 = ctx_r22.$implicit;
    const i_r2 = ctx_r22.index;
    const ctx_r4 = _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵnextContext"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtextInterpolate"](srvResult_r1.Cantidad);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"](4);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtextInterpolate"](ctx_r4.getServicio(i_r2).ClienteFact);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵstyleMap"](ctx_r4.getFrecFact(srvResult_r1.DatosInsercionCorrecta ? srvResult_r1.DatosInsercionCorrecta.FrecuenciaFact : srvResult_r1.DatosInsercionFallida.FrecuenciaFact).Style);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵproperty"]("ngClass", ctx_r4.getFrecFact(srvResult_r1.DatosInsercionCorrecta ? srvResult_r1.DatosInsercionCorrecta.FrecuenciaFact : srvResult_r1.DatosInsercionFallida.FrecuenciaFact).Class);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtextInterpolate1"](" ", ctx_r4.getFrecFact(srvResult_r1.DatosInsercionCorrecta ? srvResult_r1.DatosInsercionCorrecta.FrecuenciaFact : srvResult_r1.DatosInsercionFallida.FrecuenciaFact).Nombre, " ");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵproperty"]("ngIf", srvResult_r1.DatosInsercionCorrecta ? srvResult_r1.DatosInsercionCorrecta.Observacion : srvResult_r1.DatosInsercionFallida.Observacion);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵproperty"]("ngIf", srvResult_r1.DatosInsercionCorrecta ? srvResult_r1.DatosInsercionCorrecta.Subconcepto : srvResult_r1.DatosInsercionFallida.Subconcepto);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"](3);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵconditional"](14, !(srvResult_r1.DatosInsercionCorrecta ? srvResult_r1.DatosInsercionCorrecta.UltimoPeriodoMes : srvResult_r1.DatosInsercionFallida.UltimoPeriodoMes) || !(srvResult_r1.DatosInsercionCorrecta ? srvResult_r1.DatosInsercionCorrecta.UltimoPeriodoAnio : srvResult_r1.DatosInsercionFallida.UltimoPeriodoAnio) ? 14 : 15);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"](4);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtextInterpolate1"]("", srvResult_r1.DatosInsercionCorrecta ? srvResult_r1.DatosInsercionCorrecta.FechaAlta : srvResult_r1.DatosInsercionFallida.FechaAlta, " - ");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵconditional"](20, !(srvResult_r1.DatosInsercionCorrecta ? srvResult_r1.DatosInsercionCorrecta.FechaFin : srvResult_r1.DatosInsercionFallida.FechaFin) ? 20 : 21);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"](6);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵproperty"]("ngModel", srvResult_r1.DatosInsercionCorrecta ? srvResult_r1.DatosInsercionCorrecta.FacturacionActiva == "S" : srvResult_r1.DatosInsercionFallida.FacturacionActiva == "S");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"](4);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵproperty"]("ngModel", srvResult_r1.DatosInsercionCorrecta ? srvResult_r1.DatosInsercionCorrecta.Vigente == "S" : srvResult_r1.DatosInsercionFallida.Vigente == "S");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"](4);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵproperty"]("ngModel", srvResult_r1.DatosInsercionCorrecta ? srvResult_r1.DatosInsercionCorrecta.Pausado == "S" : srvResult_r1.DatosInsercionFallida.Pausado == "S");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"](4);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵproperty"]("ngModel", srvResult_r1.DatosInsercionCorrecta ? srvResult_r1.DatosInsercionCorrecta.MesAdelantado == "S" : srvResult_r1.DatosInsercionFallida.MesAdelantado == "S");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"](4);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵproperty"]("ngModel", srvResult_r1.DatosInsercionCorrecta ? srvResult_r1.DatosInsercionCorrecta.DebitoAutomatico == "S" : srvResult_r1.DatosInsercionFallida.DebitoAutomatico == "S");
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵconditional"](43, srvResult_r1.DatosInsercionFallida && srvResult_r1.MensajeError != "" ? 43 : -1);
  }
}
function EnvioMasivoSrvComponent_ng_container_10_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementContainerStart"](0);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](1, "p-accordionTab", 11);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtemplate"](2, EnvioMasivoSrvComponent_ng_container_10_ng_template_2_Template, 3, 1, "ng-template", 12)(3, EnvioMasivoSrvComponent_ng_container_10_ng_template_3_Template, 44, 17, "ng-template", 13);
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementContainerEnd"]();
  }
}
class EnvioMasivoSrvComponent {
  constructor(modal, srvContratado, configGral) {
    this.modal = modal;
    this.srvContratado = srvContratado;
    this.configGral = configGral;
    this.serviciosEnvio = [];
    this.serviciosRespuesta = [];
  }
  ngOnInit() {
    //Called after the constructor, initializing input properties, and the first call to ngOnChanges.
    //Add 'implements OnInit' to the class.
    if (this.serviciosEnvio && this.serviciosEnvio.length > 0) {
      this.enviarServicios();
    }
  }
  enviarServicios() {
    const sb = this.srvContratado.postServiciosContratadosMasivo(this.prepararEnvioServicios()).subscribe(resp => {
      this.serviciosRespuesta = resp.Data;
    });
  }
  prepararEnvioServicios() {
    let result = {
      IdFamilia: Number(this.configGral._config.FamiliaArtSrv),
      ServiciosContratados: this.serviciosEnvio.map(elem => {
        return {
          IdCliente: elem.IdCliente,
          IdArticulo: elem.IdArticulo,
          IdClienteFact: elem.IdClienteFact,
          FrecuenciaFact: elem.FrecuenciaFact,
          Vigente: elem.Vigente,
          Observacion: elem.Observacion,
          UltimoPeriodoMes: elem.UltimoPeriodoMes,
          UltimoPeriodoAnio: elem.UltimoPeriodoAnio,
          FechaAlta: elem.FechaAlta == null || elem.FechaAlta == '' ? null : (0,_core_utils_metodos_metodos__WEBPACK_IMPORTED_MODULE_0__.formatFecha)(elem.FechaAlta).concat(' 00:00:00'),
          FechaFin: elem.FechaFin == null || elem.FechaFin == '' ? null : (0,_core_utils_metodos_metodos__WEBPACK_IMPORTED_MODULE_0__.formatFecha)(elem.FechaFin).concat(' 00:00:00'),
          Subconcepto: elem.Subconcepto,
          Pausado: elem.Pausado,
          DebitoAutomatico: elem.DebitoAutomatico,
          MesAdelantado: elem.MesAdelantado,
          FacturacionActiva: elem.FacturacionActiva,
          Cantidad: elem.Cantidad,
          //SP SINWEB-471 nuevo campo fecha inicio de facturacion
          FechaInicioFact: elem.FechaInicioFact == null || elem.FechaInicioFact == '' ? null : (0,_core_utils_metodos_metodos__WEBPACK_IMPORTED_MODULE_0__.formatFecha)(elem.FechaInicioFact).concat(' 00:00:00')
        };
      })
    };
    return result;
  }
  cerrarModal() {
    this.modal.close(this.serviciosRespuesta.map((element, index) => {
      return element.DatosInsercionFallida ? index : undefined;
    }).filter(elem => elem != undefined));
  }
  getServicio(i) {
    return this.serviciosEnvio[i];
  }
  getFrecFact(type) {
    return src_app_core_utils_constantes_constantes_servicios__WEBPACK_IMPORTED_MODULE_1__.DICCIONARIO_SRV_CONTRATADO_FREC_FACT.find(e => e.Id === type);
  }
  static #_ = this.ɵfac = function EnvioMasivoSrvComponent_Factory(t) {
    return new (t || EnvioMasivoSrvComponent)(_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵdirectiveInject"](_ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_5__.NgbActiveModal), _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵdirectiveInject"](src_app_core_services_servicios_srvContratado_service__WEBPACK_IMPORTED_MODULE_2__.SrvContratadoService), _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵdirectiveInject"](src_app_core_services_configGeneral_service__WEBPACK_IMPORTED_MODULE_3__.ConfigGeneralService));
  };
  static #_2 = this.ɵcmp = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵdefineComponent"]({
    type: EnvioMasivoSrvComponent,
    selectors: [["app-envio-masivo-srv"]],
    inputs: {
      serviciosEnvio: "serviciosEnvio"
    },
    decls: 15,
    vars: 5,
    consts: [[1, "modal-content"], [1, "modal-header"], ["id", "example-modal-sizes-title-lg", 1, "modal-title", "h4"], [1, "overlay", "overlay-block", "cursor-default", "modal-body", 2, "min-height", "200px"], [1, "row", "mb-3"], [1, "row"], [1, "col-lg-12"], [1, "w-full", 3, "multiple"], [4, "ngFor", "ngForOf"], [1, "modal-footer"], ["type", "button", 1, "btn", "btn-primary", 3, "disabled", "click"], ["iconPos", "end"], ["pTemplate", "header"], ["pTemplate", "content"], [1, "fw-bold"], [1, "ps-3", "bx", "bx-check-circle", "bx-sm", "text-success"], [1, "ps-3", "bx", "bx-x-circle", "bx-sm", "text-danger"], [1, "float-end"], [1, "badge", "bg-dark", "font-size-16"], [1, "d-flex", "gap-2"], ["pTooltip", "Cliente a facturar", 1, "mdi", "mdi-account", "font-size-12"], [1, "text-muted", "font-size-10", "py-1"], [3, "ngClass"], ["class", "mdi mdi-eye font-size-16 ps-2", 3, "pTooltip", 4, "ngIf"], ["class", "bx bx bx-comment font-size-16 ps-2", 3, "pTooltip", 4, "ngIf"], [1, "text-muted", "font-size-10", "align-self-center"], ["pTooltip", "\u00DAltimo periodo facturado", 1, "mdi", "mdi-calendar-blank"], ["pTooltip", "Fecha de alta del servicio", 1, "mdi", "mdi-calendar-blank"], ["pTooltip", "Fecha de finalizacion del servicio", 1, "mdi", "mdi-calendar-blank"], [1, "d-flex", "justify-content-around", "pt-2"], [1, "font-size-10", "text-center"], [1, "text-muted", "mb-1"], ["id", "factActiva", "type", "checkbox", "onclick", "return false;", 1, "", 3, "ngModel"], ["id", "vigente", "type", "checkbox", "onclick", "return false;", 1, "", 3, "ngModel"], ["id", "pausado", "type", "checkbox", "onclick", "return false;", 1, "", 3, "ngModel"], ["id", "mesAdel", "type", "checkbox", "onclick", "return false;", 1, "", 3, "ngModel"], ["id", "debAuto", "type", "checkbox", "onclick", "return false;", 1, "", 3, "ngModel"], ["class", "alert alert-danger mt-2", "role", "alert"], [1, "mdi", "mdi-eye", "font-size-16", "ps-2", 3, "pTooltip"], [1, "bx", "bx", "bx-comment", "font-size-16", "ps-2", 3, "pTooltip"], ["role", "alert", 1, "alert", "alert-danger", "mt-2"], [1, "mb-0"]],
    template: function EnvioMasivoSrvComponent_Template(rf, ctx) {
      if (rf & 1) {
        _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](0, "div", 0)(1, "div", 1)(2, "div", 2);
        _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](3, " Resultados de carga de servicios ");
        _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]()();
        _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](4, "div", 3)(5, "div", 3);
        _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelement"](6, "div", 4);
        _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](7, "div", 5)(8, "div", 6)(9, "p-accordion", 7);
        _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtemplate"](10, EnvioMasivoSrvComponent_ng_container_10_Template, 4, 0, "ng-container", 8);
        _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]()()()();
        _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](11, "div", 9)(12, "button", 10);
        _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵlistener"]("click", function EnvioMasivoSrvComponent_Template_button_click_12_listener() {
          return ctx.cerrarModal();
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵpipe"](13, "async");
        _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](14, " Aceptar ");
        _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]()()()();
      }
      if (rf & 2) {
        _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"](9);
        _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵproperty"]("multiple", true);
        _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵproperty"]("ngForOf", ctx.serviciosRespuesta);
        _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"](2);
        _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵproperty"]("disabled", _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵpipeBind1"](13, 3, ctx.srvContratado.isLoading$));
      }
    },
    dependencies: [primeng_accordion__WEBPACK_IMPORTED_MODULE_6__.Accordion, primeng_accordion__WEBPACK_IMPORTED_MODULE_6__.AccordionTab, primeng_api__WEBPACK_IMPORTED_MODULE_7__.PrimeTemplate, _angular_common__WEBPACK_IMPORTED_MODULE_8__.NgClass, _angular_common__WEBPACK_IMPORTED_MODULE_8__.NgForOf, _angular_common__WEBPACK_IMPORTED_MODULE_8__.NgIf, primeng_tooltip__WEBPACK_IMPORTED_MODULE_9__.Tooltip, _angular_forms__WEBPACK_IMPORTED_MODULE_10__.CheckboxControlValueAccessor, _angular_forms__WEBPACK_IMPORTED_MODULE_10__.NgControlStatus, _angular_forms__WEBPACK_IMPORTED_MODULE_10__.NgModel, _angular_common__WEBPACK_IMPORTED_MODULE_8__.AsyncPipe]
  });
}

/***/ }),

/***/ 41003:
/*!**********************************************************************************************************!*\
  !*** ./src/app/pages/servicios/srv-contratados/edit-srv-bonificacion/edit-srv-bonificacion.component.ts ***!
  \**********************************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   EditSrvBonificacionComponent: () => (/* binding */ EditSrvBonificacionComponent)
/* harmony export */ });
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/forms */ 56223);
/* harmony import */ var src_app_core_services_core_viewHelper_service__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! src/app/core/services/core/viewHelper.service */ 4506);
/* harmony import */ var _core_utils_metodos_metodos__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! src/app/core/utils/metodos/metodos */ 38002);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/core */ 65879);
/* harmony import */ var _core_services_servicios_srvBonificacion_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../core/services/servicios/srvBonificacion.service */ 53225);
/* harmony import */ var _ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @ng-bootstrap/ng-bootstrap */ 85406);
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @angular/common */ 96814);
/* harmony import */ var _core_directives_campo_obligatorio_directive__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../core/directives/campo-obligatorio.directive */ 61528);
/* harmony import */ var _shared_ui_checkbox_checkbox_component__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../shared/ui/checkbox/checkbox.component */ 79468);
/* harmony import */ var _shared_ui_input_number_input_number_component__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../shared/ui/input-number/input-number.component */ 62271);













function EditSrvBonificacionComponent_ng_container_3_ng_container_1_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementContainerStart"](0);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](1, "Editar");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementContainerEnd"]();
  }
}
function EditSrvBonificacionComponent_ng_container_3_ng_container_2_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementContainerStart"](0);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](1, "Nueva");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementContainerEnd"]();
  }
}
function EditSrvBonificacionComponent_ng_container_3_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementContainerStart"](0);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtemplate"](1, EditSrvBonificacionComponent_ng_container_3_ng_container_1_Template, 2, 0, "ng-container", 3)(2, EditSrvBonificacionComponent_ng_container_3_ng_container_2_Template, 2, 0, "ng-container", 3);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](3, " Bonificaci\u00F3n ");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementContainerEnd"]();
  }
  if (rf & 2) {
    const ctx_r0 = _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵnextContext"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵproperty"]("ngIf", ctx_r0.bonificacion.Id);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵproperty"]("ngIf", !ctx_r0.bonificacion.Id);
  }
}
function EditSrvBonificacionComponent_option_17_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](0, "option", 27);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](1);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]();
  }
  if (rf & 2) {
    const fc_r17 = ctx.$implicit;
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵproperty"]("value", fc_r17.id);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtextInterpolate1"](" ", fc_r17.nombre, " ");
  }
}
function EditSrvBonificacionComponent_div_18_Template(rf, ctx) {
  if (rf & 1) {
    const _r19 = _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵgetCurrentView"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](0, "div", 10)(1, "label", 11);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](2, "Porcentaje de bonificaci\u00F3n");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](3, "div", 28)(4, "app-input-number", 29);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵlistener"]("emitValue", function EditSrvBonificacionComponent_div_18_Template_app_input_number_emitValue_4_listener($event) {
      _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵrestoreView"](_r19);
      const ctx_r18 = _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵnextContext"]();
      return _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵresetView"](ctx_r18.setValor($event));
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]()()();
  }
  if (rf & 2) {
    const ctx_r2 = _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵnextContext"]();
    const _r12 = _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵreference"](47);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"](4);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵproperty"]("value", ctx_r2.getValor())("isInvalid", ctx_r2.getValor() == undefined || ctx_r2.getValor() < 0 || ctx_r2.getValor() > 100)("isValid", ctx_r2.getValor() >= 0 && ctx_r2.getValor() <= 100)("templateErrors", _r12);
  }
}
function EditSrvBonificacionComponent_div_19_Template(rf, ctx) {
  if (rf & 1) {
    const _r21 = _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵgetCurrentView"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](0, "div", 10)(1, "label", 11);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](2, "Nominal (Items bonificados)");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](3, "app-input-number", 30);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵlistener"]("emitValue", function EditSrvBonificacionComponent_div_19_Template_app_input_number_emitValue_3_listener($event) {
      _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵrestoreView"](_r21);
      const ctx_r20 = _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵnextContext"]();
      return _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵresetView"](ctx_r20.setValor($event));
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]()();
  }
  if (rf & 2) {
    const ctx_r3 = _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵnextContext"]();
    const _r14 = _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵreference"](49);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"](3);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵproperty"]("value", ctx_r3.getValor())("isInvalid", ctx_r3.getValor() == undefined)("isValid", ctx_r3.getValor() != undefined)("templateErrors", _r14);
  }
}
function EditSrvBonificacionComponent_div_20_div_4_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](0, "div", 32);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](1, " Fecha correcta ");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]();
  }
}
function EditSrvBonificacionComponent_div_20_div_5_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](0, "div", 33);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](1, " Fecha requerida ");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]();
  }
}
function EditSrvBonificacionComponent_div_20_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](0, "div", 10)(1, "label", 11);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](2, "Fecha de Lista Precio");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelement"](3, "input", 31);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtemplate"](4, EditSrvBonificacionComponent_div_20_div_4_Template, 2, 0, "div", 16)(5, EditSrvBonificacionComponent_div_20_div_5_Template, 2, 0, "div", 17);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]();
  }
  if (rf & 2) {
    const ctx_r4 = _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵnextContext"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"](3);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵclassProp"]("is-invalid", ctx_r4.vh.isControlInvalid("FechaListaPrecio"))("is-valid", ctx_r4.vh.isControlValid("FechaListaPrecio"));
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵproperty"]("ngIf", ctx_r4.vh.isControlValid("FechaListaPrecio"));
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵproperty"]("ngIf", ctx_r4.vh.controlHasError("required", "FechaListaPrecio"));
  }
}
function EditSrvBonificacionComponent_div_25_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](0, "div", 32);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](1, " Fecha correcta ");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]();
  }
}
function EditSrvBonificacionComponent_div_26_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](0, "div", 33);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](1, " Fecha requerida ");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]();
  }
}
function EditSrvBonificacionComponent_div_31_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](0, "div", 32);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](1, " Fecha correcta ");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]();
  }
}
function EditSrvBonificacionComponent_div_40_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](0, "div", 32);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](1, " Observaci\u00F3n correcta ");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]();
  }
}
function EditSrvBonificacionComponent_div_41_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](0, "div", 33);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](1, " Observaci\u00F3n no debe tener m\u00E1s de 200 caracteres ");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]();
  }
}
function EditSrvBonificacionComponent_ng_container_45_i_4_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelement"](0, "i", 36);
  }
}
function EditSrvBonificacionComponent_ng_container_45_Template(rf, ctx) {
  if (rf & 1) {
    const _r26 = _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵgetCurrentView"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementContainerStart"](0);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](1, "button", 34);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵlistener"]("click", function EditSrvBonificacionComponent_ng_container_45_Template_button_click_1_listener() {
      _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵrestoreView"](_r26);
      const ctx_r25 = _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵnextContext"]();
      return _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵresetView"](ctx_r25.save());
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵpipe"](2, "async");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](3, " Guardar ");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtemplate"](4, EditSrvBonificacionComponent_ng_container_45_i_4_Template, 1, 0, "i", 35);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵpipe"](5, "async");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementContainerEnd"]();
  }
  if (rf & 2) {
    const ctx_r10 = _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵnextContext"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵproperty"]("disabled", ctx_r10.formGroup.invalid || _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵpipeBind1"](2, 2, ctx_r10.srvBonificacionService.isLoading$));
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"](3);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵproperty"]("ngIf", _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵpipeBind1"](5, 4, ctx_r10.srvBonificacionService.isLoading$));
  }
}
function EditSrvBonificacionComponent_ng_template_46_div_0_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](0, "div", 32);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](1, "% correcto");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]();
  }
}
function EditSrvBonificacionComponent_ng_template_46_div_1_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](0, "div", 33);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](1, " % requerido ");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]();
  }
}
function EditSrvBonificacionComponent_ng_template_46_div_2_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](0, "div", 33);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](1, " % debe ser entre 0 y 100 ");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]();
  }
}
function EditSrvBonificacionComponent_ng_template_46_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtemplate"](0, EditSrvBonificacionComponent_ng_template_46_div_0_Template, 2, 0, "div", 16)(1, EditSrvBonificacionComponent_ng_template_46_div_1_Template, 2, 0, "div", 17)(2, EditSrvBonificacionComponent_ng_template_46_div_2_Template, 2, 0, "div", 17);
  }
  if (rf & 2) {
    const ctx_r11 = _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵnextContext"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵproperty"]("ngIf", ctx_r11.getValor() != undefined);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵproperty"]("ngIf", ctx_r11.getValor() == undefined);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵproperty"]("ngIf", ctx_r11.getValor() < 0 || ctx_r11.getValor() > 100);
  }
}
function EditSrvBonificacionComponent_ng_template_48_div_0_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](0, "div", 32);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](1, " Cant. Items correcta ");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]();
  }
}
function EditSrvBonificacionComponent_ng_template_48_div_1_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](0, "div", 33);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](1, " Cant. items requerida ");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]();
  }
}
function EditSrvBonificacionComponent_ng_template_48_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtemplate"](0, EditSrvBonificacionComponent_ng_template_48_div_0_Template, 2, 0, "div", 16)(1, EditSrvBonificacionComponent_ng_template_48_div_1_Template, 2, 0, "div", 17);
  }
  if (rf & 2) {
    const ctx_r13 = _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵnextContext"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵproperty"]("ngIf", ctx_r13.getValor() != undefined);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵproperty"]("ngIf", ctx_r13.getValor() == undefined);
  }
}
class EditSrvBonificacionComponent {
  constructor(srvBonificacionService, fb, modal, vh, modalService) {
    this.srvBonificacionService = srvBonificacionService;
    this.fb = fb;
    this.modal = modal;
    this.vh = vh;
    this.modalService = modalService;
    this.tipoBonifOptions = [{
      id: 'F',
      nombre: 'Fecha de lista de precio'
    }, {
      id: 'N',
      nombre: 'Nominal'
    }, {
      id: 'P',
      nombre: 'Porcentaje de Bonificación'
    }];
    this.btnActivo = true;
    this.formGroup = this.fb.group({
      TipoValor: ['P', _angular_forms__WEBPACK_IMPORTED_MODULE_7__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_7__.Validators.required])],
      Valor: [0, _angular_forms__WEBPACK_IMPORTED_MODULE_7__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_7__.Validators.required, _angular_forms__WEBPACK_IMPORTED_MODULE_7__.Validators.min(0)])],
      FechaInicio: [(0,_core_utils_metodos_metodos__WEBPACK_IMPORTED_MODULE_1__.fechaActual)(), _angular_forms__WEBPACK_IMPORTED_MODULE_7__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_7__.Validators.required])],
      FechaFin: [''],
      Activa: [true, _angular_forms__WEBPACK_IMPORTED_MODULE_7__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_7__.Validators.required])],
      VigenciaIlimitada: [true, _angular_forms__WEBPACK_IMPORTED_MODULE_7__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_7__.Validators.required])],
      Observacion: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_7__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_7__.Validators.maxLength(200)])],
      FechaListaPrecio: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_7__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_7__.Validators.required])]
    });
    this._unsubscribe = [];
  }
  ngOnInit() {
    if (!this.bonificacion) {
      this.bonificacion = {
        Id: undefined,
        TipoValor: 'P',
        Valor: 0,
        FechaInicio: (0,_core_utils_metodos_metodos__WEBPACK_IMPORTED_MODULE_1__.formatFecha)((0,_core_utils_metodos_metodos__WEBPACK_IMPORTED_MODULE_1__.fechaActual)()),
        FechaFin: '',
        Activa: 'S',
        VigenciaIlimitada: 'S',
        Observacion: '',
        FechaListaPrecio: '',
        IdSrvContratado: this.servicioContratadoId
      };
    }
    this.loadForm();
    this._unsubscribe.push(this.formGroup.controls.TipoValor.valueChanges.subscribe(res => {
      if (res == 'F') {
        this.formGroup.get('Valor').disable();
        this.formGroup.get('FechaListaPrecio').enable();
      } else {
        this.formGroup.get('Valor').enable();
        this.formGroup.get('FechaListaPrecio').disable();
      }
    }));
  }
  ngOnDestroy() {
    this._unsubscribe.forEach(sb => sb.unsubscribe());
  }
  /**
   * Método que carga el formulario
   */
  loadForm() {
    if (this.bonificacion.Id !== undefined) {
      this.formGroup = this.fb.group({
        TipoValor: [this.bonificacion.TipoValor, _angular_forms__WEBPACK_IMPORTED_MODULE_7__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_7__.Validators.required])],
        Valor: [this.bonificacion.Valor, this.bonificacion.TipoValor == 'P' ? _angular_forms__WEBPACK_IMPORTED_MODULE_7__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_7__.Validators.required, _angular_forms__WEBPACK_IMPORTED_MODULE_7__.Validators.min(0), _angular_forms__WEBPACK_IMPORTED_MODULE_7__.Validators.max(100)]) : _angular_forms__WEBPACK_IMPORTED_MODULE_7__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_7__.Validators.required, _angular_forms__WEBPACK_IMPORTED_MODULE_7__.Validators.min(0)])],
        FechaInicio: [(0,_core_utils_metodos_metodos__WEBPACK_IMPORTED_MODULE_1__.formatFechaComp)(this.bonificacion.FechaInicio), _angular_forms__WEBPACK_IMPORTED_MODULE_7__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_7__.Validators.required])],
        FechaFin: [this.bonificacion.FechaFin == '' || this.bonificacion.FechaFin == null ? null : (0,_core_utils_metodos_metodos__WEBPACK_IMPORTED_MODULE_1__.formatFechaComp)(this.bonificacion.FechaFin)],
        Activa: [this.bonificacion.Activa == 'S', _angular_forms__WEBPACK_IMPORTED_MODULE_7__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_7__.Validators.required])],
        VigenciaIlimitada: [this.bonificacion.VigenciaIlimitada == 'S', _angular_forms__WEBPACK_IMPORTED_MODULE_7__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_7__.Validators.required])],
        Observacion: [this.bonificacion.Observacion, _angular_forms__WEBPACK_IMPORTED_MODULE_7__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_7__.Validators.maxLength(200)])],
        FechaListaPrecio: [this.bonificacion.FechaListaPrecio == '' || this.bonificacion.FechaListaPrecio == null ? null : (0,_core_utils_metodos_metodos__WEBPACK_IMPORTED_MODULE_1__.formatFechaComp)(this.bonificacion.FechaListaPrecio), _angular_forms__WEBPACK_IMPORTED_MODULE_7__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_7__.Validators.required])]
      });
    }
    //SP agrego la validacion correspondiente a fechaListaPrecio o valor dependiendo el tipo de valor
    if (this.formGroup.get('TipoValor').value == 'F') {
      this.formGroup.get('Valor').disable();
      this.formGroup.get('FechaListaPrecio').enable();
    } else {
      this.formGroup.get('Valor').enable();
      this.formGroup.get('FechaListaPrecio').disable();
      this.formGroup.setValidators(this.formGroup.get('TipoValor').value == 'P' ? _angular_forms__WEBPACK_IMPORTED_MODULE_7__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_7__.Validators.required, _angular_forms__WEBPACK_IMPORTED_MODULE_7__.Validators.min(0), _angular_forms__WEBPACK_IMPORTED_MODULE_7__.Validators.max(100)]) : _angular_forms__WEBPACK_IMPORTED_MODULE_7__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_7__.Validators.required, _angular_forms__WEBPACK_IMPORTED_MODULE_7__.Validators.min(0)]));
    }
    this.vh.inicializar();
    this.vh.formGroup = this.formGroup;
  }
  /**
   * Método que guarda los datos del formulario
   */
  save() {
    this.formGroup.markAllAsTouched();
    if (!this.formGroup.valid) {
      return;
    }
    //this.prepareServicio();
    if (this.bonificacion.Id) {
      this.edit(this.prepararBonificacion(), this.bonificacion.Id);
    } else {
      this.create(this.prepararBonificacion());
    }
  }
  /**
   * Método que edita una bonificacion
   */
  edit(bonificacion, id) {
    const sbUpdate = this.srvBonificacionService.editar(bonificacion, id).subscribe(res => {
      if (res.Errors == null) {
        this.modal.close();
      }
    });
    this._unsubscribe.push(sbUpdate);
  }
  /**
   * Método que crea una bonificacion
   */
  create(bonificacion) {
    this.btnActivo = false;
    const sbCreate = this.srvBonificacionService.nuevo(bonificacion).subscribe(res => {
      this.btnActivo = true;
      if (res.Errors == null) {
        this.modal.close();
      }
    });
    this._unsubscribe.push(sbCreate);
  }
  /**
   * Método que prepara los datos de la bonificacion
   */
  prepararBonificacion() {
    const formData = this.formGroup.value;
    const bonifEnvio = {
      TipoValor: formData.TipoValor,
      Valor: formData.TipoValor == 'F' ? null : formData.Valor,
      FechaInicio: (0,_core_utils_metodos_metodos__WEBPACK_IMPORTED_MODULE_1__.formatFecha)(formData.FechaInicio).concat(' 00:00:00'),
      FechaFin: formData.FechaFin == '' || formData.FechaFin == null ? null : (0,_core_utils_metodos_metodos__WEBPACK_IMPORTED_MODULE_1__.formatFecha)(formData.FechaFin).concat(' 00:00:00'),
      VigenciaIlimitada: formData.VigenciaIlimitada ? 'S' : 'N',
      Activa: formData.Activa ? 'S' : 'N',
      Observacion: formData.Observacion,
      FechaListaPrecio: formData.TipoValor != 'F' ? null : formData.FechaListaPrecio == '' || formData.FechaListaPrecio == null ? null : (0,_core_utils_metodos_metodos__WEBPACK_IMPORTED_MODULE_1__.formatFecha)(formData.FechaListaPrecio).concat(' 00:00:00'),
      IdSrvContratado: this.bonificacion.IdSrvContratado
    };
    return bonifEnvio;
  }
  getTipoBonificacion() {
    return this.formGroup.controls.TipoValor.value;
  }
  getVigenciaLimi() {
    return this.formGroup.controls.VigenciaIlimitada.value;
  }
  setVigenciaLimi() {
    this.formGroup.controls.VigenciaIlimitada.setValue(!this.getVigenciaLimi());
  }
  getActiva() {
    return this.formGroup.controls.Activa.value;
  }
  setActiva() {
    this.formGroup.controls.Activa.setValue(!this.getActiva());
  }
  getValor() {
    return this.formGroup.controls.Valor.value;
  }
  setValor(valor) {
    this.formGroup.controls.Valor.setValue(valor);
  }
  static #_ = this.ɵfac = function EditSrvBonificacionComponent_Factory(t) {
    return new (t || EditSrvBonificacionComponent)(_angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵdirectiveInject"](_core_services_servicios_srvBonificacion_service__WEBPACK_IMPORTED_MODULE_2__.SrvBonificacionService), _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵdirectiveInject"](_angular_forms__WEBPACK_IMPORTED_MODULE_7__.FormBuilder), _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵdirectiveInject"](_ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_8__.NgbActiveModal), _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵdirectiveInject"](src_app_core_services_core_viewHelper_service__WEBPACK_IMPORTED_MODULE_0__.ViewHelperService), _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵdirectiveInject"](_ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_8__.NgbModal));
  };
  static #_2 = this.ɵcmp = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵdefineComponent"]({
    type: EditSrvBonificacionComponent,
    selectors: [["app-edit-srv-bonificacion"]],
    inputs: {
      bonificacion: "bonificacion",
      servicioContratadoId: "servicioContratadoId",
      servicioContratadoNombre: "servicioContratadoNombre"
    },
    features: [_angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵProvidersFeature"]([src_app_core_services_core_viewHelper_service__WEBPACK_IMPORTED_MODULE_0__.ViewHelperService])],
    decls: 50,
    vars: 25,
    consts: [[1, "modal-content"], [1, "modal-header"], ["id", "example-modal-sizes-title-lg", 1, "modal-title", "h4"], [4, "ngIf"], [1, "overlay", "overlay-block", "cursor-default", "modal-body", 2, "min-height", "200px"], [1, "row"], [1, "col-lg-12", "p-2"], [1, "text-muted"], ["data-cy", "nro-serie-servicio", "type", "text", "name", "ServicioContratado", "disabled", "", 1, "form-control", "form-control-solid", 3, "ngModel"], ["action", "#", 1, "form", "form-label-right", 3, "formGroup"], [1, "col-lg-4", "p-2"], ["campoObligatorio", "", 1, "text-muted"], ["formControlName", "TipoValor", 1, "form-select"], [3, "value", 4, "ngFor", "ngForOf"], ["class", "col-lg-4 p-2", 4, "ngIf"], ["type", "date", "name", "FechaInicio", "formControlName", "FechaInicio", 1, "form-control", "form-control-digits"], ["class", "valid-feedback", 4, "ngIf"], ["class", "invalid-feedback animate__animated animate__shakeX", 4, "ngIf"], ["type", "date", "name", "FechaFin", "formControlName", "FechaFin", 1, "form-control", "form-control-digits"], [1, "col-lg-4", "p-2", "align-self-center"], ["title", "Vigencia Ilimitada", "colorChecked", "success", "colorUncheked", "danger", 3, "value", "emitAction"], ["title", "Activa", "colorChecked", "success", "colorUncheked", "danger", 3, "value", "emitAction"], ["rows", "2", "name", "Observacion", "formControlName", "Observacion", 1, "form-control", "form-control-solid"], [1, "modal-footer"], ["type", "button", 1, "btn", "btn-light", "btn-elevate", "mr-2", 3, "click"], ["PERCENT_ERRORS", ""], ["NOMINAL_ERRORS", ""], [3, "value"], [1, "input-group"], ["limite", "100", "decimals", "2", "suffix", "%", 3, "value", "isInvalid", "isValid", "templateErrors", "emitValue"], ["limite", "100", "decimals", "0", 3, "value", "isInvalid", "isValid", "templateErrors", "emitValue"], ["type", "date", "name", "FechaListaPrecio", "formControlName", "FechaListaPrecio", "autocomplete", "off", 1, "form-control", "form-control-digits"], [1, "valid-feedback"], [1, "invalid-feedback", "animate__animated", "animate__shakeX"], ["type", "submit", 1, "btn", "btn-success", "btn-elevate", 3, "disabled", "click"], ["Class", "bx bx-sync bx-spin font-size-16 align-middle", 4, "ngIf"], ["Class", "bx bx-sync bx-spin font-size-16 align-middle"]],
    template: function EditSrvBonificacionComponent_Template(rf, ctx) {
      if (rf & 1) {
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](0, "div", 0)(1, "div", 1)(2, "div", 2);
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtemplate"](3, EditSrvBonificacionComponent_ng_container_3_Template, 4, 2, "ng-container", 3);
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]()();
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](4, "div", 4);
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementContainerStart"](5);
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](6, "div", 5)(7, "div", 6)(8, "label", 7);
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](9, "Servicio Contratado");
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelement"](10, "input", 8);
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]()();
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](11, "form", 9)(12, "div", 5)(13, "div", 10)(14, "label", 11);
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](15, "Tipo de Bonificaci\u00F3n");
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](16, "select", 12);
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtemplate"](17, EditSrvBonificacionComponent_option_17_Template, 2, 2, "option", 13);
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]()();
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtemplate"](18, EditSrvBonificacionComponent_div_18_Template, 5, 4, "div", 14)(19, EditSrvBonificacionComponent_div_19_Template, 4, 4, "div", 14)(20, EditSrvBonificacionComponent_div_20_Template, 6, 6, "div", 14);
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](21, "div", 10)(22, "label", 7);
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](23, "Fecha Inicio");
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelement"](24, "input", 15);
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtemplate"](25, EditSrvBonificacionComponent_div_25_Template, 2, 0, "div", 16)(26, EditSrvBonificacionComponent_div_26_Template, 2, 0, "div", 17);
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](27, "div", 10)(28, "label", 7);
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](29, "Fecha Fin");
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelement"](30, "input", 18);
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtemplate"](31, EditSrvBonificacionComponent_div_31_Template, 2, 0, "div", 16);
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](32, "div", 19)(33, "app-checkbox", 20);
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵlistener"]("emitAction", function EditSrvBonificacionComponent_Template_app_checkbox_emitAction_33_listener() {
          return ctx.setVigenciaLimi();
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]()();
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](34, "div", 19)(35, "app-checkbox", 21);
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵlistener"]("emitAction", function EditSrvBonificacionComponent_Template_app_checkbox_emitAction_35_listener() {
          return ctx.setActiva();
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]()();
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](36, "div", 6)(37, "label", 7);
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](38, "Observaci\u00F3n");
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelement"](39, "textarea", 22);
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtemplate"](40, EditSrvBonificacionComponent_div_40_Template, 2, 0, "div", 16)(41, EditSrvBonificacionComponent_div_41_Template, 2, 0, "div", 17);
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]()()();
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementContainerEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](42, "div", 23)(43, "button", 24);
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵlistener"]("click", function EditSrvBonificacionComponent_Template_button_click_43_listener() {
          return ctx.modal.dismiss();
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](44, " Cancelar ");
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtemplate"](45, EditSrvBonificacionComponent_ng_container_45_Template, 6, 6, "ng-container", 3);
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]()();
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtemplate"](46, EditSrvBonificacionComponent_ng_template_46_Template, 3, 3, "ng-template", null, 25, _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtemplateRefExtractor"])(48, EditSrvBonificacionComponent_ng_template_48_Template, 2, 2, "ng-template", null, 26, _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtemplateRefExtractor"]);
      }
      if (rf & 2) {
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"](3);
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵproperty"]("ngIf", ctx.bonificacion);
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"](7);
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵproperty"]("ngModel", ctx.servicioContratadoNombre);
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵproperty"]("formGroup", ctx.formGroup);
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"](6);
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵproperty"]("ngForOf", ctx.tipoBonifOptions);
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵproperty"]("ngIf", ctx.getTipoBonificacion() == "P");
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵproperty"]("ngIf", ctx.getTipoBonificacion() == "N");
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵproperty"]("ngIf", ctx.getTipoBonificacion() == "F");
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"](4);
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵclassProp"]("is-invalid", ctx.vh.isControlInvalid("FechaInicio"))("is-valid", ctx.vh.isControlValid("FechaInicio"));
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵproperty"]("ngIf", ctx.vh.isControlValid("FechaInicio"));
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵproperty"]("ngIf", ctx.vh.controlHasError("required", "FechaInicio"));
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"](4);
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵclassProp"]("is-valid", ctx.vh.isControlValid("FechaFin"));
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵproperty"]("ngIf", ctx.vh.isControlValid("FechaFin"));
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"](2);
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵproperty"]("value", ctx.getVigenciaLimi());
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"](2);
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵproperty"]("value", ctx.getActiva());
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"](4);
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵclassProp"]("is-invalid", ctx.vh.controlHasError("maxlength", "Observacion"))("is-valid", ctx.vh.isControlValid("Observacion"));
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵproperty"]("ngIf", ctx.vh.isControlValid("Observacion"));
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵproperty"]("ngIf", ctx.vh.controlHasError("maxlength", "Observacion"));
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"](4);
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵproperty"]("ngIf", ctx.bonificacion);
      }
    },
    dependencies: [_angular_common__WEBPACK_IMPORTED_MODULE_9__.NgForOf, _angular_common__WEBPACK_IMPORTED_MODULE_9__.NgIf, _core_directives_campo_obligatorio_directive__WEBPACK_IMPORTED_MODULE_3__.CampoObligatorioDirective, _angular_forms__WEBPACK_IMPORTED_MODULE_7__["ɵNgNoValidate"], _angular_forms__WEBPACK_IMPORTED_MODULE_7__.NgSelectOption, _angular_forms__WEBPACK_IMPORTED_MODULE_7__["ɵNgSelectMultipleOption"], _angular_forms__WEBPACK_IMPORTED_MODULE_7__.DefaultValueAccessor, _angular_forms__WEBPACK_IMPORTED_MODULE_7__.SelectControlValueAccessor, _angular_forms__WEBPACK_IMPORTED_MODULE_7__.NgControlStatus, _angular_forms__WEBPACK_IMPORTED_MODULE_7__.NgControlStatusGroup, _angular_forms__WEBPACK_IMPORTED_MODULE_7__.NgModel, _angular_forms__WEBPACK_IMPORTED_MODULE_7__.FormGroupDirective, _angular_forms__WEBPACK_IMPORTED_MODULE_7__.FormControlName, _shared_ui_checkbox_checkbox_component__WEBPACK_IMPORTED_MODULE_4__.CheckboxComponent, _shared_ui_input_number_input_number_component__WEBPACK_IMPORTED_MODULE_5__.InputNumberComponent, _angular_common__WEBPACK_IMPORTED_MODULE_9__.AsyncPipe]
  });
}

/***/ }),

/***/ 63903:
/*!******************************************************************************************************!*\
  !*** ./src/app/pages/servicios/srv-contratados/edit-srv-contratado/edit-srv-contratado.component.ts ***!
  \******************************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   EditSrvContratadoComponent: () => (/* binding */ EditSrvContratadoComponent)
/* harmony export */ });
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @angular/forms */ 56223);
/* harmony import */ var src_app_core_services_core_viewHelper_service__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! src/app/core/services/core/viewHelper.service */ 4506);
/* harmony import */ var src_app_pages_dashboards_core_seleccionar_cliente_seleccionar_cliente_component__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! src/app/pages/dashboards/core/seleccionar-cliente/seleccionar-cliente.component */ 45198);
/* harmony import */ var src_app_pages_dashboards_core_seleccionar_articulo_seleccionar_articulo_component__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! src/app/pages/dashboards/core/seleccionar-articulo/seleccionar-articulo.component */ 62656);
/* harmony import */ var _core_utils_metodos_metodos__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! src/app/core/utils/metodos/metodos */ 38002);
/* harmony import */ var src_app_core_utils_constantes_constantes_servicios__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! src/app/core/utils/constantes/constantes-servicios */ 50864);
/* harmony import */ var src_app_core_utils_validators_dateValidators__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! src/app/core/utils/validators/dateValidators */ 49545);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @angular/core */ 65879);
/* harmony import */ var _core_services_servicios_srvContratado_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../core/services/servicios/srvContratado.service */ 2158);
/* harmony import */ var _core_services_servicios_srvBonificacion_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../../core/services/servicios/srvBonificacion.service */ 53225);
/* harmony import */ var _ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @ng-bootstrap/ng-bootstrap */ 85406);
/* harmony import */ var src_app_core_services_configGeneral_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! src/app/core/services/configGeneral.service */ 99757);
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @angular/common */ 96814);
/* harmony import */ var _core_directives_campo_obligatorio_directive__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../../core/directives/campo-obligatorio.directive */ 61528);
/* harmony import */ var _shared_ui_checkbox_checkbox_component__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../../shared/ui/checkbox/checkbox.component */ 79468);
/* harmony import */ var _shared_ui_input_periodo_input_periodo_component__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../../shared/ui/input-periodo/input-periodo.component */ 77947);



















function EditSrvContratadoComponent_ng_container_3_ng_container_1_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementContainerStart"](0);
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵtext"](1, "Editar");
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementContainerEnd"]();
  }
}
function EditSrvContratadoComponent_ng_container_3_ng_container_2_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementContainerStart"](0);
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵtext"](1, "Duplicar");
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementContainerEnd"]();
  }
}
function EditSrvContratadoComponent_ng_container_3_ng_container_3_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementContainerStart"](0);
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵtext"](1, "Nuevo");
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementContainerEnd"]();
  }
}
function EditSrvContratadoComponent_ng_container_3_ng_container_5_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementContainerStart"](0);
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵtext"](1);
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementContainerEnd"]();
  }
  if (rf & 2) {
    const ctx_r23 = _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵnextContext"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵtextInterpolate2"]("'(", ctx_r23.servicio.ArticuloCodigo, ")", ctx_r23.servicio.Articulo, "'");
  }
}
function EditSrvContratadoComponent_ng_container_3_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementContainerStart"](0);
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵtemplate"](1, EditSrvContratadoComponent_ng_container_3_ng_container_1_Template, 2, 0, "ng-container", 3)(2, EditSrvContratadoComponent_ng_container_3_ng_container_2_Template, 2, 0, "ng-container", 3)(3, EditSrvContratadoComponent_ng_container_3_ng_container_3_Template, 2, 0, "ng-container", 3);
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵtext"](4, " Servicio Contratado ");
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵtemplate"](5, EditSrvContratadoComponent_ng_container_3_ng_container_5_Template, 2, 2, "ng-container", 3);
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementContainerEnd"]();
  }
  if (rf & 2) {
    const ctx_r0 = _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵnextContext"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵproperty"]("ngIf", ctx_r0.servicio.Id && !ctx_r0.esDuplicar);
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵproperty"]("ngIf", ctx_r0.servicio.Id && ctx_r0.esDuplicar);
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵproperty"]("ngIf", !ctx_r0.servicio.Id);
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵproperty"]("ngIf", ctx_r0.servicio.Id);
  }
}
function EditSrvContratadoComponent_a_13_Template(rf, ctx) {
  if (rf & 1) {
    const _r25 = _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵgetCurrentView"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementStart"](0, "a", 38);
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵlistener"]("click", function EditSrvContratadoComponent_a_13_Template_a_click_0_listener() {
      _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵrestoreView"](_r25);
      const ctx_r24 = _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵnextContext"]();
      return _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵresetView"](ctx_r24.borrarCliente("cliente"));
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelement"](1, "i", 39);
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementEnd"]();
  }
}
function EditSrvContratadoComponent_a_14_Template(rf, ctx) {
  if (rf & 1) {
    const _r27 = _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵgetCurrentView"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementStart"](0, "a", 40);
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵlistener"]("click", function EditSrvContratadoComponent_a_14_Template_a_click_0_listener() {
      _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵrestoreView"](_r27);
      const ctx_r26 = _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵnextContext"]();
      return _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵresetView"](ctx_r26.buscarCliente("cliente"));
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelement"](1, "i", 41);
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementEnd"]();
  }
}
function EditSrvContratadoComponent_a_20_Template(rf, ctx) {
  if (rf & 1) {
    const _r29 = _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵgetCurrentView"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementStart"](0, "a", 38);
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵlistener"]("click", function EditSrvContratadoComponent_a_20_Template_a_click_0_listener() {
      _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵrestoreView"](_r29);
      const ctx_r28 = _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵnextContext"]();
      return _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵresetView"](ctx_r28.borrarCliente("clienteFact"));
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelement"](1, "i", 39);
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementEnd"]();
  }
}
function EditSrvContratadoComponent_a_21_Template(rf, ctx) {
  if (rf & 1) {
    const _r31 = _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵgetCurrentView"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementStart"](0, "a", 40);
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵlistener"]("click", function EditSrvContratadoComponent_a_21_Template_a_click_0_listener() {
      _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵrestoreView"](_r31);
      const ctx_r30 = _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵnextContext"]();
      return _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵresetView"](ctx_r30.buscarCliente("clienteFact"));
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelement"](1, "i", 41);
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementEnd"]();
  }
}
function EditSrvContratadoComponent_a_27_Template(rf, ctx) {
  if (rf & 1) {
    const _r33 = _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵgetCurrentView"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementStart"](0, "a", 38);
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵlistener"]("click", function EditSrvContratadoComponent_a_27_Template_a_click_0_listener() {
      _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵrestoreView"](_r33);
      const ctx_r32 = _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵnextContext"]();
      return _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵresetView"](ctx_r32.borrarArticulo());
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelement"](1, "i", 39);
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementEnd"]();
  }
}
function EditSrvContratadoComponent_a_28_Template(rf, ctx) {
  if (rf & 1) {
    const _r35 = _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵgetCurrentView"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementStart"](0, "a", 40);
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵlistener"]("click", function EditSrvContratadoComponent_a_28_Template_a_click_0_listener() {
      _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵrestoreView"](_r35);
      const ctx_r34 = _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵnextContext"]();
      return _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵresetView"](ctx_r34.buscarArticulos());
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelement"](1, "i", 41);
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementEnd"]();
  }
}
function EditSrvContratadoComponent_div_33_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementStart"](0, "div", 42);
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵtext"](1, " Subconcepto correcto ");
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementEnd"]();
  }
}
function EditSrvContratadoComponent_div_34_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementStart"](0, "div", 43);
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵtext"](1, " Subconcepto no debe tener m\u00E1s de 100 caracteres ");
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementEnd"]();
  }
}
function EditSrvContratadoComponent_div_39_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementStart"](0, "div", 42);
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵtext"](1, " Fecha correcta ");
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementEnd"]();
  }
}
function EditSrvContratadoComponent_div_40_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementStart"](0, "div", 43);
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵtext"](1, " Fecha requerida ");
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementEnd"]();
  }
}
function EditSrvContratadoComponent_div_45_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementStart"](0, "div", 42);
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵtext"](1, " Fecha correcto ");
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementEnd"]();
  }
}
function EditSrvContratadoComponent_div_46_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementStart"](0, "div", 43);
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵtext"](1, " La fecha de finalizaci\u00F3n del servicio no puede ser menor a la fecha de alta ");
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementEnd"]();
  }
}
function EditSrvContratadoComponent_option_51_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementStart"](0, "option", 44);
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵtext"](1);
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementEnd"]();
  }
  if (rf & 2) {
    const fc_r36 = ctx.$implicit;
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵproperty"]("value", fc_r36.id);
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵtextInterpolate1"](" ", fc_r36.nombre, " ");
  }
}
function EditSrvContratadoComponent_div_64_Template(rf, ctx) {
  if (rf & 1) {
    const _r38 = _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵgetCurrentView"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementStart"](0, "div", 27)(1, "app-checkbox", 45);
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵlistener"]("emitAction", function EditSrvContratadoComponent_div_64_Template_app_checkbox_emitAction_1_listener() {
      _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵrestoreView"](_r38);
      const ctx_r37 = _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵnextContext"]();
      return _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵresetView"](ctx_r37.setDebitoAuto());
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementEnd"]()();
  }
  if (rf & 2) {
    const ctx_r14 = _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵnextContext"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵproperty"]("value", ctx_r14.getDebitoAuto())("disabled", ctx_r14.esVisualizar);
  }
}
function EditSrvContratadoComponent_div_69_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementStart"](0, "div", 42);
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵtext"](1, " Observaci\u00F3n correcta ");
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementEnd"]();
  }
}
function EditSrvContratadoComponent_div_70_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementStart"](0, "div", 43);
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵtext"](1, " Observaci\u00F3n no debe tener m\u00E1s de 200 caracteres ");
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementEnd"]();
  }
}
function EditSrvContratadoComponent_div_71_div_6_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementStart"](0, "div", 48);
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵtext"](1, " El servicio no tiene ninguna bonificaci\u00F3n asociada. ");
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementEnd"]();
  }
}
function EditSrvContratadoComponent_div_71_ng_container_7_div_1_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementStart"](0, "div", 50)(1, "label", 22);
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵtext"](2, "Porcentaje de bonificaci\u00F3n");
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelement"](3, "input", 56);
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵpipe"](4, "percent");
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementEnd"]();
  }
  if (rf & 2) {
    const ctx_r41 = _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵnextContext"](3);
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵadvance"](3);
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵproperty"]("ngModel", _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵpipeBind1"](4, 1, ctx_r41.bonificacion.Valor / 100));
  }
}
function EditSrvContratadoComponent_div_71_ng_container_7_div_2_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementStart"](0, "div", 50)(1, "label", 22);
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵtext"](2, "Nominal (Licencias bonificadas)");
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelement"](3, "input", 56);
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵpipe"](4, "number");
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementEnd"]();
  }
  if (rf & 2) {
    const ctx_r42 = _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵnextContext"](3);
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵadvance"](3);
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵproperty"]("ngModel", _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵpipeBind3"](4, 1, ctx_r42.bonificacion.Valor, "1.2-5", "es"));
  }
}
function EditSrvContratadoComponent_div_71_ng_container_7_div_3_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementStart"](0, "div", 50)(1, "label", 22);
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵtext"](2, "Fecha de Lista Precio");
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelement"](3, "input", 57);
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementEnd"]();
  }
  if (rf & 2) {
    const ctx_r43 = _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵnextContext"](3);
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵadvance"](3);
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵproperty"]("ngModel", ctx_r43.bonificacion.FechaListaPrecio);
  }
}
function EditSrvContratadoComponent_div_71_ng_container_7_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementContainerStart"](0);
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵtemplate"](1, EditSrvContratadoComponent_div_71_ng_container_7_div_1_Template, 5, 3, "div", 49)(2, EditSrvContratadoComponent_div_71_ng_container_7_div_2_Template, 5, 5, "div", 49)(3, EditSrvContratadoComponent_div_71_ng_container_7_div_3_Template, 4, 1, "div", 49);
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementStart"](4, "div", 50)(5, "label", 22);
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵtext"](6, "Fecha Inicio");
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelement"](7, "input", 51);
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementStart"](8, "div", 50)(9, "label", 22);
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵtext"](10, "Fecha Fin");
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelement"](11, "input", 52);
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementStart"](12, "div", 53);
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelement"](13, "app-checkbox", 54);
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementStart"](14, "div", 53);
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelement"](15, "app-checkbox", 55);
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementContainerEnd"]();
  }
  if (rf & 2) {
    const ctx_r40 = _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵnextContext"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵproperty"]("ngIf", ctx_r40.bonificacion.TipoValor == "P");
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵproperty"]("ngIf", ctx_r40.bonificacion.TipoValor == "N");
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵproperty"]("ngIf", ctx_r40.bonificacion.TipoValor == "F");
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵadvance"](4);
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵproperty"]("ngModel", ctx_r40.bonificacion.FechaInicio);
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵadvance"](4);
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵproperty"]("ngModel", ctx_r40.bonificacion.FechaFin);
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵproperty"]("value", ctx_r40.bonificacion.VigenciaIlimitada == "S");
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵproperty"]("value", ctx_r40.bonificacion.Activa == "S");
  }
}
function EditSrvContratadoComponent_div_71_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementStart"](0, "div", 4);
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementContainerStart"](1);
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementStart"](2, "div", 46)(3, "div", 33)(4, "div", 2);
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵtext"](5, " Bonificaci\u00F3n de Servicio Contratado ");
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementEnd"]()();
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵtemplate"](6, EditSrvContratadoComponent_div_71_div_6_Template, 2, 0, "div", 47)(7, EditSrvContratadoComponent_div_71_ng_container_7_Template, 16, 7, "ng-container", 3);
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementContainerEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementEnd"]();
  }
  if (rf & 2) {
    const ctx_r17 = _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵnextContext"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵadvance"](6);
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵproperty"]("ngIf", !ctx_r17.bonificacion);
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵproperty"]("ngIf", ctx_r17.bonificacion);
  }
}
function EditSrvContratadoComponent_button_73_Template(rf, ctx) {
  if (rf & 1) {
    const _r45 = _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵgetCurrentView"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementStart"](0, "button", 58);
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵlistener"]("click", function EditSrvContratadoComponent_button_73_Template_button_click_0_listener() {
      _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵrestoreView"](_r45);
      const ctx_r44 = _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵnextContext"]();
      return _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵresetView"](ctx_r44.modal.dismiss());
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵtext"](1, " Cancelar ");
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementEnd"]();
  }
}
function EditSrvContratadoComponent_ng_container_74_button_1_Template(rf, ctx) {
  if (rf & 1) {
    const _r49 = _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵgetCurrentView"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementStart"](0, "button", 61);
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵlistener"]("click", function EditSrvContratadoComponent_ng_container_74_button_1_Template_button_click_0_listener() {
      _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵrestoreView"](_r49);
      const ctx_r48 = _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵnextContext"](2);
      return _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵresetView"](ctx_r48.modal.dismiss());
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵtext"](1, " Aceptar ");
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementEnd"]();
  }
}
function EditSrvContratadoComponent_ng_container_74_button_2_i_3_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelement"](0, "i", 64);
  }
}
function EditSrvContratadoComponent_ng_container_74_button_2_Template(rf, ctx) {
  if (rf & 1) {
    const _r52 = _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵgetCurrentView"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementStart"](0, "button", 62);
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵlistener"]("click", function EditSrvContratadoComponent_ng_container_74_button_2_Template_button_click_0_listener() {
      _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵrestoreView"](_r52);
      const ctx_r51 = _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵnextContext"](2);
      return _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵresetView"](ctx_r51.save());
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵpipe"](1, "async");
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵtext"](2, " Guardar ");
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵtemplate"](3, EditSrvContratadoComponent_ng_container_74_button_2_i_3_Template, 1, 0, "i", 63);
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵpipe"](4, "async");
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementEnd"]();
  }
  if (rf & 2) {
    const ctx_r47 = _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵnextContext"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵproperty"]("disabled", ctx_r47.formGroup.invalid || _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵpipeBind1"](1, 2, ctx_r47.srvContratadoService.isLoading$));
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵadvance"](3);
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵproperty"]("ngIf", _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵpipeBind1"](4, 4, ctx_r47.srvContratadoService.isLoading$));
  }
}
function EditSrvContratadoComponent_ng_container_74_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementContainerStart"](0);
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵtemplate"](1, EditSrvContratadoComponent_ng_container_74_button_1_Template, 2, 0, "button", 59)(2, EditSrvContratadoComponent_ng_container_74_button_2_Template, 5, 6, "button", 60);
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementContainerEnd"]();
  }
  if (rf & 2) {
    const ctx_r19 = _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵnextContext"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵproperty"]("ngIf", ctx_r19.esVisualizar);
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵproperty"]("ngIf", !ctx_r19.esVisualizar);
  }
}
const _c0 = (a0, a1) => [a0, a1];
const _c1 = "El \u00FAltimo periodo de facturado no puede ser menor a la fecha de alta";
const _c2 = () => [_c1, "Periodo incompleto"];
/**
 * Modal que permite la edición y inserción de un servicio contratado
 */
class EditSrvContratadoComponent {
  constructor(srvContratadoService, srvBonificacionService, fb, modal, vh, modalService, configGral) {
    this.srvContratadoService = srvContratadoService;
    this.srvBonificacionService = srvBonificacionService;
    this.fb = fb;
    this.modal = modal;
    this.vh = vh;
    this.modalService = modalService;
    this.configGral = configGral;
    this.frecFactOptions = src_app_core_utils_constantes_constantes_servicios__WEBPACK_IMPORTED_MODULE_4__.frecFactSrvContratado;
    this.btnActivo = true;
    this.formGroup = this.fb.group({
      Cliente: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_13__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_13__.Validators.required])],
      IdCliente: [-1, _angular_forms__WEBPACK_IMPORTED_MODULE_13__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_13__.Validators.required, _angular_forms__WEBPACK_IMPORTED_MODULE_13__.Validators.min(0)])],
      Articulo: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_13__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_13__.Validators.required])],
      IdArticulo: [-1, _angular_forms__WEBPACK_IMPORTED_MODULE_13__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_13__.Validators.required, _angular_forms__WEBPACK_IMPORTED_MODULE_13__.Validators.min(0)])],
      ClienteFact: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_13__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_13__.Validators.required])],
      IdClienteFact: [-1, _angular_forms__WEBPACK_IMPORTED_MODULE_13__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_13__.Validators.required, _angular_forms__WEBPACK_IMPORTED_MODULE_13__.Validators.min(0)])],
      FrecuenciaFact: ['M', _angular_forms__WEBPACK_IMPORTED_MODULE_13__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_13__.Validators.required])],
      Vigente: [true, _angular_forms__WEBPACK_IMPORTED_MODULE_13__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_13__.Validators.required])],
      Observacion: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_13__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_13__.Validators.maxLength(200)])],
      MesAdelantado: [false, _angular_forms__WEBPACK_IMPORTED_MODULE_13__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_13__.Validators.required])],
      DebitoAutomatico: [false, _angular_forms__WEBPACK_IMPORTED_MODULE_13__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_13__.Validators.required])],
      Pausado: [false, _angular_forms__WEBPACK_IMPORTED_MODULE_13__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_13__.Validators.required])],
      Subconcepto: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_13__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_13__.Validators.maxLength(100)])],
      FechaAlta: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_13__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_13__.Validators.required])],
      FechaFin: [''],
      UltPeriodoFact: [null, (0,src_app_core_utils_validators_dateValidators__WEBPACK_IMPORTED_MODULE_5__.periodoIncompleto)()],
      FactActiva: ['S', _angular_forms__WEBPACK_IMPORTED_MODULE_13__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_13__.Validators.required])]
    });
    this._unsubscribe = [];
  }
  ngOnInit() {
    if (this.esVisualizar) {
      this.cargarBonificacion();
    }
    if (!this.servicio) {
      this.servicio = {
        Id: undefined,
        IdCliente: undefined,
        IdArticulo: undefined,
        IdClienteFact: undefined,
        FrecuenciaFact: 'M',
        Vigente: 'S',
        Observacion: '',
        UltimoPeriodoMes: '',
        UltimoPeriodoAnio: '',
        FechaAlta: '',
        FechaFin: '',
        Subconcepto: '',
        Pausado: 'N',
        DebitoAutomatico: 'N',
        MesAdelantado: 'N',
        FacturacionActiva: 'S',
        FueFacturado: false
      };
    }
    this.loadForm();
    this.formGroup.controls.FechaAlta.valueChanges.subscribe(value => {
      this.formGroup.controls.FechaFin.updateValueAndValidity();
      this.formGroup.controls.UltPeriodoFact.markAsTouched();
      this.formGroup.controls.UltPeriodoFact.updateValueAndValidity();
    });
  }
  ngOnDestroy() {
    this._unsubscribe.forEach(sb => sb.unsubscribe());
  }
  cargarBonificacion() {
    let datos = {
      IdsSrvContratados: this.servicio.Id
    };
    this.srvBonificacionService.fetch(datos).subscribe(data => {
      if (data.Data.length > 0) {
        this.bonificacion = data.Data[0];
        this.bonificacion.FechaInicio = this.bonificacion.FechaInicio != null ? (0,_core_utils_metodos_metodos__WEBPACK_IMPORTED_MODULE_3__.formatFechaComp)((0,_core_utils_metodos_metodos__WEBPACK_IMPORTED_MODULE_3__.fechaHoraAFechaDDMMYYYY)(this.bonificacion.FechaInicio)) : null;
        this.bonificacion.FechaFin = this.bonificacion.FechaFin != null ? (0,_core_utils_metodos_metodos__WEBPACK_IMPORTED_MODULE_3__.formatFechaComp)((0,_core_utils_metodos_metodos__WEBPACK_IMPORTED_MODULE_3__.fechaHoraAFechaDDMMYYYY)(this.bonificacion.FechaFin)) : null;
        if (this.bonificacion.TipoValor == 'F') {
          this.bonificacion.FechaListaPrecio = this.bonificacion.FechaListaPrecio != null ? (0,_core_utils_metodos_metodos__WEBPACK_IMPORTED_MODULE_3__.formatFechaComp)((0,_core_utils_metodos_metodos__WEBPACK_IMPORTED_MODULE_3__.fechaHoraAFechaDDMMYYYY)(this.bonificacion.FechaListaPrecio)) : null;
        }
      }
    });
  }
  /**
   * Método que carga el formulario
   */
  loadForm() {
    if (this.servicio.Id !== undefined) {
      this.formGroup = this.fb.group({
        Cliente: ['(' + this.servicio.ClienteCodigo + ') ' + this.servicio.Cliente, _angular_forms__WEBPACK_IMPORTED_MODULE_13__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_13__.Validators.required])],
        IdCliente: [this.servicio.IdCliente, _angular_forms__WEBPACK_IMPORTED_MODULE_13__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_13__.Validators.required, _angular_forms__WEBPACK_IMPORTED_MODULE_13__.Validators.min(0)])],
        Articulo: ['(' + this.servicio.ArticuloCodigo + ') ' + this.servicio.Articulo, _angular_forms__WEBPACK_IMPORTED_MODULE_13__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_13__.Validators.required])],
        IdArticulo: [this.servicio.IdArticulo, _angular_forms__WEBPACK_IMPORTED_MODULE_13__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_13__.Validators.required, _angular_forms__WEBPACK_IMPORTED_MODULE_13__.Validators.min(0)])],
        ClienteFact: ['(' + this.servicio.ClienteFactCodigo + ') ' + this.servicio.ClienteFact, _angular_forms__WEBPACK_IMPORTED_MODULE_13__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_13__.Validators.required])],
        IdClienteFact: [this.servicio.IdClienteFact, _angular_forms__WEBPACK_IMPORTED_MODULE_13__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_13__.Validators.required, _angular_forms__WEBPACK_IMPORTED_MODULE_13__.Validators.min(0)])],
        FrecuenciaFact: [this.servicio.FrecuenciaFact, _angular_forms__WEBPACK_IMPORTED_MODULE_13__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_13__.Validators.required])],
        Vigente: [this.servicio.Vigente == 'S' ? true : false, _angular_forms__WEBPACK_IMPORTED_MODULE_13__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_13__.Validators.required])],
        Observacion: [this.servicio.Observacion, _angular_forms__WEBPACK_IMPORTED_MODULE_13__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_13__.Validators.maxLength(200)])],
        MesAdelantado: [this.servicio.MesAdelantado == 'S' ? true : false, _angular_forms__WEBPACK_IMPORTED_MODULE_13__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_13__.Validators.required])],
        DebitoAutomatico: [this.servicio.DebitoAutomatico == 'S' ? true : false, _angular_forms__WEBPACK_IMPORTED_MODULE_13__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_13__.Validators.required])],
        Pausado: [this.servicio.Pausado == 'S' ? true : false, _angular_forms__WEBPACK_IMPORTED_MODULE_13__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_13__.Validators.required])],
        Subconcepto: [this.servicio.Subconcepto, _angular_forms__WEBPACK_IMPORTED_MODULE_13__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_13__.Validators.maxLength(100)])],
        FechaAlta: [{
          value: (0,_core_utils_metodos_metodos__WEBPACK_IMPORTED_MODULE_3__.formatFechaComp)(this.servicio.FechaAlta == null ? '' : this.servicio.FechaAlta),
          disabled: this.servicio.FueFacturado
        }, _angular_forms__WEBPACK_IMPORTED_MODULE_13__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_13__.Validators.required])],
        FechaFin: [(0,_core_utils_metodos_metodos__WEBPACK_IMPORTED_MODULE_3__.formatFechaComp)(this.servicio.FechaFin == null ? '' : this.servicio.FechaFin)],
        //SP SINWEB-344 se agregan nuevos campos
        UltPeriodoFact: [this.servicio.UltimoPeriodoAnio == null || this.servicio.UltimoPeriodoMes == null ? '' : this.servicio.UltimoPeriodoMes + '/' + this.servicio.UltimoPeriodoAnio],
        FactActiva: [this.servicio.FacturacionActiva == 'S' ? true : false, _angular_forms__WEBPACK_IMPORTED_MODULE_13__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_13__.Validators.required])]
      });
      this.formGroup.controls.UltPeriodoFact.setValidators([(0,src_app_core_utils_validators_dateValidators__WEBPACK_IMPORTED_MODULE_5__.periodoIncompleto)(), (0,src_app_core_utils_validators_dateValidators__WEBPACK_IMPORTED_MODULE_5__.fechaPosteriorValidator)('FechaAlta', 'mes')]);
      this.formGroup.controls.FechaFin.addValidators([(0,src_app_core_utils_validators_dateValidators__WEBPACK_IMPORTED_MODULE_5__.fechaPosteriorValidator)('FechaAlta')]);
      if (this.esVisualizar) {
        this.formGroup.disable();
      }
    }
    this.vh.inicializar();
    this.vh.formGroup = this.formGroup;
  }
  /**
   * Método que guarda los datos del formulario
   */
  save() {
    this.formGroup.markAllAsTouched();
    if (!this.formGroup.valid) {
      return;
    }
    //
    if (this.servicio.Id && !this.esDuplicar) {
      this.edit(this.prepareServicio(), this.servicio.Id);
    } else {
      this.create(this.prepareServicio());
    }
  }
  /**
   * Método que edita un servicio
   */
  edit(servicio, id) {
    const sbUpdate = this.srvContratadoService.editar(servicio, id).subscribe(res => {
      if (res.Errors == null) {
        this.modal.close();
      }
    });
    this._unsubscribe.push(sbUpdate);
  }
  /**
   * Método que crea un servicio
   */
  create(servicio) {
    this.btnActivo = false;
    const sbCreate = this.srvContratadoService.nuevo(servicio).subscribe(res => {
      this.btnActivo = true;
      if (res.Errors == null) {
        this.modal.close();
      }
    });
    this._unsubscribe.push(sbCreate);
  }
  /**
   * Método que prepara los datos del servicio
   */
  prepareServicio() {
    const formData = this.formGroup.value;
    const servicioEnvio = {
      IdCliente: formData.IdCliente,
      IdArticulo: formData.IdArticulo,
      IdClienteFact: formData.IdClienteFact,
      FrecuenciaFact: formData.FrecuenciaFact,
      Vigente: formData.Vigente ? 'S' : 'N',
      Observacion: formData.Observacion,
      MesAdelantado: formData.MesAdelantado ? 'S' : 'N',
      DebitoAutomatico: formData.DebitoAutomatico ? 'S' : 'N',
      Pausado: formData.Pausado ? 'S' : 'N',
      Subconcepto: formData.Subconcepto,
      FechaAlta: this.formGroup.controls.FechaAlta.value == undefined ? '' : (0,_core_utils_metodos_metodos__WEBPACK_IMPORTED_MODULE_3__.formatFecha)(this.formGroup.controls.FechaAlta.value).concat(' 00:00:00'),
      FechaFin: formData.FechaFin == '' ? '' : (0,_core_utils_metodos_metodos__WEBPACK_IMPORTED_MODULE_3__.formatFecha)(formData.FechaFin).concat(' 00:00:00'),
      UltimoPeriodoMes: this.formGroup.controls.UltPeriodoFact.value == null || this.formGroup.controls.UltPeriodoFact.value == '' ? null : this.formGroup.controls.UltPeriodoFact.value.split('/')[0],
      UltimoPeriodoAnio: this.formGroup.controls.UltPeriodoFact.value == null || this.formGroup.controls.UltPeriodoFact.value == '' ? null : this.formGroup.controls.UltPeriodoFact.value.split('/')[1],
      FacturacionActiva: formData.FactActiva ? 'S' : 'N',
      OrdenFact: this.servicio.OrdenFact
    };
    if (servicioEnvio.FechaAlta == '') {
      servicioEnvio.FechaAlta = null;
    }
    return servicioEnvio;
  }
  /**
   * SP Método para buscar artículos
   */
  buscarArticulos() {
    const modalRef = this.modalService.open(src_app_pages_dashboards_core_seleccionar_articulo_seleccionar_articulo_component__WEBPACK_IMPORTED_MODULE_2__.SeleccionarArticuloComponent, {
      size: 'xl',
      backdropClass: 'back-z-index',
      windowClass: 'modal-z-index',
      backdrop: 'static',
      keyboard: false,
      scrollable: true
    });
    modalRef.componentInstance.filtros = {
      FamiliasArticulo: {
        Ids: [this.configGral._config.FamiliaArtSrv].join(','),
        Ocultar: true
      }
    };
    modalRef.result.then(resolve => {
      if (resolve !== undefined) {
        this.formGroup.controls.IdArticulo.setValue(resolve.IdArticulo);
        this.formGroup.controls.Articulo.setValue(resolve.Articulo);
      }
    });
  }
  /**
   * Método get para obtener campo articulo
   * @returns {any} Artículo
   */
  getArticulo() {
    return this.formGroup.get('Articulo').value;
  }
  /**
   * Método para limpiar filtro
   */
  borrarArticulo() {
    this.formGroup.get('Articulo').reset('');
    this.formGroup.get('IdArticulo').reset(undefined);
  }
  buscarCliente(tipo) {
    const modalRef = this.modalService.open(src_app_pages_dashboards_core_seleccionar_cliente_seleccionar_cliente_component__WEBPACK_IMPORTED_MODULE_1__.SeleccionarClienteComponent, {
      size: 'xl',
      backdropClass: 'back-z-index',
      windowClass: 'modal-z-index',
      backdrop: 'static',
      keyboard: false,
      scrollable: true
    });
    modalRef.result.then(resolve => {
      if (resolve !== undefined) {
        if (tipo === 'clienteFact') {
          this.formGroup.controls.IdClienteFact.setValue(resolve.IdCliente);
          this.formGroup.controls.ClienteFact.setValue(resolve.Cliente);
        } else {
          this.formGroup.controls.IdCliente.setValue(resolve.IdCliente);
          this.formGroup.controls.Cliente.setValue(resolve.Cliente);
          this.formGroup.controls.IdClienteFact.setValue(resolve.IdCliente);
          this.formGroup.controls.ClienteFact.setValue(resolve.Cliente);
        }
      }
    });
  }
  /**
   * Método get para obtener campo de cliente o clienteFact
   * @returns {any} Artículo
   */
  getCliente(tipo) {
    if (tipo === 'clienteFact') {
      return this.formGroup.get('ClienteFact').value;
    } else {
      return this.formGroup.get('Cliente').value;
    }
  }
  /**
   * Método para limpiar filtro
   */
  borrarCliente(tipo) {
    if (tipo === 'clienteFact') {
      this.formGroup.get('ClienteFact').reset('');
      this.formGroup.get('IdClienteFact').reset(undefined);
    } else {
      this.formGroup.get('Cliente').reset('');
      this.formGroup.get('IdCliente').reset(undefined);
    }
  }
  getVigente() {
    return this.formGroup.controls.Vigente.value;
  }
  setVigente() {
    this.formGroup.controls.Vigente.setValue(!this.getVigente());
  }
  getPausado() {
    return this.formGroup.controls.Pausado.value;
  }
  setPausado() {
    this.formGroup.controls.Pausado.setValue(!this.getPausado());
  }
  getDebitoAuto() {
    return this.formGroup.controls.DebitoAutomatico.value;
  }
  setDebitoAuto() {
    this.formGroup.controls.DebitoAutomatico.setValue(!this.getDebitoAuto());
  }
  getMesAdelantado() {
    return this.formGroup.controls.MesAdelantado.value;
  }
  setMesAdelantado() {
    this.formGroup.controls.MesAdelantado.setValue(!this.getMesAdelantado());
  }
  getFactActiva() {
    return this.formGroup.controls.FactActiva.value;
  }
  setFactActiva() {
    this.formGroup.controls.FactActiva.setValue(!this.getFactActiva());
  }
  /**
   * SP SINWEB-599 Método para obtener el valor del campo UltPeriodoFact
   * @param value
   */
  setUltPeriodoFact(value) {
    this.formGroup.controls.UltPeriodoFact.setValue(value);
  }
  /**
   * SP SINWEB-599 Método para activar la validación del campo UltPeriodoFact
   */
  activateValidationUltPeriodoFact() {
    this.formGroup.controls.UltPeriodoFact.markAsTouched();
  }
  /**
   * SP SINWEB-599 Método para obtener el valor del campo UltPeriodoFact
   * @returns
   */
  getUltPeriodoFact() {
    return this.formGroup.controls.UltPeriodoFact.value;
  }
  static #_ = this.ɵfac = function EditSrvContratadoComponent_Factory(t) {
    return new (t || EditSrvContratadoComponent)(_angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵdirectiveInject"](_core_services_servicios_srvContratado_service__WEBPACK_IMPORTED_MODULE_6__.SrvContratadoService), _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵdirectiveInject"](_core_services_servicios_srvBonificacion_service__WEBPACK_IMPORTED_MODULE_7__.SrvBonificacionService), _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵdirectiveInject"](_angular_forms__WEBPACK_IMPORTED_MODULE_13__.FormBuilder), _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵdirectiveInject"](_ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_14__.NgbActiveModal), _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵdirectiveInject"](src_app_core_services_core_viewHelper_service__WEBPACK_IMPORTED_MODULE_0__.ViewHelperService), _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵdirectiveInject"](_ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_14__.NgbModal), _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵdirectiveInject"](src_app_core_services_configGeneral_service__WEBPACK_IMPORTED_MODULE_8__.ConfigGeneralService));
  };
  static #_2 = this.ɵcmp = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵdefineComponent"]({
    type: EditSrvContratadoComponent,
    selectors: [["app-edit-srv-contratado"]],
    inputs: {
      servicio: "servicio",
      esVisualizar: "esVisualizar",
      esDuplicar: "esDuplicar"
    },
    features: [_angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵProvidersFeature"]([src_app_core_services_core_viewHelper_service__WEBPACK_IMPORTED_MODULE_0__.ViewHelperService])],
    decls: 75,
    vars: 54,
    consts: [[1, "modal-content"], [1, "modal-header"], ["id", "example-modal-sizes-title-lg", 1, "modal-title", "h4"], [4, "ngIf"], [1, "overlay", "overlay-block", "cursor-default", "modal-body", 2, "min-height", "200px"], ["action", "#", 1, "form", "form-label-right", 3, "formGroup"], [1, "form-group", "row"], [1, "col-lg-6", "p-2"], ["campoObligatorio", "", 1, "form-label"], [1, "input-group"], ["type", "search", "formControlName", "Cliente", "placeholder", "Seleccionar Cliente", "readonly", "", 1, "form-control"], ["class", "btn btn-secondary", 3, "click", 4, "ngIf"], ["class", "btn btn-primary", 3, "click", 4, "ngIf"], ["type", "search", "formControlName", "ClienteFact", "placeholder", "Seleccionar Cliente a Facturar", "readonly", "", 1, "form-control"], ["type", "search", "formControlName", "Articulo", "placeholder", "Seleccionar Art\u00EDculo", "readonly", "", 1, "form-control"], [1, "form-label"], ["data-cy", "nro-serie-servicio", "type", "text", "name", "Subconcepto", "autocomplete", "off", "formControlName", "Subconcepto", 1, "form-control", "form-control-solid"], ["class", "valid-feedback", 4, "ngIf"], ["class", "invalid-feedback animate__animated animate__shakeX", 4, "ngIf"], [1, "col-lg-3", "p-2"], ["campoObligatorio", "", 1, "text-muted"], ["type", "date", "name", "FechaAlta", "formControlName", "FechaAlta", "autocomplete", "off", 1, "form-control", "form-control-digits"], [1, "text-muted"], ["type", "date", "name", "FechaFin", "formControlName", "FechaFin", "autocomplete", "off", 1, "form-control", "form-control-digits"], ["formControlName", "FrecuenciaFact", 1, "form-select"], [3, "value", 4, "ngFor", "ngForOf"], ["maxDate", "12/3000", 3, "valor", "showErrors", "errors", "msgErrors", "disabled", "valorEmit", "touchedEmit"], [1, "col-lg-3", "p-2", "align-self-center"], ["title", "Fact. Activa", "colorChecked", "success", "colorUncheked", "danger", "colorDisabled", "secondary", 3, "value", "disabled", "emitAction"], ["title", "Vigente", "colorChecked", "success", "colorUncheked", "danger", "colorDisabled", "secondary", 3, "value", "disabled", "emitAction"], ["title", "Pausado", "colorChecked", "success", "colorUncheked", "danger", "colorDisabled", "secondary", 3, "value", "disabled", "emitAction"], ["title", "Mes Adelantado", "colorChecked", "success", "colorUncheked", "danger", "colorDisabled", "secondary", 3, "value", "disabled", "emitAction"], ["class", "col-lg-3 p-2 align-self-center", 4, "ngIf"], [1, "col-lg-12", "p-2"], ["rows", "2", "name", "Observacion", "formControlName", "Observacion", 1, "form-control", "form-control-solid"], ["class", "overlay overlay-block cursor-default modal-body", "style", "min-height: 200px", 4, "ngIf"], [1, "modal-footer"], ["type", "button", "class", "btn btn-light btn-elevate mr-2", 3, "click", 4, "ngIf"], [1, "btn", "btn-secondary", 3, "click"], [1, "bx", "bx-x"], [1, "btn", "btn-primary", 3, "click"], [1, "bx", "bx-search-alt-2"], [1, "valid-feedback"], [1, "invalid-feedback", "animate__animated", "animate__shakeX"], [3, "value"], ["title", "D\u00E9bito Autom\u00E1tico", "colorChecked", "success", "colorUncheked", "danger", "colorDisabled", "secondary", 3, "value", "disabled", "emitAction"], [1, "row"], ["class", "col-lg-12 alert alert-warning py-3 px-2 text-center", "role", "alert", 4, "ngIf"], ["role", "alert", 1, "col-lg-12", "alert", "alert-warning", "py-3", "px-2", "text-center"], ["class", "col-lg-4 p-2", 4, "ngIf"], [1, "col-lg-4", "p-2"], ["type", "date", "name", "FechaInicioBonif", "disabled", "", 1, "form-control", "form-control-digits", 3, "ngModel"], ["type", "date", "name", "FechaFinBonif", "disabled", "", 1, "form-control", "form-control-digits", 3, "ngModel"], [1, "col-lg-4", "p-2", "align-self-center"], ["title", "Vigencia Ilimitada", "colorChecked", "success", "colorUncheked", "danger", "colorDisabled", "secondary", "disabled", "", 3, "value"], ["title", "Activa", "colorChecked", "success", "colorUncheked", "danger", "colorDisabled", "secondary", "disabled", "", 3, "value"], ["type", "text", "name", "Bonificacion", "disabled", "", 1, "form-control", "form-control-solid", 3, "ngModel"], ["type", "date", "name", "FechaListaBonif", "disabled", "", 1, "form-control", "form-control-digits", 3, "ngModel"], ["type", "button", 1, "btn", "btn-light", "btn-elevate", "mr-2", 3, "click"], ["type", "button", "class", "btn btn-success btn-elevate mr-2", 3, "click", 4, "ngIf"], ["type", "submit", "class", "btn btn-success btn-elevate", 3, "disabled", "click", 4, "ngIf"], ["type", "button", 1, "btn", "btn-success", "btn-elevate", "mr-2", 3, "click"], ["type", "submit", 1, "btn", "btn-success", "btn-elevate", 3, "disabled", "click"], ["Class", "bx bx-sync bx-spin font-size-16 align-middle", 4, "ngIf"], ["Class", "bx bx-sync bx-spin font-size-16 align-middle"]],
    template: function EditSrvContratadoComponent_Template(rf, ctx) {
      if (rf & 1) {
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementStart"](0, "div", 0)(1, "div", 1)(2, "div", 2);
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵtemplate"](3, EditSrvContratadoComponent_ng_container_3_Template, 6, 4, "ng-container", 3);
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementEnd"]()();
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementStart"](4, "div", 4);
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementContainerStart"](5);
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementStart"](6, "form", 5)(7, "div", 6)(8, "div", 7)(9, "label", 8);
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵtext"](10, "Cliente");
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementStart"](11, "div", 9);
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelement"](12, "input", 10);
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵtemplate"](13, EditSrvContratadoComponent_a_13_Template, 2, 0, "a", 11)(14, EditSrvContratadoComponent_a_14_Template, 2, 0, "a", 12);
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementEnd"]()();
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementStart"](15, "div", 7)(16, "label", 8);
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵtext"](17, "Cliente a Facturar");
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementStart"](18, "div", 9);
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelement"](19, "input", 13);
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵtemplate"](20, EditSrvContratadoComponent_a_20_Template, 2, 0, "a", 11)(21, EditSrvContratadoComponent_a_21_Template, 2, 0, "a", 12);
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementEnd"]()();
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementStart"](22, "div", 7)(23, "label", 8);
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵtext"](24, "Art\u00EDculo");
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementStart"](25, "div", 9);
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelement"](26, "input", 14);
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵtemplate"](27, EditSrvContratadoComponent_a_27_Template, 2, 0, "a", 11)(28, EditSrvContratadoComponent_a_28_Template, 2, 0, "a", 12);
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementEnd"]()();
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementStart"](29, "div", 7)(30, "label", 15);
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵtext"](31, "Subconcepto");
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelement"](32, "input", 16);
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵtemplate"](33, EditSrvContratadoComponent_div_33_Template, 2, 0, "div", 17)(34, EditSrvContratadoComponent_div_34_Template, 2, 0, "div", 18);
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementStart"](35, "div", 19)(36, "label", 20);
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵtext"](37, "Fecha Alta");
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelement"](38, "input", 21);
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵtemplate"](39, EditSrvContratadoComponent_div_39_Template, 2, 0, "div", 17)(40, EditSrvContratadoComponent_div_40_Template, 2, 0, "div", 18);
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementStart"](41, "div", 19)(42, "label", 22);
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵtext"](43, "Fecha Fin");
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelement"](44, "input", 23);
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵtemplate"](45, EditSrvContratadoComponent_div_45_Template, 2, 0, "div", 17)(46, EditSrvContratadoComponent_div_46_Template, 2, 0, "div", 18);
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementStart"](47, "div", 19)(48, "label", 20);
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵtext"](49, "Frecuencia de Facturaci\u00F3n");
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementStart"](50, "select", 24);
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵtemplate"](51, EditSrvContratadoComponent_option_51_Template, 2, 2, "option", 25);
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementEnd"]()();
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementStart"](52, "div", 19)(53, "label", 22);
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵtext"](54, "\u00DAltimo Periodo Fact.");
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementStart"](55, "app-input-periodo", 26);
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵlistener"]("valorEmit", function EditSrvContratadoComponent_Template_app_input_periodo_valorEmit_55_listener($event) {
          return ctx.setUltPeriodoFact($event);
        })("touchedEmit", function EditSrvContratadoComponent_Template_app_input_periodo_touchedEmit_55_listener() {
          return ctx.activateValidationUltPeriodoFact();
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementEnd"]()();
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementStart"](56, "div", 27)(57, "app-checkbox", 28);
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵlistener"]("emitAction", function EditSrvContratadoComponent_Template_app_checkbox_emitAction_57_listener() {
          return ctx.setFactActiva();
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementEnd"]()();
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementStart"](58, "div", 27)(59, "app-checkbox", 29);
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵlistener"]("emitAction", function EditSrvContratadoComponent_Template_app_checkbox_emitAction_59_listener() {
          return ctx.setVigente();
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementEnd"]()();
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementStart"](60, "div", 27)(61, "app-checkbox", 30);
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵlistener"]("emitAction", function EditSrvContratadoComponent_Template_app_checkbox_emitAction_61_listener() {
          return ctx.setPausado();
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementEnd"]()();
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementStart"](62, "div", 27)(63, "app-checkbox", 31);
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵlistener"]("emitAction", function EditSrvContratadoComponent_Template_app_checkbox_emitAction_63_listener() {
          return ctx.setMesAdelantado();
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementEnd"]()();
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵtemplate"](64, EditSrvContratadoComponent_div_64_Template, 2, 2, "div", 32);
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementStart"](65, "div", 33)(66, "label", 22);
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵtext"](67, "Observaci\u00F3n");
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelement"](68, "textarea", 34);
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵtemplate"](69, EditSrvContratadoComponent_div_69_Template, 2, 0, "div", 17)(70, EditSrvContratadoComponent_div_70_Template, 2, 0, "div", 18);
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementEnd"]()()();
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementContainerEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵtemplate"](71, EditSrvContratadoComponent_div_71_Template, 8, 2, "div", 35);
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementStart"](72, "div", 36);
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵtemplate"](73, EditSrvContratadoComponent_button_73_Template, 2, 0, "button", 37)(74, EditSrvContratadoComponent_ng_container_74_Template, 3, 2, "ng-container", 3);
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementEnd"]()();
      }
      if (rf & 2) {
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵadvance"](3);
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵproperty"]("ngIf", ctx.servicio);
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵadvance"](3);
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵproperty"]("formGroup", ctx.formGroup);
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵadvance"](7);
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵproperty"]("ngIf", ctx.getCliente("cliente") && !ctx.servicio.FueFacturado && !ctx.esVisualizar);
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵadvance"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵproperty"]("ngIf", !ctx.servicio.FueFacturado && !ctx.esVisualizar);
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵadvance"](6);
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵproperty"]("ngIf", ctx.getCliente("clienteFact") && !ctx.esVisualizar);
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵadvance"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵproperty"]("ngIf", !ctx.esVisualizar);
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵadvance"](6);
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵproperty"]("ngIf", ctx.getArticulo() && (!ctx.servicio.FueFacturado && !ctx.esVisualizar || ctx.esDuplicar));
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵadvance"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵproperty"]("ngIf", !ctx.servicio.FueFacturado && !ctx.esVisualizar || ctx.esDuplicar);
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵadvance"](4);
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵclassProp"]("is-invalid", ctx.vh.isControlInvalid("Subconcepto"))("is-valid", ctx.vh.isControlValid("Subconcepto"));
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵadvance"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵproperty"]("ngIf", ctx.vh.isControlValid("Subconcepto"));
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵadvance"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵproperty"]("ngIf", ctx.vh.controlHasError("maxlength", "Subconcepto"));
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵadvance"](4);
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵclassProp"]("is-invalid", ctx.vh.isControlInvalid("FechaAlta"))("is-valid", ctx.vh.isControlValid("FechaAlta"));
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵadvance"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵproperty"]("ngIf", ctx.vh.isControlValid("FechaAlta"));
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵadvance"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵproperty"]("ngIf", ctx.vh.controlHasError("required", "FechaAlta"));
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵadvance"](4);
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵclassProp"]("is-invalid", ctx.vh.isControlInvalid("FechaFin"))("is-valid", ctx.vh.isControlValid("FechaFin"));
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵadvance"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵproperty"]("ngIf", ctx.vh.isControlValid("FechaFin"));
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵadvance"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵproperty"]("ngIf", ctx.vh.controlHasError("fechaPosterior", "FechaFin"));
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵadvance"](5);
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵproperty"]("ngForOf", ctx.frecFactOptions);
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵadvance"](4);
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵproperty"]("valor", ctx.getUltPeriodoFact())("showErrors", true)("errors", _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵpureFunction2"](50, _c0, ctx.vh.controlHasError("fechaPosterior", "UltPeriodoFact"), ctx.vh.controlHasError("periodoIncompleto", "UltPeriodoFact")))("msgErrors", _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵpureFunction0"](53, _c2))("disabled", ctx.esVisualizar);
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵadvance"](2);
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵproperty"]("value", ctx.getFactActiva())("disabled", ctx.esVisualizar);
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵadvance"](2);
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵproperty"]("value", ctx.getVigente())("disabled", ctx.esVisualizar);
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵadvance"](2);
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵproperty"]("value", ctx.getPausado())("disabled", ctx.esVisualizar);
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵadvance"](2);
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵproperty"]("value", ctx.getMesAdelantado())("disabled", ctx.esVisualizar);
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵadvance"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵproperty"]("ngIf", ctx.getFactActiva());
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵadvance"](4);
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵclassProp"]("is-invalid", ctx.vh.controlHasError("maxlength", "Observacion"))("is-valid", ctx.vh.isControlValid("Observacion"));
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵadvance"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵproperty"]("ngIf", ctx.vh.isControlValid("Observacion"));
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵadvance"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵproperty"]("ngIf", ctx.vh.controlHasError("maxlength", "Observacion"));
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵadvance"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵproperty"]("ngIf", ctx.esVisualizar);
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵadvance"](2);
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵproperty"]("ngIf", !ctx.esVisualizar);
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵadvance"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵproperty"]("ngIf", ctx.servicio);
      }
    },
    dependencies: [_angular_common__WEBPACK_IMPORTED_MODULE_15__.NgForOf, _angular_common__WEBPACK_IMPORTED_MODULE_15__.NgIf, _core_directives_campo_obligatorio_directive__WEBPACK_IMPORTED_MODULE_9__.CampoObligatorioDirective, _angular_forms__WEBPACK_IMPORTED_MODULE_13__["ɵNgNoValidate"], _angular_forms__WEBPACK_IMPORTED_MODULE_13__.NgSelectOption, _angular_forms__WEBPACK_IMPORTED_MODULE_13__["ɵNgSelectMultipleOption"], _angular_forms__WEBPACK_IMPORTED_MODULE_13__.DefaultValueAccessor, _angular_forms__WEBPACK_IMPORTED_MODULE_13__.SelectControlValueAccessor, _angular_forms__WEBPACK_IMPORTED_MODULE_13__.NgControlStatus, _angular_forms__WEBPACK_IMPORTED_MODULE_13__.NgControlStatusGroup, _angular_forms__WEBPACK_IMPORTED_MODULE_13__.NgModel, _angular_forms__WEBPACK_IMPORTED_MODULE_13__.FormGroupDirective, _angular_forms__WEBPACK_IMPORTED_MODULE_13__.FormControlName, _shared_ui_checkbox_checkbox_component__WEBPACK_IMPORTED_MODULE_10__.CheckboxComponent, _shared_ui_input_periodo_input_periodo_component__WEBPACK_IMPORTED_MODULE_11__.InputPeriodoComponent, _angular_common__WEBPACK_IMPORTED_MODULE_15__.AsyncPipe, _angular_common__WEBPACK_IMPORTED_MODULE_15__.DecimalPipe, _angular_common__WEBPACK_IMPORTED_MODULE_15__.PercentPipe],
    styles: [".p-inputtext {\n  padding-bottom: 8px !important;\n  padding-top: 8px !important;\n}\n\n  .p-overlaypanel.p-component {\n  z-index: 1056 !important;\n}"]
  });
}

/***/ }),

/***/ 11683:
/*!******************************************************************************!*\
  !*** ./src/app/pages/servicios/srv-contratados/srv-contratados.component.ts ***!
  \******************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   SrvContratadosComponent: () => (/* binding */ SrvContratadosComponent)
/* harmony export */ });
/* harmony import */ var src_app_core_utils_constantes_constantes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! src/app/core/utils/constantes/constantes */ 74506);
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! @angular/forms */ 56223);
/* harmony import */ var src_app_core_services_alertCustom_service__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! src/app/core/services/alertCustom.service */ 53206);
/* harmony import */ var src_app_core_utils_constantes_constantes_servicios__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../core/utils/constantes/constantes-servicios */ 50864);
/* harmony import */ var src_app_core_utils_permisos_permisos_servicios__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! src/app/core/utils/permisos/permisos-servicios */ 52788);
/* harmony import */ var _edit_srv_contratado_edit_srv_contratado_component__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./edit-srv-contratado/edit-srv-contratado.component */ 63903);
/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! rxjs/operators */ 37398);
/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! rxjs/operators */ 99397);
/* harmony import */ var src_app_core_utils_metodos_metodos__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! src/app/core/utils/metodos/metodos */ 38002);
/* harmony import */ var src_app_pages_dashboards_core_seleccionar_articulo_seleccionar_articulo_component__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! src/app/pages/dashboards/core/seleccionar-articulo/seleccionar-articulo.component */ 62656);
/* harmony import */ var src_app_pages_dashboards_core_seleccionar_cliente_seleccionar_cliente_component__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! src/app/pages/dashboards/core/seleccionar-cliente/seleccionar-cliente.component */ 45198);
/* harmony import */ var _edit_srv_bonificacion_edit_srv_bonificacion_component__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./edit-srv-bonificacion/edit-srv-bonificacion.component */ 41003);
/* harmony import */ var _movimientos_movimiento_edit_movimiento_edit_component__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../movimientos/movimiento-edit/movimiento-edit.component */ 64282);
/* harmony import */ var _movimientos_movimientos_component__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../movimientos/movimientos.component */ 50328);
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! lodash */ 6990);
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_11__);
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! @angular/common */ 96814);
/* harmony import */ var src_app_core_utils_validators_dateValidators__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! src/app/core/utils/validators/dateValidators */ 49545);
/* harmony import */ var _angular_common_locales_es_AR__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! @angular/common/locales/es-AR */ 57414);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! @angular/core */ 65879);
/* harmony import */ var ngx_toastr__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ngx-toastr */ 2425);
/* harmony import */ var _ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! @ng-bootstrap/ng-bootstrap */ 85406);
/* harmony import */ var src_app_core_services_exportacion_service__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! src/app/core/services/exportacion.service */ 18969);
/* harmony import */ var _core_services_servicios_srvContratado_service__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../core/services/servicios/srvContratado.service */ 2158);
/* harmony import */ var _core_services_servicios_srvBonificacion_service__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../../core/services/servicios/srvBonificacion.service */ 53225);
/* harmony import */ var src_app_core_services_stateful_service__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! src/app/core/services/stateful.service */ 689);
/* harmony import */ var src_app_core_services_auth_service__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! src/app/core/services/auth.service */ 90304);
/* harmony import */ var ngx_ui_tour_ng_bootstrap__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ngx-ui-tour-ng-bootstrap */ 58469);
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! @angular/router */ 75187);
/* harmony import */ var src_app_core_services_configGeneral_service__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! src/app/core/services/configGeneral.service */ 99757);
/* harmony import */ var primeng_accordion__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! primeng/accordion */ 65389);
/* harmony import */ var ngx_mask__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ngx-mask */ 43735);
/* harmony import */ var primeng_sidebar__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! primeng/sidebar */ 99246);
/* harmony import */ var _shared_widget_tour_tour_component__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../../shared/widget/tour/tour.component */ 63481);
/* harmony import */ var _shared_ui_table2_table2_component__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../../shared/ui/table2/table2.component */ 63033);
/* harmony import */ var _shared_ui_input_periodo_input_periodo_component__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../../shared/ui/input-periodo/input-periodo.component */ 77947);






































function SrvContratadosComponent_ng_template_3_Template(rf, ctx) {}
function SrvContratadosComponent_div_4_ng_template_3_Template(rf, ctx) {}
function SrvContratadosComponent_div_4_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementStart"](0, "div", 47)(1, "div", 48)(2, "div", 49);
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵtemplate"](3, SrvContratadosComponent_div_4_ng_template_3_Template, 0, 0, "ng-template", 3);
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementEnd"]()()();
  }
  if (rf & 2) {
    const ctx_r1 = _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵnextContext"]();
    const _r9 = _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵreference"](75);
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵproperty"]("formGroup", ctx_r1.filterForm);
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵproperty"]("ngTemplateOutlet", _r9);
  }
}
function SrvContratadosComponent_a_16_Template(rf, ctx) {
  if (rf & 1) {
    const _r12 = _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵgetCurrentView"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementStart"](0, "a", 50);
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵlistener"]("click", function SrvContratadosComponent_a_16_Template_a_click_0_listener() {
      _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵrestoreView"](_r12);
      const ctx_r11 = _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵnextContext"]();
      return _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵresetView"](ctx_r11.cargaMasivaSrv());
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementStart"](1, "span", 51);
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵtext"](2, "Cargar Servicios");
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelement"](3, "i", 52);
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementEnd"]();
  }
}
function SrvContratadosComponent_a_44_Template(rf, ctx) {
  if (rf & 1) {
    const _r14 = _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵgetCurrentView"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementStart"](0, "a", 53);
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵlistener"]("click", function SrvContratadosComponent_a_44_Template_a_click_0_listener() {
      _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵrestoreView"](_r14);
      const ctx_r13 = _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵnextContext"]();
      return _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵresetView"](ctx_r13.borrarCliente("cliente"));
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelement"](1, "i", 54);
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementEnd"]();
  }
}
function SrvContratadosComponent_a_50_Template(rf, ctx) {
  if (rf & 1) {
    const _r16 = _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵgetCurrentView"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementStart"](0, "a", 53);
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵlistener"]("click", function SrvContratadosComponent_a_50_Template_a_click_0_listener() {
      _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵrestoreView"](_r16);
      const ctx_r15 = _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵnextContext"]();
      return _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵresetView"](ctx_r15.borrarCliente("clienteFact"));
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelement"](1, "i", 54);
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementEnd"]();
  }
}
function SrvContratadosComponent_a_56_Template(rf, ctx) {
  if (rf & 1) {
    const _r18 = _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵgetCurrentView"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementStart"](0, "a", 53);
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵlistener"]("click", function SrvContratadosComponent_a_56_Template_a_click_0_listener() {
      _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵrestoreView"](_r18);
      const ctx_r17 = _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵnextContext"]();
      return _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵresetView"](ctx_r17.borrarArticulo());
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelement"](1, "i", 54);
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementEnd"]();
  }
}
function SrvContratadosComponent_a_62_Template(rf, ctx) {
  if (rf & 1) {
    const _r20 = _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵgetCurrentView"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementStart"](0, "a", 53);
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵlistener"]("click", function SrvContratadosComponent_a_62_Template_a_click_0_listener() {
      _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵrestoreView"](_r20);
      const ctx_r19 = _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵnextContext"]();
      return _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵresetView"](ctx_r19.borrarNumero());
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelement"](1, "i", 54);
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementEnd"]();
  }
}
function SrvContratadosComponent_a_68_Template(rf, ctx) {
  if (rf & 1) {
    const _r22 = _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵgetCurrentView"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementStart"](0, "a", 53);
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵlistener"]("click", function SrvContratadosComponent_a_68_Template_a_click_0_listener() {
      _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵrestoreView"](_r22);
      const ctx_r21 = _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵnextContext"]();
      return _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵresetView"](ctx_r21.borrarObs());
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelement"](1, "i", 54);
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementEnd"]();
  }
}
function SrvContratadosComponent_ng_template_74_option_7_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementStart"](0, "option", 76);
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵtext"](1);
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementEnd"]();
  }
  if (rf & 2) {
    const fc_r29 = ctx.$implicit;
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵproperty"]("value", fc_r29.id);
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵtextInterpolate1"](" ", fc_r29.nombre, " ");
  }
}
function SrvContratadosComponent_ng_template_74_option_13_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementStart"](0, "option", 76);
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵtext"](1);
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementEnd"]();
  }
  if (rf & 2) {
    const fc_r30 = ctx.$implicit;
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵproperty"]("value", fc_r30.id);
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵtextInterpolate1"](" ", fc_r30.nombre, " ");
  }
}
function SrvContratadosComponent_ng_template_74_option_19_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementStart"](0, "option", 76);
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵtext"](1);
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementEnd"]();
  }
  if (rf & 2) {
    const fc_r31 = ctx.$implicit;
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵproperty"]("value", fc_r31.id);
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵtextInterpolate1"](" ", fc_r31.nombre, " ");
  }
}
function SrvContratadosComponent_ng_template_74_option_25_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementStart"](0, "option", 76);
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵtext"](1);
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementEnd"]();
  }
  if (rf & 2) {
    const fc_r32 = ctx.$implicit;
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵproperty"]("value", fc_r32.id);
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵtextInterpolate1"](" ", fc_r32.nombre, " ");
  }
}
function SrvContratadosComponent_ng_template_74_option_31_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementStart"](0, "option", 76);
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵtext"](1);
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementEnd"]();
  }
  if (rf & 2) {
    const fc_r33 = ctx.$implicit;
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵproperty"]("value", fc_r33.id);
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵtextInterpolate1"](" ", fc_r33.nombre, " ");
  }
}
function SrvContratadosComponent_ng_template_74_option_37_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementStart"](0, "option", 76);
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵtext"](1);
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementEnd"]();
  }
  if (rf & 2) {
    const fc_r34 = ctx.$implicit;
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵproperty"]("value", fc_r34.id);
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵtextInterpolate1"](" ", fc_r34.nombre, " ");
  }
}
const _c0 = () => [0];
function SrvContratadosComponent_ng_template_74_Template(rf, ctx) {
  if (rf & 1) {
    const _r36 = _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵgetCurrentView"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementStart"](0, "div", 22)(1, "p-accordion", 55)(2, "p-accordionTab", 56)(3, "div")(4, "p", 57);
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵtext"](5, "Frecuencia de facturaci\u00F3n");
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementStart"](6, "select", 58);
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵtemplate"](7, SrvContratadosComponent_ng_template_74_option_7_Template, 2, 2, "option", 59);
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementEnd"]()();
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelement"](8, "hr", 60);
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementStart"](9, "div")(10, "p", 57);
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵtext"](11, "Bonificados");
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementStart"](12, "select", 61);
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵtemplate"](13, SrvContratadosComponent_ng_template_74_option_13_Template, 2, 2, "option", 59);
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementEnd"]()();
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelement"](14, "hr", 60);
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementStart"](15, "div")(16, "p", 57);
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵtext"](17, "Vigente");
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementStart"](18, "select", 62);
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵtemplate"](19, SrvContratadosComponent_ng_template_74_option_19_Template, 2, 2, "option", 59);
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementEnd"]()();
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelement"](20, "hr", 60);
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementStart"](21, "div")(22, "p", 57);
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵtext"](23, "Pausado");
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementStart"](24, "select", 63);
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵtemplate"](25, SrvContratadosComponent_ng_template_74_option_25_Template, 2, 2, "option", 59);
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementEnd"]()();
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelement"](26, "hr", 60);
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementStart"](27, "div")(28, "p", 57);
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵtext"](29, "D\u00E9bito Auto.");
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementStart"](30, "select", 64);
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵtemplate"](31, SrvContratadosComponent_ng_template_74_option_31_Template, 2, 2, "option", 59);
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementEnd"]()();
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelement"](32, "hr", 60);
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementStart"](33, "div")(34, "p", 57);
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵtext"](35, "Mes Adelantado");
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementStart"](36, "select", 65);
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵtemplate"](37, SrvContratadosComponent_ng_template_74_option_37_Template, 2, 2, "option", 59);
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementEnd"]()()();
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementStart"](38, "p-accordionTab", 66)(39, "div", 67)(40, "p", 57);
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵtext"](41, "\u00CDtems Vigentes");
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementStart"](42, "label", 68);
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵtext"](43, "Hasta");
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelement"](44, "input", 69);
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementStart"](45, "div", 67)(46, "p", 57);
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵtext"](47, "\u00DAltimo Periodo");
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementStart"](48, "label", 70);
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵtext"](49, "Desde");
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementStart"](50, "app-input-periodo", 71);
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵlistener"]("valorEmit", function SrvContratadosComponent_ng_template_74_Template_app_input_periodo_valorEmit_50_listener($event) {
      _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵrestoreView"](_r36);
      const ctx_r35 = _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵnextContext"]();
      return _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵresetView"](ctx_r35.setPeriodoDesde($event));
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementStart"](51, "label", 70);
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵtext"](52, "Hasta");
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementStart"](53, "app-input-periodo", 71);
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵlistener"]("valorEmit", function SrvContratadosComponent_ng_template_74_Template_app_input_periodo_valorEmit_53_listener($event) {
      _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵrestoreView"](_r36);
      const ctx_r37 = _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵnextContext"]();
      return _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵresetView"](ctx_r37.setPeriodoHasta($event));
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementEnd"]()();
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementStart"](54, "div", 67)(55, "p", 57);
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵtext"](56, "Fecha Alta");
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementStart"](57, "label", 70);
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵtext"](58, "Desde");
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelement"](59, "input", 72);
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementStart"](60, "label", 70);
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵtext"](61, "Hasta");
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelement"](62, "input", 73);
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementStart"](63, "div", 67)(64, "p", 57);
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵtext"](65, "Fecha Fin");
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementStart"](66, "label", 70);
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵtext"](67, "Desde");
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelement"](68, "input", 74);
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementStart"](69, "label", 70);
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵtext"](70, "Hasta");
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelement"](71, "input", 75);
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementEnd"]()()()();
  }
  if (rf & 2) {
    const ctx_r8 = _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵnextContext"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵproperty"]("formGroup", ctx_r8.filterForm);
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵproperty"]("multiple", true)("activeIndex", _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵpureFunction0"](11, _c0));
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵadvance"](6);
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵproperty"]("ngForOf", ctx_r8.frecFactOptions);
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵadvance"](6);
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵproperty"]("ngForOf", ctx_r8.todosOptions);
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵadvance"](6);
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵproperty"]("ngForOf", ctx_r8.todosOptions);
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵadvance"](6);
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵproperty"]("ngForOf", ctx_r8.todosOptions);
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵadvance"](6);
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵproperty"]("ngForOf", ctx_r8.todosOptions);
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵadvance"](6);
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵproperty"]("ngForOf", ctx_r8.todosOptions);
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵadvance"](13);
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵproperty"]("valor", ctx_r8.getPeriodoDesde());
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵadvance"](3);
    _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵproperty"]("valor", ctx_r8.getPeriodoHasta());
  }
}
class SrvContratadosComponent {
  constructor(fb, toast, modalService, alert, exportacion, srvContratadoService, srvBonificacionService, sf, authService, tourService, router, configGral) {
    this.fb = fb;
    this.toast = toast;
    this.modalService = modalService;
    this.alert = alert;
    this.exportacion = exportacion;
    this.srvContratadoService = srvContratadoService;
    this.srvBonificacionService = srvBonificacionService;
    this.sf = sf;
    this.authService = authService;
    this.tourService = tourService;
    this.router = router;
    this.configGral = configGral;
    this.serviciosContratados = [];
    //SP SINWEB-319 Ahora se cargan aca los puntos de venta
    this.puntosDeVenta = [];
    this.total = [];
    this.filtro = true;
    this.filtroMobile = false;
    this._unsubscribe = [];
    //paginacion
    this.cantSearch = src_app_core_utils_constantes_constantes__WEBPACK_IMPORTED_MODULE_0__.CANT_SEARCH;
    //SP arreglo paginas seleccionables pasadas al app-select component
    this.pageOptions = src_app_core_utils_constantes_constantes__WEBPACK_IMPORTED_MODULE_0__.PAGE_OPTIONS;
    this.order = 10;
    this.sentido = src_app_core_utils_constantes_constantes__WEBPACK_IMPORTED_MODULE_0__.INIT_SENTIDO;
    this.totalItems = 0;
    //permisos
    this.permisoInsSrv = false;
    this.permisoModSrv = false;
    this.permisoBajaSrv = false;
    this.permisosSRV = {
      PermisoInsSrv: false,
      PermisoModSrv: false,
      PermisoBajaSrv: false,
      linea1: false,
      PermisoInsBoni: true,
      PermisoModBoni: true,
      PermisoElimBobi: true,
      linea2: true,
      PermisoInsSrvMov: true
    };
    /**
     * SP SINWEB-344 se migro serviciosHeader a otro archivo para poder reutilizarlo , se agrego variable para cargar cookies de config
     */
    this.serviciosHeader = src_app_core_utils_constantes_constantes_servicios__WEBPACK_IMPORTED_MODULE_2__.servContratadosHeader;
    this.dropdownActions = src_app_core_utils_constantes_constantes_servicios__WEBPACK_IMPORTED_MODULE_2__.actionSrvContratado;
    this.frecFactOptions = [{
      id: '',
      nombre: 'Todos'
    }, {
      id: 'A',
      nombre: 'Anual'
    }, {
      id: 'B',
      nombre: 'Bimestral'
    }, {
      id: 'M',
      nombre: 'Mensual'
    }, {
      id: 'S',
      nombre: 'Semestral'
    }];
    this.todosOptions = [{
      id: '',
      nombre: 'Todos'
    }, {
      id: 'S',
      nombre: 'Si'
    }, {
      id: 'N',
      nombre: 'No'
    }];
    this.searchForm = this.fb.group({
      //subconcepto: [''],
      /**
       * SP SINWEB-318 se agrega nuevo campo de busqueda
       */
      observacion: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_23__.Validators.maxLength(200)],
      cliente: [],
      clienteId: [''],
      clienteFact: [],
      clienteFactId: [''],
      articulo: [],
      articuloId: [''],
      numeroSrv: ['']
    });
    this.filterForm = this.fb.group({
      FrecFact: [''],
      Bonificado: [''],
      Vigente: ['S'],
      FechaItemsHasta: [''],
      PeriodoDesde: ['', (0,src_app_core_utils_validators_dateValidators__WEBPACK_IMPORTED_MODULE_12__.periodoIncompleto)()],
      PeriodoHasta: ['', (0,src_app_core_utils_validators_dateValidators__WEBPACK_IMPORTED_MODULE_12__.periodoIncompleto)()],
      FechaAltaDesde: [''],
      FechaAltaHasta: [''],
      FechaFinDesde: [''],
      FechaFinHasta: [''],
      Pausado: [''],
      DebitoAutomatico: [''],
      MesAdelantado: ['']
    });
  }
  ngOnInit() {
    (0,_angular_common__WEBPACK_IMPORTED_MODULE_24__.registerLocaleData)(_angular_common_locales_es_AR__WEBPACK_IMPORTED_MODULE_25__["default"], 'es-AR');
    /**
     * SP SINWEB-344 carga del estado para obtener cookies de configuracion de la tabla
     */
    this.stateInicioConfig = this.sf.pagenamesSERV.SRV_CONTRATADOS_STATES;
    this.page = 1;
    this.previousPage = 1;
    this.inicializarSteps();
    this.cargarPermisos();
    this.inicializarEstado();
    this.configuracionFilter();
    this.loadPage();
    this.controlarTour();
  }
  ngOnDestroy() {
    this._unsubscribe.forEach(sb => sb.unsubscribe());
  }
  /**
   * PM Inicializa el estado de los componentes que permite almacenar su estado
   */
  inicializarEstado() {
    this.sf.states = this.sf.pagenamesSERV.SRV_CONTRATADOS_STATES;
    //busqueda
    /**
     * SP SINWEB-318 se agrega busqueda por observacion y se quita por subconcepto
     */
    this.searchForm.controls.observacion.setValue(this.sf.getState(this.sf.states.SRV_CONTRATADO_S_OBSERVACION));
    this.buscarObs = this.sf.getState(this.sf.states.SRV_CONTRATADO_S_OBSERVACION);
    this.searchForm.controls.numeroSrv.setValue(this.sf.getState(this.sf.states.SRV_CONTRATADO_S_NUMERO));
    this.buscarNumSrv = this.sf.getState(this.sf.states.SRV_CONTRATADO_S_NUMERO);
    // this.searchForm.controls.subconcepto.setValue(this.sf.getState(this.sf.states.SRV_CONTRATADO_S_SUBCONCEPTO));
    // this.buscarSubconcepto = this.sf.getState(this.sf.states.SRV_CONTRATADO_S_SUBCONCEPTO);
    this.searchForm.controls.clienteId.setValue(this.sf.getState(this.sf.states.SRV_CONTRATADO_S_CLIENTEID));
    this.searchForm.controls.cliente.setValue(this.sf.getState(this.sf.states.SRV_CONTRATADO_S_CLIENTE));
    this.searchForm.controls.clienteFactId.setValue(this.sf.getState(this.sf.states.SRV_CONTRATADO_S_CLIENTEFACTID));
    this.searchForm.controls.clienteFact.setValue(this.sf.getState(this.sf.states.SRV_CONTRATADO_S_CLIENTEFACT));
    this.searchForm.controls.articulo.setValue(this.sf.getState(this.sf.states.SRV_CONTRATADO_S_ARTICULO));
    this.searchForm.controls.articuloId.setValue(this.sf.getState(this.sf.states.SRV_CONTRATADO_S_ARTICULOID));
    //filtros
    this.filterFrecFact = this.sf.getState(this.sf.states.SRV_CONTRATADO_F_FRECFACT);
    this.filterForm.controls.FrecFact.setValue(this.filterFrecFact);
    /**
     * SP SINWEB-318 se agrega nuevo filtro bonificacion
     */
    this.filterBonif = this.sf.getState(this.sf.states.SRV_CONTRATADO_F_BONIF);
    this.filterForm.controls.Bonificado.setValue(this.filterBonif);
    this.filterVigente = this.sf.getState(this.sf.states.SRV_CONTRATADO_F_VIGENTE);
    this.filterForm.controls.Vigente.setValue(this.filterVigente);
    this.filterPeriodoDesde = this.sf.getState(this.sf.states.SRV_CONTRATADO_F_PERIODO_DESDE);
    this.filterForm.controls.PeriodoDesde.setValue(this.filterPeriodoDesde);
    this.filterPeriodoHasta = this.sf.getState(this.sf.states.SRV_CONTRATADO_F_PERIODO_HASTA);
    this.filterForm.controls.PeriodoHasta.setValue(this.filterPeriodoHasta);
    this.filterFechaItemsHasta = this.sf.getState(this.sf.states.SRV_CONTRATADO_F_FECHA_ITEMS_HASTA);
    this.filterForm.controls.FechaItemsHasta.setValue(this.filterFechaItemsHasta);
    this.filterFechaAltaDesde = this.sf.getState(this.sf.states.SRV_CONTRATADO_F_FECHA_ALTA_DESDE);
    this.filterForm.controls.FechaAltaDesde.setValue(this.filterFechaAltaDesde);
    this.filterFechaAltaHasta = this.sf.getState(this.sf.states.SRV_CONTRATADO_F_FECHA_ALTA_HASTA);
    this.filterForm.controls.FechaAltaHasta.setValue(this.filterFechaAltaHasta);
    this.filterFechaFinDesde = this.sf.getState(this.sf.states.SRV_CONTRATADO_F_FECHA_FIN_DESDE);
    this.filterForm.controls.FechaFinDesde.setValue(this.filterFechaFinDesde);
    this.filterFechaFinHasta = this.sf.getState(this.sf.states.SRV_CONTRATADO_F_FECHA_FIN_HASTA);
    this.filterForm.controls.FechaFinHasta.setValue(this.filterFechaFinHasta);
    this.filterPausado = this.sf.getState(this.sf.states.SRV_CONTRATADO_F_PAUSADO);
    this.filterForm.controls.Pausado.setValue(this.filterPausado);
    this.filterDebitoAuto = this.sf.getState(this.sf.states.SRV_CONTRATADO_F_DEBITO_AUTOMATICO);
    this.filterForm.controls.DebitoAutomatico.setValue(this.filterDebitoAuto);
    this.filterMesAdelantado = this.sf.getState(this.sf.states.SRV_CONTRATADO_F_MES_ADELANTADO);
    this.filterForm.controls.MesAdelantado.setValue(this.filterMesAdelantado);
    //listado
    this.page = Number(this.sf.getState(this.sf.states.SRV_CONTRATADO_L_PAGE));
    this.cantSearch = Number(this.sf.getState(this.sf.states.SRV_CONTRATADO_L_PAGESIZE));
    this.order = Number(this.sf.getState(this.sf.states.SRV_CONTRATADO_L_ORDER));
    this.sentido = this.sf.getState(this.sf.states.SRV_CONTRATADO_L_SENTIDO);
  }
  /**
   * Método para escuchar a los cambios en el formulario de filtros
   */
  configuracionFilter() {
    this._unsubscribe.push(this.filterForm.controls.FrecFact.valueChanges.subscribe(fc => {
      if (this.filtro || this.filtroMobile) {
        this.filterFrecFact = fc;
        this.page = 1;
        this.loadPage();
      }
    }));
    /**
     * SP SINWEB-318 se agrega nuevo filtro bonificacion
     */
    this._unsubscribe.push(this.filterForm.controls.Bonificado.valueChanges.subscribe(bonif => {
      if (this.filtro || this.filtroMobile) {
        this.filterBonif = bonif;
        this.page = 1;
        this.loadPage();
      }
    }));
    this._unsubscribe.push(this.filterForm.controls.Vigente.valueChanges.subscribe(vig => {
      if (this.filtro || this.filtroMobile) {
        this.filterVigente = vig;
        this.page = 1;
        this.loadPage();
      }
    }));
    this._unsubscribe.push(this.filterForm.controls.PeriodoDesde.valueChanges.subscribe(desde => {
      if (this.filtro || this.filtroMobile) {
        //SP SINWEB-599 control de periodo incompleto
        if (this.filterForm.controls.PeriodoDesde.valid) {
          this.filterPeriodoDesde = desde;
          this.page = 1;
          this.loadPage();
        }
      }
    }));
    this._unsubscribe.push(this.filterForm.controls.PeriodoHasta.valueChanges.subscribe(hasta => {
      if (this.filtro || this.filtroMobile) {
        //SP SINWEB-599 control de periodo incompleto
        if (this.filterForm.controls.PeriodoHasta.valid) {
          this.filterPeriodoHasta = hasta;
          this.page = 1;
          this.loadPage();
        }
      }
    }));
    this._unsubscribe.push(this.filterForm.controls.FechaAltaDesde.valueChanges.subscribe(desde => {
      if (this.filtro || this.filtroMobile) {
        this.filterFechaAltaDesde = desde;
        this.page = 1;
        this.loadPage();
      }
    }));
    this._unsubscribe.push(this.filterForm.controls.FechaItemsHasta.valueChanges.subscribe(itemsHasta => {
      if (this.filtro || this.filtroMobile) {
        this.filterFechaItemsHasta = itemsHasta;
        this.page = 1;
        this.loadPage();
      }
    }));
    this._unsubscribe.push(this.filterForm.controls.FechaAltaHasta.valueChanges.subscribe(hasta => {
      if (this.filtro || this.filtroMobile) {
        this.filterFechaAltaHasta = hasta;
        this.page = 1;
        this.loadPage();
      }
    }));
    this._unsubscribe.push(this.filterForm.controls.Pausado.valueChanges.subscribe(pausado => {
      if (this.filtro || this.filtroMobile) {
        this.filterPausado = pausado;
        this.page = 1;
        this.loadPage();
      }
    }));
    this._unsubscribe.push(this.filterForm.controls.DebitoAutomatico.valueChanges.subscribe(debitoAuto => {
      if (this.filtro || this.filtroMobile) {
        this.filterDebitoAuto = debitoAuto;
        this.page = 1;
        this.loadPage();
      }
    }));
    this._unsubscribe.push(this.filterForm.controls.MesAdelantado.valueChanges.subscribe(mesAdelantado => {
      if (this.filtro || this.filtroMobile) {
        this.filterMesAdelantado = mesAdelantado;
        this.page = 1;
        this.loadPage();
      }
    }));
    this._unsubscribe.push(this.filterForm.controls.FechaFinDesde.valueChanges.subscribe(desde => {
      if (this.filtro || this.filtroMobile) {
        this.filterFechaFinDesde = desde;
        this.page = 1;
        this.loadPage();
      }
    }));
    this._unsubscribe.push(this.filterForm.controls.FechaFinHasta.valueChanges.subscribe(hasta => {
      if (this.filtro || this.filtroMobile) {
        this.filterFechaFinHasta = hasta;
        this.page = 1;
        this.loadPage();
      }
    }));
  }
  /**
   * Método para limpiar los filtros
   */
  cleanStates() {
    this.sf.cleanAllStates();
    this.resetComp();
  }
  /**
   * SP metodo llamado pro clean estate que reinicia los estados y filtros
   */
  resetComp() {
    this._unsubscribe.forEach(sub => {
      sub.unsubscribe();
    });
    this.page = 1;
    this.previousPage = 1;
    this.buscarObs = '';
    this.buscarNumSrv = '';
    this.inicializarEstado();
    this.configuracionFilter();
    this.loadPage();
  }
  cargarPermisos() {
    this.permisosSRV.PermisoInsSrv = this.authService.hasPermiso(src_app_core_utils_permisos_permisos_servicios__WEBPACK_IMPORTED_MODULE_3__.PERMISO_INS_SRV_CONTRATADOS);
    this.permisosSRV.PermisoModSrv = this.authService.hasPermiso(src_app_core_utils_permisos_permisos_servicios__WEBPACK_IMPORTED_MODULE_3__.PERMISO_MODIF_SRV_CONTRATADOS);
    this.permisosSRV.PermisoBajaSrv = this.authService.hasPermiso(src_app_core_utils_permisos_permisos_servicios__WEBPACK_IMPORTED_MODULE_3__.PERMISO_BAJA_SRV_CONTRATADOS);
    this.permisosSRV.PermisoInsSrvMov = this.authService.hasPermiso(src_app_core_utils_permisos_permisos_servicios__WEBPACK_IMPORTED_MODULE_3__.PERMISO_INS_MOV);
    /**
     * SP SINWEB-320 nuevo permiso para admin de movimientos
     */
    this.permisosSRV.PermisoAdmSrvMov = this.authService.hasPermiso(src_app_core_utils_permisos_permisos_servicios__WEBPACK_IMPORTED_MODULE_3__.PERMISO_LIS_MOVIMIENTOS);
    this.permisosSRV.PermisoInsBonif = this.authService.hasPermiso(src_app_core_utils_permisos_permisos_servicios__WEBPACK_IMPORTED_MODULE_3__.PERMISO_INS_BONIF_SRV_CONTRATADO);
    this.permisosSRV.PermisoModBonif = this.authService.hasPermiso(src_app_core_utils_permisos_permisos_servicios__WEBPACK_IMPORTED_MODULE_3__.PERMISO_MODIF_BONIF_SRV_CONTRATADO);
    this.permisosSRV.PermisoElimBonif = this.authService.hasPermiso(src_app_core_utils_permisos_permisos_servicios__WEBPACK_IMPORTED_MODULE_3__.PERMISO_ELIM_BONIF_SRV_CONTRATADO);
    this.permisosSRV.Linea1 = (this.permisosSRV.PermisoModSrv || this.permisosSRV.PermisoBajaSrv) && (this.permisosSRV.PermisoInsBonif || this.permisosSRV.PermisoModBonif || this.permisosSRV.PermisoElimBonif);
    this.permisosSRV.Linea2 = (this.permisosSRV.PermisoInsBonif || this.permisosSRV.PermisoModBonif || this.permisosSRV.PermisoElimBonif) && (this.permisosSRV.PermisoAdmSrvMov || this.permisosSRV.PermivoInsSrvMov);
    this.dropdownActions[1]['Show'] = this.permisosSRV.PermisoModSrv;
    this.dropdownActions[2]['Show'] = this.permisosSRV.PermisoBajaSrv;
    this.dropdownActions[3]['Show'] = this.permisosSRV.PermisoInsSrv;
    this.dropdownActions[4]['Show'] = this.permisosSRV.Linea1;
    this.dropdownActions[5]['Show'] = this.permisosSRV.PermisoInsBonif;
    this.dropdownActions[6]['Show'] = this.permisosSRV.PermisoModBonif;
    this.dropdownActions[7]['Show'] = this.permisosSRV.PermisoElimBonif;
    this.dropdownActions[8]['Show'] = this.permisosSRV.Linea2;
    /**
     * SP SINWEB-320 nuevo permiso para admin de movimientos
     */
    this.dropdownActions[9]['Show'] = this.permisosSRV.PermisoAdmSrvMov;
    this.dropdownActions[10]['Show'] = this.permisosSRV.PermisoInsSrvMov;
  }
  /**
   * Método para cargar los datos de la página
   */
  loadPage() {
    this.onSearch(this.cargarFiltros(this.page, this.order, this.sentido));
  }
  /**
   * Método que trae las máquinas del servicio
   * @param {object} datos Datos de búsqueda
   */
  onSearch(datos) {
    const susc = this.srvContratadoService.fetch(datos).pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_26__.map)(resp => {
      return {
        Data: lodash__WEBPACK_IMPORTED_MODULE_11__.map(resp.Data, value => lodash__WEBPACK_IMPORTED_MODULE_11__.extend(value, {
          Bonificado: value.Bonificacion ? 'S' : 'N'
        })),
        TotalRecords: resp.TotalRecords
      };
    })).subscribe(data => {
      this.serviciosContratados = data.Data;
      if (data != undefined) {
        this.totalItems = data.TotalRecords;
      } else {
        this.totalItems = 0;
      }
    });
    susc.unsubscribe;
  }
  /**
   * Método que carga los filtros de búsqueda para realizar la petición
   * @param {any} page Página actual
   * @param {any} order Orden
   * @param {any} sentido Sentido (ascendente o descendente)
   * @returns {object} Datos de búsqueda
   */
  cargarFiltros(page, order, sentido) {
    let datos = {};
    //paginacion
    datos.PageNumber = page;
    datos.PageSize = this.cantSearch;
    //SP SINWEB-38 parametros de orden
    datos.Orden = order;
    datos.SentidoOrden = sentido;
    //busqueda
    /**
     * SP SINWEB-318 busqueda por subconcepto se cambia por observacion
     */
    if (this.buscarObs != undefined && this.buscarObs != '') {
      datos.Observacion = this.buscarObs;
    }
    if (this.buscarNumSrv != undefined && this.buscarNumSrv != '') {
      datos.NroSrvContratado = this.buscarNumSrv.length < 8 ? this.buscarNumSrv.padStart(8, '0') : this.buscarNumSrv;
    }
    //filtros
    if (this.filterFrecFact != undefined && this.filterFrecFact != '') {
      datos.FrecuenciaFact = this.filterFrecFact;
    }
    if (this.filterDebitoAuto != undefined && this.filterDebitoAuto != '') {
      datos.DebitoAutomatico = this.filterDebitoAuto;
    }
    if (this.filterMesAdelantado != undefined && this.filterMesAdelantado != '') {
      datos.MesAdelantado = this.filterMesAdelantado;
    }
    if (this.filterPeriodoDesde != undefined && this.filterPeriodoDesde != '') {
      datos.UltimoPeriodoDesde = this.filterPeriodoDesde;
    }
    if (this.filterPeriodoHasta != undefined && this.filterPeriodoHasta != '') {
      datos.UltimoPeriodoHasta = this.filterPeriodoHasta;
    }
    if (this.filterPausado != undefined && this.filterPausado != '') {
      datos.Pausado = this.filterPausado;
    }
    /**
     * SP SINWEB-318 nuevo filtro bonif
     */
    if (this.filterBonif != undefined && this.filterBonif != '') {
      datos.TieneBonificacion = this.filterBonif;
    }
    if (this.filterVigente != undefined && this.filterVigente != '') {
      datos.Vigente = this.filterVigente;
    }
    if (this.filterFechaItemsHasta != undefined && this.filterFechaItemsHasta != '') {
      datos.FechaReferenciaParaCantidadItems = (0,src_app_core_utils_metodos_metodos__WEBPACK_IMPORTED_MODULE_5__.formatFecha)(this.filterFechaItemsHasta).concat(' 23:59');
    }
    if (this.filterFechaAltaDesde != undefined && this.filterFechaAltaDesde != '') {
      datos.FechaAltaDesde = (0,src_app_core_utils_metodos_metodos__WEBPACK_IMPORTED_MODULE_5__.formatFecha)(this.filterFechaAltaDesde).concat(' 00:00');
    }
    if (this.filterFechaAltaHasta != undefined && this.filterFechaAltaHasta != '') {
      datos.FechaAltaHasta = (0,src_app_core_utils_metodos_metodos__WEBPACK_IMPORTED_MODULE_5__.formatFecha)(this.filterFechaAltaHasta).concat(' 23:59');
    }
    if (this.filterFechaFinDesde != undefined && this.filterFechaFinDesde != '') {
      datos.FechaFinDesde = (0,src_app_core_utils_metodos_metodos__WEBPACK_IMPORTED_MODULE_5__.formatFecha)(this.filterFechaFinDesde).concat(' 00:00');
    }
    if (this.filterFechaFinHasta != undefined && this.filterFechaFinHasta != '') {
      datos.FechaFinHasta = (0,src_app_core_utils_metodos_metodos__WEBPACK_IMPORTED_MODULE_5__.formatFecha)(this.filterFechaFinHasta).concat(' 23:59');
    }
    if (this.searchForm.controls.articuloId.value != undefined && this.searchForm.controls.articuloId.value != '') {
      datos.IdsArticulo = this.searchForm.controls.articuloId.value;
    }
    if (this.searchForm.controls.clienteFactId.value != undefined && this.searchForm.controls.clienteFactId.value != '') {
      datos.IdsClienteFact = this.searchForm.controls.clienteFactId.value;
    }
    if (this.searchForm.controls.clienteId.value != undefined && this.searchForm.controls.clienteId.value != '') {
      datos.IdsCliente = this.searchForm.controls.clienteId.value;
    }
    //Almacenar el cambio de estado de los componentes
    if (datos.PageNumber != -1) {
      this.changeStates(datos);
    }
    return datos;
  }
  /**
   * PM SINWEB-93 Método que realiza el cambio de los estados segun los valores elegidos
   * @param {any} datos Datos de búsqueda
   */
  changeStates(datos) {
    //busqueda
    // this.sf.changeState(this.sf.states.SRV_CONTRATADO_S_SUBCONCEPTO,(!datos.Subconcepto ? this.sf.states.SRV_CONTRATADO_S_SUBCONCEPTO.default : datos.Subconcepto));
    this.sf.changeState(this.sf.states.SRV_CONTRATADO_S_OBSERVACION, !datos.Observacion ? this.sf.states.SRV_CONTRATADO_S_OBSERVACION.default : datos.Observacion);
    this.sf.changeState(this.sf.states.SRV_CONTRATADO_S_NUMERO, !datos.NroSrvContratado ? this.sf.states.SRV_CONTRATADO_S_NUMERO.default : datos.NroSrvContratado);
    this.sf.changeState(this.sf.states.SRV_CONTRATADO_S_ARTICULOID, !datos.IdsArticulo ? this.sf.states.SRV_CONTRATADO_S_ARTICULOID.default : datos.IdsArticulo);
    this.sf.changeState(this.sf.states.SRV_CONTRATADO_S_ARTICULO, !datos.IdsArticulo ? this.sf.states.SRV_CONTRATADO_S_ARTICULO.default : this.searchForm.controls.articulo?.value);
    this.sf.changeState(this.sf.states.SRV_CONTRATADO_S_CLIENTEID, !datos.IdsCliente ? this.sf.states.SRV_CONTRATADO_S_CLIENTEID.default : datos.IdsCliente);
    this.sf.changeState(this.sf.states.SRV_CONTRATADO_S_CLIENTE, !datos.IdsCliente ? this.sf.states.SRV_CONTRATADO_S_CLIENTE.default : this.searchForm.controls.cliente?.value);
    this.sf.changeState(this.sf.states.SRV_CONTRATADO_S_CLIENTEFACTID, !datos.IdsClienteFact ? this.sf.states.SRV_CONTRATADO_S_CLIENTEFACTID.default : datos.IdsClienteFact);
    this.sf.changeState(this.sf.states.SRV_CONTRATADO_S_CLIENTEFACT, !datos.IdsClienteFact ? this.sf.states.SRV_CONTRATADO_S_CLIENTEFACT.default : this.searchForm.controls.clienteFact?.value);
    //filtros
    this.sf.changeState(this.sf.states.SRV_CONTRATADO_F_FRECFACT, !datos.FrecuenciaFact ? this.sf.states.SRV_CONTRATADO_F_FRECFACT.default : datos.FrecuenciaFact);
    this.sf.changeState(this.sf.states.SRV_CONTRATADO_F_DEBITO_AUTOMATICO, !datos.DebitoAutomatico ? this.sf.states.SRV_CONTRATADO_F_DEBITO_AUTOMATICO.default : datos.DebitoAutomatico);
    this.sf.changeState(this.sf.states.SRV_CONTRATADO_F_MES_ADELANTADO, !datos.MesAdelantado ? this.sf.states.SRV_CONTRATADO_F_MES_ADELANTADO.default : datos.MesAdelantado);
    this.sf.changeState(this.sf.states.SRV_CONTRATADO_F_PERIODO_DESDE, !datos.UltimoPeriodoDesde ? this.sf.states.SRV_CONTRATADO_F_PERIODO_DESDE.default : this.filterPeriodoDesde);
    this.sf.changeState(this.sf.states.SRV_CONTRATADO_F_PERIODO_HASTA, !datos.UltimoPeriodoHasta ? this.sf.states.SRV_CONTRATADO_F_PERIODO_HASTA.default : this.filterPeriodoHasta);
    this.sf.changeState(this.sf.states.SRV_CONTRATADO_F_PAUSADO, !datos.Pausado ? this.sf.states.SRV_CONTRATADO_F_PAUSADO.default : datos.Pausado);
    this.sf.changeState(this.sf.states.SRV_CONTRATADO_F_VIGENTE, !datos.Vigente ? '' : datos.Vigente);
    /**SP SINWEB-318 nuevo filtro para el bonificado */
    this.sf.changeState(this.sf.states.SRV_CONTRATADO_F_BONIF, !datos.TieneBonificacion ? this.sf.states.SRV_CONTRATADO_F_BONIF.default : datos.TieneBonificacion);
    this.sf.changeState(this.sf.states.SRV_CONTRATADO_F_FECHA_ITEMS_HASTA, !datos.FechaReferenciaParaCantidadItems ? this.sf.states.SRV_CONTRATADO_F_FECHA_ITEMS_HASTA.default : this.filterFechaItemsHasta);
    this.sf.changeState(this.sf.states.SRV_CONTRATADO_F_FECHA_ALTA_DESDE, !datos.FechaAltaDesde ? this.sf.states.SRV_CONTRATADO_F_FECHA_ALTA_DESDE.default : this.filterFechaAltaDesde);
    this.sf.changeState(this.sf.states.SRV_CONTRATADO_F_FECHA_ALTA_HASTA, !datos.FechaAltaHasta ? this.sf.states.SRV_CONTRATADO_F_FECHA_ALTA_HASTA.default : this.filterFechaAltaHasta);
    this.sf.changeState(this.sf.states.SRV_CONTRATADO_F_FECHA_FIN_DESDE, !datos.FechaFinDesde ? this.sf.states.SRV_CONTRATADO_F_FECHA_FIN_DESDE.default : this.filterFechaFinDesde);
    this.sf.changeState(this.sf.states.SRV_CONTRATADO_F_FECHA_FIN_HASTA, !datos.FechaFinHasta ? this.sf.states.SRV_CONTRATADO_F_FECHA_FIN_HASTA.default : this.filterFechaFinHasta);
    //listado
    this.sf.changeState(this.sf.states.SRV_CONTRATADO_L_PAGE, datos.PageNumber);
    this.sf.changeState(this.sf.states.SRV_CONTRATADO_L_PAGESIZE, datos.PageSize);
    this.sf.changeState(this.sf.states.SRV_CONTRATADO_L_ORDER, datos.Orden);
    this.sf.changeState(this.sf.states.SRV_CONTRATADO_L_SENTIDO, datos.SentidoOrden);
  }
  /**
   * Método que abre el modal para crear una nueva máquina
   */
  nuevo() {
    this.editar(undefined, 'insercion');
  }
  /**
   * SP SINWEB-323 nuevo metodo para duplicar servicios
   * @param servicio
   */
  duplicar(servicio) {
    this.editar(servicio, 'duplicar');
  }
  /**
   *
   * @param servicio
   * @param esEditar
   */
  editar(servicio, tipo) {
    const modalRef = this.modalService.open(_edit_srv_contratado_edit_srv_contratado_component__WEBPACK_IMPORTED_MODULE_4__.EditSrvContratadoComponent, {
      size: 'xl',
      backdrop: 'static',
      keyboard: false,
      scrollable: true
    });
    if (servicio) {
      modalRef.componentInstance.servicio = {
        Id: servicio.Id,
        IdCliente: servicio.Cliente.Id,
        ClienteCodigo: servicio.Cliente.Codigo,
        Cliente: servicio.Cliente.Nombre,
        IdArticulo: servicio.Articulo.Id,
        Articulo: servicio.Articulo.Nombre,
        ArticuloCodigo: servicio.Articulo.Codigo,
        IdClienteFact: servicio.ClienteFact.Id,
        ClienteFactCodigo: servicio.ClienteFact.Codigo,
        ClienteFact: servicio.ClienteFact.Nombre,
        FrecuenciaFact: servicio.FrecuenciaFact,
        Vigente: servicio.Vigente,
        Observacion: servicio.Observacion,
        MesAdelantado: servicio.MesAdelantado,
        DebitoAutomatico: servicio.DebitoAutomatico,
        Pausado: servicio.Pausado,
        Subconcepto: servicio.Subconcepto,
        FechaAlta: servicio.FechaAlta,
        FechaFin: servicio.FechaFin,
        UltimoPeriodoMes: servicio.UltimoPeriodoMes,
        UltimoPeriodoAnio: servicio.UltimoPeriodoAnio,
        FacturacionActiva: servicio.FacturacionActiva,
        FueFacturado: servicio.FueFacturado,
        OrdenFact: servicio.OrdenFact
      };
    }
    if (tipo == 'visualizacion') {
      modalRef.componentInstance.esVisualizar = true;
    }
    /**
     * SP SINWEB-320 nueva condicion para la accion duplicar
     */
    if (tipo == 'duplicar') {
      modalRef.componentInstance.esDuplicar = true;
    }
    modalRef.result.then(() => {
      this.loadPage();
      if (tipo == 'edicion') {
        this.alert.showBasicAlert(src_app_core_utils_constantes_constantes_servicios__WEBPACK_IMPORTED_MODULE_2__.MSJ_EXITO_EDICION, '', 'success');
      }
      /**
       * SP SINWEB-320 nueva condicion para la accion duplicar
       */
      if (tipo == 'insercion' || tipo == 'duplicar') {
        this.alert.showBasicAlert(src_app_core_utils_constantes_constantes_servicios__WEBPACK_IMPORTED_MODULE_2__.MSJ_EXITO_INSERCION, '', 'success');
      }
    }, () => {});
  }
  /**
   * Método que abre el modal para dar de baja un servicio
   * @param {number} idServicio
   * @param {string} articulo
   */
  baja(servicio) {
    this.alert.showReturnAlert('Baja de servicio.', "¿Está seguro que quiere dar de baja el servicio: '" + '(' + servicio.Articulo.Codigo + ') ' + servicio.Articulo.Nombre + "' ?", 'warning', 'Anular', 'Cancelar', true).then(result => {
      if (result.value) {
        this.bajaDeServicio(servicio);
      }
    });
  }
  prepararEnvio(servicio) {
    const servicioEnvio = {
      IdClienteFact: servicio.ClienteFact.Id,
      IdCliente: servicio.Cliente.Id,
      IdArticulo: servicio.Articulo.Id,
      FrecuenciaFact: servicio.FrecuenciaFact,
      MesAdelantado: servicio.MesAdelantado,
      DebitoAutomatico: servicio.DebitoAutomatico,
      Pausado: servicio.Pausado,
      Subconcepto: servicio.Subconcepto,
      FechaFin: servicio.FechaFin == '' || servicio.FechaFin == null ? null : servicio.FechaFin.concat(' 00:00:00'),
      Vigente: 'N',
      FacturacionActiva: servicio.FacturacionActiva,
      FechaAlta: servicio.FechaAlta.concat(' 00:00:00'),
      Observacion: servicio.Observacion,
      OrdenFact: servicio.OrdenFact
    };
    return servicioEnvio;
  }
  /**
   *
   * @param idServicio
   */
  bajaDeServicio(servicio) {
    const servicioEnvio = this.prepararEnvio(servicio);
    const sb = this.srvContratadoService.editar(servicioEnvio, servicio.Id).pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_27__.tap)(elem => {
      if (!elem.error) {
        this.alert.showBasicAlert(src_app_core_utils_constantes_constantes_servicios__WEBPACK_IMPORTED_MODULE_2__.MSJ_EXITO_BAJA, '', 'success');
        this.loadPage();
      }
    })).subscribe();
    sb.unsubscribe;
  }
  /**
   * SP Método para activar acción
   * @param {any} event Evento con la acción a realizar
   */
  acciones(event) {
    switch (event.accion) {
      case src_app_core_utils_constantes_constantes_servicios__WEBPACK_IMPORTED_MODULE_2__.SRV_EDITAR:
        this.editar(event.registro, 'edicion');
        break;
      case src_app_core_utils_constantes_constantes_servicios__WEBPACK_IMPORTED_MODULE_2__.SRV_DUPLICAR:
        this.duplicar(event.registro);
        break;
      case src_app_core_utils_constantes_constantes_servicios__WEBPACK_IMPORTED_MODULE_2__.SRV_ANULADA:
        this.baja(event.registro);
        break;
      case src_app_core_utils_constantes_constantes_servicios__WEBPACK_IMPORTED_MODULE_2__.SRV_VISUALIZAR:
        this.editar(event.registro, 'visualizacion');
        break;
      case src_app_core_utils_constantes_constantes_servicios__WEBPACK_IMPORTED_MODULE_2__.SRV_INS_BONIF:
        this.editarBonif(event.registro, 'insercion');
        break;
      case src_app_core_utils_constantes_constantes_servicios__WEBPACK_IMPORTED_MODULE_2__.SRV_MOD_BONIF:
        this.editarBonif(event.registro, 'edicion');
        break;
      case src_app_core_utils_constantes_constantes_servicios__WEBPACK_IMPORTED_MODULE_2__.SRV_ELIM_BONIF:
        this.ElimBonifiacion(event.registro);
        break;
      case src_app_core_utils_constantes_constantes_servicios__WEBPACK_IMPORTED_MODULE_2__.SRV_ADM_MOV:
        this.adminMovimientos(event.registro);
        break;
      case src_app_core_utils_constantes_constantes_servicios__WEBPACK_IMPORTED_MODULE_2__.SRV_INS_MOV:
        this.nuevoMovimiento(event.registro);
        break;
      default:
        console.log(`La accion ${event.accion} no esta disponible`);
    }
  }
  editarBonif(servicio, accion) {
    let modalRef;
    modalRef = this.modalService.open(_edit_srv_bonificacion_edit_srv_bonificacion_component__WEBPACK_IMPORTED_MODULE_8__.EditSrvBonificacionComponent, {
      size: 'xl',
      backdrop: 'static',
      keyboard: false,
      scrollable: true
    });
    if (accion == 'edicion') {
      modalRef.componentInstance.bonificacion = servicio.Bonificacion;
    }
    modalRef.componentInstance.servicioContratadoNombre = '(' + servicio.Articulo.Codigo + ') ' + servicio.Articulo.Nombre;
    if (accion == 'insercion') {
      modalRef.componentInstance.servicioContratadoId = servicio.Id;
    }
    modalRef.result.then(() => {
      this.loadPage();
      if (accion == 'edicion') {
        this.alert.showBasicAlert(src_app_core_utils_constantes_constantes_servicios__WEBPACK_IMPORTED_MODULE_2__.MSJ_EXITO_BONIF_EDICION, '', 'success');
      }
      if (accion == 'insercion') {
        this.alert.showBasicAlert(src_app_core_utils_constantes_constantes_servicios__WEBPACK_IMPORTED_MODULE_2__.MSJ_EXITO_BONIF_INSERCION, '', 'success');
      }
    }, () => {});
  }
  ElimBonifiacion(servicio) {
    this.alert.showReturnAlert('Eliminar bonificación del servicio.', "¿Está seguro que quiere eliminar la bonificación del servicio: '" + '(' + servicio.Articulo.Codigo + ') ' + servicio.Articulo.Nombre + "' ?", 'warning', 'Eliminar', 'Cancelar', true).then(result => {
      if (result.value) {
        this.elimBonif(servicio.Bonificacion.Id);
      }
    });
  }
  /**
   *
   * @param idServicio
   */
  elimBonif(servicioId) {
    const sb = this.srvBonificacionService.eliminar(servicioId).pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_27__.tap)(elem => {
      if (!elem.error) {
        this.alert.showBasicAlert(src_app_core_utils_constantes_constantes_servicios__WEBPACK_IMPORTED_MODULE_2__.MSJ_EXITO_BONIF_ELIM, '', 'success');
        this.loadPage();
      }
    })).subscribe();
    sb.unsubscribe;
  }
  nuevoMovimiento(servicio) {
    let modalRef;
    modalRef = this.modalService.open(_movimientos_movimiento_edit_movimiento_edit_component__WEBPACK_IMPORTED_MODULE_9__.MovimientoEditComponent, {
      size: 'xl',
      backdrop: 'static',
      keyboard: false,
      scrollable: true
    });
    modalRef.componentInstance.srvContratadoId = servicio.Id;
    modalRef.componentInstance.srvContratadoData = servicio;
    modalRef.result.then(() => {
      this.loadPage();
      this.alert.showBasicAlert(src_app_core_utils_constantes_constantes_servicios__WEBPACK_IMPORTED_MODULE_2__.MSJ_EXITO_MOV_INSERCION, '', 'success');
    });
  }
  /**
   * SP SINWEB-320 nueva accion de admin de movimientos , abre comp de listado de movimientos
   * @param servicio
   */
  adminMovimientos(servicio) {
    let modalRef;
    modalRef = this.modalService.open(_movimientos_movimientos_component__WEBPACK_IMPORTED_MODULE_10__.MovimientosComponent, {
      size: 'xl',
      backdropClass: 'back-z-index-1',
      windowClass: 'modal-z-index-1',
      backdrop: 'static',
      keyboard: false,
      scrollable: true
    });
    modalRef.componentInstance.srvContratado = servicio;
    modalRef.result.then(() => {
      this.loadPage();
    });
  }
  /**
   * SP SINWEB-344 metodo que maneja paginacion , orden , cant regs de la tabla
   * @param $event
   */
  lazyLoadChange($event) {
    this.page = $event.page;
    this.order = $event.order;
    this.cantSearch = $event.cant;
    this.sentido = $event.sentido;
    this.loadPage();
  }
  /**
   * Método para exportar a Excel
   */
  exportTo(extension) {
    let datos = this.cargarFiltros(-1, this.order, this.sentido);
    //datos.PageSize= this.totalItems;
    delete datos.PageSize;
    //SPse arman las columnas y keys para buscar datos y armar el excel
    //SP SINWEB-344 correccion de exportacion a excel para que concuerde con los cambios
    // MC SINWEB-378 Se combinan campos (como codigos y nombres) en una sola columna
    const columns = ['Número', '(Cod) Cliente', '(Cod) Cliente Fact.', '(Cod) Artículo', 'Último Periodo Fact.', 'Frecuencia Fact.', 'Cant. Fact.', 'Fact. Activa', 'Mes Adelantado', 'Bonificado', 'Bonif. Activa', 'Tipo Bonif.', 'Valor Bonif.', 'Fecha Lista Precio Bonif.', 'Fecha Inicio Bonif.', 'Fecha Fin Bonif.', 'Vigencia Ilimitada Bonif.', 'Vigente', 'Pausado', 'Debito Auto.', 'F. Alta', 'F. Fin', 'Observacion', 'Subconcepto'];
    const keys = ['NroSrvContratado', 'CodCliente', 'CodClienteFact', 'CodArticulo', 'UltimoPeriodoFact', 'FrecuenciaFact', 'CantidadFact', 'FacturacionActiva', 'MesAdelantado', 'Bonificado', 'BonificadoActivo', 'BonificadoTipo', 'BonificadoValor', 'BonificadoFechaListaPrecioBonif', 'BonificadoFechaInicio', 'BonificadoFechaFin', 'BonificadoVigenciaIlimitada', 'Vigente', 'Pausado', 'DebitoAutomatico', 'FechaAlta', 'FechaFin', 'Observacion', 'Subconcepto'];
    this.alert.showLoadingAlert('Exportando Servicios contratados', 'Generando archivo ' + extension + ', este proceso puede tardar unos minutos');
    //SPllamada al recurso correspondiente de la api
    this.srvContratadoService.fetch(datos).pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_26__.map)(resp => {
      return lodash__WEBPACK_IMPORTED_MODULE_11__.map(resp.Data, value => lodash__WEBPACK_IMPORTED_MODULE_11__.extend(value, {
        Bonificado: value.Bonificacion ? 'S' : 'N',
        BonificadoActivo: value.Bonificacion ? value.Bonificacion.Activa : '',
        BonificadoTipo: value.Bonificacion ? this.getTipoBonif(value.Bonificacion.TipoValor) : '',
        BonificadoValor: value.Bonificacion ? this.getValorBonif(value.Bonificacion.Valor, value.Bonificacion.TipoValor) : '',
        BonificadoFechaListaPrecioBonif: value.Bonificacion ? value.Bonificacion.FechaListaPrecio : '',
        BonificadoFechaInicio: value.Bonificacion ? value.Bonificacion.FechaInicio : '',
        BonificadoFechaFin: value.Bonificacion ? value.Bonificacion.FechaFin : '',
        BonificadoVigenciaIlimitada: value.Bonificacion ? value.Bonificacion.VigenciaIlimitada : '',
        CodCliente: `(${value.Cliente.Codigo}) ${value.Cliente.Nombre}`,
        CodClienteFact: `(${value.ClienteFact.Codigo}) ${value.ClienteFact.Nombre}`,
        CodArticulo: `(${value.Articulo.Codigo}) ${value.Articulo.Nombre}`,
        UltimoPeriodoFact: `${value.UltimoPeriodoMes}/${value.UltimoPeriodoAnio}`
      }));
    })).subscribe(data => {
      this.alert.closeLoadingAlert();
      this.alert.showBasicAlert('Servicio Contratados exportados', 'Generando archivo ' + extension, 'success');
      // MC SINWEB-378 Exportación a Pdf
      if (extension === 'Excel') {
        this.exportacion.exportToExcel(data, columns, keys, 'Listado de Servicios Contratados');
      } else {
        const columnsReduced = ['Número', '(Cod) Cliente', '(Cod) Cliente Fact.', '(Cod) Artículo', 'Último Periodo Fact.', 'Frecuencia Fact.', 'Cant. Fact.', 'Vigente', 'Observacion'];
        const keysReduced = ['NroSrvContratado', 'CodCliente', 'CodClienteFact', 'CodArticulo', 'UltimoPeriodoFact', 'FrecuenciaFact', 'CantidadFact', 'Vigente', 'Observacion'];
        this.exportacion.exportToPdf(data, columnsReduced, keysReduced, 'Listado de Servicios Contratados');
      }
    });
  }
  getTipoBonif(value) {
    switch (value) {
      case 'P':
        return 'Porcentual';
      case 'N':
        return 'Nominal';
      case 'F':
        return 'Fecha Lista Precio';
      default:
        return 'Tipo Bonif. no definido';
    }
  }
  getValorBonif(value, tipo) {
    switch (tipo) {
      case 'P':
        return value.toFixed(2).replace('.', ',') + '%';
      case 'N':
        return value.toFixed(2).replace('.', ',');
      default:
        return value;
    }
  }
  /**
   * SP Método get para obtener campo numero de srv
   * @returns {string} Número de serie
   */
  getNumero() {
    return this.searchForm.controls.numeroSrv.value;
  }
  /**
   * SP Método para limpiar filtro
   */
  borrarNumero() {
    this.searchForm.get('numeroSrv').reset('');
    this.page = 1;
    this.buscarNumSrv = '';
    this.loadPage();
  }
  buscarPorNumero() {
    this.page = 1;
    this.buscarNumSrv = this.getNumero();
    this.loadPage();
  }
  /**
   * SP control de filtro no reactivo
   */
  busquedaNumero() {
    return this.buscarNumSrv != undefined && this.buscarNumSrv != '';
  }
  /**
   * SP SINWEB-318 metodo de busqueda para observacion
   */
  /**
   *
   * @returns {string} Observación
   */
  getObs() {
    return this.searchForm.controls.observacion.value;
  }
  /**
   * SP Método para limpiar filtro
   */
  borrarObs() {
    this.searchForm.get('observacion').reset('');
    this.page = 1;
    this.buscarObs = '';
    this.loadPage();
  }
  buscarPorObs() {
    this.page = 1;
    this.buscarObs = this.getObs();
    this.loadPage();
  }
  /**
   * SP control de filtro no reactivo
   */
  busquedaObs() {
    return this.buscarObs != undefined && this.buscarObs != '';
  }
  /**
   * SP Método para buscar artículos
   */
  buscarArticulos() {
    const modalRef = this.modalService.open(src_app_pages_dashboards_core_seleccionar_articulo_seleccionar_articulo_component__WEBPACK_IMPORTED_MODULE_6__.SeleccionarArticuloComponent, {
      size: 'xl',
      backdropClass: 'back-z-index',
      windowClass: 'modal-z-index',
      backdrop: 'static',
      keyboard: false,
      scrollable: true
    });
    modalRef.componentInstance.filtros = {
      FamiliasArticulo: {
        Ids: [this.configGral._config.FamiliaArtSrv].join(','),
        Ocultar: true
      },
      Multiple: true
    };
    modalRef.result.then(resolve => {
      if (resolve !== undefined) {
        this.searchForm.controls.articuloId.setValue(resolve.IdsArticulos.join(','));
        this.searchForm.controls.articulo.setValue(resolve.Articulos.join(','));
        this.page = 1;
        this.loadPage();
      }
    });
  }
  /**
   * Método get para obtener campo articulo
   * @returns {any} Artículo
   */
  getArticulo() {
    return this.searchForm.get('articulo').value;
  }
  /**
   * Método para limpiar filtro
   */
  borrarArticulo() {
    this.searchForm.get('articulo').reset('');
    this.searchForm.get('articuloId').reset('');
    this.page = 1;
    this.loadPage();
  }
  buscarCliente(tipo) {
    const modalRef = this.modalService.open(src_app_pages_dashboards_core_seleccionar_cliente_seleccionar_cliente_component__WEBPACK_IMPORTED_MODULE_7__.SeleccionarClienteComponent, {
      size: 'xl',
      backdropClass: 'back-z-index',
      windowClass: 'modal-z-index',
      backdrop: 'static',
      keyboard: false,
      scrollable: true
    });
    modalRef.componentInstance.filtros = {
      Multiple: true
    };
    modalRef.result.then(resolve => {
      if (resolve !== undefined) {
        if (tipo === 'clienteFact') {
          this.searchForm.controls.clienteFactId.setValue(resolve.IdsClientes.join(','));
          this.searchForm.controls.clienteFact.setValue(resolve.Clientes.join(','));
        } else {
          this.searchForm.controls.clienteId.setValue(resolve.IdsClientes.join(','));
          this.searchForm.controls.cliente.setValue(resolve.Clientes.join(','));
        }
        this.page = 1;
        this.loadPage();
      }
    });
  }
  /**
   * Método get para obtener campo de cliente o clienteFact
   * @returns {any} Artículo
   */
  getCliente(tipo) {
    if (tipo === 'clienteFact') {
      return this.searchForm.get('clienteFact').value;
    } else {
      return this.searchForm.get('cliente').value;
    }
  }
  /**
   * Método para limpiar filtro
   */
  borrarCliente(tipo) {
    if (tipo === 'clienteFact') {
      this.searchForm.get('clienteFact').reset('');
      this.searchForm.get('clienteFactId').reset('');
    } else {
      this.searchForm.get('cliente').reset('');
      this.searchForm.get('clienteId').reset('');
    }
    this.page = 1;
    this.loadPage();
  }
  cargaMasivaSrv() {
    this.router.navigate(['/servicios/serviciosContratados/cargaMasiva']);
  }
  /**
   * SP Método que inicia tour de la vista
   */
  iniciarTour() {
    this.tourService.start();
  }
  /**
   * SP Método para inicializar el objecto de pasos del tour
   */
  inicializarSteps() {
    //Traigo el json con los pasos del tour
    fetch('./assets/tours/servicios/srv-contratados.json').then(response => response.json()).then(tourSrvContratados => {
      this.tourSteps = tourSrvContratados;
      this.tourService.initialize(this.tourSteps);
    });
  }
  /**
   * SP Observable para realizar acciones durante los pasos
   */
  controlarTour() {
    this._unsubscribe.push(this.tourService.stepHide$.subscribe(step => {
      if (step.step.anchorId == 'searchSrvObs.anchor.id') {
        this.filtro = true;
      }
    }));
  }
  /**
   * SP SINWEB-599 metodo para setear el periodo desde
   * @returns
   */
  getPeriodoDesde() {
    return this.filterForm.controls.PeriodoDesde.value;
  }
  /**
   * SP SINWEB-599 metodo para setear el periodo desde
   * @returns
   */
  getPeriodoHasta() {
    return this.filterForm.controls.PeriodoHasta.value;
  }
  /**
   * SP SINWEB-599 metodo para setear el periodo desde
   * @param $event
   */
  setPeriodoDesde($event) {
    this.filterForm.controls.PeriodoDesde.setValue($event);
  }
  /**
   * SP SINWEB-599 metodo para setear el periodo hasta
   * @param $event
   */
  setPeriodoHasta($event) {
    this.filterForm.controls.PeriodoHasta.setValue($event);
  }
  static #_ = this.ɵfac = function SrvContratadosComponent_Factory(t) {
    return new (t || SrvContratadosComponent)(_angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵdirectiveInject"](_angular_forms__WEBPACK_IMPORTED_MODULE_23__.FormBuilder), _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵdirectiveInject"](ngx_toastr__WEBPACK_IMPORTED_MODULE_28__.ToastrService), _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵdirectiveInject"](_ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_29__.NgbModal), _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵdirectiveInject"](src_app_core_services_alertCustom_service__WEBPACK_IMPORTED_MODULE_1__.AlertCustomService), _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵdirectiveInject"](src_app_core_services_exportacion_service__WEBPACK_IMPORTED_MODULE_13__.ExportacionService), _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵdirectiveInject"](_core_services_servicios_srvContratado_service__WEBPACK_IMPORTED_MODULE_14__.SrvContratadoService), _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵdirectiveInject"](_core_services_servicios_srvBonificacion_service__WEBPACK_IMPORTED_MODULE_15__.SrvBonificacionService), _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵdirectiveInject"](src_app_core_services_stateful_service__WEBPACK_IMPORTED_MODULE_16__.StatefulService), _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵdirectiveInject"](src_app_core_services_auth_service__WEBPACK_IMPORTED_MODULE_17__.AuthService), _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵdirectiveInject"](ngx_ui_tour_ng_bootstrap__WEBPACK_IMPORTED_MODULE_30__.TourService), _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵdirectiveInject"](_angular_router__WEBPACK_IMPORTED_MODULE_31__.Router), _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵdirectiveInject"](src_app_core_services_configGeneral_service__WEBPACK_IMPORTED_MODULE_18__.ConfigGeneralService));
  };
  static #_2 = this.ɵcmp = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵdefineComponent"]({
    type: SrvContratadosComponent,
    selectors: [["app-srv-contratados"]],
    features: [_angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵProvidersFeature"]([src_app_core_services_alertCustom_service__WEBPACK_IMPORTED_MODULE_1__.AlertCustomService])],
    decls: 77,
    vars: 33,
    consts: [[1, "row"], ["position", "left", 1, "d-block", "d-lg-none", 3, "visible", "visibleChange"], [1, "m-2"], [3, "ngTemplateOutlet"], ["class", "d-none d-lg-block col-xxl-2 col-lg-3", 4, "ngIf"], [3, "ngClass"], [1, "card"], [1, "card-body", "border-bottom"], [1, "d-flex", "flex-column", "flex-sm-row", "gap-2", "align-items-center"], [1, "mb-0", "card-title", "flex-grow-1", "d-flex", "flex-row"], ["tourAnchor", "srvContratados.anchor.id", 1, "mb-1", "align-self-center"], [1, "text-primary", 2, "cursor", "pointer", 3, "click"], [1, "bx", "bx-info-circle", "font-size-24", "align-self-center"], [1, "flex-shrink-0", "d-flex", "gap-1"], ["tourAnchor", "newSrv.anchor.id", "class", "btn btn-primary", 3, "click", 4, "ngIf"], ["tourAnchor", "refresh.anchor.id", 1, "btn", "btn-light", 3, "click"], ["data-cy", "limpiar-filtros", "tourAnchor", "filtroReset.anchor.id", 3, "ngClass", "click"], ["ngbDropdown", "", 1, "dropdown", "d-inline-block"], ["tourAnchor", "export.anchor.id", "type", "menu", "id", "dropdownMenuButton1", "data-bs-toggle", "dropdown", "aria-expanded", "false", "ngbDropdownToggle", "", 1, "btn", "btn-success"], [1, "mdi", "mdi-dots-vertical"], ["aria-labelledby", "dropdownMenuButton1", "ngbDropdownMenu", "", 1, "dropdown-menu"], ["href", "javascript:void(0);", 1, "dropdown-item", 3, "click"], [3, "formGroup"], [1, "row", "g-3", "justify-content-center", "justify-content-lg-start"], [1, "col-auto", "d-none", "d-lg-block"], ["data-cy", "boton-filtro", 1, "btn", "btn-icon", "btn-soft-secondary", "w-100", 3, "click"], [1, "col-auto", "d-block", "d-lg-none"], ["data-cy", "boton-filtroMobile", 1, "btn", "btn-icon", "btn-soft-secondary", "w-100", 3, "click"], [1, "col-xxl-3", "col-lg-3"], ["tourAnchor", "searchSrvCli.anchor.id", 1, "input-group"], ["type", "search", "formControlName", "cliente", "placeholder", "Seleccionar Cliente", "readonly", "", 1, "form-control"], ["class", "btn btn-secondary", 3, "click", 4, "ngIf"], [1, "btn", "btn-primary", 3, "click"], [1, "bx", "bx-search-alt-2"], ["tourAnchor", "searchSrvCliFact.anchor.id", 1, "input-group"], ["type", "search", "formControlName", "clienteFact", "placeholder", "Seleccionar Cliente a Facturar", "readonly", "", 1, "form-control"], ["tourAnchor", "searchSrvArt.anchor.id", 1, "input-group"], ["type", "search", "formControlName", "articulo", "placeholder", "Seleccionar Art\u00EDculo", "readonly", "", 1, "form-control"], [1, "col-xxl-2"], ["tourAnchor", "searchSrvNum.anchor.id", 1, "input-group"], ["mask", "00000000", "type", "text", "formControlName", "numeroSrv", "placeholder", "Buscar por N\u00FAmero", 1, "form-control", 3, "keyup.enter"], [1, "col-12"], ["tourAnchor", "searchSrvObs.anchor.id", 1, "input-group"], ["rows", "1", "formControlName", "observacion", "placeholder", "Buscar por observaci\u00F3n", "maxlength", "200", 1, "form-control", 3, "keyup.enter", "keydown.enter"], [1, "card-body"], ["styleTableClass", "p-datatable-gridlines", "anchorPaginacion", "paginasTablaSrv.anchor.id", "anchorRegistros", "registrosTablaSrv.anchor.id", "stateConfig", "SRV_CONTRATADO_F_CONFIG", "anchorActions", "actionsSrv.anchor.id", 3, "columns", "datos", "page", "order", "sentido", "cant_search", "totalItems", "apiTable", "isLoading", "acciones", "dropdownButtons", "configColumns", "state", "lazyLoad", "emitAction"], ["FILTRO", ""], [1, "d-none", "d-lg-block", "col-xxl-2", "col-lg-3"], ["tourAnchor", "filtroSrv.anchor.id", 1, "card", 3, "formGroup"], [1, "card-body", "p-2"], ["tourAnchor", "newSrv.anchor.id", 1, "btn", "btn-primary", 3, "click"], [1, "d-none", "d-md-block"], [1, "d-block", "d-md-none", "mdi", "mdi-plus", "mdi-16"], [1, "btn", "btn-secondary", 3, "click"], [1, "bx", "bx-x"], [3, "multiple", "activeIndex"], ["header", "B\u00E1sicos"], [1, "text-muted"], ["formControlName", "FrecFact", 1, "form-select"], [3, "value", 4, "ngFor", "ngForOf"], [1, "my-2"], ["formControlName", "Bonificado", 1, "form-select"], ["formControlName", "Vigente", 1, "form-select"], ["formControlName", "Pausado", 1, "form-select"], ["formControlName", "DebitoAutomatico", 1, "form-select"], ["formControlName", "MesAdelantado", 1, "form-select"], ["header", "Avanzados"], [1, "border", "border-1", "rounded", "border-opacity-10", "p-2", "mb-2"], ["htmlFor", "FechaItemsHasta", 1, "text-muted", "font-size-12"], ["type", "date", "id", "FechaItemsHasta", "formControlName", "FechaItemsHasta", "onkeypress", "return false", "onkeydown", "return false", 1, "form-control", "digits"], [1, "text-muted", "font-size-12"], ["maxDate", "12/3000", 3, "valor", "valorEmit"], ["type", "date", "formControlName", "FechaAltaDesde", "onkeypress", "return false", "onkeydown", "return false", 1, "form-control", "digits"], ["type", "date", "formControlName", "FechaAltaHasta", "onkeypress", "return false", "onkeydown", "return false", 1, "form-control", "digits"], ["type", "date", "formControlName", "FechaFinDesde", "onkeypress", "return false", "onkeydown", "return false", 1, "form-control", "digits"], ["type", "date", "formControlName", "FechaFinHasta", "onkeypress", "return false", "onkeydown", "return false", 1, "form-control", "digits"], [3, "value"]],
    template: function SrvContratadosComponent_Template(rf, ctx) {
      if (rf & 1) {
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementStart"](0, "div", 0)(1, "p-sidebar", 1);
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵlistener"]("visibleChange", function SrvContratadosComponent_Template_p_sidebar_visibleChange_1_listener($event) {
          return ctx.filtroMobile = $event;
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementStart"](2, "div", 2);
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵtemplate"](3, SrvContratadosComponent_ng_template_3_Template, 0, 0, "ng-template", 3);
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementEnd"]()();
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵtemplate"](4, SrvContratadosComponent_div_4_Template, 4, 2, "div", 4);
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementStart"](5, "div", 5)(6, "div", 6)(7, "div", 7)(8, "div", 8)(9, "span", 9)(10, "h5", 10);
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵtext"](11, " Servicios Contratados ");
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵtext"](12, " \u00A0 ");
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementStart"](13, "a", 11);
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵlistener"]("click", function SrvContratadosComponent_Template_a_click_13_listener() {
          return ctx.iniciarTour();
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelement"](14, "i", 12);
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementEnd"]()();
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementStart"](15, "div", 13);
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵtemplate"](16, SrvContratadosComponent_a_16_Template, 4, 0, "a", 14);
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementStart"](17, "a", 15);
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵlistener"]("click", function SrvContratadosComponent_Template_a_click_17_listener() {
          return ctx.loadPage();
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelement"](18, "i", 5);
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵpipe"](19, "async");
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementStart"](20, "a", 16);
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵlistener"]("click", function SrvContratadosComponent_Template_a_click_20_listener() {
          return ctx.cleanStates();
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelement"](21, "i", 5);
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementStart"](22, "div", 17)(23, "button", 18);
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelement"](24, "i", 19);
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementStart"](25, "ul", 20)(26, "li")(27, "a", 21);
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵlistener"]("click", function SrvContratadosComponent_Template_a_click_27_listener() {
          return ctx.exportTo("Excel");
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵtext"](28, "Exportar Excel");
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementEnd"]()();
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementStart"](29, "li")(30, "a", 21);
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵlistener"]("click", function SrvContratadosComponent_Template_a_click_30_listener() {
          return ctx.exportTo("Pdf");
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵtext"](31, "Exportar Pdf");
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementEnd"]()()()()()()();
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementStart"](32, "div", 7);
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementContainerStart"](33, 22);
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementStart"](34, "div", 23)(35, "div", 24)(36, "a", 25);
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵlistener"]("click", function SrvContratadosComponent_Template_a_click_36_listener() {
          return ctx.filtro = !ctx.filtro;
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelement"](37, "i", 5);
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementEnd"]()();
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementStart"](38, "div", 26)(39, "a", 27);
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵlistener"]("click", function SrvContratadosComponent_Template_a_click_39_listener() {
          return ctx.filtroMobile = !ctx.filtroMobile;
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelement"](40, "i", 5);
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementEnd"]()();
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementStart"](41, "div", 28)(42, "div", 29);
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelement"](43, "input", 30);
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵtemplate"](44, SrvContratadosComponent_a_44_Template, 2, 0, "a", 31);
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementStart"](45, "a", 32);
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵlistener"]("click", function SrvContratadosComponent_Template_a_click_45_listener() {
          return ctx.buscarCliente("cliente");
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelement"](46, "i", 33);
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementEnd"]()()();
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementStart"](47, "div", 28)(48, "div", 34);
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelement"](49, "input", 35);
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵtemplate"](50, SrvContratadosComponent_a_50_Template, 2, 0, "a", 31);
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementStart"](51, "a", 32);
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵlistener"]("click", function SrvContratadosComponent_Template_a_click_51_listener() {
          return ctx.buscarCliente("clienteFact");
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelement"](52, "i", 33);
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementEnd"]()()();
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementStart"](53, "div", 28)(54, "div", 36);
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelement"](55, "input", 37);
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵtemplate"](56, SrvContratadosComponent_a_56_Template, 2, 0, "a", 31);
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementStart"](57, "a", 32);
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵlistener"]("click", function SrvContratadosComponent_Template_a_click_57_listener() {
          return ctx.buscarArticulos();
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelement"](58, "i", 33);
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementEnd"]()()();
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementStart"](59, "div", 38)(60, "div", 39)(61, "input", 40);
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵlistener"]("keyup.enter", function SrvContratadosComponent_Template_input_keyup_enter_61_listener() {
          return ctx.buscarPorNumero();
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵtemplate"](62, SrvContratadosComponent_a_62_Template, 2, 0, "a", 31);
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementStart"](63, "a", 32);
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵlistener"]("click", function SrvContratadosComponent_Template_a_click_63_listener() {
          return ctx.buscarPorNumero();
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelement"](64, "i", 33);
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementEnd"]()()();
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementStart"](65, "div", 41)(66, "div", 42)(67, "textarea", 43);
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵlistener"]("keyup.enter", function SrvContratadosComponent_Template_textarea_keyup_enter_67_listener() {
          return ctx.buscarPorObs();
        })("keydown.enter", function SrvContratadosComponent_Template_textarea_keydown_enter_67_listener($event) {
          return $event.preventDefault();
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵtemplate"](68, SrvContratadosComponent_a_68_Template, 2, 0, "a", 31);
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementStart"](69, "a", 32);
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵlistener"]("click", function SrvContratadosComponent_Template_a_click_69_listener() {
          return ctx.buscarPorObs();
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelement"](70, "i", 33);
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementEnd"]()()()();
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementContainerEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementStart"](71, "div", 44)(72, "app-table2", 45);
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵlistener"]("lazyLoad", function SrvContratadosComponent_Template_app_table2_lazyLoad_72_listener($event) {
          return ctx.lazyLoadChange($event);
        })("emitAction", function SrvContratadosComponent_Template_app_table2_emitAction_72_listener($event) {
          return ctx.acciones($event);
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵpipe"](73, "async");
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelementEnd"]()()()()();
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵtemplate"](74, SrvContratadosComponent_ng_template_74_Template, 72, 12, "ng-template", null, 46, _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵtemplateRefExtractor"]);
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵelement"](76, "app-tour");
      }
      if (rf & 2) {
        const _r9 = _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵreference"](75);
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵadvance"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵproperty"]("visible", ctx.filtroMobile);
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵadvance"](2);
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵproperty"]("ngTemplateOutlet", _r9);
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵadvance"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵproperty"]("ngIf", ctx.filtro);
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵadvance"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵproperty"]("ngClass", ctx.filtro ? "col-xxl-10 col-lg-9" : "col-12");
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵadvance"](11);
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵproperty"]("ngIf", true);
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵadvance"](2);
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵproperty"]("ngClass", _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵpipeBind1"](19, 29, ctx.srvContratadoService.isLoading$) ? "bx bx-sync bx-spin font-size-16 align-middle" : "bx bx-sync font-size-16 align-middle");
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵadvance"](2);
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵproperty"]("ngClass", ctx.sf.getCantCustomStates() > 0 ? "btn btn-danger" : "btn bg-danger bg-soft");
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵadvance"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵproperty"]("ngClass", "mdi mdi-filter-remove-outline mdi-16px align-middle");
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵadvance"](12);
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵproperty"]("formGroup", ctx.searchForm);
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵadvance"](4);
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵproperty"]("ngClass", !ctx.filtro ? "mdi mdi-filter-outline mdi-18px align-middle" : "mdi mdi-filter-off-outline mdi-18px align-middle");
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵadvance"](3);
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵproperty"]("ngClass", !ctx.filtroMobile ? "mdi mdi-filter-outline mdi-18px align-middle" : "mdi mdi-filter-off-outline mdi-18px align-middle");
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵadvance"](4);
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵproperty"]("ngIf", ctx.getCliente("cliente"));
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵadvance"](6);
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵproperty"]("ngIf", ctx.getCliente("clienteFact"));
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵadvance"](6);
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵproperty"]("ngIf", ctx.getArticulo());
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵadvance"](6);
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵproperty"]("ngIf", ctx.busquedaNumero());
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵadvance"](6);
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵproperty"]("ngIf", ctx.busquedaObs());
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵadvance"](4);
        _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵproperty"]("columns", ctx.serviciosHeader)("datos", ctx.serviciosContratados)("page", ctx.page)("order", ctx.order)("sentido", ctx.sentido)("cant_search", ctx.cantSearch)("totalItems", ctx.totalItems)("apiTable", true)("isLoading", _angular_core__WEBPACK_IMPORTED_MODULE_22__["ɵɵpipeBind1"](73, 31, ctx.srvContratadoService.isLoading$))("acciones", true)("dropdownButtons", ctx.dropdownActions)("configColumns", true)("state", ctx.stateInicioConfig);
      }
    },
    dependencies: [primeng_accordion__WEBPACK_IMPORTED_MODULE_32__.Accordion, primeng_accordion__WEBPACK_IMPORTED_MODULE_32__.AccordionTab, _angular_common__WEBPACK_IMPORTED_MODULE_24__.NgClass, _angular_common__WEBPACK_IMPORTED_MODULE_24__.NgForOf, _angular_common__WEBPACK_IMPORTED_MODULE_24__.NgIf, _angular_common__WEBPACK_IMPORTED_MODULE_24__.NgTemplateOutlet, _angular_forms__WEBPACK_IMPORTED_MODULE_23__.NgSelectOption, _angular_forms__WEBPACK_IMPORTED_MODULE_23__["ɵNgSelectMultipleOption"], _angular_forms__WEBPACK_IMPORTED_MODULE_23__.DefaultValueAccessor, _angular_forms__WEBPACK_IMPORTED_MODULE_23__.SelectControlValueAccessor, _angular_forms__WEBPACK_IMPORTED_MODULE_23__.NgControlStatus, _angular_forms__WEBPACK_IMPORTED_MODULE_23__.NgControlStatusGroup, _angular_forms__WEBPACK_IMPORTED_MODULE_23__.MaxLengthValidator, _ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_29__.NgbDropdown, _ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_29__.NgbDropdownToggle, _ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_29__.NgbDropdownMenu, ngx_mask__WEBPACK_IMPORTED_MODULE_33__.NgxMaskDirective, _angular_forms__WEBPACK_IMPORTED_MODULE_23__.FormGroupDirective, _angular_forms__WEBPACK_IMPORTED_MODULE_23__.FormControlName, primeng_sidebar__WEBPACK_IMPORTED_MODULE_34__.Sidebar, ngx_ui_tour_ng_bootstrap__WEBPACK_IMPORTED_MODULE_30__.TourAnchorNgBootstrapDirective, _shared_widget_tour_tour_component__WEBPACK_IMPORTED_MODULE_19__.TourComponent, _shared_ui_table2_table2_component__WEBPACK_IMPORTED_MODULE_20__.Table2Component, _shared_ui_input_periodo_input_periodo_component__WEBPACK_IMPORTED_MODULE_21__.InputPeriodoComponent, _angular_common__WEBPACK_IMPORTED_MODULE_24__.AsyncPipe],
    changeDetection: 0
  });
}

/***/ })

}]);