Re: Importing transactions from bank.

2018-04-16 Thread Martin Blais
On Sun, Apr 15, 2018 at 8:35 PM,  wrote:

> I've started playing with import scripts,the sample files provided in repo
> are very useful, just have couple of additional questions i was not able to
> figure out/not 100% sure about:
>

Really glad the example files are useful.


1 bean-extract does not write transactions in main beancount file
> (personal.beancount), it generates output into command line or
> tmp.beancount and we enter them manually, right?
>

Correct. You redirect its output to a temp file and using your editor,
cut/paste them to your main file wherever makes most sense for you (and
complete them, e.g., categorize the expenses).



>
> 2 when running  "bean-extract -e BEANCOUNT_FILE" what is the algorithm
> used to check duplication? Does it check only for same amounts? Or also
> takes into consideration additional clues (payee, date range, etc)?
>

Not so great, definitely could use some improvement:
https://bitbucket.org/blais/beancount/src/cd5fe599fdc80d47caa8a2618f5ee489ce88d101/beancount/ingest/similar.py
https://bitbucket.org/blais/beancount/issues/185/make-duplicate-detection-configureable


3 When filing files bean-file example.import ../Downloads/ -o documents/
> how are name and date generated?
> Seems it is picks up date from original file name (example
> UTrade20160215.csv), but when it's not in file name how ofxdownload.ofx
> turns to 2013-12-18.bofa.ofx
>

>From the file_name() and file_date() methods of your importer
implementation:
https://bitbucket.org/blais/beancount/src/cd5fe599fdc80d47caa8a2618f5ee489ce88d101/beancount/ingest/importer.py
If you use the example CSV importer it does what it can.
Typically you'd write your own and choose what you want it to be.



>
> 4 Main value of regression testing is to insure that new changes/additions
> to importers still work with old input files,
> It's not so useful to help importers work with new formats if format was
> changed by bank, right?
>

Both.
Those importer codes are typically the last thing you want to do on a
Saturday night, so they tend to be kludgey.
- When you need to support something new, you want to make sure you don't
break old functionality.
- When the Java programmers at your favorite bank change the output format
without warning you (or realize 10 years after that escaping the commas in
the CSV fields might have been a good idea), there's no faster way to test
a new / updated importer than to plot a newer file in the directory and run
regression tests


On Mon, Apr 16, 2018 at 8:30 AM,  wrote:

> 5 Also what's the right way to calculate balance
> ?
>

Ideally you don't calculate it. Ideally you find it somewhere and enter it.



>
> Chase have the following CSV structure,
> 
>
> Balance fields are included in checking CSV, so i guess i can use balance
> of the last transactions for balance.
> They are not included in credit card CSV however. Is there a way to
> calculate them?
>
> And how important "balance" in the first place? Cause for example this
> import script https://gist.github.com/mterwill/7fdcc573dc1aa158648aacd4e33
> 786e8#file-importers-chase-py does not have "balance".
>

They're optional.

The reason for Balance directives is to assert (and I mean that in the
computer programming sense as well) that your ledger's calculated balance
matches the institution's idea of what it should be. The picture perfect
idea of a Balance directive is a fuddy duddy accountant type wearing brown
socks staring at the bottom line of his paper statement carefully through
bifocals and manually copying the number to a Balance directive in
Beancount.

My understanding is that most systems work on the basis of
"reconciliation", which is a fancy way of saying that you're meant to
eyeball what you've entered and confirm it perfect, and after that it's
frozen. I preferred granting my users the superpowers of changing the past
at will, so I decided to encode that as allowing you to assert balances at
particular points in time - Beancount will always automatically complain is
a computed balance fails to match your bank's expectation. All the
assertions are always checked. Adding Balance directives often also allows
you to zero in on errors faster when you're debugging things (e.g. some
missing transaction which for whatever reason you failed to enter - it
happens).

If your downloaded file contains a parseable balance field, I encourage you
to make that importer automatically generate a corresponding Balance
directive.
Otherwise, you can manually insert one manually every now and then when you
log into that website (e.g. to make a payment) and copy the number on the
screen to the current date. The idea is to enter there a number which you
know (or assume) is correct.







>
>
> On Monday, April 9, 2018 at 4:28:30 PM UTC-4, Michael Droogleever wrote:
>>
>> You'll need to use something like this, 

Re: Loosely tracking shared expenses between partners

2018-04-16 Thread Martin Blais
There are two methods going on in this thread, a simple method of keeping a
running account of the other person's contributions and paying their share
of expenses from that account, and a more complex method of maintaining a
separate beancount ledger dedicated for the project and that recording
contributions from all parties. I'll assume you meant the former, simpler
method, not the latter.

It's simple: you book the other side of the deposit to the account for each
person's contribution:

2018-01-25 * "Money for rent and other expenses"
  Assets:Pending:Bob  -1000.00 USD
  Assets:Checking  1000.00 USD

2018-01-25 * "Money for rent and other expenses"
  Assets:Pending:Alice-1100.00 USD
  Assets:Checking  1100.00 USD

When it's time to pay the rent, you just pay your bit (Expenses:Rent) and
use their account to pay the remaining portions:

2018-02-01 * "Paying the rent"
  Assets:Checking-2400.00 USD
  Assets:Pending:Bob   800.00 USD
  Assets:Pending:Alice 800.00 USD
  Expenses:Rent 800.00 USD

Whether you choose to maintain their accounts as assets or liabilities -
merely a naming change - is a matter of whether they choose to pay you
ahead of time most of the time (you safeguard some of their money in
preparation for spending - Assets), or after the fact, i.e., after expenses
have accrued (they always owe you after you've paid for them -
Liabilities). In either case, the signs all stay the same. When you pay the
rent, you increase their accounts (if they started at zero, those hold a
receivable that you have on them). When they pay you, you decrease that
receivable  (or increase the liability - a negative number).

Hope this helps,






On Tue, Apr 17, 2018 at 12:21 AM,  wrote:

> This thread feels suspiciously close to the change I'm trying to model,
> but it's still not quite making sense to me.
>
> I have several roommates. I originally thought that each person would pay
> into an "Asset:Pending:GoesToRent" account, then that would pay out to the
> "Expenses:Housing:TheMortgage" expense.
>
> The wrinkle comes in that they're paying me into my "Assets:Checking"
> account, and I want to do balance assertions on it. The account diversion
> stuff mentioned previously appears to be just syntatic sugar for mapping to
> a tag. Is that right?
>
> My goal is to understand how much of my housing expense is coming from me
> versus everyone else, so an intermediate account seems necessary?
>
> Would love to hear your thoughts,
>  -justin
>
> --
> You received this message because you are subscribed to the Google Groups
> "Beancount" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beancount+unsubscr...@googlegroups.com.
> To post to this group, send email to beancount@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/beancount/d85bad13-fd62-4241-80bf-13654e122045%40googlegroups.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To post to this group, send email to beancount@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhOwYTMgQLDb07wQMjGjV7j9iyY-vg8X%2B1y7h2E_rL%3DU2A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Loosely tracking shared expenses between partners

2018-04-16 Thread justin
This thread feels suspiciously close to the change I'm trying to model, but 
it's still not quite making sense to me.

I have several roommates. I originally thought that each person would pay 
into an "Asset:Pending:GoesToRent" account, then that would pay out to the 
"Expenses:Housing:TheMortgage" expense.

The wrinkle comes in that they're paying me into my "Assets:Checking" 
account, and I want to do balance assertions on it. The account diversion 
stuff mentioned previously appears to be just syntatic sugar for mapping to 
a tag. Is that right?

My goal is to understand how much of my housing expense is coming from me 
versus everyone else, so an intermediate account seems necessary?

Would love to hear your thoughts,
 -justin

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To post to this group, send email to beancount@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/d85bad13-fd62-4241-80bf-13654e122045%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Issue #282: Pipe not a comment? (blais/beancount)

2018-04-16 Thread Martin Michlmayr
New issue 282: Pipe not a comment?
https://bitbucket.org/blais/beancount/issues/282/pipe-not-a-comment

Martin Michlmayr:

I don't know if this is a code or a documentation issue.  The syntax guide says:

> Any line that does not begin as a valid Beancount syntax directive (e.g. with 
> a date) is silently ignored.

Now I'm not sure if this is wise since this makes it really easy to 
accidentally get something silently ignored that you don't want to be ignored.

But in any case, if the documentation is correct, this should be a valid 
comment:


```
| foo
```

but I get:

```
.../t.bean:3:   syntax error, unexpected PIPE
```


-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To post to this group, send email to beancount@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/20180416151239.27363.61261%40celery-worker-106.ash1.bb-inf.net.
For more options, visit https://groups.google.com/d/optout.


Re: Importing transactions from bank.

2018-04-16 Thread mployby
5 Also what's the right way to calculate balance 
?

Chase have the following CSV structure, 


Balance fields are included in checking CSV, so i guess i can use balance 
of the last transactions for balance.
They are not included in credit card CSV however. Is there a way to 
calculate them?

And how important "balance" in the first place? Cause for example this 
import script 
https://gist.github.com/mterwill/7fdcc573dc1aa158648aacd4e33786e8#file-importers-chase-py
 
does not have "balance".

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To post to this group, send email to beancount@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/a4d296ff-10a0-4a0b-9949-d3aac04fd7eb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Best format for importing from bank

2018-04-16 Thread mployby
Guys hi,

>From docs (Importing External Data in Beancount 
)
 
i've understood that PDF is not easy format to work with.
But how other formats compare?

In chase bank i can choose - CSV, QFX, QIF, IIF or QBO 


Which one is better?

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To post to this group, send email to beancount@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/d42886f4-a3f0-4e05-9bed-f003863df1d7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.