-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: process, generate, stirngify cnab 104
- Loading branch information
Showing
65 changed files
with
1,441 additions
and
616 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,2 @@ | ||
import { cnab240_104DetalheATemplate } from './templates/240/104/cnab-240-104-detalhe-a-template.const'; | ||
import { cnab240_104DetalheBTemplate } from './templates/240/104/cnab-240-104-detalhe-b-template.const'; | ||
import { cnab240_104HeaderArquivoTemplate } from './templates/240/104/cnab-240-104-header-arquivo-template.const'; | ||
import { cnab240_104HeaderLoteTemplate } from './templates/240/104/cnab-240-104-header-lote-template.const'; | ||
import { cnab240_104TrailerArquivoTemplate } from './templates/240/104/cnab-240-104-trailer-arquivo-template.const'; | ||
import { cnab240_104TrailerLoteTemplate } from './templates/240/104/cnab-240-104-trailer-lote-template.const'; | ||
|
||
export const CNAB_SUPPORTED_FORMATS = [240]; | ||
export const CNAB_YAML_DIR = './yaml'; | ||
export const CNAB_BANK = { | ||
caixa: { | ||
code: '104', | ||
remessa: { | ||
240: ['header_arquivo', 'detalhe', 'trailer_arquivo'], | ||
}, | ||
retorno: { | ||
240: ['header_arquivo', 'detalhe', 'trailer_arquivo'], | ||
}, | ||
}, | ||
}; | ||
|
||
export const CNAB_MODULES = { | ||
caixa: { | ||
remessa: { | ||
240: { | ||
templates: [ | ||
cnab240_104HeaderArquivoTemplate, | ||
cnab240_104HeaderLoteTemplate, | ||
cnab240_104DetalheATemplate, | ||
cnab240_104DetalheBTemplate, | ||
cnab240_104TrailerLoteTemplate, | ||
cnab240_104TrailerArquivoTemplate, | ||
], | ||
}, | ||
}, | ||
}, | ||
}; | ||
export const CNAB_EOL = '\r\n'; |
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
...ms/caixa/camara-compensacao-caixa.enum.ts → ...s/104/cnab-104-camara-compensacao.enum.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
export enum Cnab104CodigoSegmento { | ||
A = 'A', | ||
B = 'B', | ||
} |
2 changes: 1 addition & 1 deletion
2
.../enums/caixa/finalidade-doc-caixa.enum.ts → ...enums/104/cnab-104-finalidade-doc.enum.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
.../enums/caixa/finalidade-ted-caixa.enum.ts → ...enums/104/cnab-104-finalidade-ted.enum.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...nums/caixa/forma-lancamento-caixa.enum.ts → ...ums/104/cnab-104-forma-lancamento.enum.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...aixa/inficador-parcelamento-caixa.enum.ts → ...4/cnab-104-indicador-parcelamento.enum.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...nums/caixa/tipo-compromisso-caixa.enum.ts → ...ums/104/cnab-104-tipo-compromisso.enum.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
.../enums/caixa/tipo-movimento-caixa.enum.ts → ...enums/104/cnab-104-tipo-movimento.enum.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
export enum TipoMovimentoCaixa { | ||
export enum Cnab104TipoMovimento { | ||
Inclusao = '0', | ||
Exclusao = '9', | ||
} |
2 changes: 1 addition & 1 deletion
2
...ab/enums/caixa/tipo-servico-caixa.enum.ts → ...b/enums/104/cnab-104-tipo-servico.enum.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 3 additions & 2 deletions
5
.../caixa/codigo-registro-cnab-caixa.enum.ts → ...nums/all/cnab-all-codigo-registro.enum.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
export enum CodigoRegistroCnabCaixa { | ||
export enum CnabAllCodigoRegistro { | ||
HeaderArquivo = '0', | ||
HeaderLote = '1', | ||
|
||
/** Se aplica a todos os segmentos de detalhe. */ | ||
DetalheSegmento = '3', | ||
|
||
TrailerLote = '5', | ||
TailerArquivo = '9', | ||
TrailerArquivo = '9', | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 10 additions & 4 deletions
14
src/cnab/interfaces/cnab-240/104/cnab-240-104-detalhe-b.interface.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
src/cnab/interfaces/cnab-240/104/cnab-240-104-file.interface.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { ICnab240_104HeaderArquivo } from './cnab-240-104-header-arquivo.interface'; | ||
import { ICnab240_104Lote } from './cnab-240-104-lote.interface'; | ||
import { ICnab240_104TrailerArquivo } from './cnab-240-104-trailer-arquivo.interface'; | ||
|
||
export interface ICnab240_104File { | ||
headerArquivo: ICnab240_104HeaderArquivo; | ||
lotes: ICnab240_104Lote[]; | ||
trailerArquivo: ICnab240_104TrailerArquivo; | ||
} |
11 changes: 8 additions & 3 deletions
11
src/cnab/interfaces/cnab-240/104/cnab-240-104-header-arquivo.interface.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 8 additions & 3 deletions
11
src/cnab/interfaces/cnab-240/104/cnab-240-104-header-lote.interface.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
src/cnab/interfaces/cnab-240/104/cnab-240-104-lote.interface.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { ICnab240_104HeaderLote } from './cnab-240-104-header-lote.interface'; | ||
import { ICnab240_104Registro } from './cnab-240-104-registro.interface'; | ||
import { ICnab240_104TrailerLote } from './cnab-240-104-trailer-lote.interface'; | ||
|
||
export interface ICnab240_104Lote { | ||
headerLote: ICnab240_104HeaderLote; | ||
registros: ICnab240_104Registro[]; | ||
trailerLote: ICnab240_104TrailerLote; | ||
} |
7 changes: 7 additions & 0 deletions
7
src/cnab/interfaces/cnab-240/104/cnab-240-104-registro-a-b.interface.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { ICnab240_104DetalheA } from './cnab-240-104-detalhe-a.interface'; | ||
import { ICnab240_104DetalheB } from './cnab-240-104-detalhe-b.interface'; | ||
|
||
export interface ICnab240_104RegistroAB { | ||
detalheA: ICnab240_104DetalheA; | ||
detalheB: ICnab240_104DetalheB; | ||
} |
7 changes: 7 additions & 0 deletions
7
src/cnab/interfaces/cnab-240/104/cnab-240-104-registro.interface.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { ICnab240_104DetalheA } from './cnab-240-104-detalhe-a.interface'; | ||
import { ICnab240_104DetalheB } from './cnab-240-104-detalhe-b.interface'; | ||
|
||
export interface ICnab240_104Registro { | ||
detalheA?: ICnab240_104DetalheA; | ||
detalheB?: ICnab240_104DetalheB; | ||
} |
11 changes: 8 additions & 3 deletions
11
src/cnab/interfaces/cnab-240/104/cnab-240-104-trailer-arquivo.interface.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 8 additions & 3 deletions
11
src/cnab/interfaces/cnab-240/104/cnab-240-104-trailer-lote.interface.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.