Пример #1
0
    def getSettingsFromToOfAccounts(self):
        dataFile = leXls_Xlsx(self._wayFileSettings, 'DeParaPlanoContas')

        for data in dataFile:
            try:
                fieldHeader = funcoesUteis.treatTextFieldInVector(data, 1)
                if fieldHeader.count('CODIGO CONTA SISTEMA CLIENTE') > 0:
                    self._posionsOfHeaderFromToAccounts.clear()
                    for keyField, nameField in enumerate(data):
                        nameField = funcoesUteis.treatTextField(nameField)
                        self._posionsOfHeaderFromToAccounts[
                            nameField] = keyField
                    continue

                valueComparation = funcoesUteis.treatTextFieldInVector(
                    data, 1, self._posionsOfHeaderFromToAccounts,
                    "Código Conta Sistema Cliente")

                accountDominio = int(
                    funcoesUteis.treatNumberFieldInVector(
                        data, 4, self._posionsOfHeaderFromToAccounts,
                        "Conta Contábil Domínio"))

                if valueComparation != "" and accountDominio != "":
                    self._valuesFromToAccounts[
                        valueComparation] = accountDominio
            except Exception as e:
                pass

        return self._valuesFromToAccounts
Пример #2
0
    def getSettingsProviderOrExpense(self):
        dataFile = leXls_Xlsx(self._wayFileSettings, 'FornecedorOuDespesa')

        for data in dataFile:
            try:
                if str(data[0]).upper().count('QUANDO NO CAMPO') > 0:
                    self._posionsOfHeaderProviderOrExpense.clear()
                    for keyField, nameField in enumerate(data):
                        nameField = funcoesUteis.treatTextField(nameField)
                        self._posionsOfHeaderProviderOrExpense[
                            nameField] = keyField
                    continue

                fieldComparation = funcoesUteis.treatTextFieldInVector(
                    data, 1, self._posionsOfHeaderProviderOrExpense,
                    "Quando no Campo")
                fieldComparation = self._settingsFieldComparation[
                    fieldComparation]

                typeComparation = funcoesUteis.treatTextFieldInVector(
                    data, 2, self._posionsOfHeaderProviderOrExpense,
                    "Tipo comparação")
                typeComparation = self._settingsTypeComparation[
                    typeComparation]

                valueComparation = funcoesUteis.treatTextFieldInVector(
                    data, 3, self._posionsOfHeaderProviderOrExpense, "Valor")

                accountDominio = int(
                    funcoesUteis.treatNumberFieldInVector(
                        data, 4, self._posionsOfHeaderProviderOrExpense,
                        "Conta Contábil Domínio"))

                overwriteAccount = funcoesUteis.treatTextFieldInVector(
                    data, 5, self._posionsOfHeaderProviderOrExpense,
                    "Sobrescrever a Conta na Planilha Processada?")

                if fieldComparation != "" and valueComparation != "" and accountDominio > 0:
                    self._valuesOfLineProviderOrExpense = {
                        "fieldComparation": fieldComparation,
                        "typeComparation": typeComparation,
                        "valueComparation": valueComparation,
                        "accountDominio": accountDominio,
                        "overwriteAccount": overwriteAccount
                    }

                    self._valuesOfFileProviderOrExpense.append(
                        self._valuesOfLineProviderOrExpense.copy())
            except Exception as e:
                pass

        return self._valuesOfFileProviderOrExpense
Пример #3
0
    def getSettingsAccountAndHistoricOthers(self):
        dataFile = leXls_Xlsx(self._wayFileSettings, 'ContasEHistoricoOutros')

        for data in dataFile:
            try:
                fieldHeader = funcoesUteis.treatTextFieldInVector(data, 1)
                if fieldHeader.count('QUANDO HOUVER') > 0:
                    self._posionsOfHeaderAccountAndHistoricOthers.clear()
                    for keyField, nameField in enumerate(data):
                        nameField = funcoesUteis.treatTextField(nameField)
                        self._posionsOfHeaderAccountAndHistoricOthers[
                            nameField] = keyField
                    continue

                # juros, multa, desconto
                fieldComparation = funcoesUteis.treatTextFieldInVector(
                    data, 1, self._posionsOfHeaderAccountAndHistoricOthers,
                    "Quando houver")
                if fieldComparation == "":
                    continue

                # historico ou conta contabil
                fieldOthers = funcoesUteis.treatTextFieldInVector(
                    data, 2, self._posionsOfHeaderAccountAndHistoricOthers,
                    "na Domínio o código do(a)")

                valueDominio = funcoesUteis.treatNumberFieldInVector(
                    data, 3, self._posionsOfHeaderAccountAndHistoricOthers,
                    "Será o")

                if fieldComparation != "" and fieldOthers != "" and valueDominio != "":
                    self._valuesAccountAndHistoricOthers[
                        fieldComparation, fieldOthers] = valueDominio

                whenColumnDocumento = funcoesUteis.treatTextFieldInVector(
                    data, 7, self._posionsOfHeaderAccountAndHistoricOthers,
                    "Quando na Coluna Documento")

                compositionHistoric = funcoesUteis.treatTextFieldInVector(
                    data,
                    8,
                    self._posionsOfHeaderAccountAndHistoricOthers,
                    "Composição Histórico",
                    keepTextOriginal=False)

                if whenColumnDocumento != "" and compositionHistoric != "":
                    self._valuesAccountAndHistoricOthers[
                        whenColumnDocumento] = compositionHistoric

            except Exception as e:
                pass
Пример #4
0
    def getSettingsExtract(self):
        dataFile = leXls_Xlsx(self._wayFileSettings, 'ExtratoBancario')

        for data in dataFile:
            try:
                if str(data[0]).upper().count('QUANDO NO CAMPO') > 0:
                    self._posionsOfHeaderExtracts.clear()
                    for keyField, nameField in enumerate(data):
                        nameField = funcoesUteis.treatTextField(nameField)
                        self._posionsOfHeaderExtracts[nameField] = keyField
                    continue

                fieldComparation = funcoesUteis.treatTextFieldInVector(
                    data, 1, self._posionsOfHeaderExtracts, "Quando no Campo")
                fieldComparation = self._settingsFieldComparationExtract[
                    fieldComparation]

                operationComparation = funcoesUteis.treatTextFieldInVector(
                    data, 2, self._posionsOfHeaderExtracts, "Operação for")
                operationComparation = self._settingsOperationComparation[
                    operationComparation]

                typeComparation = funcoesUteis.treatTextFieldInVector(
                    data, 3, self._posionsOfHeaderExtracts, "Tipo comparação")
                typeComparation = self._settingsTypeComparation[
                    typeComparation]

                valueComparation = funcoesUteis.treatTextFieldInVector(
                    data, 4, self._posionsOfHeaderExtracts, "Valor")

                accountDominio = int(
                    funcoesUteis.treatNumberFieldInVector(
                        data, 5, self._posionsOfHeaderExtracts,
                        "Conta Contábil Domínio"))

                if fieldComparation != "" and valueComparation != "" and accountDominio > 0:
                    self._valuesOfLineExtracts = {
                        "fieldComparation": fieldComparation,
                        "operationComparation": operationComparation,
                        "typeComparation": typeComparation,
                        "valueComparation": valueComparation,
                        "accountDominio": accountDominio
                    }

                    self._valuesOfFileExtracts.append(
                        self._valuesOfLineExtracts.copy())
            except Exception as e:
                pass

        return self._valuesOfFileExtracts
Пример #5
0
    def getSettingsBanks(self):
        dataFile = leXls_Xlsx(self._wayFileSettings, 'Bancos')

        for data in dataFile:
            try:
                if str(data[0]).upper().count('COMPARAR COM') > 0 or str(
                        data[0]).upper().count('BANCO') > 0:
                    self._posionsOfHeaderBanks.clear()
                    for keyField, nameField in enumerate(data):
                        nameField = funcoesUteis.treatTextField(nameField)
                        self._posionsOfHeaderBanks[nameField] = keyField
                    continue

                compareWith = funcoesUteis.treatTextFieldInVector(
                    data, 1, self._posionsOfHeaderBanks, "Comparar Com")
                compareWith = "" if compareWith != "EXTRATO BANCARIO" and compareWith != "FINANCEIRO DO CLIENTE" else compareWith

                nameBank = funcoesUteis.treatTextFieldInVector(
                    data, 2, self._posionsOfHeaderBanks, "Banco")

                account = funcoesUteis.treatTextFieldInVector(
                    data, 3, self._posionsOfHeaderBanks,
                    "Conta Corrente (Sem o Dígito Verificador)")
                # account = account[:-1] # o -1 é pra tirar o digíto verificador caso o pessoal preencha na configuração, então pega sempre um char a menos evitando este problema

                accountDominio = int(
                    funcoesUteis.treatNumberFieldInVector(
                        data, 4, self._posionsOfHeaderBanks,
                        "Conta Contábil Banco na Domínio"))

                if nameBank != "" and accountDominio > 0:
                    self._valuesOfLineBanks = {
                        "compareWith": compareWith,
                        "nameBankComparation": nameBank,
                        "accountComparation": account,
                        "accountDominio": accountDominio
                    }

                    self._valuesOfFileBanks.append(
                        self._valuesOfLineBanks.copy())
            except Exception as e:
                pass

        return self._valuesOfFileBanks
    def getAccountPlan(self):
        dataFile = leXls_Xlsx(self._file, 'PlanoContas')

        for data in dataFile:
            if str(data[0]).upper().count('CONTA') > 0:
                self._posionsOfHeaderAccountPlan.clear()
                for keyField, nameField in enumerate(data):
                    nameField = funcoesUteis.treatTextField(nameField)
                    self._posionsOfHeaderAccountPlan[nameField] = keyField
                continue

            account = funcoesUteis.treatTextFieldInVector(
                data, 1, self._posionsOfHeaderAccountPlan, "Conta")
            # nameAccount = funcoesUteis.treatTextFieldInVector(data, 2, self._posionsOfHeaderAccountPlan, "Nome")
            # nameAccountMain = funcoesUteis.treatTextFieldInVector(data, 3, self._posionsOfHeaderAccountPlan, "Grupo Principal")
            # nameAccountSubMain = funcoesUteis.treatTextFieldInVector(data, 4, self._posionsOfHeaderAccountPlan, "Subgrupo")
            accountDominio = funcoesUteis.treatNumberFieldInVector(
                data, 5, self._posionsOfHeaderAccountPlan,
                "Código Conta Domínio")

            self._dataOfLineAccountPlan[account] = accountDominio

        return self._dataOfLineAccountPlan
Пример #7
0
    def getPayments(self):
        dataFile = leXls_Xlsx(self._file, 'Pagamentos')

        for data in dataFile:
            if str(data[0]).upper().count('LOTE') > 0:
                self._posionsOfHeaderPayments.clear()
                for keyField, nameField in enumerate(data):
                    nameField = funcoesUteis.treatTextField(nameField)
                    self._posionsOfHeaderPayments[nameField] = keyField
                continue

            numberLote = int(
                funcoesUteis.treatDecimalFieldInVector(
                    data, 1, self._posionsOfHeaderPayments, "Lote"))
            document = funcoesUteis.treatTextFieldInVector(
                data, 2, self._posionsOfHeaderPayments, "Documento")

            findNote = funcoesUteis.treatTextFieldInVector(
                data, 3, self._posionsOfHeaderPayments, "NF na Domínio?")
            if findNote == "1":
                findNote = True
            elif findNote == "0":
                findNote = False
            else:
                findNote = ""

            parcelNumber = funcoesUteis.treatTextFieldInVector(
                data, 4, self._posionsOfHeaderPayments, "Parcela")
            nameProvider = funcoesUteis.treatTextFieldInVector(
                data, 5, self._posionsOfHeaderPayments, "Fornecedor")
            cgceProvider = funcoesUteis.treatTextFieldInVector(
                data, 6, self._posionsOfHeaderPayments, "CNPJ Fornecedor")

            bankAndAccount = funcoesUteis.treatTextFieldInVector(
                data, 7, self._posionsOfHeaderPayments,
                "Banco Financeiro").split('-')
            if len(bankAndAccount) == 2:
                bank = bankAndAccount[0]
                account = bankAndAccount[1]
            elif len(bankAndAccount) == 1:
                bank = bankAndAccount[0]
                account = ""
            else:
                bank = ""
                account = ""

            bankAndAccountExtract = funcoesUteis.treatTextFieldInVector(
                data, 8, self._posionsOfHeaderPayments,
                "Banco Extrato").split('-')
            if len(bankAndAccountExtract) == 2:
                bankExtract = bankAndAccountExtract[0]
                accountExtract = bankAndAccountExtract[1]
            elif len(bankAndAccountExtract) == 1:
                bankExtract = bankAndAccountExtract[0]
                accountExtract = ""
            else:
                bankExtract = ""
                accountExtract = ""

            foundProof = funcoesUteis.treatTextFieldInVector(
                data, 9, self._posionsOfHeaderPayments, "Comprovante Pagto?")
            if foundProof == "1":
                foundProof = True
            elif foundProof == "0":
                foundProof = False
            else:
                foundProof = ""

            paymentDate = funcoesUteis.treatDateFieldInVector(
                data, 10, self._posionsOfHeaderPayments, "Data Financeiro")
            extractDate = funcoesUteis.treatDateFieldInVector(
                data, 11, self._posionsOfHeaderPayments, "Data Extrato")
            dateOfImport = funcoesUteis.treatDateFieldInVector(
                data, 12, self._posionsOfHeaderPayments, "Importação Domínio")
            dueDate = funcoesUteis.treatTextFieldInVector(
                data, 13, self._posionsOfHeaderPayments, "Vencimento")
            issueDate = funcoesUteis.treatTextFieldInVector(
                data, 14, self._posionsOfHeaderPayments, "Emissão")
            amountPaid = funcoesUteis.treatDecimalFieldInVector(
                data, 15, self._posionsOfHeaderPayments, "Valor Pago")
            amountDiscount = funcoesUteis.treatDecimalFieldInVector(
                data, 16, self._posionsOfHeaderPayments, "Desconto")
            amountInterest = funcoesUteis.treatDecimalFieldInVector(
                data, 17, self._posionsOfHeaderPayments, "Juros")
            amountFine = funcoesUteis.treatDecimalFieldInVector(
                data, 18, self._posionsOfHeaderPayments, "Multa")
            amountOriginal = funcoesUteis.treatDecimalFieldInVector(
                data, 19, self._posionsOfHeaderPayments, "Valor Original")
            accountCode = funcoesUteis.treatNumberFieldInVector(
                data, 20, self._posionsOfHeaderPayments,
                "Conta Contabil Domínio")
            codiEmp = funcoesUteis.treatTextFieldInVector(
                data, 21, self._posionsOfHeaderPayments, "Codigo Empresa")
            historic = funcoesUteis.treatTextFieldInVector(
                data, 22, self._posionsOfHeaderPayments,
                "Historico Financeiro")
            category = funcoesUteis.treatTextFieldInVector(
                data, 23, self._posionsOfHeaderPayments, "Categoria")
            accountPlan = funcoesUteis.treatTextFieldInVector(
                data, 24, self._posionsOfHeaderPayments, "Plano de Contas")
            cgcePaying = funcoesUteis.treatTextFieldInVector(
                data, 25, self._posionsOfHeaderPayments, "CNPJ Pagador")
            historicExtract = funcoesUteis.treatTextFieldInVector(
                data, 26, self._posionsOfHeaderPayments,
                "Historico Extrato Bancário")
            accountCodeOld = funcoesUteis.treatTextFieldInVector(
                data, 27, self._posionsOfHeaderPayments,
                "Conta Contabil Sistema Cliente")

            if amountPaid != 0:
                self._paymentsOfLine = {
                    "numberLote": numberLote,
                    "document": document,
                    "findNote": findNote,
                    "parcelNumber": parcelNumber,
                    "nameProvider": nameProvider,
                    "cgceProvider": cgceProvider,
                    "bank": bank,
                    "account": account,
                    "bankExtract": bankExtract,
                    "accountExtract": accountExtract,
                    "foundProof": foundProof,
                    "paymentDate": paymentDate,
                    "dateExtract": extractDate,
                    "dateOfImport": dateOfImport,
                    "dueDate": dueDate,
                    "issueDate": issueDate,
                    "amountPaid": amountPaid,
                    "amountDiscount": amountDiscount,
                    "amountInterest": amountInterest,
                    "amountFine": amountFine,
                    "amountOriginal": amountOriginal,
                    "accountCode": accountCode,
                    "companyBranch": codiEmp,
                    "historic": historic,
                    "category": category,
                    "accountPlan": accountPlan,
                    "cgcePaying": cgcePaying,
                    "historicExtract": historicExtract,
                    "accountCodeOld": accountCodeOld
                }

                self._paymentsOfFile.append(self._paymentsOfLine.copy())

        return self._paymentsOfFile
Пример #8
0
    def getExtracts(self):
        dataFile = leXls_Xlsx(self._file, 'ExtratosBancarios')

        for key, data in enumerate(dataFile):
            if str(data[0]).upper().count('DATA') > 0:
                self._posionsOfHeaderExtracts.clear()
                for keyField, nameField in enumerate(data):
                    nameField = funcoesUteis.treatTextField(nameField)
                    self._posionsOfHeaderExtracts[nameField] = keyField
                continue

            dateExtract = funcoesUteis.treatDateFieldInVector(data, 1)
            accountCodeDebit = funcoesUteis.treatNumberFieldInVector(
                data, 2, self._posionsOfHeaderExtracts, "Debito")
            accountCodeCredit = funcoesUteis.treatNumberFieldInVector(
                data, 3, self._posionsOfHeaderExtracts, "Credito")
            amount = funcoesUteis.treatDecimalFieldInVector(
                data, 4, self._posionsOfHeaderExtracts, "Valor")
            historicCode = funcoesUteis.treatNumberFieldInVector(
                data, 5, self._posionsOfHeaderExtracts, "Cod. Hist")
            historic = funcoesUteis.treatTextFieldInVector(
                data, 6, self._posionsOfHeaderExtracts, "Historico")

            foundProofInPayments = funcoesUteis.treatTextFieldInVector(
                data, 7, self._posionsOfHeaderExtracts,
                "Encontrou no Financeiro?")
            if foundProofInPayments == "1":
                foundProofInPayments = True
            elif foundProofInPayments == "0":
                foundProofInPayments = False
            else:
                foundProofInPayments = ""

            bank = funcoesUteis.treatTextFieldInVector(
                data, 10, self._posionsOfHeaderExtracts, "Banco")
            account = funcoesUteis.treatTextFieldInVector(
                data, 11, self._posionsOfHeaderExtracts, "Conta Corrente")
            typeTransaction = funcoesUteis.treatTextFieldInVector(
                data, 13, self._posionsOfHeaderExtracts, "Tipo Transacao")
            operation = funcoesUteis.treatTextFieldInVector(
                data, 14, self._posionsOfHeaderExtracts, "Operacao")
            document = funcoesUteis.treatTextFieldInVector(
                data, 16, self._posionsOfHeaderExtracts, "Documento")

            if dateExtract is not None and amount > 0:
                self._extractsOfLine = {
                    "dateTransaction": dateExtract,
                    "accountCodeDebit": accountCodeDebit,
                    "accountCodeCredit": accountCodeCredit,
                    "amount": amount,
                    "historicCode": historicCode,
                    "historic": historic,
                    "foundProofInPayments": foundProofInPayments,
                    "bank": bank,
                    "account": account,
                    "typeTransaction": typeTransaction,
                    "operation": operation,
                    "document": document
                }
                self._extractsOfFile.append(self._extractsOfLine.copy())
                self._extractsOfLine.clear()

        return self._extractsOfFile
Пример #9
0
    def process(self):
        valuesOfFile = []
        valuesOfLine = {}

        isPagamento = False

        cgceProvider = ''
        cgcePaying = ''
        nameProvider = ""
        historic = ""
        amountPaid = float(0)
        account = ""
        amountOriginal = float(0)
        amountDiscount = float(0)
        amountInterest = float(0)
        amountFine = float(0)
        paymentDate = None
        dueDate = None
        countQtdDataNecessaryToProofIsValid = 0
        
        for data in self._dataFile:
            if data.find('COMPROVANTE DE TRANSACAO BANCARIA') >= 0:
                countQtdDataNecessaryToProofIsValid = 0
                countQtdDataNecessaryToProofIsValid += 1

            if data.find('TRANSACAO ACIMA FOI REALIZADA') >= 0:
                countQtdDataNecessaryToProofIsValid += 1
                
            if countQtdDataNecessaryToProofIsValid >= 2:
                isPagamento = True

            data = str(data)
            dataSplit = data.split(':')

            fieldOne = funcoesUteis.treatTextField(funcoesUteis.analyzeIfFieldIsValidMatrix(dataSplit, 1))
            fieldTwo = funcoesUteis.treatTextField(funcoesUteis.analyzeIfFieldIsValidMatrix(dataSplit, 2))
            # fieldThree = funcoesUteis.treatTextField(funcoesUteis.analyzeIfFieldIsValidMatrix(dataSplit, 3))
            
            if fieldOne == 'CONTA DE DEBITO':
                account = funcoesUteis.analyzeIfFieldIsValidMatrix(dataSplit, 4)
                account = account.split('|')
                account = funcoesUteis.analyzeIfFieldIsValidMatrix(account, 1)
                account = account.split('-')
                account = funcoesUteis.treatNumberFieldInVector(account, 1, isInt=True)
                account = str(account)

            if data.count('RAZAO SOCIAL') > 0 and data.count('SACADOR') == 0:
                positionRazaoSocial = data.find('RAZAO SOCIAL') + len('RAZAO SOCIAL')
                nameProvider = funcoesUteis.treatTextField(data[positionRazaoSocial:])

            if fieldOne.count('CNPJ') > 0 and fieldOne.count("BENEFICIARIO") > 0:
                cgceProvider = fieldTwo

            if fieldOne.count('CNPJ') > 0 and fieldOne.count("PAGADOR") > 0:
                cgcePaying = fieldTwo

            if fieldOne == "DATA DE DEBITO":
                paymentDate = funcoesUteis.retornaCampoComoData(fieldTwo)

            if fieldOne == "DATA DE VENCIMENTO":
                dueDate = funcoesUteis.retornaCampoComoData(fieldTwo)

            if fieldOne == "VALOR":
                amountOriginal = funcoesUteis.treatDecimalField(fieldTwo, decimalSeparator='.')

            if fieldOne.count('DESCONTO') > 0:
                amountDiscount = funcoesUteis.treatDecimalField(fieldTwo, decimalSeparator='.')

            if fieldOne.count('MULTA') > 0:
                amountFine = funcoesUteis.treatDecimalField(fieldTwo, decimalSeparator='.')

            if fieldOne.count('JUROS') > 0:
                amountInterest = funcoesUteis.treatDecimalField(fieldTwo, decimalSeparator='.')

            if fieldOne == "VALOR TOTAL":
                amountPaid = funcoesUteis.treatDecimalField(fieldTwo, decimalSeparator='.')

            if fieldOne == "DESCRICAO":
                historic = funcoesUteis.treatDecimalField(fieldTwo)            

            if data.find('TRANSACAO ACIMA FOI REALIZADA') >= 0:
                if paymentDate is not None and amountPaid > 0 and isPagamento is True:
                    valuesOfLine = {
                        "paymentDate": paymentDate,
                        "nameProvider": nameProvider,
                        "cgceProvider": cgceProvider,
                        "dueDate": dueDate,
                        "bank": 'BRADESCO',
                        "account": account,
                        "amountPaid": round(amountPaid, 2),
                        "amountInterest": round(amountInterest, 2),
                        "amountDiscount": round(amountDiscount, 2),
                        "amountFine": round(amountFine, 2),
                        "amountOriginal": round(amountOriginal, 2),
                        "historic": historic,
                        "category": '',
                        "cgcePaying": cgcePaying,
                        "foundProof": True,
                        "amountPaidPerLote": round(amountPaid, 2),
                        "wayFile": self._file
                    }

                    valuesOfFile.append(valuesOfLine.copy())

        return valuesOfFile
Пример #10
0
    def process(self, file):

        if self.isPaymentsLysPorMoeda(file) is not True:
            return []

        valuesOfLine = {}
        valuesOfFile = []
        posionsOfHeader = {}

        dataFile = leXls_Xlsx(file)

        for data in dataFile:
            try:
                headerField = funcoesUteis.treatTextFieldInVector(data, 5)
                if headerField.count('NMPESSOACREDORA') > 0:
                    posionsOfHeader.clear()
                    for keyField, nameField in enumerate(data):
                        nameField = funcoesUteis.treatTextField(nameField)
                        posionsOfHeader[nameField] = keyField
                    continue

                idAccountPaid = funcoesUteis.treatTextFieldInVector(
                    data, 1, posionsOfHeader, "idsContaPagar")
                paymentDate = funcoesUteis.treatDateFieldInVector(
                    data, 14, posionsOfHeader, "dtPagamento")
                accountCode = funcoesUteis.treatNumberFieldInVector(
                    data, 23, posionsOfHeader, "nrContaContabil")

                bankAndAccount = funcoesUteis.treatTextFieldInVector(
                    data, 20, posionsOfHeader, "idFonte")

                idCentroCusto = funcoesUteis.treatTextFieldInVector(
                    data, 17, posionsOfHeader, "idCentroDeCustoPagamento")

                positionWordBank = bankAndAccount.find('BANCO')
                if positionWordBank >= 0:
                    positionPlusSign = bankAndAccount[positionWordBank:].find(
                        '>') + positionWordBank
                    bank = funcoesUteis.returnBankForName(
                        funcoesUteis.treatTextField(
                            bankAndAccount[positionWordBank +
                                           6:positionPlusSign]))

                    positionWordAccount = bankAndAccount.find('CONTA')
                    positionSplitSign = bankAndAccount[
                        positionWordAccount:].find(
                            '/') + positionWordAccount + 1
                    accountBank = funcoesUteis.treatTextField(
                        bankAndAccount[positionSplitSign:])
                else:
                    bank = "DINHEIRO"
                    accountBank = ""
                    bank = f'{bank} {idCentroCusto}'

                if paymentDate is not None:
                    valuesOfLine = {
                        "idAccountPaid": idAccountPaid,
                        "paymentDate": paymentDate,
                        "bank": bank,
                        "accountBank": accountBank,
                        "accountCode": accountCode
                    }

                    valuesOfFile.append(valuesOfLine.copy())
            except Exception:
                pass
        return valuesOfFile