(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["app-pages-especificos-rocha-movimentos-emissao-nota-fiscal-emissao-nota-fiscal-module"],{

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/especificos/rocha/movimentos/emissao-nota-fiscal/emissao-nota-fiscal-filter/emissao-nota-fiscal-filter.component.html":
/*!***********************************************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/especificos/rocha/movimentos/emissao-nota-fiscal/emissao-nota-fiscal-filter/emissao-nota-fiscal-filter.component.html ***!
  \***********************************************************************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("<div class=\"modal\" id=\"emissao-nota-fiscal-filter-dialog\" tabindex=\"-1\" role=\"dialog\" data-backdrop=\"static\">\r\n    <div class=\"uni-modal-dialog-md-30\">\r\n        <div class=\"modal-content\">\r\n            <div class=\"modal-header\">\r\n                <h6 class=\"modal-title\">{{title}}</h6>\r\n            </div>\r\n            <form class=\"form\" #form=\"ngForm\" (ngSubmit)=\"onSubmit(form)\" *ngIf=\"!!service.filter\">\r\n                <app-validacoes></app-validacoes>\r\n                <div class=\"modal-body\">\r\n                    <div class=\"row\">\r\n                        <div class=\"col-lg-12 mb-0\">\r\n                            <div class=\"form-group form-group-sm\">\r\n                                <label>&nbsp;</label>\r\n                                <div class=\"form-check-inline\">\r\n                                    <input id=\"tipoMov0\" type=\"radio\" name=\"tipoMov\" class=\"form-check-input\" value=\"E\"\r\n                                        [(ngModel)]=\"service.filter.tipoMov\">\r\n                                    <label for=\"tipoMov0\">{{ 'labels.entrada' | translate }}</label>\r\n                                </div>\r\n                                <div class=\"form-check-inline\">\r\n                                    <input id=\"tipoMov1\" type=\"radio\" name=\"tipoMov\" class=\"form-check-input\" value=\"S\"\r\n                                        [(ngModel)]=\"service.filter.tipoMov\">\r\n                                    <label for=\"tipoMov1\">{{ 'labels.saida' | translate }}</label>\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                    <div class=\"row\">\r\n                        <div class=\"col-lg-12\">\r\n                            <div class=\"form-group form-group-sm\">\r\n                                <label for=\"ordem\">{{'labels.ordem' | translate}}</label>\r\n                                <app-ordem id=\"ordem\" name=\"ordem\" [list]=\"constantes.orderBy\"\r\n                                    (outOrdem)=\"service.filter.ordem = $event\"></app-ordem>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                </div>\r\n                <div class=\"modal-footer\">\r\n                    <button class=\"btn btn-success mr-1\" type=\"submit\">{{ 'buttons.pesquisar' | translate }}\r\n                    </button>\r\n                    <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">{{ 'buttons.sair' | translate\r\n                        }}</button>\r\n                </div>\r\n            </form>\r\n        </div>\r\n    </div>\r\n</div>");

/***/ }),

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/especificos/rocha/movimentos/emissao-nota-fiscal/emissao-nota-fiscal-index/emissao-nota-fiscal-index.component.html":
/*!*********************************************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/especificos/rocha/movimentos/emissao-nota-fiscal/emissao-nota-fiscal-index/emissao-nota-fiscal-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\" [sisFormularioId]=\"constantes.sisFormularioId\"\n    [formAction]=\"actionForm\" [itemData]=\"data.pedidoId\">\n</app-menu-command-bar>\n\n<div class=\"section-comand-bar\">\n    <table id=\"dtEmissaoNotaFiscal\" class=\"table table-striped table-bordered table-hover nowrap table-sm\"></table>\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<app-emissao-nota-fiscal-filter (filtrar)=\"executarFiltro($event)\">\n</app-emissao-nota-fiscal-filter>\n<app-emissao-nota-fiscal-titulo-modal (ok)=\"outTituloAtraso($event)\"></app-emissao-nota-fiscal-titulo-modal>\n<app-emissao-nota-fiscal-moeda [cotacaoDeMoeda]=\"cotacaoDeMoeda\" [pedidoId]=\"data.pedidoId\" (dataResult)=\"outMoedaCotacao($event)\"></app-emissao-nota-fiscal-moeda>");

/***/ }),

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/especificos/rocha/movimentos/emissao-nota-fiscal/emissao-nota-fiscal-liberar/emissao-nota-fiscal-liberar-form.component.html":
/*!******************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/especificos/rocha/movimentos/emissao-nota-fiscal/emissao-nota-fiscal-liberar/emissao-nota-fiscal-liberar-form.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.listaForm\" [sisFormularioId]=\"constantes.sisFormularioId\"\n    [formAction]=\"actionForm\" [itemData]=\"service.data?.pedidoId\">\n</app-menu-command-bar>\n\n<div class=\"row\">\n    <div class=\"col-lg-12\">\n        <div class=\"card\">\n            <app-form-legenda></app-form-legenda>\n            <div class=\"card-body widget-body\">\n                <form class=\"form\" #f=\"ngForm\" (ngSubmit)=\"onSubmit(f)\" *ngIf=\"!!service.data\">\n                    <app-validacoes></app-validacoes>\n                    <div class=\"row\">\n                        <div class=\"col-lg-3 col-md-6 col-sm-12\">\n                            <div class=\"form-group form-group-sm\">\n                                <label for=\"pedido\">{{'labels.pedido' | translate}}</label>\n                                <input id=\"pedido\" name=\"pedido\" [(ngModel)]=\"service.data.pedido\"\n                                    class=\"form-control form-control-sm\" type=\"text\" disabled>\n                            </div>\n                        </div>\n                        <div class=\"col-lg-3 col-md-6 col-sm-12\">\n                            <div class=\"form-group form-group-sm\">\n                                <label for=\"numControle\">{{'labels.numControle' | translate}}</label>\n                                <input id=\"numControle\" name=\"numControle\" [(ngModel)]=\"service.data.numControle\"\n                                    class=\"form-control form-control-sm\" type=\"text\" disabled>\n                            </div>\n                        </div>\n                    </div>\n                    <div class=\"row\">\n                        <div class=\"col-lg-6 col-md-10 col-sm-12\">\n                            <div class=\"form-group form-group-sm\">\n                                <app-input-description [label]=\"'destinatario'\"\n                                    [valueID]=\"service.data.destinatarioIdCliente\"\n                                    [valueDescription]=\"service.data?.destinatario?.fantasia\">\n                                </app-input-description>\n                            </div>\n                        </div>\n                    </div>\n                    <div class=\"row\">\n                        <div class=\"col-lg-6 col-md-6 col-sm-12\">\n                            <div class=\"form-group form-group-sm\">\n                                <label for=\"municipio\">{{'labels.municipio' | translate}}</label>\n                                <input id=\"municipio\" name=\"municipio\" [(ngModel)]=\"service.data.municipio\"\n                                    class=\"form-control form-control-sm\" type=\"text\" disabled>\n                            </div>\n                        </div>\n                        <div class=\"col-lg-2 col-md-6 col-sm-12\">\n                            <div class=\"form-group form-group-sm\">\n                                <label for=\"uf\">{{'labels.estado' | translate}}</label>\n                                <input id=\"uf\" name=\"uf\" [(ngModel)]=\"service.data.estadoId\"\n                                    class=\"form-control form-control-sm\" type=\"text\" disabled>\n                            </div>\n                        </div>\n                    </div>\n                    <div class=\"row\">\n                        <div class=\"col-lg-2 col-md-6 col-sm-12\">\n                            <div class=\"form-group form-group-sm\">\n                                <label for=\"emissao\" class=\"required\">{{\"labels.emissao\" | translate }}</label>\n                                <app-data id=\"emissao\" name=\"emissao\" [(ngModel)]=\"service.data.dtEmissao\" autofocus\n                                    class=\"dataHora\" [formatDateTime]=\"mascara.getFormatData\" required=\"true\"\n                                    [disabled]=\"true\">\n                                </app-data>\n                            </div>\n                        </div>\n                    </div>\n                    <div class=\"clearfix\">\n                        <ul class=\"nav nav-tabs\">\n                            <li class=\"nav-item\">\n                                <a class=\"nav-link active show\" data-toggle=\"tab\" href=\"#va\">{{\"labels.valores\" |\n                                    translate}}</a>\n                            </li>\n                            <li class=\"nav-item\" *ngIf=\"showDuplicatas\">\n                                <a class=\"nav-link\" data-toggle=\"tab\" href=\"#du\">{{\"labels.duplicatas\" | translate}}</a>\n                            </li>\n                            <li class=\"nav-item\" *ngIf=\"showTransporte\">\n                                <a class=\"nav-link\" data-toggle=\"tab\" href=\"#tr\">{{\"labels.transporte\" | translate}}</a>\n                            </li>\n                            <li class=\"nav-item\">\n                                <a class=\"nav-link\" data-toggle=\"tab\" href=\"#ob\">{{\"labels.observacoes\" |\n                                    translate}}</a>\n                            </li>\n                            <li class=\"nav-item\">\n                                <a class=\"nav-link\" data-toggle=\"tab\" href=\"#obp\">{{\"labels.observacoesDoPedido\" |\n                                    translate}}</a>\n                            </li>\n                        </ul>\n                    </div>\n                    <div class=\"tab-content top\">\n                        <!-- ABA VALORES -->\n                        <div class=\"tab-pane active show\" id=\"va\">\n                            <div class=\"row\">\n                                <div class=\"col-lg-3\">\n                                    <div class=\"row\">\n                                        <div class=\"col-lg-9 col-md-6 col-sm-12\">\n                                            <div class=\"form-group form-group-sm\">\n                                                <label for=\"vlFrete\">{{'labels.vlFrete' | translate}}</label>\n                                                <input id=\"vlFrete\" name=\"vlFrete\" [(ngModel)]=\"service.data.vlFrete\"\n                                                    class=\"form-control form-control-sm\" type=\"text\"\n                                                    [disabled]=\"disabledVlFrete\" currencyMask\n                                                    [options]=\"funcoes.optionCurrency(2)\" (blur)=\"setaRecalculo()\">\n                                            </div>\n                                        </div>\n                                    </div>\n                                    <div class=\"row\">\n                                        <div class=\"col-lg-9 col-md-6 col-sm-12\">\n                                            <div class=\"form-group form-group-sm\">\n                                                <label for=\"vlSeguro\">{{'labels.vlSeguro' | translate}}</label>\n                                                <input id=\"vlSeguro\" name=\"vlSeguro\" [(ngModel)]=\"service.data.vlSeguro\"\n                                                    class=\"form-control form-control-sm\" type=\"text\"\n                                                    [disabled]=\"disabledVlFrete\" currencyMask\n                                                    [options]=\"funcoes.optionCurrency(2)\" (blur)=\"setaRecalculo()\">\n                                            </div>\n                                        </div>\n                                    </div>\n                                    <div class=\"row\">\n                                        <div class=\"col-lg-9 col-md-6 col-sm-12\">\n                                            <div class=\"form-group form-group-sm\">\n                                                <label for=\"vlOutras\">{{'labels.vlOutras' | translate}}</label>\n                                                <input id=\"vlOutras\" name=\"vlOutras\" [(ngModel)]=\"service.data.vlOutras\"\n                                                    class=\"form-control form-control-sm\" type=\"text\"\n                                                    [disabled]=\"disabledVlOutras\" currencyMask\n                                                    [options]=\"funcoes.optionCurrency(2)\" (blur)=\"setaRecalculo()\">\n                                            </div>\n                                        </div>\n                                    </div>\n                                    <div class=\"row\">\n                                        <div class=\"col-lg-9 col-md-6 col-sm-12\">\n                                            <div class=\"form-group form-group-sm\">\n                                                <label for=\"desconto\">{{'labels.desconto%' | translate}}</label>\n                                                <input id=\"desconto\" name=\"desconto\"\n                                                    [(ngModel)]=\"service.data.descPtPed\"\n                                                    class=\"form-control form-control-sm\" type=\"text\" currencyMask\n                                                    [options]=\"funcoes.optionCurrency(2)\" (blur)=\"setaRecalculo()\"\n                                                    [maxLength]=\"5\">\n                                            </div>\n                                        </div>\n                                    </div>\n                                    <div class=\"row\">\n                                        <div class=\"col-lg-9 col-md-6 col-sm-12\">\n                                            <div class=\"form-group form-group-sm\">\n                                                <label for=\"descVl\"></label>\n                                                <input id=\"descVl\" name=\"descVl\" [(ngModel)]=\"service.data.descVl\"\n                                                    class=\"form-control form-control-sm\" type=\"text\" currencyMask\n                                                    [options]=\"funcoes.optionCurrency(2)\" (blur)=\"setaRecalculo()\">\n                                            </div>\n                                        </div>\n                                    </div>\n                                    <div class=\"row\">\n                                        <div class=\"col-lg-9 col-md-6 col-sm-12\">\n                                            <div class=\"form-group form-group-sm\">\n                                                <label for=\"encFin\">{{'labels.vlEncFin' | translate}}</label>\n                                                <input id=\"encFin\" name=\"encFin\" [(ngModel)]=\"service.data.encFin\"\n                                                    class=\"form-control form-control-sm\" type=\"text\" currencyMask\n                                                    [options]=\"funcoes.optionCurrency(2)\" (blur)=\"setaRecalculo()\"\n                                                    [maxLength]=\"5\">\n                                            </div>\n                                        </div>\n                                    </div>\n                                    <div class=\"row\">\n                                        <div class=\"col-lg-9 col-md-6 col-sm-12\">\n                                            <div class=\"form-group form-group-sm\">\n                                                <label for=\"vlSiscomex\"\n                                                    [class.required]=\"!disabledCamposValores\">{{'labels.vlDoSiscomex' |\n                                                    translate}}</label>\n                                                <input id=\"vlSiscomex\" name=\"vlSiscomex\"\n                                                    [(ngModel)]=\"service.data.vlSiscomex\"\n                                                    class=\"form-control form-control-sm\" type=\"text\"\n                                                    [disabled]=\"disabledCamposValores\"\n                                                    [required]=\"!disabledCamposValores\" currencyMask\n                                                    [options]=\"funcoes.optionCurrency(2)\" (blur)=\"setaRecalculo()\">\n                                            </div>\n                                        </div>\n                                    </div>\n                                    <div class=\"row\">\n                                        <div class=\"col-lg-9 col-md-6 col-sm-12\">\n                                            <div class=\"form-group form-group-sm\">\n                                                <label for=\"vlMerc\">{{'labels.totalDasMercadorias' | translate}}</label>\n                                                <input id=\"vlMerc\" name=\"vlMerc\" [(ngModel)]=\"service.data.vlMerc\"\n                                                    class=\"form-control form-control-sm\" type=\"text\" [disabled]=\"true\"\n                                                    currencyMask [options]=\"funcoes.optionCurrency(2)\">\n                                            </div>\n                                        </div>\n                                    </div>\n                                    <div class=\"row\">\n                                        <div class=\"col-lg-9 col-md-6 col-sm-12\">\n                                            <div class=\"form-group form-group-sm\">\n                                                <label for=\"vlServ\">{{'labels.totalDosServicos' | translate}}</label>\n                                                <input id=\"vlServ\" name=\"vlServ\" [(ngModel)]=\"service.data.vlServ\"\n                                                    class=\"form-control form-control-sm\" type=\"text\" [disabled]=\"true\"\n                                                    currencyMask [options]=\"funcoes.optionCurrency(2)\">\n                                            </div>\n                                        </div>\n                                    </div>\n                                    <div class=\"row\">\n                                        <div class=\"col-lg-9 col-md-6 col-sm-12\">\n                                            <div class=\"form-group form-group-sm\">\n                                                <label for=\"vlFatura\"\n                                                    [class.required]=\"!disabledCamposValores\">{{'labels.vlFatura' |\n                                                    translate}}</label>\n                                                <input id=\"vlFatura\" name=\"vlFatura\" [(ngModel)]=\"service.data.vlFatura\"\n                                                    class=\"form-control form-control-sm\" type=\"text\"\n                                                    [disabled]=\"disabledCamposValores || service.data.vlFatura === 0\"\n                                                    [required]=\"!disabledCamposValores\" currencyMask\n                                                    [options]=\"funcoes.optionCurrency(2)\"\n                                                    (blur)=\"validaDifMaxima('vlFatura', $event.target.value, defaultVlFatura)\">\n                                            </div>\n                                        </div>\n                                    </div>\n                                    <div class=\"row\">\n                                        <div class=\"col-lg-9 col-md-6 col-sm-12\">\n                                            <div class=\"form-group form-group-sm\">\n                                                <label for=\"vlNota\"\n                                                    [class.required]=\"!disabledCamposValores\">{{'labels.totalNotaFiscal'\n                                                    |\n                                                    translate}}</label>\n                                                <input id=\"vlNota\" name=\"vlNota\" [(ngModel)]=\"service.data.vlNota\"\n                                                    class=\"form-control form-control-sm\" type=\"text\"\n                                                    [disabled]=\"disabledCamposValores || service.data.vlNota === 0\"\n                                                    [required]=\"!disabledCamposValores\" currencyMask\n                                                    [options]=\"funcoes.optionCurrency(2)\"\n                                                    (blur)=\"validaDifMaxima('vlNota', $event.target.value, defaultVlNota)\">\n                                            </div>\n                                        </div>\n                                    </div>\n                                </div>\n                                <div class=\"col-lg-7\">\n                                    <app-card-container tituloCard=\"impostos\">\n                                        <div class=\"row\">\n                                            <div class=\"col-lg-6\">\n                                                <div class=\"row\">\n                                                    <div class=\"col-lg-9 col-md-6 col-sm-12\">\n                                                        <div class=\"form-group form-group-sm\">\n                                                            <label for=\"baseDeCalcICMS\"\n                                                                [class.required]=\"!disabledCamposValores\">{{'labels.baseDeCalcICMS'\n                                                                |\n                                                                translate}}</label>\n                                                            <input id=\"baseDeCalcICMS\" name=\"baseDeCalcICMS\"\n                                                                [(ngModel)]=\"service.data.basIcm\"\n                                                                class=\"form-control form-control-sm\" type=\"text\"\n                                                                [disabled]=\"disabledCamposValores || service.data.basIcm === 0\"\n                                                                [required]=\"!disabledCamposValores\" currencyMask\n                                                                [options]=\"funcoes.optionCurrency(2)\"\n                                                                (blur)=\"validaDifMaxima('basIcm', $event.target.value, defaultBasIcm)\">\n                                                        </div>\n                                                    </div>\n                                                </div>\n                                                <div class=\"row\">\n                                                    <div class=\"col-lg-9 col-md-6 col-sm-12\">\n                                                        <div class=\"form-group form-group-sm\">\n                                                            <label for=\"baseDeCalcIPI\"\n                                                                [class.required]=\"!disabledCamposValores\">{{'labels.baseDeCalcIPI'\n                                                                |\n                                                                translate}}</label>\n                                                            <input id=\"baseDeCalcIPI\" name=\"baseDeCalcIPI\"\n                                                                [(ngModel)]=\"service.data.basIpi\"\n                                                                class=\"form-control form-control-sm\" type=\"text\"\n                                                                [disabled]=\"disabledCamposValores || service.data.basIpi === 0\"\n                                                                [required]=\"!disabledCamposValores\" currencyMask\n                                                                [options]=\"funcoes.optionCurrency(2)\"\n                                                                (blur)=\"validaDifMaxima('basIpi', $event.target.value, defaultBasIpi)\">\n                                                        </div>\n                                                    </div>\n                                                </div>\n                                                <div class=\"row\">\n                                                    <div class=\"col-lg-9 col-md-6 col-sm-12\">\n                                                        <div class=\"form-group form-group-sm\">\n                                                            <label for=\"vlIcms\"\n                                                                [class.required]=\"!disabledCamposValores\">{{'labels.valorDoICMS'\n                                                                |\n                                                                translate}}</label>\n                                                            <input id=\"vlIcms\" name=\"vlIcms\"\n                                                                [(ngModel)]=\"service.data.vlIcms\"\n                                                                class=\"form-control form-control-sm\" type=\"text\"\n                                                                [disabled]=\"disabledCamposValores || service.data.vlIcms === 0\"\n                                                                [required]=\"!disabledCamposValores\" currencyMask\n                                                                [options]=\"funcoes.optionCurrency(2)\"\n                                                                (blur)=\"validaDifMaxima('vlIcms', $event.target.value, defaultVlIcms)\">\n                                                        </div>\n                                                    </div>\n                                                </div>\n                                                <div class=\"row\">\n                                                    <div class=\"col-lg-9 col-md-6 col-sm-12\">\n                                                        <div class=\"form-group form-group-sm\">\n                                                            <label for=\"vlIpi\"\n                                                                [class.required]=\"!disabledCamposValores\">{{'labels.valorDoIPI'\n                                                                |\n                                                                translate}}</label>\n                                                            <input id=\"vlIpi\" name=\"vlIpi\"\n                                                                [(ngModel)]=\"service.data.vlIpi\"\n                                                                class=\"form-control form-control-sm\" type=\"text\"\n                                                                [disabled]=\"disabledCamposValores || service.data.vlIpi === 0\"\n                                                                [required]=\"!disabledCamposValores\" currencyMask\n                                                                [options]=\"funcoes.optionCurrency(2)\"\n                                                                (blur)=\"validaDifMaxima('vlIpi', $event.target.value, defaultVlIpi)\">\n                                                        </div>\n                                                    </div>\n                                                </div>\n                                                <div class=\"row\">\n                                                    <div class=\"col-lg-9 col-md-6 col-sm-12\">\n                                                        <div class=\"form-group form-group-sm\">\n                                                            <label for=\"valorDoICMSRet\"\n                                                                [class.required]=\"!disabledCamposValores\">{{'labels.valorDoICMSRet'\n                                                                |\n                                                                translate}}</label>\n                                                            <input id=\"valorDoICMSRet\" name=\"valorDoICMSRet\"\n                                                                [(ngModel)]=\"service.data.vlIcmsRet\"\n                                                                class=\"form-control form-control-sm\" type=\"text\"\n                                                                [disabled]=\"disabledCamposValores || service.data.vlIcmsRet === 0\"\n                                                                [required]=\"!disabledCamposValores\" currencyMask\n                                                                [options]=\"funcoes.optionCurrency(2)\"\n                                                                (blur)=\"validaDifMaxima('vlIcmsRet', $event.target.value, defaultVlIcmsRet)\">\n                                                        </div>\n                                                    </div>\n                                                </div>\n                                                <div class=\"row\">\n                                                    <div class=\"col-lg-9 col-md-6 col-sm-12\">\n                                                        <div class=\"form-group form-group-sm\">\n                                                            <label for=\"valorDoIPIDestacado\"\n                                                                [class.required]=\"!disabledCamposValores\">{{'labels.valorDoIPIDestacado'\n                                                                | translate}}</label>\n                                                            <input id=\"valorDoIPIDestacado\" name=\"valorDoIPIDestacado\"\n                                                                [(ngModel)]=\"service.data.vlIpiDest\"\n                                                                class=\"form-control form-control-sm\" type=\"text\"\n                                                                [disabled]=\"disabledCamposValores || service.data.vlIpiDest === 0\"\n                                                                [required]=\"!disabledCamposValores\" currencyMask\n                                                                [options]=\"funcoes.optionCurrency(2)\"\n                                                                (blur)=\"validaDifMaxima('vlIpiDest', $event.target.value, defaultVlIpiDest)\">\n                                                        </div>\n                                                    </div>\n                                                </div>\n                                                <div class=\"row\">\n                                                    <div class=\"col-lg-9 col-md-6 col-sm-12\">\n                                                        <div class=\"form-group form-group-sm\">\n                                                            <label for=\"vlIss\"\n                                                                [class.required]=\"!disabledCamposValores\">{{'labels.vlDoIss'\n                                                                | translate}}</label>\n                                                            <input id=\"vlIss\" name=\"vlIss\"\n                                                                [(ngModel)]=\"service.data.vlIss\"\n                                                                class=\"form-control form-control-sm\" type=\"text\"\n                                                                [disabled]=\"disabledCamposValores\"\n                                                                [required]=\"!disabledCamposValores\" currencyMask\n                                                                [options]=\"funcoes.optionCurrency(2)\"\n                                                                (blur)=\"validaDifMaxima('vlIss', $event.target.value, defaultVlIss)\">\n                                                        </div>\n                                                    </div>\n                                                </div>\n                                                <div class=\"row\">\n                                                    <div class=\"col-lg-9 col-md-6 col-sm-12\">\n                                                        <div class=\"form-group form-group-sm\">\n                                                            <label for=\"vlIr\"\n                                                                [class.required]=\"!disabledCamposValores\">{{'labels.vlDoIR'\n                                                                | translate}}</label>\n                                                            <input id=\"vlIr\" name=\"vlIr\" [(ngModel)]=\"service.data.vlIr\"\n                                                                class=\"form-control form-control-sm\" type=\"text\"\n                                                                [disabled]=\"disabledCamposValores || service.data.vlIr === 0\"\n                                                                [required]=\"!disabledCamposValores\" currencyMask\n                                                                [options]=\"funcoes.optionCurrency(2)\"\n                                                                (blur)=\"validaDifMaxima('vlIr', $event.target.value, defaultVlIr)\">\n                                                        </div>\n                                                    </div>\n                                                </div>\n                                                <div class=\"row\">\n                                                    <div class=\"col-lg-9 col-md-6 col-sm-12\">\n                                                        <div class=\"form-group form-group-sm\">\n                                                            <label for=\"vlInss\"\n                                                                [class.required]=\"!disabledCamposValores\">{{'labels.vlDoINSS'\n                                                                |\n                                                                translate}}</label>\n                                                            <input id=\"vlInss\" name=\"vlInss\"\n                                                                [(ngModel)]=\"service.data.vlInss\"\n                                                                class=\"form-control form-control-sm\" type=\"text\"\n                                                                [disabled]=\"disabledCamposValores || service.data.vlInss === 0\"\n                                                                [required]=\"!disabledCamposValores\" currencyMask\n                                                                [options]=\"funcoes.optionCurrency(2)\"\n                                                                (blur)=\"validaDifMaxima('vlInss', $event.target.value, defaultVlInss)\">\n                                                        </div>\n                                                    </div>\n                                                </div>\n                                                <div class=\"row\">\n                                                    <div class=\"col-lg-9 col-md-6 col-sm-12\">\n                                                        <div class=\"form-group form-group-sm\">\n                                                            <label for=\"vlIssRet\">{{'labels.vlDoISSRet'\n                                                                |\n                                                                translate}}</label>\n                                                            <input id=\"vlIssRet\" name=\"vlIssRet\"\n                                                                [(ngModel)]=\"service.data.vlIssRet\"\n                                                                class=\"form-control form-control-sm\" type=\"text\"\n                                                                disabled currencyMask\n                                                                [options]=\"funcoes.optionCurrency(2)\">\n                                                        </div>\n                                                    </div>\n                                                </div>\n                                                <div class=\"row\">\n                                                    <div class=\"col-lg-9 col-md-6 col-sm-12\">\n                                                        <div class=\"form-group form-group-sm\">\n                                                            <label for=\"impostoRet\"\n                                                                [class.required]=\"!disabledCamposValores\">{{'labels.vlImpostoRet'\n                                                                |\n                                                                translate}}</label>\n                                                            <input id=\"impostoRet\" name=\"impostoRet\"\n                                                                [(ngModel)]=\"service.data.impostoRet\"\n                                                                class=\"form-control form-control-sm\" type=\"text\"\n                                                                [disabled]=\"disabledCamposValores\"\n                                                                [required]=\"!disabledCamposValores\" currencyMask\n                                                                [options]=\"funcoes.optionCurrency(2)\"\n                                                                (blur)=\"validaDifMaxima('impostoRet', $event.target.value, defaultImpostoRet)\">\n                                                        </div>\n                                                    </div>\n                                                </div>\n                                            </div>\n                                            <div class=\"col-lg-6\">\n                                                <div class=\"row\">\n                                                    <div class=\"col-lg-9 col-md-6 col-sm-12\">\n                                                        <div class=\"form-group form-group-sm\">\n                                                            <label for=\"vlPis\">{{'labels.valorPIS'\n                                                                | translate}}</label>\n                                                            <input id=\"vlPis\" name=\"vlPis\"\n                                                                [(ngModel)]=\"service.data.vlPis\"\n                                                                class=\"form-control form-control-sm\" type=\"text\"\n                                                                disabled currencyMask\n                                                                [options]=\"funcoes.optionCurrency(2)\">\n                                                        </div>\n                                                    </div>\n                                                </div>\n                                                <div class=\"row\">\n                                                    <div class=\"col-lg-9 col-md-6 col-sm-12\">\n                                                        <div class=\"form-group form-group-sm\">\n                                                            <label for=\"vlCofins\">{{'labels.valorCOFINS' |\n                                                                translate}}</label>\n                                                            <input id=\"vlCofins\" name=\"vlCofins\"\n                                                                [(ngModel)]=\"service.data.vlCofins\"\n                                                                class=\"form-control form-control-sm\" type=\"text\"\n                                                                disabled currencyMask\n                                                                [options]=\"funcoes.optionCurrency(2)\">\n                                                        </div>\n                                                    </div>\n                                                </div>\n                                                <div class=\"row\">\n                                                    <div class=\"col-lg-9 col-md-6 col-sm-12\">\n                                                        <div class=\"form-group form-group-sm\">\n                                                            <label for=\"vlCsll\">{{'labels.vlCsll' | translate}}</label>\n                                                            <input id=\"vlCsll\" name=\"vlCsll\"\n                                                                [(ngModel)]=\"service.data.vlCsll\"\n                                                                class=\"form-control form-control-sm\" type=\"text\"\n                                                                disabled currencyMask\n                                                                [options]=\"funcoes.optionCurrency(2)\">\n                                                        </div>\n                                                    </div>\n                                                </div>\n                                                <div class=\"row\">\n                                                    <div class=\"col-lg-9 col-md-6 col-sm-12\">\n                                                        <div class=\"form-group form-group-sm\">\n                                                            <label for=\"vlII\">{{'labels.valorII' | translate}}</label>\n                                                            <input id=\"vlII\" name=\"vlII\" [(ngModel)]=\"service.data.vlII\"\n                                                                class=\"form-control form-control-sm\" type=\"text\"\n                                                                disabled currencyMask\n                                                                [options]=\"funcoes.optionCurrency(2)\">\n                                                        </div>\n                                                    </div>\n                                                </div>\n                                                <div class=\"row\">\n                                                    <div class=\"col-lg-9 col-md-6 col-sm-12\">\n                                                        <div class=\"form-group form-group-sm\">\n                                                            <label for=\"vlDedIcms\">{{'labels.vlDedIcms' |\n                                                                translate}}</label>\n                                                            <input id=\"vlDedIcms\" name=\"vlDedIcms\"\n                                                                [(ngModel)]=\"service.data.vlDedIcms\"\n                                                                class=\"form-control form-control-sm\" type=\"text\"\n                                                                disabled currencyMask\n                                                                [options]=\"funcoes.optionCurrency(2)\">\n                                                        </div>\n                                                    </div>\n                                                </div>\n                                                <div class=\"row\">\n                                                    <div class=\"col-lg-9 col-md-6 col-sm-12\">\n                                                        <div class=\"form-group form-group-sm\">\n                                                            <label for=\"vlDedPis\">{{'labels.vlDedPis' |\n                                                                translate}}</label>\n                                                            <input id=\"vlDedPis\" name=\"vlDedPis\"\n                                                                [(ngModel)]=\"service.data.vlDedPis\"\n                                                                class=\"form-control form-control-sm\" type=\"text\"\n                                                                disabled currencyMask\n                                                                [options]=\"funcoes.optionCurrency(2)\">\n                                                        </div>\n                                                    </div>\n                                                </div>\n                                                <div class=\"row\">\n                                                    <div class=\"col-lg-9 col-md-6 col-sm-12\">\n                                                        <div class=\"form-group form-group-sm\">\n                                                            <label for=\"vlDedCofins\">{{'labels.vlDedCofins'\n                                                                |\n                                                                translate}}</label>\n                                                            <input id=\"vlDedCofins\" name=\"vlDedCofins\"\n                                                                [(ngModel)]=\"service.data.vlDedCofins\"\n                                                                class=\"form-control form-control-sm\" type=\"text\"\n                                                                disabled currencyMask\n                                                                [options]=\"funcoes.optionCurrency(2)\">\n                                                        </div>\n                                                    </div>\n                                                </div>\n                                            </div>\n                                        </div>\n                                    </app-card-container>\n                                </div>\n                            </div>\n                        </div>\n                        <!-- ABA DUPLICATAS -->\n                        <div class=\"tab-pane\" id=\"du\" *ngIf=\"showDuplicatas\">\n                            <div class=\"row\">\n                                <div class=\"col-lg-6\">\n                                    <div class=\"row\">\n                                        <div class=\"col-lg-10 col-md-8 col-sm-12\">\n                                            <div class=\"form-group form-group-sm\">\n                                                <label for=\"condPagto\" [class.required]=\"!disabledCondPagto\">{{\n                                                    'labels.condPagto' |\n                                                    translate}}</label>\n                                                <app-combo-padrao name=\"condPagto\" id=\"condPagto\" chave=\"CondPag\"\n                                                    descricao=\"DescrCond\" ativo=\"true\" tabela=\"CondPagamento\"\n                                                    [(ngModel)]=\"service.data.condPagamentoId\"\n                                                    [disabled]=\"disabledCondPagto\" (change)=\"trataCondPagamento()\">\n                                                </app-combo-padrao>\n                                            </div>\n                                        </div>\n                                    </div>\n                                    <div class=\"row\">\n                                        <div class=\"col-lg-10 col-md-8 col-sm-12\">\n                                            <div class=\"form-group form-group-sm\">\n                                                <label for=\"desdobramento\">{{'labels.desdobramento' |\n                                                    translate}}</label>\n                                                <input id=\"desdobramento\" name=\"desdobramento\"\n                                                    [(ngModel)]=\"service.data.desdobramento\" maxlength=\"40\"\n                                                    class=\"form-control form-control-sm\" type=\"text\" disabled>\n                                            </div>\n                                        </div>\n                                    </div>\n                                    <div class=\"row\">\n                                        <div class=\"col-lg-10 col-md-8 col-sm-12\">\n                                            <div class=\"form-group form-group-sm\">\n                                                <label for=\"contaCorrente\" class=\"required\">{{'labels.contaCorrente' |\n                                                    translate}}</label>\n                                                <app-combo-padrao id=\"contaCorrente\" name=\"contaCorrente\"\n                                                    tabela=\"contaCorrente\" chave=\"codConta\" descricao=\"DescrConta\"\n                                                    [(ngModel)]=\"service.data.contaCorrenteId\" [required]=\"true\">\n                                                </app-combo-padrao>\n                                            </div>\n                                        </div>\n                                    </div>\n                                    <div class=\"row\">\n                                        <div class=\"col-lg-5 col-md-8 col-sm-12\">\n                                            <div class=\"form-group form-group-sm\">\n                                                <label for=\"descFinanceiro\">{{'labels.descFinanceiro' |\n                                                    translate}}</label>\n                                                <input id=\"descFinanceiro\" name=\"descFinanceiro\"\n                                                    [(ngModel)]=\"service.data.descFin\"\n                                                    class=\"form-control form-control-sm\" type=\"text\" currencyMask\n                                                    [options]=\"funcoes.optionCurrency(2)\" [disabled]=\"disabledCondPagto\"\n                                                    [maxLength]=\"5\">\n                                            </div>\n                                        </div>\n                                    </div>\n                                    <div class=\"col-lg-10 card my-2 p-3\" *ngIf=\"showAntecipacao\">\n                                        <div class=\"card-body\">\n                                            <div class=\"row\">\n                                                <div class=\"col-lg-8 col-md-6 col-sm-12\">\n                                                    <div class=\"form-group form-group-sm\">\n                                                        <label for=\"vlAntecipado\">{{'labels.antecipacao' |\n                                                            translate}}</label>\n                                                        <input id=\"vlAntecipado\" name=\"vlAntecipado\"\n                                                            [(ngModel)]=\"service.data.vlAntecipado\"\n                                                            class=\"form-control form-control-sm\" type=\"text\"\n                                                            currencyMask [options]=\"funcoes.optionCurrency(2)\"\n                                                            (blur)=\"calculaSaldoPedidoAntecipado(vlBaixa)\">\n                                                    </div>\n                                                </div>\n                                            </div>\n                                            <div class=\"row\">\n                                                <div class=\"col-lg-8 col-md-6 col-sm-12\">\n                                                    <div class=\"form-group form-group-sm\">\n                                                        <label for=\"vencimento\">{{\"labels.vencimento\" | translate\n                                                            }}</label>\n                                                        <app-data id=\"vencimento\" name=\"vencimento\"\n                                                            [(ngModel)]=\"service.data.dtAntecipado\" autofocus\n                                                            class=\"dataHora\" [formatDateTime]=\"mascara.getFormatData\"\n                                                            [disabled]=\"false\">\n                                                        </app-data>\n                                                    </div>\n                                                </div>\n                                            </div>\n                                            <div class=\"row\">\n                                                <div class=\"col-lg-8 col-md-6 col-sm-12\">\n                                                    <div class=\"form-group form-group-sm\">\n                                                        <label for=\"saldo\">{{'labels.saldo' | translate}}</label>\n                                                        <input id=\"saldo\" name=\"saldo\" [(ngModel)]=\"saldo\"\n                                                            class=\"form-control form-control-sm\" type=\"text\"\n                                                            currencyMask [options]=\"funcoes.optionCurrency(2)\">\n                                                    </div>\n                                                </div>\n                                            </div>\n                                        </div>\n                                    </div>\n                                </div>\n                                <div class=\"col-lg-6\" *ngIf=\"showDesdobramentos\">\n                                    <div class=\"card mb-3\">\n                                        <div class=\"card-body\">\n                                            <h6 class=\"card-title\">{{\"titles.desdobramentos\" | translate }}</h6>\n                                            <div *ngFor=\"let dv of datasVencimento; let i = index\" class=\"row mb-2\">\n                                                <div class=\"col-lg-1 col-md-1 col-sm-12\">\n                                                    {{ letrasAlfabeto[i] }}\n                                                </div>\n                                                <div class=\"col-lg-4 col-md-7 col-sm-12\">\n                                                    <input id=\"desdobramento_vencimento_{{i}}\"\n                                                        name=\"desdobramento_vencimento_{{i}}\"\n                                                        class=\"dataHora form-control form-control-sm\"\n                                                        [value]=\"dv | date:'dd/MM/yyyy'\" type=\"text\" disabled>\n                                                </div>\n                                                <div class=\"col-lg-4 col-md-7 col-sm-12\">\n                                                    <input id=\"valor_{{i}}\" name=\"valor_{{i}}\"\n                                                        class=\"valor form-control form-control-sm\"\n                                                        [value]=\"valorParcDesdobramento | formatCurrency: 2\" type=\"text\"\n                                                        disabled>\n                                                </div>\n                                            </div>\n                                        </div>\n                                    </div>\n                                </div>\n                            </div>\n                        </div>\n                        <!-- ABA TRANSPORTE -->\n                        <div class=\"tab-pane\" id=\"tr\" *ngIf=\"showTransporte\">\n                            <div class=\"row\">\n                                <div class=\"col-lg-3 col-md-8 col-sm-12\">\n                                    <div class=\"form-group form-group-sm\">\n                                        <label for=\"tipoFrete\" class=\"required\">{{\"labels.tipoFrete\" | translate\n                                            }}</label>\n                                        <select id=\"tipoFrete\" name=\"tipoFrete\" [(ngModel)]=\"service.data.tipoFreteId\"\n                                            required=\"true\" class=\"form-control form-control-sm\">\n                                            <option value=\"\">{{'labels.selecione'|translate}}</option>\n                                            <option value=\"1\">{{'labels.emitenteCif'|translate}}</option>\n                                            <option value=\"2\">{{'labels.destRemFob'|translate}}</option>\n                                            <option value=\"3\">{{'labels.terceiros'|translate}}</option>\n                                            <option value=\"9\">{{'labels.semFrete'|translate}}</option>\n                                        </select>\n                                    </div>\n                                </div>\n                            </div>\n                            <div class=\"row\">\n                                <div class=\"col-lg-6 col-sm-12\">\n                                    <div class=\"form-group form-group-sm\">\n                                        <app-pesquisa-destinatario id=\"destinatarioIdTransportadora\"\n                                            name=\"destinatarioIdTransportadora\" label=\"transportadora\"\n                                            modalTitle=\"pesquisaTransportadora\" showInscricao=\"false\" showCgcCpf=\"false\"\n                                            [(ngModel)]=\"service.data.destinatarioIdTransportadora\"\n                                            [inSelected]=\"service.data.transportadora\" tipoDestinatario=\"T\"\n                                            permiteInativos=\"false\" required=\"true\">\n                                        </app-pesquisa-destinatario>\n                                    </div>\n                                </div>\n                            </div>\n                            <div class=\"row\">\n                                <div class=\"col-lg-2 col-md-6 col-sm-12\">\n                                    <div class=\"form-group form-group-sm\">\n                                        <label for=\"estado\">{{ \"labels.estado\" | translate\n                                            }}</label>\n                                        <select class=\"form-control form-control-sm\" id=\"estado\" name=\"estado\"\n                                            [(ngModel)]=\"service.data.estadoIdCavalo\">\n                                            <option value=\"\">{{ 'labels.selecione' | translate }}</option>\n                                            <option *ngFor=\"let item of estados\" value=\"{{ item.estadoId }}\">{{\n                                                item.estadoId\n                                                }}</option>\n                                        </select>\n                                    </div>\n                                </div>\n                                <div class=\"col-lg-2 col-md-6 col-sm-12\">\n                                    <div class=\"form-group form-group-sm\">\n                                        <label for=\"placa\">{{ \"labels.placa\" | translate }}</label>\n                                        <input type=\"text\" id=\"placa\" name=\"placa\"\n                                            class=\"form-control form-control-sm uppercase\"\n                                            [(ngModel)]=\"service.data.placa\" [mask]=\"maskCustom\"\n                                            [maxlength]=\"maxLengthPlaca\" (blur)=\"validaPlaca()\">\n                                    </div>\n                                </div>\n                            </div>\n                            <div class=\"row\">\n                                <div class=\"col-md-6 col-sm-12\">\n                                    <div class=\"form-group form-group-sm\">\n                                        <label for=\"tipoDeTransporte\" class=\"required\">{{ 'labels.tipoDeTransporte' |\n                                            translate}}</label>\n                                        <app-combo-padrao id=\"tipoDeTransporte\" name=\"tipoDeTransporte\"\n                                            tabela=\"TipoTransporte\" descricao=\"DescrTipoTransporte\"\n                                            chave=\"TipoTransporte\" ativos=\"true\"\n                                            [(ngModel)]=\"service.data.tipoTransporte\" [required]=\"true\">\n                                        </app-combo-padrao>\n                                    </div>\n                                </div>\n                            </div>\n                            <div class=\"col-lg-6 card my-2 p-3\">\n                                <div class=\"row\">\n                                    <div class=\"col-lg-4 col-md-8 col-sm-12\">\n                                        <div class=\"form-group form-group-sm\">\n                                            <label for=\"volumes\" class=\"required\">{{'labels.volumes' |\n                                                translate}}</label>\n                                            <input id=\"volumes\" name=\"volumes\" [(ngModel)]=\"service.data.volumes\"\n                                                class=\"form-control form-control-sm\" type=\"text\" currencyMask\n                                                [options]=\"funcoes.optionCurrency(0)\" required>\n                                        </div>\n                                    </div>\n                                </div>\n                                <div class=\"row\">\n                                    <div class=\"col-lg-8 col-md-6 col-sm-12\">\n                                        <div class=\"form-group form-group-sm\">\n                                            <label for=\"descricao\">{{ \"labels.descricao\" | translate\n                                                }}</label>\n                                            <input type=\"text\" id=\"descricao\" name=\"descricao\"\n                                                class=\"form-control form-control-sm uppercase\"\n                                                [(ngModel)]=\"service.data.descricao\">\n                                        </div>\n                                    </div>\n                                </div>\n                                <div class=\"row\">\n                                    <div class=\"col-lg-4 col-md-8 col-sm-12\">\n                                        <div class=\"form-group form-group-sm\">\n                                            <label for=\"pesoLiq\" class=\"required\">{{'labels.pesoLiq' |\n                                                translate}}</label>\n                                            <input id=\"pesoLiq\" name=\"pesoLiq\" [(ngModel)]=\"service.data.pesoLiq\"\n                                                class=\"form-control form-control-sm\" type=\"text\" currencyMask\n                                                [options]=\"funcoes.optionCurrency(3)\" required>\n                                        </div>\n                                    </div>\n                                    <div class=\"col-lg-4 col-md-8 col-sm-12\">\n                                        <div class=\"form-group form-group-sm\">\n                                            <label for=\"pesoBru\" class=\"required\">{{'labels.pesoBru' |\n                                                translate}}</label>\n                                            <input id=\"pesoBru\" name=\"pesoBru\" [(ngModel)]=\"service.data.pesoBru\"\n                                                class=\"form-control form-control-sm\" type=\"text\" currencyMask\n                                                [options]=\"funcoes.optionCurrency(3)\" required>\n                                        </div>\n                                    </div>\n                                </div>\n                            </div>\n                            <div class=\"col-lg-6 card my-3 p-3\">\n                                <div class=\"row\">\n                                    <div class=\"col-lg-4 col-md-6 col-sm-12\">\n                                        <div class=\"form-group form-group-sm\">\n                                            <label for=\"uFEmbarq\">{{ \"titles.localDeEmbarque\" | translate }}</label>\n                                            <select class=\"form-control form-control-sm\" id=\"uFEmbarq\" name=\"uFEmbarq\"\n                                                [(ngModel)]=\"service.data.uFEmbarq\">\n                                                <option value=\"\">{{ 'labels.selecione' | translate }}</option>\n                                                <option *ngFor=\"let item of estados\" value=\"{{ item.estadoId }}\">{{\n                                                    item.estadoId\n                                                    }}</option>\n                                            </select>\n                                        </div>\n                                    </div>\n                                    <div class=\"col-lg-8 col-md-6 col-sm-12\">\n                                        <div class=\"form-group form-group-sm\">\n                                            <label for=\"localEmbarq\">&nbsp;</label>\n                                            <input type=\"text\" id=\"localEmbarq\" name=\"localEmbarq\"\n                                                class=\"form-control form-control-sm\"\n                                                [(ngModel)]=\"service.data.localEmbarq\">\n                                        </div>\n                                    </div>\n                                </div>\n                            </div>\n                        </div>\n                        <!-- ABA OBSERVAÇÕES -->\n                        <div class=\"tab-pane\" id=\"ob\">\n                            <div class=\"row\">\n                                <div class=\"col-lg-8 col-md-12 col-sm-12\">\n                                    <label for=\"observacoesFixas\">{{'labels.observacoesFixas' |\n                                        translate}}</label>\n                                    <textarea id=\"observacoesFixas\" name=\"observacoesFixas\"\n                                        [(ngModel)]=\"service.data.observacoesFixas\" class=\"form-control\" rows=\"6\"\n                                        autofocus data-title=\"{{'labels.observacoesFixas' | translate}}\"></textarea>\n                                </div>\n                            </div>\n                            <div class=\"row\">\n                                <div class=\"col-lg-8 col-md-12 col-sm-12\">\n                                    <label for=\"observacoesComplementares\">{{'labels.observacoesComplementares' |\n                                        translate}}</label>\n                                    <textarea id=\"observacoesComplementares\" name=\"observacoesComplementares\"\n                                        [(ngModel)]=\"service.data.observacoesComplementares\" class=\"form-control\"\n                                        rows=\"6\" autofocus\n                                        data-title=\"{{'labels.observacoesComplementares' | translate}}\"></textarea>\n                                </div>\n                            </div>\n                            <div class=\"row\">\n                                <div class=\"col-lg-8 col-md-12 col-sm-12\">\n                                    <label for=\"observacoesNotaLivroFiscal\">{{'labels.observacoesNotaLivroFiscal' |\n                                        translate}}</label>\n                                    <textarea id=\"observacoesNotaLivroFiscal\" name=\"observacoesNotaLivroFiscal\"\n                                        [(ngModel)]=\"service.data.obsLivro\" class=\"form-control\" rows=\"6\" autofocus\n                                        data-title=\"{{'labels.observacoesNotaLivroFiscal' | translate}}\"></textarea>\n                                </div>\n                            </div>\n                        </div>\n                        <!-- ABA OBSERVAÇÕES DO PEDIDO -->\n                        <div class=\"tab-pane\" id=\"obp\">\n                            <div class=\"row\">\n                                <div class=\"col-lg-8 col-md-12 col-sm-12\">\n                                    <label for=\"observacoesDoPedido\"></label>\n                                    <textarea id=\"observacoesDoPedido\" name=\"observacoesDoPedido\" maxlength=\"500\"\n                                        [(ngModel)]=\"service.data.observacoesDoPedido\" class=\"form-control\" rows=\"18\"\n                                        autofocus data-title=\"{{'labels.observacoesDoPedido' | translate}}\"></textarea>\n                                </div>\n                            </div>\n                        </div>\n                    </div>\n                    <div class=\"clearfix\">&nbsp;</div>\n                    <div class=\"row\">\n                        <div class=\"col-12\">\n                            <div class=\"form-group\">\n                                <button class=\"btn btn-success mr-2\" type=\"submit\" [disabled]=\"disabledButtonSalvar\">\n                                    {{ 'buttons.salvar' | translate }}\n                                </button>\n                                <button class=\"btn btn-success  mr-2\" (click)=\"calcular()\" type=\"button\"\n                                    [disabled]=\"disabledButtonCalcular\">{{\n                                    'buttons.calcular' |\n                                    translate }}\n                                </button>\n                                <button type=\"button\" class=\"btn btn-default\" (click)=\"back()\">{{ 'buttons.cancelar' |\n                                    translate }}\n                                </button>\n                            </div>\n                        </div>\n                    </div>\n                </form>\n            </div>\n        </div>\n    </div>\n</div>\n\n<app-liberar-acesso-supervisor></app-liberar-acesso-supervisor>\n<app-emissao-nota-fiscal-proxima-nota\n    (outConfirma)=\"confirmaProximaNota($event)\"></app-emissao-nota-fiscal-proxima-nota>\n<app-emissao-nota-fiscal-seleciona-impressora\n    (outConfirma)=\"confirmaImpressora($event)\"></app-emissao-nota-fiscal-seleciona-impressora>");

/***/ }),

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/especificos/rocha/movimentos/emissao-nota-fiscal/emissao-nota-fiscal-moeda/emissao-nota-fiscal-moeda.component.html":
/*!*********************************************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/especificos/rocha/movimentos/emissao-nota-fiscal/emissao-nota-fiscal-moeda/emissao-nota-fiscal-moeda.component.html ***!
  \*********************************************************************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("<div class=\"modal\" id=\"modalMoedaCotacao\" tabindex=\"-1\" role=\"dialog\" data-backdrop=\"static\">\r\n    <div class=\"uni-modal-dialog-md-30\">\r\n        <div class=\"modal-content\">\r\n            <div class=\"modal-header\">\r\n                <h6 class=\"modal-title\">{{ 'titles.cotacao' | translate }}</h6>\r\n            </div>\r\n            <form class=\"form\" #form=\"ngForm\" (ngSubmit)=\"onSubmit(form)\">\r\n                <app-validacoes formErrorId=\"msgCotacao\"></app-validacoes>\r\n                <div class=\"modal-body\">\r\n                    <div class=\"row\">\r\n                        <div class=\"col-12\">\r\n                            <div class=\"form-group form-group-sm\">\r\n                                <label for=\"moedaId\">{{\"labels.moeda\" | translate}}</label>\r\n                                <app-combo-moeda id=\"moedaId\" name=\"moedaId\" [(ngModel)]=\"cotacaoDeMoeda.moedaId\"\r\n                                    [disabled]=\"true\">\r\n                                </app-combo-moeda>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                    <div class=\"row\">\r\n                        <div class=\"col-6\">\r\n                            <div class=\"form-group form-group-sm\">\r\n                                <label for=\"dtCotacao\" class=\"required\">{{\"labels.dtcotacao\" | translate }}</label>\r\n                                <app-data id=\"dtCotacao\" name=\"dtCotacao\" [(ngModel)]=\"cotacaoDeMoeda.dtCotacao\"\r\n                                    autofocus class=\"dataHora\" [formatDateTime]=\"mascara.getFormatData\" required=\"true\"\r\n                                    (executa)=\"getCotacao()\">\r\n                                </app-data>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                    <div class=\"row\">\r\n                        <div class=\"col-6\">\r\n                            <div class=\"form-group form-group-sm\">\r\n                                <label for=\"vlCotacao\">{{'labels.valorCotacao' | translate}}</label>\r\n                                <input id=\"vlCotacao\" name=\"valor\" [(ngModel)]=\"cotacaoDeMoeda.vlCotacao\"\r\n                                    class=\"form-control form-control-sm\" type=\"text\" currencyMask\r\n                                    [options]=\"funcoes.optionCurrency(5)\" [disabled]=\"true\">\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                </div>\r\n                <div class=\"modal-footer\">\r\n                    <button class=\"btn btn-success mr-1\" type=\"submit\">{{ 'buttons.ok' | translate }}\r\n                    </button>\r\n                    <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\" (click)=\"onCancelarClick()\">{{\r\n                        'buttons.cancelar' | translate }}</button>\r\n                </div>\r\n            </form>\r\n        </div>\r\n    </div>\r\n</div>");

/***/ }),

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/especificos/rocha/movimentos/emissao-nota-fiscal/emissao-nota-fiscal-proxima-nota/emissao-nota-fiscal-proxima-nota.component.html":
/*!***********************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/especificos/rocha/movimentos/emissao-nota-fiscal/emissao-nota-fiscal-proxima-nota/emissao-nota-fiscal-proxima-nota.component.html ***!
  \***********************************************************************************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("<div class=\"modal fade\" id=\"emissao-nota-fiscal-proxima-nota-dialog\" tabindex=\"-1\" role=\"dialog\" data-backdrop=\"static\">\r\n    <div class=\"uni-modal-dialog-md-30\">\r\n        <div class=\"modal-content\">\r\n            <div class=\"modal-header\">\r\n                <h6 class=\"modal-title\">{{ 'titles.proximaNotaFiscal' | translate }}</h6>\r\n            </div>\r\n            <form class=\"form\" #form=\"ngForm\" (ngSubmit)=\"onSubmit(form)\">\r\n                <app-validacoes formErrorId=\"msgEmissaoProxNota\"></app-validacoes>\r\n                <div class=\"modal-body\">\r\n                    <div class=\"row\" *ngIf=\"mostrarComboSerie\">\r\n                        <div class=\"col-md-12\">\r\n                            <label for=\"serieNota\" class=\"required\"> {{\"labels.serieNota\" | translate\r\n                                }}</label>\r\n                            <app-combo-serie id=\"serieNota\" label=\"serieNota\" name=\"serieNota\"\r\n                                excetoModeloNotaIds=\"[99]\" [(ngModel)]=\"data.serieId\" (outSelected)=\"trataSerie($event)\"\r\n                                [required]=\"true\">\r\n                            </app-combo-serie>\r\n                        </div>\r\n                    </div>\r\n                    <div class=\"row\" *ngIf=\"!mostrarComboSerie\">\r\n                        <div class=\"col-md-12\">\r\n                            <div class=\"form-group form-group-sm\">\r\n                                <label for=\"serieNota\">{{'labels.serieNota' |\r\n                                    translate}}</label>\r\n                                <input id=\"serieNota\" name=\"serieNota\" [(ngModel)]=\"data.serieId\"\r\n                                    class=\"form-control form-control-sm\" type=\"text\" maxlength=\"9\" mask=\"999999999\"\r\n                                    disabled data-title=\"{{'labels.serieNota' | translate}}\">\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                    <div class=\"row\">\r\n                        <div class=\"col-md-12\">\r\n                            <div class=\"form-group form-group-sm\">\r\n                                <label for=\"proximaNota\" [class.required]=\"!disabledNota\">{{'labels.proximaNota' |\r\n                                    translate}}</label>\r\n                                <input id=\"proximaNota\" name=\"proximaNota\" [(ngModel)]=\"data.nota\"\r\n                                    class=\"form-control form-control-sm\" type=\"text\" maxlength=\"9\" mask=\"999999999\"\r\n                                    data-title=\"{{'labels.proximaNota' | translate}}\" [required]=\"!disabledNota\"\r\n                                    [disabled]=\"disabledNota\" (blur)=\"verificaNotaEmitida()\">\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                    <div class=\"row\">\r\n                        <div class=\"col-md-12\">\r\n                            <div id=\"impressora\" class=\"form-group form-group-sm\">\r\n                                <label for=\"impressora\" class=\"required\">{{'labels.impressora' | translate}}</label>\r\n                                <app-pesquisa-impressoras id=\"impressora\" name=\"impressora\"\r\n                                    [(ngModel)]=\"data.impressora\" [required]=\"true\">\r\n                                </app-pesquisa-impressoras>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                </div>\r\n                <div class=\"modal-footer\">\r\n                    <button class=\"btn btn-success mr-1\" type=\"submit\">{{ 'buttons.ok' | translate }}\r\n                    </button>\r\n                    <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">Cancelar</button>\r\n                </div>\r\n            </form>\r\n        </div>\r\n    </div>\r\n</div>");

/***/ }),

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/especificos/rocha/movimentos/emissao-nota-fiscal/emissao-nota-fiscal-seleciona-impressora/emissao-nota-fiscal-seleciona-impressora.component.html":
/*!***************************************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/especificos/rocha/movimentos/emissao-nota-fiscal/emissao-nota-fiscal-seleciona-impressora/emissao-nota-fiscal-seleciona-impressora.component.html ***!
  \***************************************************************************************************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("<div class=\"modal fade\" id=\"emissao-nota-fiscal-seleciona-impressora-dialog\" tabindex=\"-1\" role=\"dialog\"\r\n    data-backdrop=\"static\">\r\n    <div class=\"uni-modal-dialog-md-30\">\r\n        <div class=\"modal-content\">\r\n            <div class=\"modal-header\">\r\n                <h6 class=\"modal-title\">{{ 'labels.impressora' | translate }}</h6>\r\n            </div>\r\n            <form class=\"form\" #form=\"ngForm\" (ngSubmit)=\"onSubmit(form)\">\r\n                <app-validacoes formErrorId=\"msgSelecionaImpressora\"></app-validacoes>\r\n                <div class=\"modal-body\">\r\n                    <div class=\"row\">\r\n                        <div class=\"col-md-12\">\r\n                            <div id=\"impress\" class=\"form-group form-group-sm\">\r\n                                <label for=\"impress\" class=\"required\">{{'labels.impressora' | translate}}</label>\r\n                                <app-pesquisa-impressoras id=\"impress\" name=\"impress\" [(ngModel)]=\"impressora\"\r\n                                    [required]=\"true\">\r\n                                </app-pesquisa-impressoras>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                </div>\r\n                <div class=\"modal-footer\">\r\n                    <button class=\"btn btn-success mr-1\" [disabled]=\"!impressora\" type=\"submit\">{{ 'buttons.ok' |\r\n                        translate }}\r\n                    </button>\r\n                    <button type=\"button\" class=\"btn btn-default\" (click)=\"cancelar()\">{{ 'buttons.cancelar' | translate\r\n                        }}</button>\r\n                </div>\r\n            </form>\r\n        </div>\r\n    </div>\r\n</div>");

/***/ }),

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/especificos/rocha/movimentos/emissao-nota-fiscal/emissao-nota-fiscal-titulo-modal/emissao-nota-fiscal-titulo-modal.component.html":
/*!***********************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/especificos/rocha/movimentos/emissao-nota-fiscal/emissao-nota-fiscal-titulo-modal/emissao-nota-fiscal-titulo-modal.component.html ***!
  \***********************************************************************************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("<div class=\"modal fade\" id=\"modalTituloAtraso\" tabindex=\"-1\" role=\"dialog\" data-backdrop=\"static\">\r\n\t<div class=\"modal-dialog modal-sm\">\r\n\t\t<div class=\"modal-content\">\r\n\t\t\t<form class=\"form\" #frmTituloAtraso=\"ngForm\" (ngSubmit)=\"onSubmit(frmTituloAtraso)\">\r\n\t\t\t\t<app-validacoes formErrorId=\"msgTituloAtraso\"></app-validacoes>\r\n\t\t\t\t<div class=\"modal-header\">\r\n\t\t\t\t\t<h4 class=\"modal-title\">{{ 'titles.titulosEmAtraso' | translate }}</h4>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class=\"modal-body text-center\">\r\n\t\t\t\t\t<h5 class=\"modal-title\">{{ 'titles.clienteComTituloEmAtraso' | translate }}</h5>\r\n\t\t\t\t\t<div class=\"clearfix\">&nbsp;</div>\r\n\t\t\t\t\t<div class=\"row\">\r\n\t\t\t\t\t\t<div class=\"col-lg-4 col-md-10 col-sm-12 form-inline\">\r\n\t\t\t\t\t\t\t<div class=\"form-group form-group-sm\">\r\n\t\t\t\t\t\t\t\t<label for=\"valorEmAtraso\" class=\"mr-3\">{{'labels.valorEmAtraso' | translate}}</label>\r\n\t\t\t\t\t\t\t\t<input id=\"valorEmAtraso\" name=\"valorEmAtraso\" [(ngModel)]=\"vlAtraso\"\r\n\t\t\t\t\t\t\t\t\tclass=\"form-control form-control-sm input-inline-middle\" type=\"text\" currencyMask\r\n\t\t\t\t\t\t\t\t\t[options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 0 }\" disabled>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class=\"clearfix\">&nbsp;</div>\r\n\t\t\t\t\t<div class=\"row\">\r\n\t\t\t\t\t\t<div class=\"col-lg-12\">\r\n\t\t\t\t\t\t\t<div class=\"card\">\r\n\t\t\t\t\t\t\t\t<div class=\"card-body\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"usuario\" class=\"required\">{{ 'labels.usuario' | translate }}</label>\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"form-control username\" id=\"usuario\" name=\"usuario\"\r\n\t\t\t\t\t\t\t\t\t\t\tmaxlength=\"15\" [(ngModel)]=\"usuario\" required>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"senha\" class=\"required\">{{ 'labels.senha' | translate }}</label>\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"password\" class=\"form-control\" id=\"senha\" name=\"password\"\r\n\t\t\t\t\t\t\t\t\t\t\tmaxlength=\"15\" [(ngModel)]=\"senha\" required>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class=\"modal-footer\">\r\n\t\t\t\t\t<button type=\"submit\" class=\"btn btn-small btn-success\">{{\r\n\t\t\t\t\t\t'buttons.ok' | translate }}</button>\r\n\t\t\t\t\t<button type=\"button\" class=\"btn btn-small btn-default\" data-dismiss=\"modal\"\r\n\t\t\t\t\t\t(click)=\"onCancelarClick()\">{{ 'buttons.cancelar' |\r\n\t\t\t\t\t\ttranslate }}</button>\r\n\t\t\t\t</div>\r\n\t\t\t</form>\r\n\t\t</div>\r\n\t</div>\r\n</div>");

/***/ }),

/***/ "./src/app/pages/especificos/rocha/movimentos/emissao-nota-fiscal/emissao-nota-fiscal-filter/emissao-nota-fiscal-filter.component.ts":
/*!*******************************************************************************************************************************************!*\
  !*** ./src/app/pages/especificos/rocha/movimentos/emissao-nota-fiscal/emissao-nota-fiscal-filter/emissao-nota-fiscal-filter.component.ts ***!
  \*******************************************************************************************************************************************/
/*! exports provided: EmissaoNotaFiscalFilterComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EmissaoNotaFiscalFilterComponent", function() { return EmissaoNotaFiscalFilterComponent; });
/* harmony import */ var app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! app/shared/services/message/message.service */ "./src/app/shared/services/message/message.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 app_shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! app/shared/services/event-emitter/event-emitter.service */ "./src/app/shared/services/event-emitter/event-emitter.service.ts");
/* harmony import */ var _emissao_nota_fiscal_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../emissao-nota-fiscal.service */ "./src/app/pages/especificos/rocha/movimentos/emissao-nota-fiscal/emissao-nota-fiscal.service.ts");
/* harmony import */ var _emissao_nota_fiscal_model__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../emissao-nota-fiscal.model */ "./src/app/pages/especificos/rocha/movimentos/emissao-nota-fiscal/emissao-nota-fiscal.model.ts");
/* harmony import */ var _emissao_nota_fiscal_constants__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../emissao-nota-fiscal.constants */ "./src/app/pages/especificos/rocha/movimentos/emissao-nota-fiscal/emissao-nota-fiscal.constants.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 __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 EmissaoNotaFiscalFilterComponent = /** @class */ (function () {
    function EmissaoNotaFiscalFilterComponent(service, message) {
        this.service = service;
        this.message = message;
        this.constantes = new _emissao_nota_fiscal_constants__WEBPACK_IMPORTED_MODULE_5__["EmissaoNotaFiscalConstants"]();
        this.filtrar = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["EventEmitter"]();
    }
    EmissaoNotaFiscalFilterComponent.prototype.ngOnInit = function () {
        this.service.filter = new _emissao_nota_fiscal_model__WEBPACK_IMPORTED_MODULE_4__["EmissaoNotaFiscalFilterVo"]();
    };
    Object.defineProperty(EmissaoNotaFiscalFilterComponent.prototype, "title", {
        get: function () {
            return this.message.translate("titles.emissaoNotaFiscal");
        },
        enumerable: true,
        configurable: true
    });
    EmissaoNotaFiscalFilterComponent.prototype.onSubmit = function (form) {
        app_shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_2__["EventEmitterService"].get("formError").emit(form);
        if (form.invalid)
            return;
        this.filtrar.emit(this.service.filter);
        jQuery("#emissao-nota-fiscal-filter-dialog").modal("hide");
    };
    EmissaoNotaFiscalFilterComponent.ctorParameters = function () { return [
        { type: _emissao_nota_fiscal_service__WEBPACK_IMPORTED_MODULE_3__["EmissaoNotaFiscalService"] },
        { type: app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_0__["MessageService"] }
    ]; };
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Output"])(),
        __metadata("design:type", Object)
    ], EmissaoNotaFiscalFilterComponent.prototype, "filtrar", void 0);
    EmissaoNotaFiscalFilterComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({
            selector: "app-emissao-nota-fiscal-filter",
            template: __importDefault(__webpack_require__(/*! raw-loader!./emissao-nota-fiscal-filter.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/especificos/rocha/movimentos/emissao-nota-fiscal/emissao-nota-fiscal-filter/emissao-nota-fiscal-filter.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewEncapsulation"].None
        }),
        __metadata("design:paramtypes", [_emissao_nota_fiscal_service__WEBPACK_IMPORTED_MODULE_3__["EmissaoNotaFiscalService"],
            app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_0__["MessageService"]])
    ], EmissaoNotaFiscalFilterComponent);
    return EmissaoNotaFiscalFilterComponent;
}());



/***/ }),

/***/ "./src/app/pages/especificos/rocha/movimentos/emissao-nota-fiscal/emissao-nota-fiscal-index/emissao-nota-fiscal-index.component.ts":
/*!*****************************************************************************************************************************************!*\
  !*** ./src/app/pages/especificos/rocha/movimentos/emissao-nota-fiscal/emissao-nota-fiscal-index/emissao-nota-fiscal-index.component.ts ***!
  \*****************************************************************************************************************************************/
/*! exports provided: EmissaoNotaFiscalIndexComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EmissaoNotaFiscalIndexComponent", function() { return EmissaoNotaFiscalIndexComponent; });
/* 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_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! app/shared/services/funcoes/number-utils/number-utils.static.service */ "./src/app/shared/services/funcoes/number-utils/number-utils.static.service.ts");
/* harmony import */ var app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! app/pages/login/login.service */ "./src/app/pages/login/login.service.ts");
/* harmony import */ var app_shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! app/shared/components/corporate/base/base.permissoes */ "./src/app/shared/components/corporate/base/base.permissoes.ts");
/* harmony import */ var app_shared_services_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! app/shared/services/datatables/datatables.service */ "./src/app/shared/services/datatables/datatables.service.ts");
/* harmony import */ var app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! app/shared/services/funcoes/funcoes.service */ "./src/app/shared/services/funcoes/funcoes.service.ts");
/* harmony import */ var app_shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! app/shared/services/funcoes/permissoes-utils/permissoes-utils.service */ "./src/app/shared/services/funcoes/permissoes-utils/permissoes-utils.service.ts");
/* harmony import */ var app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! app/shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var _emissao_nota_fiscal_constants__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../emissao-nota-fiscal.constants */ "./src/app/pages/especificos/rocha/movimentos/emissao-nota-fiscal/emissao-nota-fiscal.constants.ts");
/* harmony import */ var _emissao_nota_fiscal_model__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../emissao-nota-fiscal.model */ "./src/app/pages/especificos/rocha/movimentos/emissao-nota-fiscal/emissao-nota-fiscal.model.ts");
/* harmony import */ var _emissao_nota_fiscal_service__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../emissao-nota-fiscal.service */ "./src/app/pages/especificos/rocha/movimentos/emissao-nota-fiscal/emissao-nota-fiscal.service.ts");
/* harmony import */ var app_pages_cadastro_destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! app/pages/cadastro/destinatario/destinatario.service */ "./src/app/pages/cadastro/destinatario/destinatario.service.ts");
/* harmony import */ var app_shared_services_funcoes_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! app/shared/services/funcoes/configuracao/configuracao.facade */ "./src/app/shared/services/funcoes/configuracao/configuracao.facade.ts");
/* harmony import */ var _emissao_nota_fiscal_titulo_modal_emissao_nota_fiscal_titulo_modal_component__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../emissao-nota-fiscal-titulo-modal/emissao-nota-fiscal-titulo-modal.component */ "./src/app/pages/especificos/rocha/movimentos/emissao-nota-fiscal/emissao-nota-fiscal-titulo-modal/emissao-nota-fiscal-titulo-modal.component.ts");
/* harmony import */ var app_shared_services_funcoes_modal_utils_modal_utils_static_service__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! app/shared/services/funcoes/modal-utils/modal-utils.static.service */ "./src/app/shared/services/funcoes/modal-utils/modal-utils.static.service.ts");
/* harmony import */ var app_shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! app/shared/services/event-emitter/event-emitter.service */ "./src/app/shared/services/event-emitter/event-emitter.service.ts");
/* harmony import */ var app_pages_cadastro_cotacao_de_moeda_cotacao_de_moeda_model__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! app/pages/cadastro/cotacao-de-moeda/cotacao-de-moeda.model */ "./src/app/pages/cadastro/cotacao-de-moeda/cotacao-de-moeda.model.ts");
/* harmony import */ var app_pages_cadastro_cotacao_de_moeda_cotacao_de_moeda_service__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! app/pages/cadastro/cotacao-de-moeda/cotacao-de-moeda.service */ "./src/app/pages/cadastro/cotacao-de-moeda/cotacao-de-moeda.service.ts");
/* harmony import */ var app_shared_services_funcoes_string_utils_string_utils_static_service__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! app/shared/services/funcoes/string-utils/string-utils.static.service */ "./src/app/shared/services/funcoes/string-utils/string-utils.static.service.ts");
/* harmony import */ var app_pages_controle_outra_nota_emissao_outra_nota_emissao_service__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! app/pages/controle/outra-nota-emissao/outra-nota-emissao.service */ "./src/app/pages/controle/outra-nota-emissao/outra-nota-emissao.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 EmissaoNotaFiscalIndexComponent = /** @class */ (function (_super) {
    __extends(EmissaoNotaFiscalIndexComponent, _super);
    function EmissaoNotaFiscalIndexComponent(router, service, datatables, permissoesUtils, message, loginService, funcoes, destinatarioService, configuracao, cotacaoService, outraNotaEmissaoService) {
        var _this = _super.call(this, new _emissao_nota_fiscal_constants__WEBPACK_IMPORTED_MODULE_9__["EmissaoNotaFiscalConstants"](), funcoes) || this;
        _this.router = router;
        _this.service = service;
        _this.datatables = datatables;
        _this.permissoesUtils = permissoesUtils;
        _this.message = message;
        _this.loginService = loginService;
        _this.funcoes = funcoes;
        _this.destinatarioService = destinatarioService;
        _this.configuracao = configuracao;
        _this.cotacaoService = cotacaoService;
        _this.outraNotaEmissaoService = outraNotaEmissaoService;
        _this.data = new _emissao_nota_fiscal_model__WEBPACK_IMPORTED_MODULE_10__["EmissaoNotaFiscal"]();
        _this.constantes = new _emissao_nota_fiscal_constants__WEBPACK_IMPORTED_MODULE_9__["EmissaoNotaFiscalConstants"]();
        _this.vlAtraso = 0;
        _this.cotacaoDeMoeda = new app_pages_cadastro_cotacao_de_moeda_cotacao_de_moeda_model__WEBPACK_IMPORTED_MODULE_17__["CotacaoDeMoeda"]();
        _this.continua = "";
        _this.mensagem = "";
        _this.target = _this.funcoesService.getTargetLocation();
        _this.pageRoute = "/especificos/rocha/movimentos/emissaoNotaFiscal";
        _this.loadConfig = function () {
            if (_this.configuracao.isLoadConfig()) {
                _this.service.configFat.libCredito = _this.configuracao.boolean("FAT", "LibCredito");
                _this.service.configUni.moedaPadrao = _this.configuracao.number("UNI", "MoedaPadrao");
            }
        };
        _this.liberacao = function () {
            var resp = _this;
            if (!resp.itemSelecionado())
                return;
            _this.permissoesUtils.verificaRotina(_this.constantes.sisFormularioId, 2, function () { return __awaiter(_this, void 0, void 0, function () {
                return __generator(this, function (_a) {
                    if (!!this.data.pedidoId) {
                        this.podeLiberar();
                    }
                    return [2 /*return*/];
                });
            }); });
        };
        router.events.subscribe(function (event) {
            var params = _this.funcoesService.formParams.getParams(router, event);
            if (params) {
                _this.actionForm = params.action;
            }
        });
        return _this;
    }
    EmissaoNotaFiscalIndexComponent.prototype.init = function () {
        var _this = this;
        this.configuracao.getConfig(this.constantes.listaParam, this.loadConfig);
        _super.prototype.addFuncoes.call(this, [
            { action: 'liberacao', func: function () { return _this.liberacao; } },
        ]);
    };
    EmissaoNotaFiscalIndexComponent.prototype.ngOnInit = function () {
        var _this = this;
        this.init();
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 4, function () { return __awaiter(_this, void 0, void 0, function () {
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        if (!!this.loginService.isTokenExpired()) return [3 /*break*/, 3];
                        if (!this.funcoesService.abrirFiltro) return [3 /*break*/, 1];
                        this.service.filter = new _emissao_nota_fiscal_model__WEBPACK_IMPORTED_MODULE_10__["EmissaoNotaFiscalFilterVo"]();
                        this.filtrar();
                        return [3 /*break*/, 3];
                    case 1: return [4 /*yield*/, this.refresh()];
                    case 2:
                        _a.sent();
                        _a.label = 3;
                    case 3: return [2 /*return*/];
                }
            });
        }); }, function () {
            _this.permissoesUtils.back();
        }, true);
    };
    EmissaoNotaFiscalIndexComponent.prototype.refresh = function () {
        return __awaiter(this, void 0, void 0, function () {
            var _a, columns;
            var _this = this;
            return __generator(this, function (_b) {
                switch (_b.label) {
                    case 0:
                        this.data = new _emissao_nota_fiscal_model__WEBPACK_IMPORTED_MODULE_10__["EmissaoNotaFiscal"]();
                        _a = this;
                        return [4 /*yield*/, this.service.getByFiltro().toPromise()];
                    case 1:
                        _a.dados = _b.sent();
                        columns = [
                            this.datatables.getDataStringAlignRight("pedido", "pedido", "10%"),
                            this.datatables.getDataStringAlignRight("numControle", "controle", "10%"),
                            this.datatables.getDataDateTime("dtPedido", "emissao", "DD/MM/YYYY"),
                            this.datatables.getDataString("fantasiaCliente", "fantasia"),
                            this.datatables.getDataDouble("totalPed", "total", 2),
                            this.datatables.getDataDateTime("dtPedido", "entrega", "DD/MM/YYYY")
                        ];
                        this.datatables.toDataTable({ tableId: "dtEmissaoNotaFiscal", columns: columns, data: this.dados }, function (aData) {
                            _this.data = aData;
                        });
                        return [2 /*return*/];
                }
            });
        });
    };
    EmissaoNotaFiscalIndexComponent.prototype.filtrar = function () {
        app_shared_services_funcoes_modal_utils_modal_utils_static_service__WEBPACK_IMPORTED_MODULE_15__["ModalUtilsStaticService"].openModal("emissao-nota-fiscal-filter-dialog");
    };
    EmissaoNotaFiscalIndexComponent.prototype.executarFiltro = function (event) {
        this.refresh();
    };
    EmissaoNotaFiscalIndexComponent.prototype.properties = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 1, function () {
            _super.prototype.properties.call(_this, _this.data);
        });
    };
    EmissaoNotaFiscalIndexComponent.prototype.permissoes = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 3, function () {
            _super.prototype.permissoes.call(_this, _this.constantes);
        });
    };
    EmissaoNotaFiscalIndexComponent.prototype.itemSelecionado = function () {
        if (app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_2__["NumberUtilsStaticService"].isNotPositive(this.data.pedidoId)) {
            this.message.warning("titles.emissaoNotaFiscal", "messages.selecioneUmRegistro");
            return false;
        }
        return true;
    };
    EmissaoNotaFiscalIndexComponent.prototype.podeLiberar = function () {
        return __awaiter(this, void 0, void 0, function () {
            var validationResult, mensagens;
            var _this = this;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0: return [4 /*yield*/, this.service.podeLiberar({ pedidoId: this.data.pedidoId }).toPromise()];
                    case 1:
                        validationResult = _a.sent();
                        if (!validationResult.isValid) {
                            mensagens = this.message.validationResult(validationResult);
                            mensagens.forEach(function (m) { return _this.message.warning("titles.emissaoNotaFiscal", m); });
                            return [2 /*return*/];
                        }
                        else {
                            this.validaInscricaoEstadualCliente();
                        }
                        return [2 /*return*/];
                }
            });
        });
    };
    EmissaoNotaFiscalIndexComponent.prototype.validaInscricaoEstadualCliente = function () {
        var _this = this;
        if (app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_2__["NumberUtilsStaticService"].isPositive(this.data.destinatarioIdCliente)) {
            this.destinatarioService.getById(this.data.destinatarioIdCliente).subscribe(function (resp) {
                if (resp) {
                    var estadoIdFilial = _this.loginService.getLogin().estadoIdFilial;
                    if (resp.estadoId !== estadoIdFilial && resp.inscricao === "ISENTO") {
                        _this.message.confirm("titles.emissaoNotaFiscal", "messages.clienteForaDoEstadoInscricaoIsentaContinuar", null, function () {
                            _this.verificaTitulosEmAtraso();
                        });
                    }
                    else {
                        _this.verificaTitulosEmAtraso();
                    }
                }
                else {
                    _this.message.warning("titles.emissaoNotaFiscal", "messages.clienteNaoEncontradoNaVerificacaoInscricao");
                    return;
                }
            });
        }
    };
    EmissaoNotaFiscalIndexComponent.prototype.verificaTitulosEmAtraso = function () {
        return __awaiter(this, void 0, void 0, function () {
            var ret, ret;
            var _this = this;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        if (!this.service.configFat.libCredito) return [3 /*break*/, 2];
                        return [4 /*yield*/, this.outraNotaEmissaoService.getValorEmAtraso({ destinatarioId: this.data.destinatarioIdCliente }).toPromise()];
                    case 1:
                        ret = _a.sent();
                        if (ret) {
                            this.vlAtraso = ret.vlAtraso;
                            if (app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_2__["NumberUtilsStaticService"].isPositive(this.vlAtraso)) {
                                this.childEmissaoNotaFiscalTituloModalComponent.objectSelect(this.vlAtraso, this.data.pedidoId);
                                app_shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_16__["EventEmitterService"].get("msgTituloAtraso").emit(null);
                                app_shared_services_funcoes_modal_utils_modal_utils_static_service__WEBPACK_IMPORTED_MODULE_15__["ModalUtilsStaticService"].openModal("modalTituloAtraso");
                            }
                        }
                        return [3 /*break*/, 5];
                    case 2:
                        if (!(this.data.situacaoCli > 0 && !this.service.configFat.libCredito)) return [3 /*break*/, 4];
                        return [4 /*yield*/, this.outraNotaEmissaoService.getVerificaSituacaoCliente({ destinatarioId: this.data.destinatarioIdCliente }).toPromise()];
                    case 3:
                        ret = _a.sent();
                        this.continua = ret.continua;
                        this.mensagem = ret.mensagem;
                        if (app_shared_services_funcoes_string_utils_string_utils_static_service__WEBPACK_IMPORTED_MODULE_19__["StringUtilsStaticService"].isNotEmpty(this.mensagem)) {
                            if (this.continua === "S") {
                                this.message.confirm("titles.emissaoNotaFiscal", this.mensagem + " " + ". Continua?", null, function () {
                                    _this.verificaCotacao();
                                }, false);
                            }
                        }
                        else {
                            this.verificaCotacao();
                        }
                        return [3 /*break*/, 5];
                    case 4:
                        this.verificaCotacao();
                        _a.label = 5;
                    case 5: return [2 /*return*/];
                }
            });
        });
    };
    EmissaoNotaFiscalIndexComponent.prototype.showFormLiberar = function () {
        return __awaiter(this, void 0, void 0, function () {
            return __generator(this, function (_a) {
                this.router.navigate(["" + this.target + this.pageRoute + "/liberar/" + this.data.pedidoId]);
                return [2 /*return*/];
            });
        });
    };
    EmissaoNotaFiscalIndexComponent.prototype.outTituloAtraso = function (ok) {
        if (ok) {
            this.verificaCotacao();
        }
    };
    EmissaoNotaFiscalIndexComponent.prototype.verificaCotacao = function () {
        return __awaiter(this, void 0, void 0, function () {
            var _a;
            return __generator(this, function (_b) {
                switch (_b.label) {
                    case 0:
                        if (!(app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_2__["NumberUtilsStaticService"].toNumber(this.service.configUni.moedaPadrao) !== app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_2__["NumberUtilsStaticService"].toNumber(this.data.moedaId))) return [3 /*break*/, 2];
                        _a = this;
                        return [4 /*yield*/, this.cotacaoService.getVerificaCotacao({ moedaId: this.data.moedaId, dtCotacao: new Date() }).toPromise()];
                    case 1:
                        _a.cotacaoDeMoeda = _b.sent();
                        this.service.showCotacao = true;
                        app_shared_services_funcoes_modal_utils_modal_utils_static_service__WEBPACK_IMPORTED_MODULE_15__["ModalUtilsStaticService"].openModal("modalMoedaCotacao");
                        return [3 /*break*/, 3];
                    case 2:
                        this.showFormLiberar();
                        _b.label = 3;
                    case 3: return [2 /*return*/];
                }
            });
        });
    };
    EmissaoNotaFiscalIndexComponent.prototype.outMoedaCotacao = function (cotacao) {
        this.service.vlCotacao = app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_2__["NumberUtilsStaticService"].toNumber(cotacao.vlCotacao);
        this.showFormLiberar();
    };
    EmissaoNotaFiscalIndexComponent.ctorParameters = function () { return [
        { type: _angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"] },
        { type: _emissao_nota_fiscal_service__WEBPACK_IMPORTED_MODULE_11__["EmissaoNotaFiscalService"] },
        { type: app_shared_services_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_5__["DatatablesService"] },
        { type: app_shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_7__["PermissoesUtilsService"] },
        { type: app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_8__["MessageService"] },
        { type: app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_3__["LoginService"] },
        { type: app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_6__["FuncoesService"] },
        { type: app_pages_cadastro_destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_12__["DestinatarioService"] },
        { type: app_shared_services_funcoes_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_13__["ConfiguracaoFacade"] },
        { type: app_pages_cadastro_cotacao_de_moeda_cotacao_de_moeda_service__WEBPACK_IMPORTED_MODULE_18__["CotacaoDeMoedaService"] },
        { type: app_pages_controle_outra_nota_emissao_outra_nota_emissao_service__WEBPACK_IMPORTED_MODULE_20__["OutraNotaEmissaoService"] }
    ]; };
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewChild"])(_emissao_nota_fiscal_titulo_modal_emissao_nota_fiscal_titulo_modal_component__WEBPACK_IMPORTED_MODULE_14__["EmissaoNotaFiscalTituloModalComponent"], { static: false }),
        __metadata("design:type", _emissao_nota_fiscal_titulo_modal_emissao_nota_fiscal_titulo_modal_component__WEBPACK_IMPORTED_MODULE_14__["EmissaoNotaFiscalTituloModalComponent"])
    ], EmissaoNotaFiscalIndexComponent.prototype, "childEmissaoNotaFiscalTituloModalComponent", void 0);
    EmissaoNotaFiscalIndexComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: "app-emissao-nota-fiscal-index",
            template: __importDefault(__webpack_require__(/*! raw-loader!./emissao-nota-fiscal-index.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/especificos/rocha/movimentos/emissao-nota-fiscal/emissao-nota-fiscal-index/emissao-nota-fiscal-index.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None
        }),
        __metadata("design:paramtypes", [_angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"],
            _emissao_nota_fiscal_service__WEBPACK_IMPORTED_MODULE_11__["EmissaoNotaFiscalService"],
            app_shared_services_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_5__["DatatablesService"],
            app_shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_7__["PermissoesUtilsService"],
            app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_8__["MessageService"],
            app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_3__["LoginService"],
            app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_6__["FuncoesService"],
            app_pages_cadastro_destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_12__["DestinatarioService"],
            app_shared_services_funcoes_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_13__["ConfiguracaoFacade"],
            app_pages_cadastro_cotacao_de_moeda_cotacao_de_moeda_service__WEBPACK_IMPORTED_MODULE_18__["CotacaoDeMoedaService"],
            app_pages_controle_outra_nota_emissao_outra_nota_emissao_service__WEBPACK_IMPORTED_MODULE_20__["OutraNotaEmissaoService"]])
    ], EmissaoNotaFiscalIndexComponent);
    return EmissaoNotaFiscalIndexComponent;
}(app_shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_4__["BasePermissoes"]));



/***/ }),

/***/ "./src/app/pages/especificos/rocha/movimentos/emissao-nota-fiscal/emissao-nota-fiscal-liberar/emissao-nota-fiscal-liberar-form.component.ts":
/*!**************************************************************************************************************************************************!*\
  !*** ./src/app/pages/especificos/rocha/movimentos/emissao-nota-fiscal/emissao-nota-fiscal-liberar/emissao-nota-fiscal-liberar-form.component.ts ***!
  \**************************************************************************************************************************************************/
/*! exports provided: EmissaoNotaFiscalLiberarFormComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EmissaoNotaFiscalLiberarFormComponent", function() { return EmissaoNotaFiscalLiberarFormComponent; });
/* 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 app_pages_cadastro_destinatario_destinatario_model__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! app/pages/cadastro/destinatario/destinatario.model */ "./src/app/pages/cadastro/destinatario/destinatario.model.ts");
/* harmony import */ var app_pages_cadastro_destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! app/pages/cadastro/destinatario/destinatario.service */ "./src/app/pages/cadastro/destinatario/destinatario.service.ts");
/* harmony import */ var app_pages_cadastro_estados_estados_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! app/pages/cadastro/estados/estados.service */ "./src/app/pages/cadastro/estados/estados.service.ts");
/* harmony import */ var app_pages_nfe_nfe_model__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! app/pages/nfe/nfe.model */ "./src/app/pages/nfe/nfe.model.ts");
/* harmony import */ var app_pages_nfe_nfe_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! app/pages/nfe/nfe.service */ "./src/app/pages/nfe/nfe.service.ts");
/* harmony import */ var app_shared_services_funcoes_array_utils_array_utils_static_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! app/shared/services/funcoes/array-utils/array-utils.static.service */ "./src/app/shared/services/funcoes/array-utils/array-utils.static.service.ts");
/* harmony import */ var app_shared_services_funcoes_boolean_utils_boolean_utils_static_service__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! app/shared/services/funcoes/boolean-utils/boolean-utils.static.service */ "./src/app/shared/services/funcoes/boolean-utils/boolean-utils.static.service.ts");
/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! moment */ "./node_modules/moment/moment.js");
/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(moment__WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js");
/* harmony import */ var app_shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! app/shared/components/corporate/base/base.permissoes */ "./src/app/shared/components/corporate/base/base.permissoes.ts");
/* harmony import */ var app_shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! app/shared/services/event-emitter/event-emitter.service */ "./src/app/shared/services/event-emitter/event-emitter.service.ts");
/* harmony import */ var app_shared_services_funcoes_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! app/shared/services/funcoes/configuracao/configuracao.facade */ "./src/app/shared/services/funcoes/configuracao/configuracao.facade.ts");
/* harmony import */ var app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! app/shared/services/funcoes/funcoes.service */ "./src/app/shared/services/funcoes/funcoes.service.ts");
/* harmony import */ var app_shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! app/shared/services/funcoes/permissoes-utils/permissoes-utils.service */ "./src/app/shared/services/funcoes/permissoes-utils/permissoes-utils.service.ts");
/* harmony import */ var app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! app/shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var _emissao_nota_fiscal_constants__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../emissao-nota-fiscal.constants */ "./src/app/pages/especificos/rocha/movimentos/emissao-nota-fiscal/emissao-nota-fiscal.constants.ts");
/* harmony import */ var _emissao_nota_fiscal_model__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../emissao-nota-fiscal.model */ "./src/app/pages/especificos/rocha/movimentos/emissao-nota-fiscal/emissao-nota-fiscal.model.ts");
/* harmony import */ var _emissao_nota_fiscal_service__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../emissao-nota-fiscal.service */ "./src/app/pages/especificos/rocha/movimentos/emissao-nota-fiscal/emissao-nota-fiscal.service.ts");
/* harmony import */ var app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! app/pages/login/login.service */ "./src/app/pages/login/login.service.ts");
/* harmony import */ var app_pages_cadastro_material_material_service__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! app/pages/cadastro/material/material.service */ "./src/app/pages/cadastro/material/material.service.ts");
/* harmony import */ var app_pages_cadastro_motorista_motorista_service__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! app/pages/cadastro/motorista/motorista.service */ "./src/app/pages/cadastro/motorista/motorista.service.ts");
/* harmony import */ var app_pages_cadastro_serie_serie_service__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! app/pages/cadastro/serie/serie.service */ "./src/app/pages/cadastro/serie/serie.service.ts");
/* harmony import */ var app_shared_services_funcoes_modal_utils_modal_utils_static_service__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! app/shared/services/funcoes/modal-utils/modal-utils.static.service */ "./src/app/shared/services/funcoes/modal-utils/modal-utils.static.service.ts");
/* harmony import */ var _emissao_nota_fiscal_proxima_nota_emissao_nota_fiscal_proxima_nota_component__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ../emissao-nota-fiscal-proxima-nota/emissao-nota-fiscal-proxima-nota.component */ "./src/app/pages/especificos/rocha/movimentos/emissao-nota-fiscal/emissao-nota-fiscal-proxima-nota/emissao-nota-fiscal-proxima-nota.component.ts");
/* harmony import */ var app_shared_services_funcoes_string_utils_string_utils_static_service__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! app/shared/services/funcoes/string-utils/string-utils.static.service */ "./src/app/shared/services/funcoes/string-utils/string-utils.static.service.ts");
/* harmony import */ var app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! app/shared/services/funcoes/number-utils/number-utils.static.service */ "./src/app/shared/services/funcoes/number-utils/number-utils.static.service.ts");
/* harmony import */ var app_pages_cadastro_cond_pagamento_cond_pagamento_service__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! app/pages/cadastro/cond-pagamento/cond-pagamento.service */ "./src/app/pages/cadastro/cond-pagamento/cond-pagamento.service.ts");
/* harmony import */ var app_pages_controle_outra_nota_emissao_outra_nota_emissao_service__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! app/pages/controle/outra-nota-emissao/outra-nota-emissao.service */ "./src/app/pages/controle/outra-nota-emissao/outra-nota-emissao.service.ts");
/* harmony import */ var app_shared_services_funcoes_date_time_utils_date_time_utils_static_service__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! app/shared/services/funcoes/date-time-utils/date-time-utils.static.service */ "./src/app/shared/services/funcoes/date-time-utils/date-time-utils.static.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 EmissaoNotaFiscalLiberarFormComponent = /** @class */ (function (_super) {
    __extends(EmissaoNotaFiscalLiberarFormComponent, _super);
    function EmissaoNotaFiscalLiberarFormComponent(router, activatedRoute, message, service, permissoesUtils, funcoes, configuracao, loginService, materialService, destinatarioService, motoristaService, estadosService, nfeService, serieService, condPagamentoService, outraNotaEmissaoService) {
        var _this = _super.call(this, new _emissao_nota_fiscal_constants__WEBPACK_IMPORTED_MODULE_18__["EmissaoNotaFiscalConstants"](), funcoes) || this;
        _this.router = router;
        _this.activatedRoute = activatedRoute;
        _this.message = message;
        _this.service = service;
        _this.permissoesUtils = permissoesUtils;
        _this.funcoes = funcoes;
        _this.configuracao = configuracao;
        _this.loginService = loginService;
        _this.materialService = materialService;
        _this.destinatarioService = destinatarioService;
        _this.motoristaService = motoristaService;
        _this.estadosService = estadosService;
        _this.nfeService = nfeService;
        _this.serieService = serieService;
        _this.condPagamentoService = condPagamentoService;
        _this.outraNotaEmissaoService = outraNotaEmissaoService;
        _this.mensagens = [];
        _this.constantes = new _emissao_nota_fiscal_constants__WEBPACK_IMPORTED_MODULE_18__["EmissaoNotaFiscalConstants"]();
        _this.pedido = new _emissao_nota_fiscal_model__WEBPACK_IMPORTED_MODULE_19__["EmissaoNotaFiscalPedidoDto"]();
        _this.calculaNota = new _emissao_nota_fiscal_model__WEBPACK_IMPORTED_MODULE_19__["FatCalculaNotaVo"]();
        _this.disabledVlFrete = true;
        _this.disabledVlOutras = true;
        _this.disabledCamposValores = true;
        _this.disabledCondPagto = true;
        _this.showDuplicatas = false;
        _this.showTransporte = false;
        _this.disabledButtonSalvar = false;
        _this.disabledButtonCalcular = true;
        _this.disabledLimparMensagens = true;
        _this.saldo = 0;
        _this.vlBaixa = 0;
        _this.opCargaId = 0;
        _this.mascara = new app_config_enumerables__WEBPACK_IMPORTED_MODULE_2__["Mascaras"]();
        _this.nfeXmlFilter = new app_pages_nfe_nfe_model__WEBPACK_IMPORTED_MODULE_6__["NfeXmlFilter"]();
        _this.nfeXmlFilterAux = new app_pages_nfe_nfe_model__WEBPACK_IMPORTED_MODULE_6__["NfeXmlFilter"]();
        _this.proximaNota = new _emissao_nota_fiscal_model__WEBPACK_IMPORTED_MODULE_19__["EmissaoNotaFiscalProxima"]();
        _this.defaultBasIcm = 0;
        _this.defaultBasIpi = 0;
        _this.defaultVlIcms = 0;
        _this.defaultVlIpi = 0;
        _this.defaultVlIcmsRet = 0;
        _this.defaultVlIpiDest = 0;
        _this.defaultVlIr = 0;
        _this.defaultVlInss = 0;
        _this.defaultVlFatura = 0;
        _this.defaultVlNota = 0;
        _this.defaultVlIss = 0;
        _this.defaultImpostoRet = 0;
        _this.difBasIcm = 0;
        _this.difBasIpi = 0;
        _this.difVlIcms = 0;
        _this.difVlIpi = 0;
        _this.difVlIcmsRet = 0;
        _this.difVlIpiDest = 0;
        _this.difVlIr = 0;
        _this.difVlInss = 0;
        _this.retRegNota = 0;
        _this.numRegNota = 0;
        _this.valorBase = 0;
        _this.valorLiquido = 0;
        _this.valor = 0;
        _this.total = 0;
        _this.arrayDias = [];
        _this.datasVencimento = [];
        _this.showDesdobramentos = false;
        _this.showAntecipacao = false;
        _this.valorParcDesdobramento = 0;
        _this.letrasAlfabeto = Array.from({ length: 26 }, function (_, i) { return String.fromCharCode(65 + i); });
        _this.isFerroviario = false;
        _this.maxLengthPlaca = 18;
        _this.target = _this.funcoes.getTargetLocation();
        _this.pageRoute = "/especificos/rocha/movimentos/emissaoNotaFiscal";
        _this.loadConfig = function () {
            if (_this.configuracao.isLoadConfig()) {
                _this.service.configFat.libExpedicao = _this.configuracao.boolean("FAT", "LibExpedicao");
                _this.service.configFat.ida1Certificate = _this.configuracao.lerConfig("FAT", "IDA1CERTIFICATE");
                _this.service.configMat.fechamentoEst = _this.configuracao.lerConfig("MAT", "FechamentoEst");
                _this.service.configUni.fechamentoCtb = _this.configuracao.lerConfig("UNI", "FechamentoCtb");
                _this.service.configUni.moedaPadrao = _this.configuracao.number("UNI", "MoedaPadrao");
                _this.service.configUni.condSemDebito = _this.configuracao.number("UNI", "CondSemDeb");
                _this.service.configLiv.fechamentoFis = _this.configuracao.lerConfig("LIV", "FechamentoFis");
                _this.service.configFat.rSeriePadrao = _this.configuracao.number("FAT", "RSeriePadrao");
                _this.service.configFat.duplIcmsSubs = _this.configuracao.boolean("FAT", "DuplIcmsSubs");
                _this.service.configFat.selBoletoSTPed = _this.configuracao.boolean("FAT", "SelBoletoSTPed");
                _this.service.configFat.vrfDadosServ = _this.configuracao.boolean("FAT", "VrfDadosServ");
                _this.service.configFat.iPIPrimDp = _this.configuracao.boolean("FAT", "IPIPrimDp");
                _this.service.configFat.fretePrimDupl = _this.configuracao.boolean("FAT", "FretePrimDupl");
                _this.service.configCtr.valPlacaEmissNF = _this.configuracao.boolean("CTR", "ValPlacaEmissNF");
                _this.service.configBal.maskTrem = _this.configuracao.lerConfig('BAL', 'MaskTrem');
                _this.service.configBal.maskPlaca = _this.configuracao.lerConfig('BAL', 'MaskPlaca');
                _this.service.configFat.libCredito = _this.configuracao.boolean("FAT", "LibCredito");
                _this.service.configBal.serieTerm = _this.configuracao.lerConfig('BAL', 'SerieTerm');
            }
        };
        router.events.subscribe(function (event) {
            var params = _this.funcoes.formParams.getParams(router, event);
            if (params) {
                _this.actionForm = params.action;
            }
        });
        _this.filialId = loginService.getLogin().filialId;
        return _this;
    }
    EmissaoNotaFiscalLiberarFormComponent.prototype.ngOnInit = function () {
        var _this = this;
        this.getConfig();
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, this.permissoesUtils.getLibRotina(this.actionForm), function () {
            var id = _this.activatedRoute.snapshot.paramMap.get("id");
            if (id) {
                _this.carregaCombo();
                _this.preLiberacao(+id);
            }
        }, function () {
            _this.permissoesUtils.back();
        });
    };
    EmissaoNotaFiscalLiberarFormComponent.prototype.getConfig = function () {
        var _this = this;
        this.constantes.listaParam.map(function (c) {
            if (c.sistema === 'BAL') {
                c.parametros.push("RSerTra" + _this.configuracao.macAddress);
                c.parametros.push("RSerArm" + _this.configuracao.macAddress);
            }
        });
        this.configuracao.getConfig(this.constantes.listaParam, this.loadConfig);
    };
    EmissaoNotaFiscalLiberarFormComponent.prototype.carregaCombo = function () {
        var _this = this;
        Object(rxjs__WEBPACK_IMPORTED_MODULE_11__["forkJoin"])([
            this.estadosService.get(),
        ]).subscribe(function (resp) {
            _this.estados = app_shared_services_funcoes_array_utils_array_utils_static_service__WEBPACK_IMPORTED_MODULE_8__["ArrayUtilsStaticService"].any(resp[0]) ? resp[0].filter(function (val) { return val.sitReg != "E"; }) : [];
        });
    };
    EmissaoNotaFiscalLiberarFormComponent.prototype.preLiberacao = function (id) {
        var _this = this;
        this.calculaDtBaseVencimento();
        this.service.data = new _emissao_nota_fiscal_model__WEBPACK_IMPORTED_MODULE_19__["EmissaoNotaFiscal"]();
        this.service.data.destinatario = new app_pages_cadastro_destinatario_destinatario_model__WEBPACK_IMPORTED_MODULE_3__["Destinatario"]();
        this.outraNotaEmissaoService.carregaDadosPedido({ pedidoId: id }).subscribe(function (pedido) { return __awaiter(_this, void 0, void 0, function () {
            var resp, transp;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        this.pedido = pedido;
                        this.service.data.pedidoId = id;
                        this.opCargaId = this.pedido.autorizacao;
                        this.service.data.situacaoCli = this.pedido.situacaoCli;
                        this.loadCalculaNota();
                        this.service.data.pedido = pedido.pedido;
                        this.service.data.numControle = pedido.numControle;
                        this.service.data.municipio = pedido.municipio;
                        this.service.data.estadoId = pedido.estadoId;
                        this.service.data.dtEmissao = new Date();
                        this.service.data.destinatarioIdCliente = pedido.destinatarioId;
                        return [4 /*yield*/, this.destinatarioService.getById(this.service.data.destinatarioIdCliente).toPromise()];
                    case 1:
                        resp = _a.sent();
                        this.loadCliente(resp);
                        this.service.data.descPtPed = pedido.descPtPed;
                        this.service.data.descVl = pedido.descVl;
                        this.getOpCarga(this.opCargaId);
                        this.trataTipoFrete(this.pedido.tipoFreteId);
                        this.service.data.destinatarioIdTransportadora = this.pedido.transportadora;
                        return [4 /*yield*/, this.destinatarioService.getById(this.service.data.destinatarioIdTransportadora).toPromise()];
                    case 2:
                        transp = _a.sent();
                        this.loadTransportadora(transp);
                        this.service.data.observacoesDoPedido = pedido.observacoes + pedido.observacoes2;
                        if (this.service.configCtr.valPlacaEmissNF)
                            this.loadMaskPlaca();
                        return [2 /*return*/];
                }
            });
        }); });
    };
    EmissaoNotaFiscalLiberarFormComponent.prototype.calculaDtBaseVencimento = function () {
        return __awaiter(this, void 0, void 0, function () {
            var ret;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0: return [4 /*yield*/, this.outraNotaEmissaoService.getCalculaDtBaseVencimento().toPromise()];
                    case 1:
                        ret = _a.sent();
                        if (ret)
                            this.dtBaseVencto = ret.vencimento;
                        if (!!this.pedido.dtBaseVencto && (app_shared_services_funcoes_date_time_utils_date_time_utils_static_service__WEBPACK_IMPORTED_MODULE_31__["DateTimeUtilsStaticService"].difDays(this.pedido.dtBaseVencto) > 100)) {
                            this.dtBaseVencto = this.pedido.dtBaseVencto;
                        }
                        return [2 /*return*/];
                }
            });
        });
    };
    EmissaoNotaFiscalLiberarFormComponent.prototype.trataTipoFrete = function (tipoFreteId) {
        if (!["1", "2", "3", "9"].includes(tipoFreteId))
            this.service.data.tipoFreteId = "1";
        else
            this.service.data.tipoFreteId = tipoFreteId;
    };
    EmissaoNotaFiscalLiberarFormComponent.prototype.loadTransportadora = function (data) {
        return __awaiter(this, void 0, void 0, function () {
            return __generator(this, function (_a) {
                if (!data)
                    return [2 /*return*/];
                this.service.data.destinatarioIdTransportadora = data.destinatarioId;
                this.service.data.transportadora = data;
                return [2 /*return*/];
            });
        });
    };
    EmissaoNotaFiscalLiberarFormComponent.prototype.loadCalculaNota = function () {
        return __awaiter(this, void 0, void 0, function () {
            var obj, result, mensagens;
            var _this = this;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        this.service.data.vlCotacao = this.service.showCotacao ? this.service.vlCotacao : 1;
                        obj = new _emissao_nota_fiscal_model__WEBPACK_IMPORTED_MODULE_19__["FatCalculaNotaVo"]();
                        obj.pedidoId = this.service.data.pedidoId;
                        obj.vlCotacao = this.service.data.vlCotacao;
                        obj.descVl = this.service.data.descVl;
                        obj.descPtPed = this.service.data.descPtPed;
                        obj.encFin = this.service.data.encFin;
                        obj.vlFrete = this.service.data.vlFrete;
                        obj.vlSeguro = this.service.data.vlSeguro;
                        obj.vlOutras = this.service.data.vlOutras;
                        obj.vlSiscomex = this.service.data.vlSiscomex;
                        obj.tipoIssDest = "";
                        obj.aliqIssDest = 0;
                        obj.aliqCofinsDest = 0;
                        return [4 /*yield*/, this.outraNotaEmissaoService.calculaNota(obj).toPromise()];
                    case 1:
                        result = _a.sent();
                        if (!result.validationResult.isValid) {
                            mensagens = this.message.validationResult(result.validationResult);
                            mensagens.forEach(function (m) { return _this.message.warning("titles.emissaoNotaFiscal", m); });
                            this.back(false);
                        }
                        else {
                            this.calculaNota = result;
                            this.service.data.vlMerc = this.calculaNota.retVlMerc;
                            this.service.data.vlServ = this.calculaNota.retVlServ;
                            this.service.data.volumes = this.calculaNota.retVolumes;
                            this.service.data.pesoLiq = this.calculaNota.retPesoLiq;
                            this.service.data.pesoBru = this.calculaNota.retPesoBru;
                            if (app_shared_services_funcoes_string_utils_string_utils_static_service__WEBPACK_IMPORTED_MODULE_27__["StringUtilsStaticService"].isNotEmpty(this.calculaNota.retObsDig1) || app_shared_services_funcoes_string_utils_string_utils_static_service__WEBPACK_IMPORTED_MODULE_27__["StringUtilsStaticService"].isNotEmpty(this.calculaNota.retObsDig2) ||
                                app_shared_services_funcoes_string_utils_string_utils_static_service__WEBPACK_IMPORTED_MODULE_27__["StringUtilsStaticService"].isNotEmpty(this.calculaNota.retObsDig3) || app_shared_services_funcoes_string_utils_string_utils_static_service__WEBPACK_IMPORTED_MODULE_27__["StringUtilsStaticService"].isNotEmpty(this.calculaNota.retObsDig4)) {
                                this.service.data.observacoesComplementares = this.calculaNota.retObsDig1 + this.calculaNota.retObsDig2 + this.calculaNota.retObsDig3 + this.calculaNota.retObsDig4;
                            }
                            this.service.data.vlIcms = this.calculaNota.retVlIcms;
                            this.service.data.vlIcmsRet = this.calculaNota.retVlIcmsRet;
                            this.service.data.vlIpi = this.calculaNota.retVlIpi;
                            this.service.data.vlIpiDest = this.calculaNota.retVlIpiDest;
                            this.service.data.vlIr = this.calculaNota.retVlIr;
                            this.service.data.vlInss = this.calculaNota.retVlInss;
                            this.service.data.basIcm = this.calculaNota.retBasIcm;
                            this.service.data.basIpi = this.calculaNota.retBasIpi;
                            this.service.data.impostoRet = this.calculaNota.retImpostoRet;
                            this.service.data.vlFatura = this.calculaNota.retVlFatura;
                            this.service.data.vlNota = this.calculaNota.retVlNota;
                            this.service.data.vlIss = this.calculaNota.retVlIss;
                            this.service.data.vlIssRet = this.calculaNota.retVlIssRet;
                            this.service.data.vlPis = this.calculaNota.retVlPis;
                            this.service.data.vlCofins = this.calculaNota.retVlCofins;
                            this.service.data.vlCsll = this.calculaNota.retVlCsll;
                            this.service.data.vlII = this.calculaNota.retVlII;
                            this.service.data.dupls = 0;
                            this.service.data.vlDedIcms = this.calculaNota.retVlDedIcms;
                            this.service.data.vlDedPis = this.calculaNota.retVlDedPis;
                            this.service.data.vlDedCofins = this.calculaNota.retVlDedCofins;
                            this.service.data.condPagamentoId = this.pedido.condPag;
                            this.service.data.desdobramento = this.pedido.desdobramento;
                            this.service.data.contaCorrenteId = this.calculaNota.retCodConta === 0 ? "" : this.calculaNota.retCodConta;
                            this.service.data.descFin = this.pedido.descFin;
                            this.service.data.vlAntecipado = this.pedido.vlAntecipado;
                            this.service.data.dtAntecipado = this.pedido.dtAntecipado;
                            this.getVlBaixaPedidoAntecipado(this.service.data.pedidoId);
                            this.service.data.descricao = this.calculaNota.retDescrVol;
                            this.service.data.observacoesFixas = this.calculaNota.retObsNot1 + this.calculaNota.retObsNot2 + this.calculaNota.retObsNot3 + this.calculaNota.retObsNot4;
                            this.service.data.ptRetencao = this.pedido.ptRetencao;
                            if (this.service.data.ptRetencao > 0) {
                                this.calculaDtVctoRetencao();
                            }
                            this.service.data.complementar = app_shared_services_funcoes_boolean_utils_boolean_utils_static_service__WEBPACK_IMPORTED_MODULE_9__["BooleanUtilsStaticService"].toBoolean(this.pedido.flagCompl);
                            if (app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_28__["NumberUtilsStaticService"].isPositive(this.service.data.vlFatura) && app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_28__["NumberUtilsStaticService"].isPositive(this.service.data.ptRetencao)) {
                                this.service.data.duplsRete = 1;
                                this.service.data.vlRetencao = (this.service.data.vlNota * this.service.data.ptRetencao) / 100;
                            }
                            else {
                                this.service.data.duplsRete = 0;
                                this.service.data.vlRetencao = 0;
                            }
                            this.service.data.duplIcmsSubs = this.service.configFat.duplIcmsSubs;
                            if (this.service.configFat.selBoletoSTPed) {
                                this.service.data.duplIcmsSubs = app_shared_services_funcoes_boolean_utils_boolean_utils_static_service__WEBPACK_IMPORTED_MODULE_9__["BooleanUtilsStaticService"].toBoolean(this.pedido.flagBoletoSTP);
                            }
                            else {
                                this.service.data.duplIcmsSubs = !!this.service.data.duplIcmsSubs ? this.service.data.duplIcmsSubs : app_shared_services_funcoes_boolean_utils_boolean_utils_static_service__WEBPACK_IMPORTED_MODULE_9__["BooleanUtilsStaticService"].toBoolean(this.pedido.flagBoletoSTP);
                            }
                            this.service.data.vlIcmsRet = this.calculaNota.retVlIcmsRet;
                            if (this.service.data.duplIcmsSubs && app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_28__["NumberUtilsStaticService"].isPositive(this.service.data.vlIcmsRet))
                                this.service.data.duplsSubs = 1;
                            else
                                this.service.data.duplsSubs = 0;
                            if (app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_28__["NumberUtilsStaticService"].isNotPositive(this.service.data.vlFatura) || (this.service.data.vlFatura === this.service.data.vlIcmsRet) && !this.service.data.complementar) {
                                if (app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_28__["NumberUtilsStaticService"].isNotPositive(this.service.configUni.condSemDebito)) {
                                    this.message.warning("titles.emissaoNotaFiscal", "messages.condicaoDePagamentoSemDebitoOpNaoPermitida");
                                    this.service.data.condPagamentoId = null;
                                    this.back(false);
                                }
                                else {
                                    this.service.data.condPagamentoId = this.service.configUni.condSemDebito;
                                }
                                this.service.data.duplsFat = 0;
                                this.service.data.desdobramento = "";
                            }
                            else {
                                this.service.data.duplsFat = this.arrayDias.length === 0 ? 1 : this.arrayDias.length;
                                this.validaCondPagamento();
                            }
                            this.defaultVlFatura = this.calculaNota.retVlFatura;
                            this.defaultVlNota = this.calculaNota.retVlNota;
                            this.defaultVlIss = this.calculaNota.retVlIss;
                            this.defaultImpostoRet = this.calculaNota.retImpostoRet;
                            this.defaultBasIcm = this.calculaNota.retBasIcm;
                            this.defaultBasIpi = this.calculaNota.retBasIpi;
                            this.defaultVlIcms = this.calculaNota.retVlIcms;
                            this.defaultVlIpi = this.calculaNota.retVlIpi;
                            this.defaultVlIcmsRet = this.calculaNota.retVlIcmsRet;
                            this.defaultVlIpiDest = this.calculaNota.retVlIpiDest;
                            this.defaultVlIr = this.calculaNota.retVlIr;
                            this.defaultVlInss = this.calculaNota.retVlInss;
                            this.disabledVlFrete = this.calculaNota.retVlMerc > 0 ? false : true;
                            this.disabledVlOutras = (this.calculaNota.retVlMerc > 0 || this.pedido.flagCompl !== "S") ? false : true;
                            this.disabledCamposValores = this.pedido.tipoNota === "I" ? false : true;
                            this.showDuplicatas = (this.service.data.vlFatura > 0) || (this.service.data.vlIcmsRet > 0);
                            this.showTransporte = (this.calculaNota.retVlMerc > 0) || (!this.service.configFat.vrfDadosServ);
                            this.showAntecipacao = (this.pedido.vlAntecipado > 0) && (this.pedido.tipoMov === "S");
                            this.disabledCondPagto = ((this.service.data.vlFatura > this.service.data.vlIcmsRet) || (app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_28__["NumberUtilsStaticService"].isPositive(this.service.data.vlFatura) && this.service.data.complementar)) ? false : true;
                            if (this.service.configFat.iPIPrimDp) {
                                this.valorBase = this.service.data.vlIpi;
                            }
                            if (this.service.configFat.fretePrimDupl) {
                                this.valorBase += this.service.data.vlFrete;
                            }
                            this.valorLiquido = this.service.data.vlFatura - this.valorBase;
                            if (app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_28__["NumberUtilsStaticService"].isPositive(this.service.data.vlRetencao)) {
                                this.valorLiquido -= this.service.data.vlRetencao;
                            }
                            if (this.service.data.duplIcmsSubs && app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_28__["NumberUtilsStaticService"].isPositive(this.service.data.vlIcmsRet)) {
                                this.valor = app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_28__["NumberUtilsStaticService"].round((this.valorLiquido - this.service.data.vlIcmsRet) / this.service.data.duplsFat, 2);
                                this.total = (this.valor * this.service.data.duplsFat) + this.valorBase + this.service.data.vlIcmsRet + this.service.data.vlRetencao;
                            }
                            else {
                                this.valor = app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_28__["NumberUtilsStaticService"].round((this.valorLiquido / this.service.data.duplsFat), 2);
                                this.total = (this.valor * this.service.data.duplsFat) + this.valorBase + this.service.data.vlRetencao;
                            }
                        }
                        return [2 /*return*/];
                }
            });
        });
    };
    EmissaoNotaFiscalLiberarFormComponent.prototype.calculaDtVctoRetencao = function () {
        return __awaiter(this, void 0, void 0, function () {
            return __generator(this, function (_a) {
                if (app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_28__["NumberUtilsStaticService"].isPositive(this.pedido.condRetencao) && !!this.pedido.dtBaseRetencao) {
                    this.geraDesdobramentos(this.pedido.condRetencao, this.pedido.dtBaseRetencao, true);
                }
                return [2 /*return*/];
            });
        });
    };
    EmissaoNotaFiscalLiberarFormComponent.prototype.validaCondPagamento = function () {
        return __awaiter(this, void 0, void 0, function () {
            var condPagamento;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        if (!app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_28__["NumberUtilsStaticService"].isPositive(this.service.data.condPagamentoId)) return [3 /*break*/, 2];
                        return [4 /*yield*/, this.condPagamentoService.getById(this.service.data.condPagamentoId).toPromise()];
                    case 1:
                        condPagamento = _a.sent();
                        if (!!condPagamento) {
                            if (condPagamento.esPgto === '1' && app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_28__["NumberUtilsStaticService"].isPositive(this.service.data.vlFatura)) {
                                this.message.warning("titles.emissaoNotaFiscal", "messages.condicaoDePagamentoSemDebitoOpNaoPermitida");
                                this.service.data.condPagamentoId = null;
                                this.back(false);
                            }
                            else {
                                if (condPagamento.esPgto !== '1') {
                                    this.service.data.desdobramento = condPagamento.desdobramento;
                                    if (condPagamento.desdobramento.includes('/'))
                                        this.arrayDias = condPagamento.desdobramento.split('/').map(Number);
                                    else
                                        this.arrayDias.push(app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_28__["NumberUtilsStaticService"].toNumber(condPagamento.desdobramento));
                                    this.geraDesdobramentos(this.service.data.condPagamentoId, this.dtBaseVencto);
                                }
                            }
                        }
                        _a.label = 2;
                    case 2: return [2 /*return*/];
                }
            });
        });
    };
    EmissaoNotaFiscalLiberarFormComponent.prototype.geraDesdobramentos = function (condPagamentoId, dtBaseVencto, isRetencao) {
        if (isRetencao === void 0) { isRetencao = false; }
        return __awaiter(this, void 0, void 0, function () {
            var ret;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0: return [4 /*yield*/, this.service.getCalcVenctoDuplicatas({ condPagamentoId: condPagamentoId, dtBaseVencto: dtBaseVencto, isRetencao: isRetencao }).toPromise()];
                    case 1:
                        ret = _a.sent();
                        if (ret) {
                            this.showDesdobramentos = ret.datasVencimento.length > 0;
                            if (!this.showDesdobramentos) {
                                this.service.data.duplsFat = 0;
                                this.service.data.desdobramento = "";
                            }
                            this.datasVencimento = ret.datasVencimento;
                            this.valorParcDesdobramento = app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_28__["NumberUtilsStaticService"].round((this.total / ret.datasVencimento.length), 2);
                        }
                        return [2 /*return*/];
                }
            });
        });
    };
    EmissaoNotaFiscalLiberarFormComponent.prototype.trataCondPagamento = function () {
        var _this = this;
        if (!!this.service.data.condPagamentoId) {
            this.condPagamentoService.getById(this.service.data.condPagamentoId).subscribe(function (resp) {
                if (!!resp) {
                    if (resp.esPgto === "1" && app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_28__["NumberUtilsStaticService"].isPositive(_this.service.data.vlFatura)) {
                        _this.message.error("titles.emissaoNotaFiscal", "messages.condicaoDePagamentoSemDebitoOpNaoPermitida");
                        _this.service.data.condPagamentoId = null;
                        return;
                    }
                    else {
                        _this.service.data.desdobramento = resp.desdobramento;
                        if (resp.desdobramento.includes('/'))
                            _this.arrayDias = resp.desdobramento.split('/').map(Number);
                        else
                            _this.arrayDias.push(app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_28__["NumberUtilsStaticService"].toNumber(resp.desdobramento));
                        _this.geraDesdobramentos(_this.service.data.condPagamentoId, _this.dtBaseVencto);
                    }
                }
            });
        }
    };
    EmissaoNotaFiscalLiberarFormComponent.prototype.getOpCarga = function (opCargaId) {
        return __awaiter(this, void 0, void 0, function () {
            var ret;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        if (app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_28__["NumberUtilsStaticService"].isNotPositive(opCargaId))
                            return [2 /*return*/];
                        return [4 /*yield*/, this.outraNotaEmissaoService.getOpCarga({ opCargaId: opCargaId }).toPromise()];
                    case 1:
                        ret = _a.sent();
                        if (ret) {
                            this.service.data.estadoIdCavalo = ret.estado;
                            this.service.data.placa = ret.placa;
                            this.service.data.pesoLiq = ret.pesoLiq;
                            this.service.data.pesoBru = ret.pesoBru;
                        }
                        return [2 /*return*/];
                }
            });
        });
    };
    EmissaoNotaFiscalLiberarFormComponent.prototype.getVlBaixaPedidoAntecipado = function (pedidoId) {
        return __awaiter(this, void 0, void 0, function () {
            var ret;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        if (!pedidoId)
                            return [2 /*return*/];
                        return [4 /*yield*/, this.outraNotaEmissaoService.getVlBaixaPedidoAntecipado({ pedidoId: pedidoId }).toPromise()];
                    case 1:
                        ret = _a.sent();
                        if (ret) {
                            this.vlBaixa = ret.vlBaixa;
                            this.calculaSaldoPedidoAntecipado(this.vlBaixa);
                        }
                        return [2 /*return*/];
                }
            });
        });
    };
    EmissaoNotaFiscalLiberarFormComponent.prototype.calculaSaldoPedidoAntecipado = function (vlBaixa) {
        if (vlBaixa > 0)
            this.saldo = this.service.data.vlAntecipado - vlBaixa;
        else
            this.saldo = 0;
    };
    EmissaoNotaFiscalLiberarFormComponent.prototype.loadCliente = function (data) {
        return __awaiter(this, void 0, void 0, function () {
            return __generator(this, function (_a) {
                if (!data)
                    return [2 /*return*/];
                this.service.data.destinatarioIdCliente = data.destinatarioId;
                this.service.data.destinatario = data;
                return [2 /*return*/];
            });
        });
    };
    EmissaoNotaFiscalLiberarFormComponent.prototype.onSubmit = function (form, create) {
        if (create === void 0) { create = false; }
        return __awaiter(this, void 0, void 0, function () {
            var validationResult, mensagens;
            var _this = this;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        app_shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_13__["EventEmitterService"].get("formError").emit(form);
                        if (form.invalid) {
                            this.funcoesService.backToTop();
                            return [2 /*return*/];
                        }
                        this.preSave();
                        return [4 /*yield*/, this.service.podeConfirmar({
                                pedidoId: this.service.data.pedidoId,
                                condPagamentoId: this.service.data.condPagamentoId,
                                vlFatura: this.service.data.vlFatura,
                                vlIcmsRet: this.service.data.vlIcmsRet,
                                tipoTransporteId: this.service.data.tipoTransporte,
                                obsComplementar: this.service.data.obsDig1,
                                contaCorrenteId: this.service.data.contaCorrenteId,
                                flagCompl: this.service.data.complementar,
                                vlMerc: this.service.data.vlMerc
                            }).toPromise()];
                    case 1:
                        validationResult = _a.sent();
                        if (!validationResult.isValid) {
                            mensagens = this.message.validationResult(validationResult);
                            mensagens.forEach(function (m) { return _this.message.warning("titles.emissaoNotaFiscal", m); });
                            if (validationResult.message === "ABA_DUPLICATAS") {
                                jQuery("a.nav-link[href='#du']").trigger("click");
                            }
                            else if (validationResult.message === "ABA_OBSERVACOES") {
                                jQuery("a.nav-link[href='#ob']").trigger("click");
                            }
                            return [2 /*return*/];
                        }
                        else {
                            this.preConfirmacao();
                        }
                        return [2 /*return*/];
                }
            });
        });
    };
    EmissaoNotaFiscalLiberarFormComponent.prototype.preSave = function () {
        this.service.data.obsDig1 = this.service.data.observacoesComplementares;
        if (this.service.data.contaCorrenteId === undefined || this.service.data.contaCorrenteId === "") {
            this.service.data.contaCorrenteId = 0;
        }
    };
    EmissaoNotaFiscalLiberarFormComponent.prototype.preConfirmacao = function () {
        return __awaiter(this, void 0, void 0, function () {
            var _a, sSist, sParam, configSerie, serie;
            var _this = this;
            return __generator(this, function (_b) {
                switch (_b.label) {
                    case 0:
                        _a = this.getConfiguracaoSerie(this.pedido.tipoPed, this.service.data.vlMerc, this.service.data.vlServ, this.constantes.sisSistemaId), sSist = _a.sSist, sParam = _a.sParam;
                        configSerie = this.configuracao.number(sSist, sParam);
                        return [4 /*yield*/, this.serieService.byRegSerie(configSerie).toPromise()];
                    case 1:
                        serie = _b.sent();
                        if (!serie) {
                            this.message.warning("titles.emissaoNotaFiscal", "messages.serieNaoInformada");
                            return [2 /*return*/];
                        }
                        this.proximaNota.serieId = serie.serieId;
                        this.proximaNota.nota = serie.nota;
                        this.proximaNota.impressora = serie.impressora;
                        this.proximaNota.numNfAuto = serie.numNfAuto;
                        this.proximaNota.formControle = serie.formControle;
                        this.proximaNota.flagImp = serie.flagImp;
                        this.proximaNota.tipoNfeId = serie.tipoNfeId;
                        if (this.proximaNota.numNfAuto !== "S") {
                            this.childEmissaoNotaFiscalProximaNotaComponent.objectSelect(this.proximaNota);
                            app_shared_services_funcoes_modal_utils_modal_utils_static_service__WEBPACK_IMPORTED_MODULE_25__["ModalUtilsStaticService"].openModal("emissao-nota-fiscal-proxima-nota-dialog");
                        }
                        else {
                            if (this.proximaNota.flagImp === "N" || !!this.proximaNota.impressora) {
                                this.message.confirm("titles.emissaoNotaFiscal", "messages.confirmaEmissaoNotaFiscal", null, function () { return __awaiter(_this, void 0, void 0, function () {
                                    return __generator(this, function (_a) {
                                        if (this.proximaNota.tipoNfeId === 2) {
                                            this.validaDadosNota();
                                        }
                                        else {
                                            this.ajustaDiferenca();
                                        }
                                        return [2 /*return*/];
                                    });
                                }); });
                            }
                            else {
                                app_shared_services_funcoes_modal_utils_modal_utils_static_service__WEBPACK_IMPORTED_MODULE_25__["ModalUtilsStaticService"].openModal("emissao-nota-fiscal-seleciona-impressora-dialog");
                            }
                        }
                        return [2 /*return*/];
                }
            });
        });
    };
    EmissaoNotaFiscalLiberarFormComponent.prototype.validaDadosNota = function () {
        return __awaiter(this, void 0, void 0, function () {
            var validationResult, mensagens;
            var _this = this;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0: return [4 /*yield*/, this.outraNotaEmissaoService.getValidaDadosNota({ pedidoId: this.service.data.pedidoId }).toPromise()];
                    case 1:
                        validationResult = _a.sent();
                        if (!validationResult.isValid) {
                            mensagens = this.message.validationResult(validationResult);
                            mensagens.forEach(function (m) { return _this.message.warning("titles.emissaoNotaFiscal", m); });
                            return [2 /*return*/];
                        }
                        else {
                            this.ajustaDiferenca();
                        }
                        return [2 /*return*/];
                }
            });
        });
    };
    EmissaoNotaFiscalLiberarFormComponent.prototype.ajustaDiferenca = function () {
        return __awaiter(this, void 0, void 0, function () {
            var validationResult, mensagens;
            var _this = this;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        this.difBasIcm = this.service.data.basIcm - this.defaultBasIcm;
                        this.difBasIpi = this.service.data.basIpi - this.defaultBasIpi;
                        this.difVlIcms = this.service.data.vlIcms - this.defaultVlIcms;
                        this.difVlIpi = this.service.data.vlIpi - this.defaultVlIpi;
                        this.difVlIcmsRet = this.service.data.vlIcmsRet - this.defaultVlIcmsRet;
                        this.difVlIpiDest = this.service.data.vlIpiDest - this.defaultVlIpiDest;
                        this.difVlIr = this.service.data.vlIr - this.defaultVlIr;
                        this.difVlInss = this.service.data.vlInss - this.defaultVlInss;
                        return [4 /*yield*/, this.outraNotaEmissaoService.getAjustaDiferenca({
                                pedidoId: this.service.data.pedidoId,
                                difBasIcm: this.difBasIcm,
                                difBasIpi: this.difBasIpi,
                                difVlIcms: this.difVlIcms,
                                difVlIpi: this.difVlIpi,
                                difVlIcmsRet: this.difVlIcmsRet,
                                difVlIpiDest: this.difVlIpiDest,
                                difVlIr: this.difVlIr,
                                difVlInss: this.difVlInss
                            }).toPromise()];
                    case 1:
                        validationResult = _a.sent();
                        if (!validationResult.isValid) {
                            mensagens = this.message.validationResult(validationResult);
                            mensagens.forEach(function (m) { return _this.message.warning("titles.emissaoNotaFiscal", m); });
                            return [2 /*return*/];
                        }
                        else {
                            this.zeraDiferenca();
                            this.executeConfirmacaoPedido();
                        }
                        return [2 /*return*/];
                }
            });
        });
    };
    EmissaoNotaFiscalLiberarFormComponent.prototype.zeraDiferenca = function () {
        this.difBasIcm = 0;
        this.difBasIpi = 0;
        this.difVlIcms = 0;
        this.difVlIpi = 0;
        this.difVlIcmsRet = 0;
        this.difVlIpiDest = 0;
        this.difVlIr = 0;
        this.difVlInss = 0;
    };
    EmissaoNotaFiscalLiberarFormComponent.prototype.executeConfirmacaoPedido = function () {
        return __awaiter(this, void 0, void 0, function () {
            var ret;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        this.service.data.serieId = this.proximaNota.serieId;
                        this.service.data.notaId = this.proximaNota.nota;
                        this.service.data.tipoNfeId = this.proximaNota.tipoNfeId;
                        return [4 /*yield*/, this.outraNotaEmissaoService.confirmacaoPedido(this.service.data).toPromise()];
                    case 1:
                        ret = _a.sent();
                        if (app_shared_services_funcoes_string_utils_string_utils_static_service__WEBPACK_IMPORTED_MODULE_27__["StringUtilsStaticService"].isNotEmpty(ret.msg)) {
                            this.message.warning("titles.emissaoNotaFiscal", ret.msg);
                            return [2 /*return*/];
                        }
                        else {
                            this.retRegNota = ret.retRegNota;
                            this.numRegNota = ret.numRegNota;
                            if (this.service.data.tipoNfeId === 2 && this.proximaNota.formControle === "N") {
                                this.geraNFE();
                            }
                            else
                                this.printFormularioControle(this.retRegNota);
                            this.backToIndex();
                        }
                        return [2 /*return*/];
                }
            });
        });
    };
    EmissaoNotaFiscalLiberarFormComponent.prototype.printFormularioControle = function (regNota) {
        this.funcoesService.reportInvoc.invocaRelatorio('COM0007', {
            titulo: this.message.getTranslates('titles', 'emissaoNotaFiscal'),
            subTitulo: ''
        }, {
            regNota: regNota,
            filialId: this.loginService.getLogin().filialId,
            colaboradorId: this.loginService.getLogin().colaboradorId
        });
    };
    EmissaoNotaFiscalLiberarFormComponent.prototype.geraNFE = function () {
        var _this = this;
        if (this.funcoesService.isUndefinedOrNull(this.service.configFat.ida1Certificate)) {
            this.message.error("titles.emissaoNotaFiscal", "messages.certificadoNaoSelecionadoConfiguracoes");
        }
        else {
            this.nfeService.emissao({ regNota: this.retRegNota }).subscribe(function (resp) {
                if (resp.has) {
                    _this.message.warning("titles.emissaoNotaFiscal", "messages.verifiqueStatusNfe");
                }
                else {
                    _this.imprimirDanfe(_this.retRegNota);
                }
            });
        }
    };
    EmissaoNotaFiscalLiberarFormComponent.prototype.back = function (exibeConfirm) {
        if (exibeConfirm === void 0) { exibeConfirm = true; }
        return __awaiter(this, void 0, void 0, function () {
            var _this = this;
            return __generator(this, function (_a) {
                if (exibeConfirm) {
                    this.message.confirm("titles.emissaoNotaFiscal", "messages.cancelaConfirmacaoPedido", null, function () { return __awaiter(_this, void 0, void 0, function () {
                        return __generator(this, function (_a) {
                            this.cancelaConfirmacao();
                            return [2 /*return*/];
                        });
                    }); });
                }
                else {
                    this.cancelaConfirmacao();
                }
                return [2 /*return*/];
            });
        });
    };
    EmissaoNotaFiscalLiberarFormComponent.prototype.cancelaConfirmacao = function () {
        return __awaiter(this, void 0, void 0, function () {
            var validationResult, mensagens;
            var _this = this;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        if (!!!this.service.data.pedidoId) return [3 /*break*/, 2];
                        return [4 /*yield*/, this.outraNotaEmissaoService.cancelaConfirmacao({ pedidoId: this.service.data.pedidoId }).toPromise()];
                    case 1:
                        validationResult = _a.sent();
                        if (!validationResult.isValid) {
                            mensagens = this.message.validationResult(validationResult);
                            mensagens.forEach(function (m) { return _this.message.warning("titles.emissaoNotaFiscal", m); });
                            return [2 /*return*/];
                        }
                        else {
                            this.backToIndex();
                        }
                        _a.label = 2;
                    case 2: return [2 /*return*/];
                }
            });
        });
    };
    EmissaoNotaFiscalLiberarFormComponent.prototype.backToIndex = function () {
        this.funcoesService.desabilitarFiltro();
        this.router.navigate(["" + this.target + this.pageRoute]);
    };
    EmissaoNotaFiscalLiberarFormComponent.prototype.calcular = function () {
        return __awaiter(this, void 0, void 0, function () {
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        this.disabledButtonSalvar = false;
                        this.disabledButtonCalcular = true;
                        return [4 /*yield*/, this.loadCalculaNota()];
                    case 1:
                        _a.sent();
                        return [2 /*return*/];
                }
            });
        });
    };
    EmissaoNotaFiscalLiberarFormComponent.prototype.setaRecalculo = function () {
        this.disabledButtonSalvar = true;
        this.disabledButtonCalcular = false;
    };
    EmissaoNotaFiscalLiberarFormComponent.prototype.imprimirDanfe = function (notaFiscalId) {
        return __awaiter(this, void 0, void 0, function () {
            var dtArquivo;
            var _this = this;
            return __generator(this, function (_a) {
                dtArquivo = moment__WEBPACK_IMPORTED_MODULE_10__().format('DDMMYYYYHHMMSS').toString();
                this.nfeXmlFilter.filialId = this.filialId;
                this.nfeXmlFilter.nomeArquivo = "Danfe" + dtArquivo + ".zip";
                this.nfeXmlFilter.notaFiscalIdI = notaFiscalId;
                this.nfeXmlFilter.notaFiscalIdF = notaFiscalId;
                this.nfeService.exportarPdf(this.nfeXmlFilter).subscribe(function (ret) {
                    if (_this.funcoesService.isNotUndefinedOrNull(ret.validationResult)) {
                        _this.mensagens = _this.message.validationResult(ret.validationResult);
                        if (ret && !ret.validationResult.isValid) {
                            _this.message.warning("titles.emissaoNotaFiscal", _this.mensagens[0]);
                            return;
                        }
                    }
                    else {
                        _this.nfeXmlFilterAux = ret;
                        if ((!_this.funcoesService.isNotUndefinedOrNull(_this.nfeXmlFilterAux.arquivoZip)) || (_this.nfeXmlFilterAux.arquivoZip === "")) {
                            _this.message.warning("titles.emissaoNotaFiscal", "messages.nenhumPdfEnontrado");
                            return;
                        }
                        _this.download();
                    }
                });
                return [2 /*return*/];
            });
        });
    };
    EmissaoNotaFiscalLiberarFormComponent.prototype.download = function () {
        if (this.funcoesService.isUndefinedOrNull(this.nfeXmlFilterAux)) {
            return;
        }
        var b64 = this.nfeXmlFilterAux.arquivoZip;
        var byteCharacters = atob(b64);
        var byteArrays = [];
        for (var offset = 0; offset < byteCharacters.length; offset += 512) {
            var slice = byteCharacters.slice(offset, offset + 512);
            var byteNumbers = new Array(slice.length);
            for (var i = 0; i < slice.length; i++) {
                byteNumbers[i] = slice.charCodeAt(i);
            }
            var byteArray = new Uint8Array(byteNumbers);
            byteArrays.push(byteArray);
        }
        var tipo = this.nfeXmlFilterAux.tipoArquivo.replace(',', '');
        var blobData = new Blob(byteArrays, { type: tipo });
        var win = window;
        if (win.navigator && win.navigator.msSaveOrOpenBlob) { // IE
            win.navigator.msSaveOrOpenBlob(blobData, this.nfeXmlFilterAux.nomeArquivo);
        }
        else { // chrome
            var blob = new Blob([blobData], { type: tipo });
            var url = window.URL.createObjectURL(blob);
            var link = document.createElement('a');
            link.href = url;
            link.download = this.nfeXmlFilterAux.nomeArquivo;
            link.click();
        }
    };
    EmissaoNotaFiscalLiberarFormComponent.prototype.confirmaProximaNota = function (proximaNota) {
        this.proximaNota.serieId = proximaNota.serieId;
        this.proximaNota.nota = proximaNota.nota;
        this.proximaNota.impressora = proximaNota.impressora;
        this.proximaNota.numNfAuto = proximaNota.numNfAuto;
        this.proximaNota.formControle = proximaNota.formControle;
        this.proximaNota.flagImp = proximaNota.flagImp;
        this.proximaNota.tipoNfeId = proximaNota.tipoNfeId;
    };
    EmissaoNotaFiscalLiberarFormComponent.prototype.confirmaImpressora = function (impressora) {
        var _this = this;
        if (!!impressora) {
            this.proximaNota.impressora = impressora;
            this.message.confirm("titles.emissaoNotaFiscal", "messages.confirmaEmissaoNotaFiscal", null, function () { return __awaiter(_this, void 0, void 0, function () {
                return __generator(this, function (_a) {
                    if (this.proximaNota.tipoNfeId === 2) {
                        this.validaDadosNota();
                    }
                    else {
                        this.ajustaDiferenca();
                    }
                    return [2 /*return*/];
                });
            }); });
        }
        else {
            this.back();
        }
    };
    EmissaoNotaFiscalLiberarFormComponent.prototype.loadMaskPlaca = function () {
        return __awaiter(this, void 0, void 0, function () {
            var mascara, ret;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        if (!(this.funcoes.isUndefinedOrNull(this.maskCustom) || this.maskCustom === '')) return [3 /*break*/, 2];
                        if (!this.configuracao.isLoadConfig) {
                            return [2 /*return*/];
                        }
                        mascara = new app_config_enumerables__WEBPACK_IMPORTED_MODULE_2__["Mascaras"]();
                        return [4 /*yield*/, this.outraNotaEmissaoService.getTipoTransp({ pedidoId: this.service.data.pedidoId }).toPromise()];
                    case 1:
                        ret = _a.sent();
                        if (ret.tipoTransp === "F") {
                            this.isFerroviario = true;
                        }
                        if (this.isFerroviario)
                            this.maskCustom = mascara.mapMascaraCutomizada(this.service.configBal.maskTrem);
                        else
                            this.maskCustom = mascara.mapMascaraCutomizada(this.service.configBal.maskPlaca);
                        this.maxLengthPlaca = !!this.maskCustom ? this.maskCustom.length : 18;
                        _a.label = 2;
                    case 2: return [2 /*return*/];
                }
            });
        });
    };
    EmissaoNotaFiscalLiberarFormComponent.prototype.validaPlaca = function () {
        if (this.service.configCtr.valPlacaEmissNF)
            this.loadMaskPlaca();
    };
    EmissaoNotaFiscalLiberarFormComponent.prototype.validaDifMaxima = function (campo, valor, valorAnt) {
        if (!campo || !valor)
            return true;
        var dif = Math.abs(app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_28__["NumberUtilsStaticService"].toNumber(valorAnt) - app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_28__["NumberUtilsStaticService"].toNumber(valor));
        if (dif > 100) {
            document.getElementById(campo).focus();
            this.service.data[campo] = app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_28__["NumberUtilsStaticService"].toNumber(valorAnt);
            this.message.warning("titles.emissaoNotaFiscal", "messages.diferencaMaxPermitida100");
            return false;
        }
        return true;
    };
    EmissaoNotaFiscalLiberarFormComponent.prototype.getConfiguracaoSerie = function (tipoPed, vlMerc, vlServ, nomeSist) {
        var sSist = 'FAT';
        var sParam = 'RSeriePadrao';
        if (tipoPed === 'I') {
            sSist = 'IND';
        }
        else if (tipoPed === 'V') {
            sSist = 'PDV';
        }
        else if (vlMerc === 0 && vlServ !== 0) {
            sParam = 'RSerieServ';
        }
        else if (['CTR', 'BAL'].includes(nomeSist.toUpperCase())) {
            sSist = 'BAL';
            if (this.service.configBal.serieTerm === 'S') {
                if (tipoPed === 'T') {
                    sParam = "RSerTra" + this.configuracao.macAddress;
                }
                else {
                    sParam = "RSerArm" + this.configuracao.macAddress;
                }
            }
            else {
                if (tipoPed === 'T') {
                    sParam = 'RSerTransito';
                }
                else {
                    sParam = 'RSerRetorno';
                }
            }
        }
        return { sSist: sSist, sParam: sParam };
    };
    EmissaoNotaFiscalLiberarFormComponent.ctorParameters = function () { return [
        { type: _angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"] },
        { type: _angular_router__WEBPACK_IMPORTED_MODULE_1__["ActivatedRoute"] },
        { type: app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_17__["MessageService"] },
        { type: _emissao_nota_fiscal_service__WEBPACK_IMPORTED_MODULE_20__["EmissaoNotaFiscalService"] },
        { type: app_shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_16__["PermissoesUtilsService"] },
        { type: app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_15__["FuncoesService"] },
        { type: app_shared_services_funcoes_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_14__["ConfiguracaoFacade"] },
        { type: app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_21__["LoginService"] },
        { type: app_pages_cadastro_material_material_service__WEBPACK_IMPORTED_MODULE_22__["MaterialService"] },
        { type: app_pages_cadastro_destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_4__["DestinatarioService"] },
        { type: app_pages_cadastro_motorista_motorista_service__WEBPACK_IMPORTED_MODULE_23__["MotoristaService"] },
        { type: app_pages_cadastro_estados_estados_service__WEBPACK_IMPORTED_MODULE_5__["EstadosService"] },
        { type: app_pages_nfe_nfe_service__WEBPACK_IMPORTED_MODULE_7__["NfeService"] },
        { type: app_pages_cadastro_serie_serie_service__WEBPACK_IMPORTED_MODULE_24__["SerieService"] },
        { type: app_pages_cadastro_cond_pagamento_cond_pagamento_service__WEBPACK_IMPORTED_MODULE_29__["CondPagamentoService"] },
        { type: app_pages_controle_outra_nota_emissao_outra_nota_emissao_service__WEBPACK_IMPORTED_MODULE_30__["OutraNotaEmissaoService"] }
    ]; };
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewChild"])(_emissao_nota_fiscal_proxima_nota_emissao_nota_fiscal_proxima_nota_component__WEBPACK_IMPORTED_MODULE_26__["EmissaoNotaFiscalProximaNotaComponent"], { static: false }),
        __metadata("design:type", _emissao_nota_fiscal_proxima_nota_emissao_nota_fiscal_proxima_nota_component__WEBPACK_IMPORTED_MODULE_26__["EmissaoNotaFiscalProximaNotaComponent"])
    ], EmissaoNotaFiscalLiberarFormComponent.prototype, "childEmissaoNotaFiscalProximaNotaComponent", void 0);
    EmissaoNotaFiscalLiberarFormComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: "app-emissao-nota-fiscal-liberar-form",
            template: __importDefault(__webpack_require__(/*! raw-loader!./emissao-nota-fiscal-liberar-form.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/especificos/rocha/movimentos/emissao-nota-fiscal/emissao-nota-fiscal-liberar/emissao-nota-fiscal-liberar-form.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None
        }),
        __metadata("design:paramtypes", [_angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"],
            _angular_router__WEBPACK_IMPORTED_MODULE_1__["ActivatedRoute"],
            app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_17__["MessageService"],
            _emissao_nota_fiscal_service__WEBPACK_IMPORTED_MODULE_20__["EmissaoNotaFiscalService"],
            app_shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_16__["PermissoesUtilsService"],
            app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_15__["FuncoesService"],
            app_shared_services_funcoes_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_14__["ConfiguracaoFacade"],
            app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_21__["LoginService"],
            app_pages_cadastro_material_material_service__WEBPACK_IMPORTED_MODULE_22__["MaterialService"],
            app_pages_cadastro_destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_4__["DestinatarioService"],
            app_pages_cadastro_motorista_motorista_service__WEBPACK_IMPORTED_MODULE_23__["MotoristaService"],
            app_pages_cadastro_estados_estados_service__WEBPACK_IMPORTED_MODULE_5__["EstadosService"],
            app_pages_nfe_nfe_service__WEBPACK_IMPORTED_MODULE_7__["NfeService"],
            app_pages_cadastro_serie_serie_service__WEBPACK_IMPORTED_MODULE_24__["SerieService"],
            app_pages_cadastro_cond_pagamento_cond_pagamento_service__WEBPACK_IMPORTED_MODULE_29__["CondPagamentoService"],
            app_pages_controle_outra_nota_emissao_outra_nota_emissao_service__WEBPACK_IMPORTED_MODULE_30__["OutraNotaEmissaoService"]])
    ], EmissaoNotaFiscalLiberarFormComponent);
    return EmissaoNotaFiscalLiberarFormComponent;
}(app_shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_12__["BasePermissoes"]));



/***/ }),

/***/ "./src/app/pages/especificos/rocha/movimentos/emissao-nota-fiscal/emissao-nota-fiscal-moeda/emissao-nota-fiscal-moeda.component.ts":
/*!*****************************************************************************************************************************************!*\
  !*** ./src/app/pages/especificos/rocha/movimentos/emissao-nota-fiscal/emissao-nota-fiscal-moeda/emissao-nota-fiscal-moeda.component.ts ***!
  \*****************************************************************************************************************************************/
/*! exports provided: EmissaoNotaFiscalMoedaComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EmissaoNotaFiscalMoedaComponent", function() { return EmissaoNotaFiscalMoedaComponent; });
/* harmony import */ var _shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../../../../../../shared/services/funcoes/number-utils/number-utils.static.service */ "./src/app/shared/services/funcoes/number-utils/number-utils.static.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 app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! app/shared/services/funcoes/funcoes.service */ "./src/app/shared/services/funcoes/funcoes.service.ts");
/* harmony import */ var app_pages_cadastro_cotacao_de_moeda_cotacao_de_moeda_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! app/pages/cadastro/cotacao-de-moeda/cotacao-de-moeda.service */ "./src/app/pages/cadastro/cotacao-de-moeda/cotacao-de-moeda.service.ts");
/* harmony import */ var app_shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! app/shared/services/event-emitter/event-emitter.service */ "./src/app/shared/services/event-emitter/event-emitter.service.ts");
/* harmony import */ var app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! app/shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var app_shared_services_funcoes_modal_utils_modal_utils_static_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! app/shared/services/funcoes/modal-utils/modal-utils.static.service */ "./src/app/shared/services/funcoes/modal-utils/modal-utils.static.service.ts");
/* harmony import */ var app_config_enumerables__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! app/config/enumerables */ "./src/app/config/enumerables.ts");
/* harmony import */ var app_pages_controle_outra_nota_emissao_outra_nota_emissao_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! app/pages/controle/outra-nota-emissao/outra-nota-emissao.service */ "./src/app/pages/controle/outra-nota-emissao/outra-nota-emissao.service.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 __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 EmissaoNotaFiscalMoedaComponent = /** @class */ (function () {
    function EmissaoNotaFiscalMoedaComponent(funcoes, cotacaoService, message, outraNotaEmissaoService) {
        this.funcoes = funcoes;
        this.cotacaoService = cotacaoService;
        this.message = message;
        this.outraNotaEmissaoService = outraNotaEmissaoService;
        this.dataResult = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["EventEmitter"]();
        this.mascara = new app_config_enumerables__WEBPACK_IMPORTED_MODULE_7__["Mascaras"]();
    }
    EmissaoNotaFiscalMoedaComponent.prototype.ngOnInit = function () {
    };
    EmissaoNotaFiscalMoedaComponent.prototype.onSubmit = function (form) {
        app_shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_4__["EventEmitterService"].get("msgCotacao").emit(form);
        if (form.invalid) {
            return;
        }
        if (_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_0__["NumberUtilsStaticService"].isNotPositive(this.cotacaoDeMoeda.vlCotacao)) {
            this.message.warning("titles.cotacao", "messages.cotacaoInvalida");
            return;
        }
        this.dataResult.emit(this.cotacaoDeMoeda);
        app_shared_services_funcoes_modal_utils_modal_utils_static_service__WEBPACK_IMPORTED_MODULE_6__["ModalUtilsStaticService"].closeModal("modalMoedaCotacao");
    };
    EmissaoNotaFiscalMoedaComponent.prototype.getCotacao = function () {
        return __awaiter(this, void 0, void 0, function () {
            var _a;
            return __generator(this, function (_b) {
                switch (_b.label) {
                    case 0:
                        _a = this;
                        return [4 /*yield*/, this.cotacaoService.getVerificaCotacao({ moedaId: this.cotacaoDeMoeda.moedaId, dtCotacao: this.cotacaoDeMoeda.dtCotacao }).toPromise()];
                    case 1:
                        _a.cotacaoDeMoeda = _b.sent();
                        return [2 /*return*/];
                }
            });
        });
    };
    EmissaoNotaFiscalMoedaComponent.prototype.onCancelarClick = function () {
        return __awaiter(this, void 0, void 0, function () {
            var validationResult, mensagens;
            var _this = this;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        if (!!!this.pedidoId) return [3 /*break*/, 2];
                        return [4 /*yield*/, this.outraNotaEmissaoService.alteraSituacaoDoPedido({ pedidoId: this.pedidoId, sitReg: "" }).toPromise()];
                    case 1:
                        validationResult = _a.sent();
                        if (!validationResult.isValid) {
                            mensagens = this.message.validationResult(validationResult);
                            mensagens.forEach(function (m) { return _this.message.warning("titles.emissaoNotaFiscal", m); });
                            return [2 /*return*/];
                        }
                        else {
                            app_shared_services_funcoes_modal_utils_modal_utils_static_service__WEBPACK_IMPORTED_MODULE_6__["ModalUtilsStaticService"].closeModal("modalMoedaCotacao");
                        }
                        _a.label = 2;
                    case 2: return [2 /*return*/];
                }
            });
        });
    };
    EmissaoNotaFiscalMoedaComponent.ctorParameters = function () { return [
        { type: app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_2__["FuncoesService"] },
        { type: app_pages_cadastro_cotacao_de_moeda_cotacao_de_moeda_service__WEBPACK_IMPORTED_MODULE_3__["CotacaoDeMoedaService"] },
        { type: app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_5__["MessageService"] },
        { type: app_pages_controle_outra_nota_emissao_outra_nota_emissao_service__WEBPACK_IMPORTED_MODULE_8__["OutraNotaEmissaoService"] }
    ]; };
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])(),
        __metadata("design:type", Object)
    ], EmissaoNotaFiscalMoedaComponent.prototype, "cotacaoDeMoeda", void 0);
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])(),
        __metadata("design:type", Object)
    ], EmissaoNotaFiscalMoedaComponent.prototype, "pedidoId", void 0);
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Output"])(),
        __metadata("design:type", Object)
    ], EmissaoNotaFiscalMoedaComponent.prototype, "dataResult", void 0);
    EmissaoNotaFiscalMoedaComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({
            selector: "app-emissao-nota-fiscal-moeda",
            template: __importDefault(__webpack_require__(/*! raw-loader!./emissao-nota-fiscal-moeda.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/especificos/rocha/movimentos/emissao-nota-fiscal/emissao-nota-fiscal-moeda/emissao-nota-fiscal-moeda.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewEncapsulation"].None
        }),
        __metadata("design:paramtypes", [app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_2__["FuncoesService"],
            app_pages_cadastro_cotacao_de_moeda_cotacao_de_moeda_service__WEBPACK_IMPORTED_MODULE_3__["CotacaoDeMoedaService"],
            app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_5__["MessageService"],
            app_pages_controle_outra_nota_emissao_outra_nota_emissao_service__WEBPACK_IMPORTED_MODULE_8__["OutraNotaEmissaoService"]])
    ], EmissaoNotaFiscalMoedaComponent);
    return EmissaoNotaFiscalMoedaComponent;
}());



/***/ }),

/***/ "./src/app/pages/especificos/rocha/movimentos/emissao-nota-fiscal/emissao-nota-fiscal-proxima-nota/emissao-nota-fiscal-proxima-nota.component.ts":
/*!*******************************************************************************************************************************************************!*\
  !*** ./src/app/pages/especificos/rocha/movimentos/emissao-nota-fiscal/emissao-nota-fiscal-proxima-nota/emissao-nota-fiscal-proxima-nota.component.ts ***!
  \*******************************************************************************************************************************************************/
/*! exports provided: EmissaoNotaFiscalProximaNotaComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EmissaoNotaFiscalProximaNotaComponent", function() { return EmissaoNotaFiscalProximaNotaComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! app/shared/services/funcoes/funcoes.service */ "./src/app/shared/services/funcoes/funcoes.service.ts");
/* harmony import */ var app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! app/shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var app_shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! app/shared/services/event-emitter/event-emitter.service */ "./src/app/shared/services/event-emitter/event-emitter.service.ts");
/* harmony import */ var app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! app/pages/login/login.service */ "./src/app/pages/login/login.service.ts");
/* harmony import */ var _emissao_nota_fiscal_model__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../emissao-nota-fiscal.model */ "./src/app/pages/especificos/rocha/movimentos/emissao-nota-fiscal/emissao-nota-fiscal.model.ts");
/* harmony import */ var _emissao_nota_fiscal_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../emissao-nota-fiscal.service */ "./src/app/pages/especificos/rocha/movimentos/emissao-nota-fiscal/emissao-nota-fiscal.service.ts");
/* harmony import */ var app_pages_cadastro_serie_serie_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! app/pages/cadastro/serie/serie.service */ "./src/app/pages/cadastro/serie/serie.service.ts");
/* harmony import */ var app_shared_services_funcoes_boolean_utils_boolean_utils_static_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! app/shared/services/funcoes/boolean-utils/boolean-utils.static.service */ "./src/app/shared/services/funcoes/boolean-utils/boolean-utils.static.service.ts");
/* harmony import */ var app_shared_services_funcoes_modal_utils_modal_utils_static_service__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! app/shared/services/funcoes/modal-utils/modal-utils.static.service */ "./src/app/shared/services/funcoes/modal-utils/modal-utils.static.service.ts");
/* harmony import */ var app_config_enumerables__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! app/config/enumerables */ "./src/app/config/enumerables.ts");
/* harmony import */ var app_pages_controle_outra_nota_emissao_outra_nota_emissao_service__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! app/pages/controle/outra-nota-emissao/outra-nota-emissao.service */ "./src/app/pages/controle/outra-nota-emissao/outra-nota-emissao.service.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 __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 EmissaoNotaFiscalProximaNotaComponent = /** @class */ (function () {
    function EmissaoNotaFiscalProximaNotaComponent(funcoesService, messageService, loginService, service, serieService, outraNotaEmissaoService) {
        this.funcoesService = funcoesService;
        this.messageService = messageService;
        this.loginService = loginService;
        this.service = service;
        this.serieService = serieService;
        this.outraNotaEmissaoService = outraNotaEmissaoService;
        this.mascara = new app_config_enumerables__WEBPACK_IMPORTED_MODULE_10__["Mascaras"]();
        this.mensagens = [];
        this.disabledNota = false;
        this.outConfirma = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
    }
    EmissaoNotaFiscalProximaNotaComponent.prototype.ngOnInit = function () {
        this.data = new _emissao_nota_fiscal_model__WEBPACK_IMPORTED_MODULE_5__["EmissaoNotaFiscalProxima"]();
    };
    EmissaoNotaFiscalProximaNotaComponent.prototype.onSubmit = function (form) {
        return __awaiter(this, void 0, void 0, function () {
            var validationResult, mensagens;
            var _this = this;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        app_shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_3__["EventEmitterService"].get("msgEmissaoProxNota").emit(form);
                        if (form.invalid) {
                            return [2 /*return*/];
                        }
                        return [4 /*yield*/, this.outraNotaEmissaoService.getVerificaNotaEmitida({ serieId: this.data.serieId, nota: this.data.nota }).toPromise()];
                    case 1:
                        validationResult = _a.sent();
                        if (!validationResult.isValid) {
                            mensagens = this.messageService.validationResult(validationResult);
                            mensagens.forEach(function (m) { return _this.messageService.warning("titles.emissaoNotaFiscal", m); });
                            return [2 /*return*/];
                        }
                        this.outConfirma.emit(this.data);
                        this.data = new _emissao_nota_fiscal_model__WEBPACK_IMPORTED_MODULE_5__["EmissaoNotaFiscalProxima"]();
                        app_shared_services_funcoes_modal_utils_modal_utils_static_service__WEBPACK_IMPORTED_MODULE_9__["ModalUtilsStaticService"].closeModal("emissao-nota-fiscal-proxima-nota-dialog");
                        return [2 /*return*/];
                }
            });
        });
    };
    Object.defineProperty(EmissaoNotaFiscalProximaNotaComponent.prototype, "mostrarComboSerie", {
        get: function () {
            if (this.service.configFat.rSeriePadrao === 0)
                return true;
        },
        enumerable: true,
        configurable: true
    });
    EmissaoNotaFiscalProximaNotaComponent.prototype.objectSelect = function (current) {
        this.data = current;
    };
    EmissaoNotaFiscalProximaNotaComponent.prototype.trataSerie = function (serie) {
        this.data.nota = serie.nota;
        this.data.impressora = serie.impressora;
        this.data.numNfAuto = serie.numNfAuto;
        this.disabledNota = !app_shared_services_funcoes_boolean_utils_boolean_utils_static_service__WEBPACK_IMPORTED_MODULE_8__["BooleanUtilsStaticService"].toBoolean(serie.numNfAuto);
        this.data.formControle = serie.formControle;
        this.data.flagImp = serie.flagImp;
        this.data.tipoNfeId = serie.tipoNfeId;
    };
    EmissaoNotaFiscalProximaNotaComponent.prototype.verificaNotaEmitida = function () {
        return __awaiter(this, void 0, void 0, function () {
            var validationResult, mensagens;
            var _this = this;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0: return [4 /*yield*/, this.outraNotaEmissaoService.getVerificaNotaEmitida({ serieId: this.data.serieId, nota: this.data.nota }).toPromise()];
                    case 1:
                        validationResult = _a.sent();
                        if (!validationResult.isValid) {
                            mensagens = this.messageService.validationResult(validationResult);
                            mensagens.forEach(function (m) { return _this.messageService.warning("titles.emissaoNotaFiscal", m); });
                            return [2 /*return*/];
                        }
                        return [2 /*return*/];
                }
            });
        });
    };
    EmissaoNotaFiscalProximaNotaComponent.ctorParameters = function () { return [
        { type: app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_1__["FuncoesService"] },
        { type: app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_2__["MessageService"] },
        { type: app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_4__["LoginService"] },
        { type: _emissao_nota_fiscal_service__WEBPACK_IMPORTED_MODULE_6__["EmissaoNotaFiscalService"] },
        { type: app_pages_cadastro_serie_serie_service__WEBPACK_IMPORTED_MODULE_7__["SerieService"] },
        { type: app_pages_controle_outra_nota_emissao_outra_nota_emissao_service__WEBPACK_IMPORTED_MODULE_11__["OutraNotaEmissaoService"] }
    ]; };
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
        __metadata("design:type", Object)
    ], EmissaoNotaFiscalProximaNotaComponent.prototype, "outConfirma", void 0);
    EmissaoNotaFiscalProximaNotaComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: "app-emissao-nota-fiscal-proxima-nota",
            template: __importDefault(__webpack_require__(/*! raw-loader!./emissao-nota-fiscal-proxima-nota.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/especificos/rocha/movimentos/emissao-nota-fiscal/emissao-nota-fiscal-proxima-nota/emissao-nota-fiscal-proxima-nota.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None
        }),
        __metadata("design:paramtypes", [app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_1__["FuncoesService"],
            app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_2__["MessageService"],
            app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_4__["LoginService"],
            _emissao_nota_fiscal_service__WEBPACK_IMPORTED_MODULE_6__["EmissaoNotaFiscalService"],
            app_pages_cadastro_serie_serie_service__WEBPACK_IMPORTED_MODULE_7__["SerieService"],
            app_pages_controle_outra_nota_emissao_outra_nota_emissao_service__WEBPACK_IMPORTED_MODULE_11__["OutraNotaEmissaoService"]])
    ], EmissaoNotaFiscalProximaNotaComponent);
    return EmissaoNotaFiscalProximaNotaComponent;
}());



/***/ }),

/***/ "./src/app/pages/especificos/rocha/movimentos/emissao-nota-fiscal/emissao-nota-fiscal-seleciona-impressora/emissao-nota-fiscal-seleciona-impressora.component.ts":
/*!***********************************************************************************************************************************************************************!*\
  !*** ./src/app/pages/especificos/rocha/movimentos/emissao-nota-fiscal/emissao-nota-fiscal-seleciona-impressora/emissao-nota-fiscal-seleciona-impressora.component.ts ***!
  \***********************************************************************************************************************************************************************/
/*! exports provided: EmissaoNotaFiscalSelImpressoraComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EmissaoNotaFiscalSelImpressoraComponent", function() { return EmissaoNotaFiscalSelImpressoraComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! app/shared/services/funcoes/funcoes.service */ "./src/app/shared/services/funcoes/funcoes.service.ts");
/* harmony import */ var app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! app/shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var app_shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! app/shared/services/event-emitter/event-emitter.service */ "./src/app/shared/services/event-emitter/event-emitter.service.ts");
/* harmony import */ var app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! app/pages/login/login.service */ "./src/app/pages/login/login.service.ts");
/* harmony import */ var _emissao_nota_fiscal_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../emissao-nota-fiscal.service */ "./src/app/pages/especificos/rocha/movimentos/emissao-nota-fiscal/emissao-nota-fiscal.service.ts");
/* harmony import */ var app_shared_services_funcoes_modal_utils_modal_utils_static_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! app/shared/services/funcoes/modal-utils/modal-utils.static.service */ "./src/app/shared/services/funcoes/modal-utils/modal-utils.static.service.ts");
/* harmony import */ var app_config_enumerables__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! app/config/enumerables */ "./src/app/config/enumerables.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 __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 EmissaoNotaFiscalSelImpressoraComponent = /** @class */ (function () {
    function EmissaoNotaFiscalSelImpressoraComponent(funcoesService, messageService, loginService, service) {
        this.funcoesService = funcoesService;
        this.messageService = messageService;
        this.loginService = loginService;
        this.service = service;
        this.outConfirma = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
        this.mascara = new app_config_enumerables__WEBPACK_IMPORTED_MODULE_7__["Mascaras"]();
        this.mensagens = [];
        this.impressora = "";
    }
    EmissaoNotaFiscalSelImpressoraComponent.prototype.ngOnInit = function () {
        this.impressora = "";
    };
    EmissaoNotaFiscalSelImpressoraComponent.prototype.onSubmit = function (form) {
        return __awaiter(this, void 0, void 0, function () {
            return __generator(this, function (_a) {
                app_shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_3__["EventEmitterService"].get("msgSelecionaImpressora").emit(form);
                if (form.invalid) {
                    return [2 /*return*/];
                }
                this.outConfirma.emit(this.impressora);
                app_shared_services_funcoes_modal_utils_modal_utils_static_service__WEBPACK_IMPORTED_MODULE_6__["ModalUtilsStaticService"].closeModal("emissao-nota-fiscal-seleciona-impressora-dialog");
                this.impressora = "";
                return [2 /*return*/];
            });
        });
    };
    EmissaoNotaFiscalSelImpressoraComponent.prototype.cancelar = function () {
        app_shared_services_funcoes_modal_utils_modal_utils_static_service__WEBPACK_IMPORTED_MODULE_6__["ModalUtilsStaticService"].closeModal("emissao-nota-fiscal-seleciona-impressora-dialog");
        this.outConfirma.emit("");
    };
    EmissaoNotaFiscalSelImpressoraComponent.ctorParameters = function () { return [
        { type: app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_1__["FuncoesService"] },
        { type: app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_2__["MessageService"] },
        { type: app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_4__["LoginService"] },
        { type: _emissao_nota_fiscal_service__WEBPACK_IMPORTED_MODULE_5__["EmissaoNotaFiscalService"] }
    ]; };
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
        __metadata("design:type", Object)
    ], EmissaoNotaFiscalSelImpressoraComponent.prototype, "outConfirma", void 0);
    EmissaoNotaFiscalSelImpressoraComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: "app-emissao-nota-fiscal-seleciona-impressora",
            template: __importDefault(__webpack_require__(/*! raw-loader!./emissao-nota-fiscal-seleciona-impressora.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/especificos/rocha/movimentos/emissao-nota-fiscal/emissao-nota-fiscal-seleciona-impressora/emissao-nota-fiscal-seleciona-impressora.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None
        }),
        __metadata("design:paramtypes", [app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_1__["FuncoesService"],
            app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_2__["MessageService"],
            app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_4__["LoginService"],
            _emissao_nota_fiscal_service__WEBPACK_IMPORTED_MODULE_5__["EmissaoNotaFiscalService"]])
    ], EmissaoNotaFiscalSelImpressoraComponent);
    return EmissaoNotaFiscalSelImpressoraComponent;
}());



/***/ }),

/***/ "./src/app/pages/especificos/rocha/movimentos/emissao-nota-fiscal/emissao-nota-fiscal-titulo-modal/emissao-nota-fiscal-titulo-modal.component.ts":
/*!*******************************************************************************************************************************************************!*\
  !*** ./src/app/pages/especificos/rocha/movimentos/emissao-nota-fiscal/emissao-nota-fiscal-titulo-modal/emissao-nota-fiscal-titulo-modal.component.ts ***!
  \*******************************************************************************************************************************************************/
/*! exports provided: EmissaoNotaFiscalTituloModalComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EmissaoNotaFiscalTituloModalComponent", function() { return EmissaoNotaFiscalTituloModalComponent; });
/* harmony import */ var _shared_services_auth_auth_service__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../../../../../../shared/services/auth/auth.service */ "./src/app/shared/services/auth/auth.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_router__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
/* harmony import */ var app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! app/pages/login/login.service */ "./src/app/pages/login/login.service.ts");
/* harmony import */ var app_shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! app/shared/services/event-emitter/event-emitter.service */ "./src/app/shared/services/event-emitter/event-emitter.service.ts");
/* harmony import */ var app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! app/shared/services/funcoes/funcoes.service */ "./src/app/shared/services/funcoes/funcoes.service.ts");
/* harmony import */ var app_shared_services_funcoes_modal_utils_modal_utils_static_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! app/shared/services/funcoes/modal-utils/modal-utils.static.service */ "./src/app/shared/services/funcoes/modal-utils/modal-utils.static.service.ts");
/* harmony import */ var app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! app/shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var _emissao_nota_fiscal_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../emissao-nota-fiscal.service */ "./src/app/pages/especificos/rocha/movimentos/emissao-nota-fiscal/emissao-nota-fiscal.service.ts");
/* harmony import */ var app_pages_controle_outra_nota_emissao_outra_nota_emissao_service__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! app/pages/controle/outra-nota-emissao/outra-nota-emissao.service */ "./src/app/pages/controle/outra-nota-emissao/outra-nota-emissao.service.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 __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 EmissaoNotaFiscalTituloModalComponent = /** @class */ (function () {
    function EmissaoNotaFiscalTituloModalComponent(router, funcoes, loginService, messageService, service, outraNotaEmissaoService) {
        this.router = router;
        this.funcoes = funcoes;
        this.loginService = loginService;
        this.messageService = messageService;
        this.service = service;
        this.outraNotaEmissaoService = outraNotaEmissaoService;
        this.ok = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["EventEmitter"]();
        this.vlAtraso = 0;
        this.usuario = "";
        this.senha = "";
        this.pedidoId = 0;
    }
    EmissaoNotaFiscalTituloModalComponent.prototype.ngOnInit = function () {
        var _this = this;
        this.router.events.subscribe(function (event) {
            var params = _this.funcoes.formParams.getParams(_this.router, event);
        });
        this.vlAtraso = 0;
        this.usuario = "";
        this.senha = "";
    };
    EmissaoNotaFiscalTituloModalComponent.prototype.onSubmit = function (form) {
        var _this = this;
        app_shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_4__["EventEmitterService"].get("msgTituloAtraso").emit(form);
        if (form.invalid) {
            return;
        }
        _shared_services_auth_auth_service__WEBPACK_IMPORTED_MODULE_0__["AuthService"].removeTentativas();
        this.loginService
            .checkLogin(this.usuario, this.senha)
            .subscribe(function (resp) {
            if (_this.funcoes.isNotUndefinedOrNull(resp.errorMessage)) {
                _this.messageService.error("titles.erroLogin", resp.errorMessage);
            }
            else {
                _this.ok.emit(true);
                _this.vlAtraso = 0;
                _this.usuario = "";
                _this.senha = "";
                app_shared_services_funcoes_modal_utils_modal_utils_static_service__WEBPACK_IMPORTED_MODULE_6__["ModalUtilsStaticService"].closeModal("modalTituloAtraso");
            }
        }, function (error) { return _this.messageService.error("titles.erroLogin", error); });
    };
    EmissaoNotaFiscalTituloModalComponent.prototype.objectSelect = function (current, pedidoId) {
        if (current === void 0) { current = 0; }
        if (pedidoId === void 0) { pedidoId = 0; }
        this.vlAtraso = current;
        this.pedidoId = pedidoId;
    };
    EmissaoNotaFiscalTituloModalComponent.prototype.onCancelarClick = function () {
        return __awaiter(this, void 0, void 0, function () {
            var validationResult, mensagens;
            var _this = this;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        if (!!!this.pedidoId) return [3 /*break*/, 2];
                        return [4 /*yield*/, this.outraNotaEmissaoService.alteraSituacaoDoPedido({ pedidoId: this.pedidoId, sitReg: "" }).toPromise()];
                    case 1:
                        validationResult = _a.sent();
                        if (!validationResult.isValid) {
                            mensagens = this.messageService.validationResult(validationResult);
                            mensagens.forEach(function (m) { return _this.messageService.warning("titles.emissaoNotaFiscal", m); });
                            return [2 /*return*/];
                        }
                        else {
                            this.vlAtraso = 0;
                            this.usuario = "";
                            this.senha = "";
                            app_shared_services_funcoes_modal_utils_modal_utils_static_service__WEBPACK_IMPORTED_MODULE_6__["ModalUtilsStaticService"].closeModal("modalTituloAtraso");
                        }
                        _a.label = 2;
                    case 2: return [2 /*return*/];
                }
            });
        });
    };
    EmissaoNotaFiscalTituloModalComponent.ctorParameters = function () { return [
        { type: _angular_router__WEBPACK_IMPORTED_MODULE_2__["Router"] },
        { type: app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_5__["FuncoesService"] },
        { type: app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_3__["LoginService"] },
        { type: app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_7__["MessageService"] },
        { type: _emissao_nota_fiscal_service__WEBPACK_IMPORTED_MODULE_8__["EmissaoNotaFiscalService"] },
        { type: app_pages_controle_outra_nota_emissao_outra_nota_emissao_service__WEBPACK_IMPORTED_MODULE_9__["OutraNotaEmissaoService"] }
    ]; };
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Output"])(),
        __metadata("design:type", Object)
    ], EmissaoNotaFiscalTituloModalComponent.prototype, "ok", void 0);
    EmissaoNotaFiscalTituloModalComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({
            selector: "app-emissao-nota-fiscal-titulo-modal",
            template: __importDefault(__webpack_require__(/*! raw-loader!./emissao-nota-fiscal-titulo-modal.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/especificos/rocha/movimentos/emissao-nota-fiscal/emissao-nota-fiscal-titulo-modal/emissao-nota-fiscal-titulo-modal.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewEncapsulation"].None
        }),
        __metadata("design:paramtypes", [_angular_router__WEBPACK_IMPORTED_MODULE_2__["Router"],
            app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_5__["FuncoesService"],
            app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_3__["LoginService"],
            app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_7__["MessageService"],
            _emissao_nota_fiscal_service__WEBPACK_IMPORTED_MODULE_8__["EmissaoNotaFiscalService"],
            app_pages_controle_outra_nota_emissao_outra_nota_emissao_service__WEBPACK_IMPORTED_MODULE_9__["OutraNotaEmissaoService"]])
    ], EmissaoNotaFiscalTituloModalComponent);
    return EmissaoNotaFiscalTituloModalComponent;
}());



/***/ }),

/***/ "./src/app/pages/especificos/rocha/movimentos/emissao-nota-fiscal/emissao-nota-fiscal.constants.ts":
/*!*********************************************************************************************************!*\
  !*** ./src/app/pages/especificos/rocha/movimentos/emissao-nota-fiscal/emissao-nota-fiscal.constants.ts ***!
  \*********************************************************************************************************/
/*! exports provided: EmissaoNotaFiscalConstants */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EmissaoNotaFiscalConstants", function() { return EmissaoNotaFiscalConstants; });
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};
var EmissaoNotaFiscalConstants = /** @class */ (function () {
    function EmissaoNotaFiscalConstants() {
        this.sisFormularioId = 375339;
        this.permissoes = [
            { sisFormularioId: this.sisFormularioId, libRotina: 1, acao: "labels.propriedades" },
            { sisFormularioId: this.sisFormularioId, libRotina: 2, acao: "labels.liberacao" },
            { sisFormularioId: this.sisFormularioId, libRotina: 3, acao: "labels.permissoes" },
            { sisFormularioId: this.sisFormularioId, libRotina: 4, acao: "labels.consulta" },
        ];
        this.sisSistemaId = "CTR";
        this.nomeForm = "titles.emissaoNotaFiscal";
        this.reportId = "";
        this.listaIndex = [
            { title: 'Atualizar', action: 'refresh', icon: "icon-reload", exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
            { title: 'Pesquisar', action: 'filtrar', icon: "icon-search", exibeButton: true, eximeMenu: true, menuName: 'Movimento' },
            { title: 'Propriedade', action: 'properties', icon: "icon-menu", exibeButton: true, eximeMenu: true, menuName: 'Movimento' },
            { title: 'Permissao', action: 'permissoes', icon: "icon-unlock", exibeButton: true, eximeMenu: true, menuName: 'Movimento' },
            { title: 'liberacao', action: 'liberacao', icon: "fa fa-check", exibeButton: true, eximeMenu: true, menuName: 'Movimento' },
        ];
        this.listaForm = [
            { title: 'Voltar', action: 'back', icon: "icon-arrow-left", exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
        ];
        this.listaLiberarVeiculo = [
            { title: 'Voltar', action: 'back', icon: "icon-arrow-left", exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
        ];
        this.listaParam = [
            { 'sistema': 'FAT', 'parametros': ['LibExpedicao', 'IDA1CERTIFICATE', 'RSeriePadrao', 'DuplIcmsSubs', 'SelBoletoSTPed', 'VrfDadosServ', 'IPIPrimDp', 'FretePrimDupl', 'LibCredito'] },
            { 'sistema': 'MAT', 'parametros': ['FechamentoEst'] },
            { 'sistema': 'UNI', 'parametros': ['FechamentoCtb', 'MoedaPadrao', 'CondSemDeb'] },
            { 'sistema': 'LIV', 'parametros': ['FechamentoFis'] },
            { 'sistema': 'CTR', 'parametros': ['RSerieServ', 'RSerTransito', 'RSerRetorno', 'ValPlacaEmissNF'] },
            { 'sistema': 'BAL', 'parametros': ['RSerTransito', 'RSerRetorno', 'MaskPlaca', 'MaskTrem', 'SerieTerm'] },
        ];
        this.orderBy = [
            { field: "Pedido", description: "Pedido", direction: "asc", default: true, sequence: 1 },
            { field: "Fantasia", description: "Cliente", direction: "asc", default: false, sequence: 2 },
            { field: "NumControle", description: "Controle", direction: "asc", default: false, sequence: 3 },
            { field: "DtPedido", description: "Data", direction: "asc", default: false, sequence: 4 },
        ];
    }
    return EmissaoNotaFiscalConstants;
}());



/***/ }),

/***/ "./src/app/pages/especificos/rocha/movimentos/emissao-nota-fiscal/emissao-nota-fiscal.model.ts":
/*!*****************************************************************************************************!*\
  !*** ./src/app/pages/especificos/rocha/movimentos/emissao-nota-fiscal/emissao-nota-fiscal.model.ts ***!
  \*****************************************************************************************************/
/*! exports provided: EmissaoNotaFiscal, EmissaoNotaFiscalFilterVo, EmissaoNotaFiscalDto, EmissaoNotaFiscalPedidoDto, FatCalculaNotaVo, EmissaoNotaFiscalProxima */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EmissaoNotaFiscal", function() { return EmissaoNotaFiscal; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EmissaoNotaFiscalFilterVo", function() { return EmissaoNotaFiscalFilterVo; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EmissaoNotaFiscalDto", function() { return EmissaoNotaFiscalDto; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EmissaoNotaFiscalPedidoDto", function() { return EmissaoNotaFiscalPedidoDto; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FatCalculaNotaVo", function() { return FatCalculaNotaVo; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EmissaoNotaFiscalProxima", function() { return EmissaoNotaFiscalProxima; });
/* harmony import */ var app_shared_services_base_base_model__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! app/shared/services/base/base.model */ "./src/app/shared/services/base/base.model.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 __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};

var EmissaoNotaFiscal = /** @class */ (function (_super) {
    __extends(EmissaoNotaFiscal, _super);
    function EmissaoNotaFiscal() {
        var _this = _super.call(this) || this;
        _this.vlFrete = 0;
        _this.vlSeguro = 0;
        _this.encFin = 0;
        _this.descVl = 0;
        _this.descPtPed = 0;
        _this.vlOutras = 0;
        _this.vlSiscomex = 0;
        _this.vlMerc = 0;
        _this.vlNota = 0;
        _this.vlFatura = 0;
        _this.basIcm = 0;
        _this.basIpi = 0;
        _this.vlIcms = 0;
        _this.vlIpi = 0;
        _this.vlIcmsRet = 0;
        _this.vlIpiDest = 0;
        _this.vlIss = 0;
        _this.vlIr = 0;
        _this.vlInss = 0;
        _this.vlIssRet = 0;
        _this.impostoRet = 0;
        _this.vlPis = 0;
        _this.vlCsll = 0;
        _this.vlII = 0;
        _this.vlDedIcms = 0;
        _this.vlDedPis = 0;
        _this.vlDedCofins = 0;
        _this.descFin = 0;
        _this.vlAntecipado = 0;
        _this.desdobramento = "";
        _this.pesoLiq = 0;
        _this.pesoBru = 0;
        _this.placa = "";
        _this.estadoIdCavalo = "";
        _this.tipoTransporte = "0";
        _this.volumes = 0;
        _this.uFEmbarq = "";
        _this.localEmbarq = "";
        _this.observacoesFixas = "";
        _this.observacoesComplementares = "";
        _this.observacoesNotaLivroFiscal = "";
        _this.observacoesDoPedido = "";
        _this.observacoesDoCliente = "";
        _this.contaCorrenteId = "";
        return _this;
    }
    return EmissaoNotaFiscal;
}(app_shared_services_base_base_model__WEBPACK_IMPORTED_MODULE_0__["BaseModel"]));

var EmissaoNotaFiscalFilterVo = /** @class */ (function () {
    function EmissaoNotaFiscalFilterVo() {
        this.tipoMov = "S";
        this.ordem = "Pedido";
    }
    return EmissaoNotaFiscalFilterVo;
}());

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

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

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

var EmissaoNotaFiscalProxima = /** @class */ (function () {
    function EmissaoNotaFiscalProxima() {
        this.numNfAuto = "N";
        this.serieId = "";
    }
    return EmissaoNotaFiscalProxima;
}());



/***/ }),

/***/ "./src/app/pages/especificos/rocha/movimentos/emissao-nota-fiscal/emissao-nota-fiscal.module.ts":
/*!******************************************************************************************************!*\
  !*** ./src/app/pages/especificos/rocha/movimentos/emissao-nota-fiscal/emissao-nota-fiscal.module.ts ***!
  \******************************************************************************************************/
/*! exports provided: EmissaoNotaFiscalModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EmissaoNotaFiscalModule", function() { return EmissaoNotaFiscalModule; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var app_shared_shared_module__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! app/shared/shared.module */ "./src/app/shared/shared.module.ts");
/* harmony import */ var _emissao_nota_fiscal_filter_emissao_nota_fiscal_filter_component__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./emissao-nota-fiscal-filter/emissao-nota-fiscal-filter.component */ "./src/app/pages/especificos/rocha/movimentos/emissao-nota-fiscal/emissao-nota-fiscal-filter/emissao-nota-fiscal-filter.component.ts");
/* harmony import */ var _emissao_nota_fiscal_index_emissao_nota_fiscal_index_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./emissao-nota-fiscal-index/emissao-nota-fiscal-index.component */ "./src/app/pages/especificos/rocha/movimentos/emissao-nota-fiscal/emissao-nota-fiscal-index/emissao-nota-fiscal-index.component.ts");
/* harmony import */ var _emissao_nota_fiscal_liberar_emissao_nota_fiscal_liberar_form_component__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./emissao-nota-fiscal-liberar/emissao-nota-fiscal-liberar-form.component */ "./src/app/pages/especificos/rocha/movimentos/emissao-nota-fiscal/emissao-nota-fiscal-liberar/emissao-nota-fiscal-liberar-form.component.ts");
/* harmony import */ var _emissao_nota_fiscal_routing_module__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./emissao-nota-fiscal.routing.module */ "./src/app/pages/especificos/rocha/movimentos/emissao-nota-fiscal/emissao-nota-fiscal.routing.module.ts");
/* harmony import */ var _emissao_nota_fiscal_proxima_nota_emissao_nota_fiscal_proxima_nota_component__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./emissao-nota-fiscal-proxima-nota/emissao-nota-fiscal-proxima-nota.component */ "./src/app/pages/especificos/rocha/movimentos/emissao-nota-fiscal/emissao-nota-fiscal-proxima-nota/emissao-nota-fiscal-proxima-nota.component.ts");
/* harmony import */ var _emissao_nota_fiscal_titulo_modal_emissao_nota_fiscal_titulo_modal_component__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./emissao-nota-fiscal-titulo-modal/emissao-nota-fiscal-titulo-modal.component */ "./src/app/pages/especificos/rocha/movimentos/emissao-nota-fiscal/emissao-nota-fiscal-titulo-modal/emissao-nota-fiscal-titulo-modal.component.ts");
/* harmony import */ var _emissao_nota_fiscal_moeda_emissao_nota_fiscal_moeda_component__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./emissao-nota-fiscal-moeda/emissao-nota-fiscal-moeda.component */ "./src/app/pages/especificos/rocha/movimentos/emissao-nota-fiscal/emissao-nota-fiscal-moeda/emissao-nota-fiscal-moeda.component.ts");
/* harmony import */ var _emissao_nota_fiscal_seleciona_impressora_emissao_nota_fiscal_seleciona_impressora_component__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./emissao-nota-fiscal-seleciona-impressora/emissao-nota-fiscal-seleciona-impressora.component */ "./src/app/pages/especificos/rocha/movimentos/emissao-nota-fiscal/emissao-nota-fiscal-seleciona-impressora/emissao-nota-fiscal-seleciona-impressora.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 EmissaoNotaFiscalModule = /** @class */ (function () {
    function EmissaoNotaFiscalModule() {
    }
    EmissaoNotaFiscalModule = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"])({
            imports: [app_shared_shared_module__WEBPACK_IMPORTED_MODULE_1__["SharedModule"], _emissao_nota_fiscal_routing_module__WEBPACK_IMPORTED_MODULE_5__["EmissaoNotaFiscalRoutingModule"]],
            declarations: [
                _emissao_nota_fiscal_index_emissao_nota_fiscal_index_component__WEBPACK_IMPORTED_MODULE_3__["EmissaoNotaFiscalIndexComponent"],
                _emissao_nota_fiscal_filter_emissao_nota_fiscal_filter_component__WEBPACK_IMPORTED_MODULE_2__["EmissaoNotaFiscalFilterComponent"],
                _emissao_nota_fiscal_liberar_emissao_nota_fiscal_liberar_form_component__WEBPACK_IMPORTED_MODULE_4__["EmissaoNotaFiscalLiberarFormComponent"],
                _emissao_nota_fiscal_proxima_nota_emissao_nota_fiscal_proxima_nota_component__WEBPACK_IMPORTED_MODULE_6__["EmissaoNotaFiscalProximaNotaComponent"],
                _emissao_nota_fiscal_titulo_modal_emissao_nota_fiscal_titulo_modal_component__WEBPACK_IMPORTED_MODULE_7__["EmissaoNotaFiscalTituloModalComponent"],
                _emissao_nota_fiscal_moeda_emissao_nota_fiscal_moeda_component__WEBPACK_IMPORTED_MODULE_8__["EmissaoNotaFiscalMoedaComponent"],
                _emissao_nota_fiscal_seleciona_impressora_emissao_nota_fiscal_seleciona_impressora_component__WEBPACK_IMPORTED_MODULE_9__["EmissaoNotaFiscalSelImpressoraComponent"]
            ]
        })
    ], EmissaoNotaFiscalModule);
    return EmissaoNotaFiscalModule;
}());



/***/ }),

/***/ "./src/app/pages/especificos/rocha/movimentos/emissao-nota-fiscal/emissao-nota-fiscal.routing.module.ts":
/*!**************************************************************************************************************!*\
  !*** ./src/app/pages/especificos/rocha/movimentos/emissao-nota-fiscal/emissao-nota-fiscal.routing.module.ts ***!
  \**************************************************************************************************************/
/*! exports provided: EmissaoNotaFiscalRoutingModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EmissaoNotaFiscalRoutingModule", function() { return EmissaoNotaFiscalRoutingModule; });
/* 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 _emissao_nota_fiscal_index_emissao_nota_fiscal_index_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./emissao-nota-fiscal-index/emissao-nota-fiscal-index.component */ "./src/app/pages/especificos/rocha/movimentos/emissao-nota-fiscal/emissao-nota-fiscal-index/emissao-nota-fiscal-index.component.ts");
/* harmony import */ var _emissao_nota_fiscal_liberar_emissao_nota_fiscal_liberar_form_component__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./emissao-nota-fiscal-liberar/emissao-nota-fiscal-liberar-form.component */ "./src/app/pages/especificos/rocha/movimentos/emissao-nota-fiscal/emissao-nota-fiscal-liberar/emissao-nota-fiscal-liberar-form.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: _emissao_nota_fiscal_index_emissao_nota_fiscal_index_component__WEBPACK_IMPORTED_MODULE_3__["EmissaoNotaFiscalIndexComponent"],
        data: { breadcrumb: "emissaoNotaFiscal", formParams: { action: app_config_enumerables__WEBPACK_IMPORTED_MODULE_2__["ActionForm"].index } }
    },
    {
        path: "liberar/:id",
        component: _emissao_nota_fiscal_liberar_emissao_nota_fiscal_liberar_form_component__WEBPACK_IMPORTED_MODULE_4__["EmissaoNotaFiscalLiberarFormComponent"],
        data: {
            breadcrumb: "emissaoNotaFiscal",
            formParams: { action: app_config_enumerables__WEBPACK_IMPORTED_MODULE_2__["ActionForm"].detail }
        }
    }
];
var EmissaoNotaFiscalRoutingModule = /** @class */ (function () {
    function EmissaoNotaFiscalRoutingModule() {
    }
    EmissaoNotaFiscalRoutingModule = __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"]],
        })
    ], EmissaoNotaFiscalRoutingModule);
    return EmissaoNotaFiscalRoutingModule;
}());



/***/ }),

/***/ "./src/app/pages/especificos/rocha/movimentos/emissao-nota-fiscal/emissao-nota-fiscal.service.ts":
/*!*******************************************************************************************************!*\
  !*** ./src/app/pages/especificos/rocha/movimentos/emissao-nota-fiscal/emissao-nota-fiscal.service.ts ***!
  \*******************************************************************************************************/
/*! exports provided: EmissaoNotaFiscalService */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EmissaoNotaFiscalService", function() { return EmissaoNotaFiscalService; });
/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/fesm5/http.js");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! app/pages/login/login.service */ "./src/app/pages/login/login.service.ts");
/* harmony import */ var app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! app/shared/services/funcoes/funcoes.service */ "./src/app/shared/services/funcoes/funcoes.service.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_app_error_handler__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! app/app.error-handler */ "./src/app/app.error-handler.ts");
/* harmony import */ var app_pages_cadastro_material_material_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! app/pages/cadastro/material/material.service */ "./src/app/pages/cadastro/material/material.service.ts");
/* harmony import */ var app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! app/shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var _emissao_nota_fiscal_constants__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./emissao-nota-fiscal.constants */ "./src/app/pages/especificos/rocha/movimentos/emissao-nota-fiscal/emissao-nota-fiscal.constants.ts");
/* harmony import */ var _emissao_nota_fiscal_model__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./emissao-nota-fiscal.model */ "./src/app/pages/especificos/rocha/movimentos/emissao-nota-fiscal/emissao-nota-fiscal.model.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 __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 EmissaoNotaFiscalService = /** @class */ (function () {
    function EmissaoNotaFiscalService(http, message, materialService, funcoes, loginService) {
        this.http = http;
        this.message = message;
        this.materialService = materialService;
        this.funcoes = funcoes;
        this.loginService = loginService;
        this.filter = new _emissao_nota_fiscal_model__WEBPACK_IMPORTED_MODULE_10__["EmissaoNotaFiscalFilterVo"]();
        this.constantes = new _emissao_nota_fiscal_constants__WEBPACK_IMPORTED_MODULE_9__["EmissaoNotaFiscalConstants"]();
        this.showCotacao = false;
        this.vlCotacao = 0;
        this.configFat = {
            libExpedicao: false,
            ida1Certificate: "",
            rSeriePadrao: 0,
            duplIcmsSubs: false,
            selBoletoSTPed: false,
            vrfDadosServ: false,
            iPIPrimDp: false,
            fretePrimDupl: false,
            libCredito: false
        };
        this.configMat = {
            fechamentoEst: "",
        };
        this.configUni = {
            fechamentoCtb: "",
            moedaPadrao: 0,
            condSemDebito: 0
        };
        this.configLiv = {
            fechamentoFis: "",
        };
        this.configCtr = {
            valPlacaEmissNF: false
        };
        this.configBal = {
            maskPlaca: "",
            maskTrem: "",
            serieTerm: ""
        };
    }
    EmissaoNotaFiscalService.prototype.getByFiltro = function () {
        return this.http
            .post(environments_environment__WEBPACK_IMPORTED_MODULE_4__["environment"].specifics_service_url + "/api/v1/rocha/movimentos/emissaoNotaFiscal/getByFiltro", this.filter)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_5__["catchError"])(app_app_error_handler__WEBPACK_IMPORTED_MODULE_6__["ErrorHandler"].handleError));
    };
    EmissaoNotaFiscalService.prototype.podeLiberar = function (data) {
        return this.http
            .post(environments_environment__WEBPACK_IMPORTED_MODULE_4__["environment"].specifics_service_url + "/api/v1/rocha/movimentos/emissaoNotaFiscal/podeLiberar", data)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_5__["catchError"])(app_app_error_handler__WEBPACK_IMPORTED_MODULE_6__["ErrorHandler"].handleError));
    };
    EmissaoNotaFiscalService.prototype.getCalcVenctoDuplicatas = function (data) {
        return this.http
            .post(environments_environment__WEBPACK_IMPORTED_MODULE_4__["environment"].specifics_service_url + "/api/v1/rocha/movimentos/emissaoNotaFiscal/calcVenctoDuplicatas", data)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_5__["catchError"])(app_app_error_handler__WEBPACK_IMPORTED_MODULE_6__["ErrorHandler"].handleError));
    };
    EmissaoNotaFiscalService.prototype.podeConfirmar = function (filter) {
        return this.http
            .post(environments_environment__WEBPACK_IMPORTED_MODULE_4__["environment"].specifics_service_url + "/api/v1/rocha/movimentos/emissaoNotaFiscal/podeConfirmar", filter)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_5__["catchError"])(app_app_error_handler__WEBPACK_IMPORTED_MODULE_6__["ErrorHandler"].handleError));
    };
    EmissaoNotaFiscalService.ctorParameters = function () { return [
        { type: _angular_common_http__WEBPACK_IMPORTED_MODULE_0__["HttpClient"] },
        { type: app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_8__["MessageService"] },
        { type: app_pages_cadastro_material_material_service__WEBPACK_IMPORTED_MODULE_7__["MaterialService"] },
        { type: app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_3__["FuncoesService"] },
        { type: app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_2__["LoginService"] }
    ]; };
    EmissaoNotaFiscalService = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"])({
            providedIn: 'root'
        }),
        __metadata("design:paramtypes", [_angular_common_http__WEBPACK_IMPORTED_MODULE_0__["HttpClient"],
            app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_8__["MessageService"],
            app_pages_cadastro_material_material_service__WEBPACK_IMPORTED_MODULE_7__["MaterialService"],
            app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_3__["FuncoesService"],
            app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_2__["LoginService"]])
    ], EmissaoNotaFiscalService);
    return EmissaoNotaFiscalService;
}());



/***/ })

}]);
//# sourceMappingURL=app-pages-especificos-rocha-movimentos-emissao-nota-fiscal-emissao-nota-fiscal-module.js.map