Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - jat255

Pages: [1] 2
Bug Reports / Re: Bug with "undeletable" split transaction
« on: July 25, 2019, 04:50:37 PM »
I didn't originally write it (it's a fork of, but I added some capabilities with regards to splits and transfers. I structure my bi-weekly paycheck as a split transaction with subtractions for all the deductions (healthcare, insurance, etc.) so I have a record of the gross wages. Since that doesn't typically change from week to week, I wrote a method that automates paycheck entry, including two transfers into a retirement account. It is not on the github (since it has private information), but I've been using it for about a year now without issues (until this issue popped up... not sure where it came from...).

Here's a sanitized version of what I'm using (this method goes in pythonfinancier/

Code: [Select]
    def add_paycheck(self, account_name):
            Add an instance of a paycheck to an account.

            account_name : str
                Name of the account to use

                JSON response of the database upon inserting the transaction
            from datetime import datetime

            this_id = str(uuid.uuid4())
            memo = "2019 pay period ## paycheck"
            date ='%Y-%m-%d')
            this_retire1_uuid = str(uuid.uuid4())
            this_retire2_uuid = str(uuid.uuid4())

            other_retire1_uuid = str(uuid.uuid4())
            other_retire2_uuid = str(uuid.uuid4())

            # getting account from either map or database
            account_id = self.find_account(account_name)['_id']
            retire_name = 'retirement account name'

            # getting payee or creating a new one
            payee_id = self.get_or_create_payee("my workplace")['_id']

            id_transaction = self.get_id_transaction(this_id)
            tr = self.get_transaction(id_transaction)

            net_value = 9999.99 * 100
            retire1_val = 888.88 * 100
            retire2_val = 777.77 * 100

            transactions = [{'value': -111.11 * 100,
                             'payee_name': '',
                             'category_name': 'incomeNextMonth',
                             'memo': '#split1',
                             'id': str(uuid.uuid4())},
                            {'value': -1 * retire1_val,
                             'payee_name': '',
                             'category_name': 'incomeNextMonth',
                             'memo': '#split2',
                             'transfer': other_retire1_uuid,
                             'id': this_retire1_uuid},
                            {'value': -1 * retire2_val,
                             'payee_name': '',
                             'category_name': 'incomeNextMonth',
                             'transfer': other_retire2_uuid,
                             'memo': '#split3',
                             'id': this_retire2_uuid},
                            {'value': -111.11 * 100,
                             'payee_name': '',
                             'category_name': 'incomeNextMonth',
                             'memo': '#split4',
                             'id': str(uuid.uuid4())},
                            {'value': -111.11 * 100,
                             'payee_name': '',
                             'category_name': 'incomeNextMonth',
                             'memo': '#split5',
                             'id': str(uuid.uuid4())},
                            {'value': -111.11 * 100,
                             'payee_name': '',
                             'category_name': 'incomeNextMonth',
                             'memo': '#split6',
                             'id': str(uuid.uuid4())},
                            {'value': -11.11 * 100,
                             'payee_name': '',
                             'category_name': 'incomeNextMonth',
                             'memo': '#split7',
                             'id': str(uuid.uuid4())},
                            {'value': -11.11 * 100,
                             'payee_name': '',
                             'category_name': 'incomeNextMonth',
                             'memo': '#split8',
                             'id': str(uuid.uuid4())},
                            {'value': -11.11 * 100,
                             'payee_name': '',
                             'category_name': 'incomeNextMonth',
                             'memo': '#split9',
                             'id': str(uuid.uuid4())},
                            {'value': -11.11 * 100,
                             'payee_name': '',
                             'category_name': 'incomeNextMonth',
                             'memo': '#split10',
                             'id': str(uuid.uuid4())},
                            {'value': 99999 * 100,
                             'payee_name': '',
                             'category_name': 'incomeNextMonth',
                             'memo': '#gross_wages',
                             'id': str(uuid.uuid4())}]

            for i, t in enumerate(transactions):
                t['category'] = self.find_category(t.pop('category_name'))['_id']
                if t['payee_name'] is not '':
                    t['payee'] = self.get_or_create_payee(t.pop('payee_name'))['_id']
                    # null payee
                transactions\[i\] = t

            if not tr or '_id' not in tr:
                # category is "split"
                doc = {'_id': id_transaction, 'value': value,
                       'account': account_id,
                       'payee': payee_id, 'date': date,
                       'category': 'split', 'memo': memo,
                       'splits': transactions}
                self.logger.debug('Adding', doc)

                if '_rev' in tr:
                    doc['_rev'] = tr['_rev']
                    'importing transaction {0}'.format(doc['_id']))

                added_doc =, doc)

                inserted = self.find_transaction(memo=memo, date=date)[0][



                return added_doc
                    'transaction {0} has already been imported '.format(

So I suppose it's mostly manual still, but it would not be too much work to write a small extension to take the output of a ofx file or something and batch upload transactions.

Bug Reports / Re: Bug with "undeletable" split transaction
« on: July 25, 2019, 04:13:57 PM »
It worked! My savior :)

Bug Reports / Re: Bug with "undeletable" split transaction
« on: July 25, 2019, 04:07:21 PM »
I think it came about as a result of some code that I have to automatically enter my paychecks that I added using

Using GET requests, I can see that there are no splits defined for that transaction, but I'm wondering if some other deleted transaction is referencing it and that's why the front-end is getting messed up. I can use PUTs to change the memo and set the value to 0, but I'm getting a 409 conflict response when I try to issue a DELETE on the document.

Bug Reports / Bug with "undeletable" split transaction
« on: July 25, 2019, 03:05:54 PM »
I think I've come across a bug in my budget...

I do split transactions for my paychecks. One of these splits is a transfer to an off-budget retirement account. I have two transactions in the retirement account that are listed as transfers to my checking account, but neither one has a matching split in the checking account. I cannot delete these transactions from my retirement account because it says "Cannot delete transfer of split transaction. This transfer is from a split transaction. To remove it, modify the split transaction this transfer originates from."

Is there a "super delete" option? I'm not sure how I ended up in this state.

Feature Requests / Re: Virtual Accounts or Categories
« on: April 20, 2018, 02:35:17 PM »
This could be a great addition to the "reports" section, or perhaps as a section with the "On/Off accounts" and "Closed accounts".

A dashboard of these different values on the reports page would be pretty cool (like a bunch of little tiles showing the balance, maybe with a sparkline view of the past X months or something). Then clicking on one of the tiles would open up that calculation as a graph of it's value over time.

Sounds like a great feature. Want to code it @Billy_McSkintos:P

Off-topic / Re: Where did Financier get it's name?
« on: February 22, 2018, 10:40:57 AM »
I would assume it has something to do with the cake, but I could be mistaken:


Seriously, my guess is that it was a clever play on the title of a Financier, which is someone who controls lots of money (like the Monopoly man). As an aside, my wife and I pronounce it with a "long A" sound at the end (is in French) because it sounds fancier :)

Feature Requests / Re: A Place to keep notes....
« on: February 09, 2018, 04:40:30 PM »
That also looks like a great spot for a calendar, in case you wanted to use it for something related to scheduled transactions.

Announcements / Re: CouchDB maintenance & backups
« on: January 12, 2018, 04:29:38 PM »
... run the function after a complete pouchdb sync would be all you need @jat255.

Sadly, with my total lack of js knowledge, the easiest thing for me to do is write a selenium script with python to go get the backup, lol

Announcements / Re: CouchDB maintenance & backups
« on: January 12, 2018, 04:07:28 PM »
Gotcha. crypto-pouch would be a cool option. It could be disabled by default, but users could enable it with a big warning and clear understanding that no password = no data (even for the budget overlord).

Announcements / Re: CouchDB maintenance & backups
« on: January 12, 2018, 03:29:07 PM »
... run your account, 'hack' into your account, and export the budget. ...

Is this something that can be done at any time? I hadn't gone through it, but I was hoping that the budgets were encrypted somehow on the remote storage. Is this not the case?

Announcements / Re: CouchDB maintenance & backups
« on: January 12, 2018, 02:32:06 PM »
Actually, in that vein, do you know off hand what the address for a request to get a budget in export/import format would be? I'm thinking of setting up a cron job with a curl request (presumably with an authentication cookie) to auto-backup my budget .json locally every day (now that my wife and I are sharing one account, things could unintentionally go haywire).

Other / Re: Financier Mobile (Unofficial)
« on: September 25, 2017, 11:33:40 AM »
Hmm.. Color themes are by far the most critical portion. Make sure you get that right :-p

Announcements / Re: Financier frontend repository is now open sourced!
« on: August 30, 2017, 12:23:38 PM »
Does it being open sourced mean that the look/feel/functionality is likely to change at the will of arbitrary software developers who decide to contributing to the project? Or will there be someone providing 'direction' for development?
I'm just curious how the open source flow works in practice. I'd imagine different folks have different ideas about what should be changed..

From a user perspective, nothing should change unless @Alex decides he wants it to. He controls the "authoritative" copy of the software, which is called the "upstream" version. Basically, the open-sourcing enables everyone to make a full copy of the program (offline-only, since he only released the front-end part). A developer (or enterprising user) can then make changes to their personal copy however they wish, changing things, adding functionality, etc. however they like. They can then submit a "pull request" to the upstream version, and Alex can decide whether or not to incorporate that change into the primary version that everyone uses when they go to

Hope that makes sense!

Other / Re: Customizing Financier: nYNABish Theme
« on: August 03, 2017, 04:19:08 PM »
I added the following to my theme to get nicer scrollbars (I think only works on webkit browsers like Chrome):

Code: [Select]
border-radius: 6px;
background-color: #F5F5F5;

width: 6px;
background-color: #F5F5F5;

-webkit-box-shadow: inset 0 0 4px rgba(0,0,0,.3);
background-color: #008bb3;


Announcements / Re: Public Financier source
« on: July 26, 2017, 04:07:45 PM »
@Alex any update?

Pages: [1] 2