feat: importação de fatura de cartão — strip R$, skip negativos, all_expenses

Parser limpa prefixo R$ e símbolos de moeda antes de parsear o valor.
Flags SkipNegative e AllExpenses para CSV de fatura de cartão.
UI: checkboxes "Fatura de cartão" e "Ignorar valores negativos".

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
This commit is contained in:
2026-05-27 15:56:14 -03:00
co-authored by Claude Sonnet 4.6
parent 7dae05cabf
commit e438002c0a
4 changed files with 37 additions and 5 deletions
+2
View File
@@ -24,6 +24,8 @@ export interface CSVMapping {
has_header: boolean
decimal_separator: string
field_separator: string
skip_negative: boolean
all_expenses: boolean
}
export const useImportStore = defineStore('import', () => {
+10
View File
@@ -17,6 +17,8 @@ const csvMapping = ref<CSVMapping>({
has_header: true,
decimal_separator: ',',
field_separator: ';',
skip_negative: false,
all_expenses: false,
})
function onFileChange(e: Event) {
@@ -130,6 +132,14 @@ function fmt(amount: number) {
<input type="checkbox" v-model="csvMapping.has_header" />
Arquivo tem cabeçalho
</label>
<label class="fc-label fc-import-cfg__checkbox">
<input type="checkbox" v-model="csvMapping.all_expenses" />
Fatura de cartão (todos são despesas)
</label>
<label class="fc-label fc-import-cfg__checkbox">
<input type="checkbox" v-model="csvMapping.skip_negative" />
Ignorar valores negativos
</label>
</div>
</NeonPanel>