Hi Everyone,
I hope this email finds you well. I've been using Beancount for many years. It's been an amazing tool, and I'm grateful to this community and especially to Martin Blais for maintaining such a fantastic project.
I'm sharing a project I've been working on called Beanpost, which you can find on GitHub at https://github.com/gerdemb/beanpost. This started as an experiment to see if I could recreate plain text accounting functionality using a PostgreSQL database, and it turned out more successful than I expected. I thought the Beancount community might find it useful and interesting.
Beanpost consists of a PostgreSQL schema and import/export commands that let you transfer data between a beancount file and a PostgreSQL database. Much of Beancount's functionality is implemented using custom PostgreSQL functions, allowing for complex queries and data manipulation. This setup provides a flexible backend that can integrate with other tools like web apps or reporting systems.
One of the reasons I created Beanpost was to build a mobile-friendly custom front-end. Fava is a fantastic tool, but it's not very mobile-friendly, isn't intuitive for beginners, and is hard to customize. With Beanpost, you have more flexibility to create a custom front-end that suits your needs.
The included functionality is as follows:
I'm curious to hear your thoughts on this approach. Would love to hear any feedback. I think I've implemented the majority of the required features, but maybe I'm missing a few things?
Maybe we could call this "database-based accounting" instead of "plain text accounting." 🙂
Thank you for your time, and I look forward to hearing from you.
Best regards,
Ben
--
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+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/143e6263-3db3-4532-ae0e-eac6d7e6ffebn%40googlegroups.com.
Hi Martin,
Thanks for your feedback, and thanks for maintaining Beancount. Your work has made it such a great tool for so many of us.
I wanted to clarify that Beanpost does support multiple currencies using a custom PostgreSQL type and custom aggregator functions. I apologize for not making that clearer in my initial message. For example, the query SELECT sum(amount) FROM posting will return a summed inventory of all the currencies for the postings, allowing you to work with different commodities.
Regarding cost-basis, I haven't personally needed it yet, so that's why it's not implemented. However, I do import the cost and price information for each posting, which would be the basis for the calculation. I would need to review the documentation about how to calculate cost-basis accurately, but my basic idea is to write custom PostgreSQL functions to perform different cost-basis calculations. I'll also need to think about how to represent the matching of lots in SQL. Perhaps using foreign keys to link back to the matching lots could be a potential solution.
Thanks again for your guidance and insights.
Best regards,
Ben
--
On Apr 24, 2024, at 8:19 AM, Martin Blais <bl...@furius.ca> wrote:Oh wow, that's crazy cool. I didn't know postgresql supported that!Will have a more detailed look, sorry for not digging in deeper
On Apr 24, 2024, at 3:22 PM, Chary Chary <char...@gmail.com> wrote:Question 1: What can you do with beanpost, what you can't do with beanquery?
Question 2: The documentation says:
- Transaction dates: Each posting can have its own date, allowing transactions to balance even if individual postings have different dates. This helps with common issues when transferring money between accounts where withdrawal and deposit dates differ.
How do you achieve this, if initially the database is created by importing beancount file, which has only one date per transaction?
Question 2: The documentation says:
- Transaction dates: Each posting can have its own date, allowing transactions to balance even if individual postings have different dates. This helps with common issues when transferring money between accounts where withdrawal and deposit dates differ.
How do you achieve this, if initially the database is created by importing beancount file, which has only one date per transaction?On import into the database, we assign the beancount transaction date to each posting. On export to a beancount file, since beancount doesn't support dated postings, we use the date of the first posting for the transaction date.I hope this answers your questions. If you have more queries or need further clarification, I'm happy to help.Best regards,Ben
On Apr 26, 2024, at 10:58 PM, b...@gerdemann.org wrote:
--
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+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/5BAF897D-5F22-40FE-B58D-E15D9D404BD5%40gerdemann.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/3A1E6703-508D-4051-87F9-1A51A44AF438%40bravo5.org.