(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["app-pages-comercial-substituir-rps-substituir-rps-module"],{

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/comercial/substituir-rps/substituir-rps-index/substituir-rps-index.component.html":
/*!***********************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/comercial/substituir-rps/substituir-rps-index/substituir-rps-index.component.html ***!
  \***********************************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("<app-menu-command-bar [botoesComando]=\"constantes.listaIndex\"\n                      [formAction]=\"actionForm\"\n                      [itemData]=\"data1.regNota\"\n                      [sisFormularioId]=\"constantes.sisFormularioId\">\n</app-menu-command-bar>\n\n<div class=\"row\">\n    <div class=\"col-lg-12\">\n        <div class=\"section-comand-bar\">\n            <app-form-legenda></app-form-legenda>\n            <div class=\"card-body widget-body\">\n                <form class=\"form\" #f=\"ngForm\" (ngSubmit)=\"_onSubmit(f)\" autocomplete=\"off\">\n                    <app-validacoes></app-validacoes>\n                    <div class=\"row\">\n                        <div class=\"col-lg-6 col-md-12\">\n                            <app-card-container tituloCard=\"rpsSubstitutoVelho\">\n                                <div class=\"row\">\n                                    <div class=\"col-lg-4 col-md-6\">\n                                        <div class=\"form-group \">\n                                            <label for=\"notaId\" [class.required]=\"!data1.vlNota\">{{'labels.rps' | translate}}</label>\n                                            <input type=\"text\" id=\"notaId\" name=\"notaId\" (keyup)=\"onKeyupEvent($event)\"\n                                                   class=\"form-control form-control-sm\"\n                                                   mask=\"999999999\"\n                                                   [required]=\"!data1.vlNota\" \n                                                   [(ngModel)]=\"data1.notaId\"\n                                            >\n                                        </div>\n                                    </div>\n                                </div>\n                                <div class=\"row\">\n                                    <div class=\"col-lg-4 col-md-6\">\n                                        <div class=\"form-group \">\n                                            <label for=\"serieNF\">{{'labels.serie' | translate}}</label>\n                                            <input type=\"text\" id=\"serieNF\" name=\"serieNF\"\n                                                   class=\"form-control form-control-sm\"\n                                                   disabled\n                                                   [(ngModel)]=\"data1.serieNF\"\n                                            >\n                                        </div>\n                                    </div>\n                                    <div class=\"col-lg-6 col-md-6\">\n                                        <div class=\"form-group \">\n                                            <label for=\"dtEmissao\">{{'labels.emissao' | translate}}</label>\n                                            <app-data id=\"dtEmissao\"\n                                                      name=\"dtEmissao\"\n                                                      disabled\n                                                      [(ngModel)]=\"data1.dtEmissao\"\n                                                      [ngStyle]=\"{'width':'100%'}\">\n                                            </app-data>\n                                        </div>\n                                    </div>\n                                </div>\n                                <div class=\"row\">\n                                    <div class=\"col-lg-4 col-md-6\">\n                                        <div class=\"form-group\">\n                                            <label for=\"vlNota\">{{'labels.valorTotal' | translate}}</label>\n                                            <input type=\"text\" id=\"vlNota\" name=\"vlNota\"\n                                                   class=\"form-control form-control-sm\"\n                                                   maxlength=\"16\"\n                                                   [(ngModel)]=\"data1.vlNota\"\n                                                   currencyMask\n                                                   disabled\n                                                   [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 2 }\"\n                                                   >\n                                        </div>\n                                    </div>\n                                </div>\n                                <div class=\"row\">\n                                    <div class=\"col-lg-12\">\n                                        <div class=\"form-group\">\n                                            <label for=\"fantasia\">{{'labels.cliente' | translate}}</label>\n                                            <input type=\"text\" id=\"fantasia\" name=\"fantasia\"\n                                                   class=\"form-control form-control-sm\"\n                                                   disabled\n                                                   maxlength=\"25\"\n                                                   [(ngModel)]=\"data1.fantasia\"\n                                            >\n                                        </div>\n                                    </div>\n                                </div>\n                            </app-card-container>\n                        </div>\n\n                        <div class=\"col-lg-6 col-md-12\">\n                            <app-card-container tituloCard=\"rpsSubstitutoNovo\">\n                                <div class=\"row\">\n                                    <div class=\"col-lg-4 col-md-6\">\n                                        <div class=\"form-group \">\n                                            <label for=\"notaId2\" [class.required]=\"data1.vlNota\">{{'labels.rps' | translate}}</label>\n                                            <input type=\"text\" id=\"notaId2\" name=\"notaId2\"\n                                                   (keyup)=\"onKeyupEvent($event)\"\n                                                   class=\"form-control form-control-sm\"\n                                                   mask=\"999999999\"\n                                                   [required]=\"data1.vlNota\" \n                                                   [disabled]=\"!data1.vlNota\"\n                                                   [(ngModel)]=\"data2.notaId\"\n                                            >\n                                        </div>\n                                    </div>\n                                </div>\n                                <div class=\"row\">\n                                    <div class=\"col-lg-4 col-md-6\">\n                                        <div class=\"form-group \">\n                                            <label for=\"serieNF2\">{{'labels.serie' | translate}}</label>\n                                            <input type=\"text\" id=\"serieNF2\" name=\"serieNF2\"\n                                                   class=\"form-control form-control-sm\"\n                                                   disabled\n                                                   [(ngModel)]=\"data2.serieNF\"\n                                            >\n                                        </div>\n                                    </div>\n                                    <div class=\"col-lg-6 col-md-6\">\n                                        <div class=\"form-group \">\n                                            <label for=\"dtEmissao2\">{{'labels.emissao' | translate}}</label>\n                                            <app-data id=\"dtEmissao2\"\n                                                      name=\"dtEmissao2\"\n                                                      disabled\n                                                      [(ngModel)]=\"data2.dtEmissao\"\n                                                      [ngStyle]=\"{'width':'100%'}\">\n                                            </app-data>\n                                        </div>\n                                    </div>\n                                </div>\n                                <div class=\"row\">\n                                    <div class=\"col-lg-4 col-md-6\">\n                                        <div class=\"form-group\">\n                                            <label for=\"vlNota2\">{{'labels.valorTotal' | translate}}</label>\n                                            <input type=\"text\" id=\"vlNota2\" name=\"vlNota2\"\n                                                   class=\"form-control form-control-sm\"\n                                                   maxlength=\"16\"\n                                                   [(ngModel)]=\"data2.vlNota\"\n                                                   currencyMask\n                                                   disabled\n                                                   [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 2 }\"\n                                                   >\n                                        </div>\n                                    </div>\n                                </div>\n                                <div class=\"row\">\n                                    <div class=\"col-lg-12\">\n                                        <div class=\"form-group\">\n                                            <label for=\"fantasia2\">{{'labels.cliente' | translate}}</label>\n                                            <input type=\"text\" id=\"fantasia2\" name=\"fantasia2\"\n                                                   class=\"form-control form-control-sm\"\n                                                   disabled\n                                                   maxlength=\"25\"\n                                                   [(ngModel)]=\"data2.fantasia\"\n                                            >\n                                        </div>\n                                    </div>\n                                </div>\n                            </app-card-container>\n                        </div>\n                    </div>\n\n                    <div class=\"row\">\n                        <div class=\"col-4\">\n                            <div class=\"form-group\">\n                                <button class=\"btn btn-success mr-2\" type=\"submit\"\n                                        [disabled]=\"!this.data1.vlNota && !this.data2.vlNota\">\n                                    {{ 'buttons.ok' | translate }}\n                                </button>\n                                <button type=\"button\" class=\"btn btn-default\" (click)=\"cancel()\">{{ 'buttons.cancelar' | translate }}</button>\n                            </div>\n                        </div>\n                    </div>\n                </form>\n            </div>\n        </div>\n    </div>\n</div>\n\n<app-propriedades></app-propriedades>\n<app-liberar-acesso-supervisor></app-liberar-acesso-supervisor>\n<app-permissoes-rotina [constantes]=\"constantes\"></app-permissoes-rotina>\n\n");

/***/ }),

/***/ "./src/app/pages/comercial/substituir-rps/substituir-rps-index/substituir-rps-index.component.ts":
/*!*******************************************************************************************************!*\
  !*** ./src/app/pages/comercial/substituir-rps/substituir-rps-index/substituir-rps-index.component.ts ***!
  \*******************************************************************************************************/
/*! exports provided: SubstituirRPSIndexComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SubstituirRPSIndexComponent", function() { return SubstituirRPSIndexComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
/* harmony import */ var _shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../shared/components/corporate/base/base.permissoes */ "./src/app/shared/components/corporate/base/base.permissoes.ts");
/* harmony import */ var _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../shared/services/event-emitter/event-emitter.service */ "./src/app/shared/services/event-emitter/event-emitter.service.ts");
/* harmony import */ var _shared_services_funcoes_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../shared/services/funcoes/configuracao/configuracao.facade */ "./src/app/shared/services/funcoes/configuracao/configuracao.facade.ts");
/* harmony import */ var _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../shared/services/funcoes/funcoes.service */ "./src/app/shared/services/funcoes/funcoes.service.ts");
/* harmony import */ var _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../shared/services/funcoes/permissoes-utils/permissoes-utils.service */ "./src/app/shared/services/funcoes/permissoes-utils/permissoes-utils.service.ts");
/* harmony import */ var _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../../shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var _login_login_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../login/login.service */ "./src/app/pages/login/login.service.ts");
/* harmony import */ var _substituir_rps_constants__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../substituir-rps.constants */ "./src/app/pages/comercial/substituir-rps/substituir-rps.constants.ts");
/* harmony import */ var _substituir_rps_model__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../substituir-rps.model */ "./src/app/pages/comercial/substituir-rps/substituir-rps.model.ts");
/* harmony import */ var _substituir_rps_service__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../substituir-rps.service */ "./src/app/pages/comercial/substituir-rps/substituir-rps.service.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (undefined && undefined.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        if (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
            if (y = 0, t) op = [op[0] & 2, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};












var SubstituirRPSIndexComponent = /** @class */ (function (_super) {
    __extends(SubstituirRPSIndexComponent, _super);
    function SubstituirRPSIndexComponent(service, funcoes, router, configuracao, messageService, loginService, funcoesService, permissoesUtils) {
        var _this = _super.call(this, new _substituir_rps_constants__WEBPACK_IMPORTED_MODULE_9__["SubstituirRpsConstants"](), funcoesService) || this;
        _this.service = service;
        _this.funcoes = funcoes;
        _this.router = router;
        _this.configuracao = configuracao;
        _this.messageService = messageService;
        _this.loginService = loginService;
        _this.funcoesService = funcoesService;
        _this.permissoesUtils = permissoesUtils;
        _this.data1 = new _substituir_rps_model__WEBPACK_IMPORTED_MODULE_10__["SubstituirRpsDto"]();
        _this.data2 = new _substituir_rps_model__WEBPACK_IMPORTED_MODULE_10__["SubstituirRpsDto"]();
        _this.constantes = new _substituir_rps_constants__WEBPACK_IMPORTED_MODULE_9__["SubstituirRpsConstants"]();
        _this.target = _this.funcoesService.getTargetLocation();
        _this.config = new _substituir_rps_model__WEBPACK_IMPORTED_MODULE_10__["SubstituirRpsConfig"]();
        _this.loadConfig = function () {
            if (_this.configuracao.isLoadConfig()) {
                _this.config.fechamentoCtb = _this.configuracao.lerConfig("UNI", "FechamentoCtb");
                _this.config.fechamentoFis = _this.configuracao.lerConfig("LIV", "FechamentoFis");
            }
        };
        router.events.subscribe(function (event) {
            var params = _this.funcoesService.formParams.getParams(router, event);
            if (params) {
                _this.actionForm = params.action;
            }
        });
        return _this;
    }
    SubstituirRPSIndexComponent.prototype.ngOnInit = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 1, function () { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
            return [2 /*return*/, this.configuracao.getConfig(this.constantes.configs, this.loadConfig)];
        }); }); }, function () { return _this.permissoesUtils.back(); });
    };
    SubstituirRPSIndexComponent.prototype.onKeyupEvent = function (event) {
        var _this = this;
        if (this.timeOut) {
            clearTimeout(this.timeOut);
        }
        this.timeOut = setTimeout(function () {
            _this.executeFilter();
        }, 1000);
    };
    SubstituirRPSIndexComponent.prototype._onSubmit = function (form) {
        var _this = this;
        _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_3__["EventEmitterService"].get("formError").emit(form);
        if (form.invalid) {
            return;
        }
        var titulo = this.messageService.translate("messages.confirmaSubstituicaoRPS", { velho: this.data1.notaId, novo: this.data2.notaId });
        this.messageService.confirm("titles.substituirRps", titulo, null, function () { return _this.onSubmit(form); }, false);
    };
    SubstituirRPSIndexComponent.prototype.onSubmit = function (form) {
        var _this = this;
        _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_3__["EventEmitterService"].get("formError").emit(form);
        if (form.invalid) {
            return;
        }
        if (this.config.fechamentoCtb > this.data1.dtEmissao) {
            this.messageService.warning("titles.substituirRps", "messages.rpsAnteriorAoFechamentoContabilCancelamentoNaOpermitido");
            return;
        }
        if (this.config.fechamentoFis > this.data2.dtEmissao) {
            this.messageService.warning("titles.substituirRps", "messages.rpsAnteriorAoFechamentoContabilCancelamentoNaOpermitido");
            return;
        }
        var currentDay = new Date();
        currentDay.setDate(currentDay.getDate() - 100);
        if ((currentDay > this.data2.dtEmissao) || (currentDay > this.data1.dtEmissao)) {
            this.messageService.warning("titles.substituirRps", "messages.rPSEmitidoHaMaisDe100DiasCancelamentoNaoPermitido");
            return;
        }
        var obj = { regOrigem: this.data1.regNota, regDestino: this.data2.regNota };
        this.service.substituiRPS(obj).subscribe(function (resp) {
            if (resp) {
                var response = resp;
                if (response.isValid === false) {
                    _this.messageService.warning("titles.substituirRps", response.errorMessage);
                    return;
                }
                _this.messageService.warning("titles.substituirRps", "messages.sucesso");
                _this.data1 = new _substituir_rps_model__WEBPACK_IMPORTED_MODULE_10__["SubstituirRpsDto"]();
                _this.data2 = new _substituir_rps_model__WEBPACK_IMPORTED_MODULE_10__["SubstituirRpsDto"]();
            }
        });
    };
    SubstituirRPSIndexComponent.prototype.executeFilter = function () {
        var _this = this;
        if (!this.data2.notaId) {
            this.service.filter.status = "novo";
            this.service.filter.notaId = this.data1.notaId;
        }
        else if (this.data1.notaId) {
            this.service.filter.status = "velho";
            if (this.data2.notaId === this.data1.notaId) {
                this.messageService.warning("titles.substituirRps", "messages.rpsNaoPodeSerIgualRPSOrigem");
                this.data2.notaId = null;
                return;
            }
            this.service.filter.notaId = this.data2.notaId;
        }
        else if (!this.data1.notaId && !this.data2.notaId) {
            return;
        }
        this.service.getByNota(this.service.filter.notaId).subscribe(function (resp) {
            if (_this.service.filter.status === "novo") {
                if (!resp) {
                    _this.messageService.warning("titles.substituirRps", "messages.rPSNaoLocalizado");
                    return;
                }
                _this.data1 = resp;
                _this.data1.notaId = _this.service.filter.notaId;
            }
            else if (_this.service.filter.status === "velho") {
                if (!resp) {
                    _this.messageService.warning("titles.substituirRps", "messages.rPSNaoLocalizado");
                    return;
                }
                if (resp.sitReg === "C") {
                    _this.messageService.warning("titles.substituirRps", "messages.mesnagemRpsCancelado");
                    return;
                }
                if (resp.regNotaSubs === 0) {
                    _this.messageService.warning("titles.substituirRps", "messages.esteDocumentoJaEstaSubstituindoOutroRPS");
                    return;
                }
                _this.data2 = resp;
                _this.data2.notaId = _this.service.filter.notaId;
            }
            _this.service.filter.status = "";
            _this.service.filter.notaId = null;
        });
    };
    SubstituirRPSIndexComponent.prototype.permissoes = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 2, function () {
            _super.prototype.permissoes.call(_this, _this.constantes);
        });
    };
    SubstituirRPSIndexComponent.prototype.cancel = function () {
        if (this.data2.vlNota) {
            this.data2 = new _substituir_rps_model__WEBPACK_IMPORTED_MODULE_10__["SubstituirRpsDto"]();
        }
        else if (this.data1.vlNota) {
            this.data1 = new _substituir_rps_model__WEBPACK_IMPORTED_MODULE_10__["SubstituirRpsDto"]();
        }
    };
    SubstituirRPSIndexComponent.ctorParameters = function () { return [
        { type: _substituir_rps_service__WEBPACK_IMPORTED_MODULE_11__["SubstituirRpsService"] },
        { type: _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_5__["FuncoesService"] },
        { type: _angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"] },
        { type: _shared_services_funcoes_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_4__["ConfiguracaoFacade"] },
        { type: _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_7__["MessageService"] },
        { type: _login_login_service__WEBPACK_IMPORTED_MODULE_8__["LoginService"] },
        { type: _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_5__["FuncoesService"] },
        { type: _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_6__["PermissoesUtilsService"] }
    ]; };
    SubstituirRPSIndexComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: 'app-substituir-rps-index',
            template: __importDefault(__webpack_require__(/*! raw-loader!./substituir-rps-index.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/comercial/substituir-rps/substituir-rps-index/substituir-rps-index.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None
        }),
        __metadata("design:paramtypes", [_substituir_rps_service__WEBPACK_IMPORTED_MODULE_11__["SubstituirRpsService"],
            _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_5__["FuncoesService"],
            _angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"],
            _shared_services_funcoes_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_4__["ConfiguracaoFacade"],
            _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_7__["MessageService"],
            _login_login_service__WEBPACK_IMPORTED_MODULE_8__["LoginService"],
            _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_5__["FuncoesService"],
            _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_6__["PermissoesUtilsService"]])
    ], SubstituirRPSIndexComponent);
    return SubstituirRPSIndexComponent;
}(_shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_2__["BasePermissoes"]));



/***/ }),

/***/ "./src/app/pages/comercial/substituir-rps/substituir-rps.constants.ts":
/*!****************************************************************************!*\
  !*** ./src/app/pages/comercial/substituir-rps/substituir-rps.constants.ts ***!
  \****************************************************************************/
/*! exports provided: SubstituirRpsConstants */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SubstituirRpsConstants", function() { return SubstituirRpsConstants; });
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};
var SubstituirRpsConstants = /** @class */ (function () {
    function SubstituirRpsConstants() {
        this.sisFormularioId = 5228;
        this.permissoes = [
            { sisFormularioId: this.sisFormularioId, libRotina: 1, acao: "labels.substituirRps" },
            { sisFormularioId: this.sisFormularioId, libRotina: 2, acao: "labels.permissoes" },
        ];
        this.sisSistemaId = "CAD";
        this.configs = [];
        this.nomeForm = "titles.substituirRps";
        this.listaIndex = [
            { title: 'Permissao', action: 'permissoes', icon: "icon-unlock", exibeButton: true, eximeMenu: true, menuName: 'Movimento' },
        ];
        this.configs = [
            { sistema: "UNI", parametros: ["FechamentoCtb"] },
            { sistema: "LIV", parametros: ["FechamentoFis"] },
        ];
    }
    return SubstituirRpsConstants;
}());



/***/ }),

/***/ "./src/app/pages/comercial/substituir-rps/substituir-rps.model.ts":
/*!************************************************************************!*\
  !*** ./src/app/pages/comercial/substituir-rps/substituir-rps.model.ts ***!
  \************************************************************************/
/*! exports provided: SubstituirRpsDto, SubstituirRpsFilter, SubstituirRpsConfig */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SubstituirRpsDto", function() { return SubstituirRpsDto; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SubstituirRpsFilter", function() { return SubstituirRpsFilter; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SubstituirRpsConfig", function() { return SubstituirRpsConfig; });
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};
var SubstituirRpsDto = /** @class */ (function () {
    function SubstituirRpsDto() {
    }
    return SubstituirRpsDto;
}());

var SubstituirRpsFilter = /** @class */ (function () {
    function SubstituirRpsFilter() {
    }
    return SubstituirRpsFilter;
}());

var SubstituirRpsConfig = /** @class */ (function () {
    function SubstituirRpsConfig() {
    }
    return SubstituirRpsConfig;
}());



/***/ }),

/***/ "./src/app/pages/comercial/substituir-rps/substituir-rps.module.ts":
/*!*************************************************************************!*\
  !*** ./src/app/pages/comercial/substituir-rps/substituir-rps.module.ts ***!
  \*************************************************************************/
/*! exports provided: SubstituirRPSModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SubstituirRPSModule", function() { return SubstituirRPSModule; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js");
/* harmony import */ var _shared_shared_module__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../shared/shared.module */ "./src/app/shared/shared.module.ts");
/* harmony import */ var _substituir_rps_routing_module__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./substituir-rps.routing.module */ "./src/app/pages/comercial/substituir-rps/substituir-rps.routing.module.ts");
/* harmony import */ var _substituir_rps_index_substituir_rps_index_component__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./substituir-rps-index/substituir-rps-index.component */ "./src/app/pages/comercial/substituir-rps/substituir-rps-index/substituir-rps-index.component.ts");
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};





var SubstituirRPSModule = /** @class */ (function () {
    function SubstituirRPSModule() {
    }
    SubstituirRPSModule = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"])({
            declarations: [_substituir_rps_index_substituir_rps_index_component__WEBPACK_IMPORTED_MODULE_4__["SubstituirRPSIndexComponent"]],
            imports: [
                _angular_common__WEBPACK_IMPORTED_MODULE_1__["CommonModule"],
                _shared_shared_module__WEBPACK_IMPORTED_MODULE_2__["SharedModule"],
                _substituir_rps_routing_module__WEBPACK_IMPORTED_MODULE_3__["SubstituirRpsRoutingModule"]
            ]
        })
    ], SubstituirRPSModule);
    return SubstituirRPSModule;
}());



/***/ }),

/***/ "./src/app/pages/comercial/substituir-rps/substituir-rps.routing.module.ts":
/*!*********************************************************************************!*\
  !*** ./src/app/pages/comercial/substituir-rps/substituir-rps.routing.module.ts ***!
  \*********************************************************************************/
/*! exports provided: SubstituirRpsRoutingModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SubstituirRpsRoutingModule", function() { return SubstituirRpsRoutingModule; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
/* harmony import */ var app_config_enumerables__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! app/config/enumerables */ "./src/app/config/enumerables.ts");
/* harmony import */ var _substituir_rps_index_substituir_rps_index_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./substituir-rps-index/substituir-rps-index.component */ "./src/app/pages/comercial/substituir-rps/substituir-rps-index/substituir-rps-index.component.ts");
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};




var MRoutes = [
    {
        path: "",
        component: _substituir_rps_index_substituir_rps_index_component__WEBPACK_IMPORTED_MODULE_3__["SubstituirRPSIndexComponent"],
        data: {
            breadcrumb: "substituirRPS",
            formParams: { action: app_config_enumerables__WEBPACK_IMPORTED_MODULE_2__["ActionForm"].index }
        }
    }
];
var SubstituirRpsRoutingModule = /** @class */ (function () {
    function SubstituirRpsRoutingModule() {
    }
    SubstituirRpsRoutingModule = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"])({
            imports: [_angular_router__WEBPACK_IMPORTED_MODULE_1__["RouterModule"].forChild(MRoutes)],
            exports: [_angular_router__WEBPACK_IMPORTED_MODULE_1__["RouterModule"]]
        })
    ], SubstituirRpsRoutingModule);
    return SubstituirRpsRoutingModule;
}());



/***/ }),

/***/ "./src/app/pages/comercial/substituir-rps/substituir-rps.service.ts":
/*!**************************************************************************!*\
  !*** ./src/app/pages/comercial/substituir-rps/substituir-rps.service.ts ***!
  \**************************************************************************/
/*! exports provided: SubstituirRpsService */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SubstituirRpsService", function() { return SubstituirRpsService; });
/* harmony import */ var app_shared_services_base_base_service__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! app/shared/services/base/base.service */ "./src/app/shared/services/base/base.service.ts");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/fesm5/http.js");
/* harmony import */ var _substituir_rps_model__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./substituir-rps.model */ "./src/app/pages/comercial/substituir-rps/substituir-rps.model.ts");
/* harmony import */ var _environments_environment__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../environments/environment */ "./src/environments/environment.ts");
/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm5/operators/index.js");
/* harmony import */ var _app_error_handler__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../app.error-handler */ "./src/app/app.error-handler.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};







var SubstituirRpsService = /** @class */ (function (_super) {
    __extends(SubstituirRpsService, _super);
    function SubstituirRpsService(http) {
        var _this = _super.call(this, http, "") || this;
        _this.filter = new _substituir_rps_model__WEBPACK_IMPORTED_MODULE_3__["SubstituirRpsFilter"]();
        return _this;
    }
    SubstituirRpsService.prototype.getByNota = function (nota) {
        return this.http
            .get(_environments_environment__WEBPACK_IMPORTED_MODULE_4__["environment"].service_url + "/api/v1/comercial/substituirRPS/getByNota/" + nota)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_5__["catchError"])(_app_error_handler__WEBPACK_IMPORTED_MODULE_6__["ErrorHandler"].handleError));
    };
    SubstituirRpsService.prototype.substituiRPS = function (data) {
        return this.http
            .post(_environments_environment__WEBPACK_IMPORTED_MODULE_4__["environment"].service_url + "/api/v1/comercial/substituirRPS/substitui", data)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_5__["catchError"])(_app_error_handler__WEBPACK_IMPORTED_MODULE_6__["ErrorHandler"].handleError));
    };
    SubstituirRpsService.ctorParameters = function () { return [
        { type: _angular_common_http__WEBPACK_IMPORTED_MODULE_2__["HttpClient"] }
    ]; };
    SubstituirRpsService = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"])({
            providedIn: "root"
        }),
        __metadata("design:paramtypes", [_angular_common_http__WEBPACK_IMPORTED_MODULE_2__["HttpClient"]])
    ], SubstituirRpsService);
    return SubstituirRpsService;
}(app_shared_services_base_base_service__WEBPACK_IMPORTED_MODULE_0__["BaseService"]));



/***/ })

}]);
//# sourceMappingURL=app-pages-comercial-substituir-rps-substituir-rps-module.js.map