Browse Source

updates

master
F2256342 - Daniel de Oliveira Carvalho 1 year ago
parent
commit
c6b8bee396
  1. 12
      delimiters.txt
  2. 20
      design-notes.txt
  3. 251
      pdfScrape.ipynb
  4. 30
      queries.sql
  5. 75
      robopato.sql
  6. 2
      table-test.txt

12
delimiters.txt

@ -1,11 +1,11 @@
14.07.2024NAZO SUSHI BAR BRASILIA BR 446,22 0,00 14.07.2024NAZO SUSHI BAR BRASILIA BR 446,22 0,00
01-11 DATE 01-11 (10) DATE
12-34 DESC 12-34 (23) DESC
35-48 CITY 35-48 (14) CITY
49-50 COUNTRY 49-50 (02) COUNTRY
51-70 DEBT 51-70 (20) DEBT
71-82 CREDIT 71-82 (12) CREDIT
(\d{2}\.\d{2}\.\d{4})(.{23})(.{14})(.{2})(\s*\d+,\d{2})(\s*\d+,\d{2}) (\d{2}\.\d{2}\.\d{4})(.{23})(.{14})(.{2})(\s*\d+,\d{2})(\s*\d+,\d{2})
\d{2}\.\d{2}\.\d{4}.{23}.{14}.{2}\s*\d+,\d{2}\s*\d+,\d{2} \d{2}\.\d{2}\.\d{4}.{23}.{14}.{2}\s*\d+,\d{2}\s*\d+,\d{2}

20
design-notes.txt

@ -0,0 +1,20 @@
---
installments notes
transaction is: thingie (01/10)
so
create transactions as:
thingie(**/10) until thingie (10/10)
if transaction starts at: (03/10)
then it should:
thingie(03/10) to thingie (10/10)
on creation, change installments transactions dates to match credit card invoice month.
so
(15/03) thingie (03/10)
(15/04) thingie (04/10)
and so on
should we control wether it's paid or not?
probably not as the idea is to have no manual conciliation of transactions
should we control initial installment, and last separately?

251
pdfScrape.ipynb

File diff suppressed because one or more lines are too long

30
queries.sql

@ -0,0 +1,30 @@
INSERT INTO
default.TRANSACTION (
ID,
TDATE,
ACCOUNTID,
MEMO,
CITY,
COUNTRY,
OUTFLOW,
INFLOW,
OWNERID,
INSTALLMENTS,
CREATED,
UPDATED
)
VALUES
(
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL
);

75
robopato.sql

@ -0,0 +1,75 @@
CREATE TABLE `ACCOUNTS` (
`ID` integer PRIMARY KEY AUTO_INCREMENT,
`NAME` varchar(20),
`CREATED` datetime,
`UPDATED` datetime
);
CREATE TABLE `TRANSACTION` (
`ID` integer PRIMARY KEY AUTO_INCREMENT,
`DATE` date,
`ACCOUNTID` integer,
`DESC` varchar(23),
`CITY` varchar(14),
`COUNTRY` char(2),
`OUTFLOW` decimal(20,2),
`INFLOW` decimal(12,2),
`OWNERID` integer,
`INSTALLMENTS` integer DEFAULT 1,
`CREATED` datetime,
`UPDATED` datetime
);
CREATE TABLE `PAYEE` (
`ID` integer PRIMARY KEY AUTO_INCREMENT,
`NAME` varchar(20),
`CREATED` datetime,
`UPDATED` datetime
);
CREATE TABLE `OWNER` (
`ID` integer PRIMARY KEY AUTO_INCREMENT,
`NAME` varchar(20),
`CREATED` datetime,
`UPDATED` datetime
);
CREATE TABLE `CATEGORY` (
`ID` integer PRIMARY KEY AUTO_INCREMENT,
`NAME` varchar(20),
`CREATED` datetime,
`UPDATED` datetime
);
CREATE TABLE `SUBCATEGORY` (
`ID` integer PRIMARY KEY AUTO_INCREMENT,
`CATEGORYID` integer,
`NAME` varchar(20),
`CREATED` datetime,
`UPDATED` datetime
);
CREATE TABLE `CATEGORIZED_TRANSACTIONS` (
`ID` integer PRIMARY KEY AUTO_INCREMENT,
`ACCOUNTID` integer,
`TRANSACTIONID` integer,
`PAYEEID` integer,
`CATEGORYID` integer,
`SUBCATEGORYID` integer,
`CREATED` datetime,
`UPDATED` datetime
);
ALTER TABLE `ACCOUNTS` ADD FOREIGN KEY (`ID`) REFERENCES `TRANSACTION` (`ACCOUNTID`);
ALTER TABLE `OWNER` ADD FOREIGN KEY (`ID`) REFERENCES `TRANSACTION` (`OWNERID`);
ALTER TABLE `CATEGORY` ADD FOREIGN KEY (`ID`) REFERENCES `SUBCATEGORY` (`CATEGORYID`);
ALTER TABLE `TRANSACTION` ADD FOREIGN KEY (`ID`) REFERENCES `CATEGORIZED_TRANSACTIONS` (`TRANSACTIONID`);
ALTER TABLE `CATEGORY` ADD FOREIGN KEY (`ID`) REFERENCES `CATEGORIZED_TRANSACTIONS` (`CATEGORYID`);
ALTER TABLE `SUBCATEGORY` ADD FOREIGN KEY (`ID`) REFERENCES `CATEGORIZED_TRANSACTIONS` (`SUBCATEGORYID`);
ALTER TABLE `PAYEE` ADD FOREIGN KEY (`ID`) REFERENCES `CATEGORIZED_TRANSACTIONS` (`PAYEEID`);

2
table-test.txt

@ -2,6 +2,7 @@ KRAKARANGA
BATURU BATURU
UNGABUNGA UNGABUNGA
TABLEA TABLEA
UNGA
DATA DATA
DATA DATA
DATA DATA
@ -12,6 +13,7 @@ DATA
DATA DATA
DATA DATA
TABLEB TABLEB
BUNGA
DELTA DELTA
DELTA DELTA
DELTA DELTA

Loading…
Cancel
Save