Re: [GNC] gnucash-user Digest, Vol 233, Issue 90

2022-08-31 Thread Robert Simmons
James, Can you visit the following list management URL: https://lists.gnucash.org/mailman/listinfo/gnucash-user Down at the very bottom there is a box for your email address. The text next to it is "To unsubscribe from gnucash-user, get a password reminder, or change your subscription options en

Re: [GNC] Missing Documentation

2022-08-23 Thread Robert Simmons
Got it. Thanks! ___ gnucash-user mailing list gnucash-user@gnucash.org To update your subscription preferences or to unsubscribe: https://lists.gnucash.org/mailman/listinfo/gnucash-user - Please remember to CC this list on all your replies. You can do

Re: [GNC] Missing Documentation

2022-08-23 Thread Robert Simmons
I didn't include the URL to the location where it seems it should be: https://code.gnucash.org/docs/MAINT/group__Business.html On Tue, Aug 23, 2022 at 9:18 AM Robert Simmons wrote: > Please correct me if I am wrong, but the Python bindings documentation is > automatically gener

[GNC] Missing Documentation

2022-08-23 Thread Robert Simmons
Please correct me if I am wrong, but the Python bindings documentation is automatically generated, right? I looked in both master and maint, and I don't see documentation for "Bill", but it shows up in the python bindings results from both help() and dir(). And this object is a full object for ven

Re: [GNC] How to bulk import about 130 Securities entries?

2022-08-16 Thread Robert Simmons
> running the *.gnucash through gunzip, add in the text, and run it back through gzip As a connoisseur of bad ideas for adding data to GnuCash myself, I have to point out that one should use a programming language that has a library with support for the structured data format that one wants to add

Re: [GNC] How to bulk import about 130 Securities entries?

2022-08-14 Thread Robert Simmons
The program you want to use that is the macOS equivalent of what the other reply suggested is called "Automator". As long as you have not moved it, it is located in "Launchpad > Other > Automator" or "Applications > Automator". Also, this is just a general suggestion about XML manipulation (or man

Re: [GNC] Strange Error Message

2022-08-12 Thread Robert Simmons
> Does this invoice involve a job? Yes, all invoices I've created involve jobs. ___ gnucash-user mailing list gnucash-user@gnucash.org To update your subscription preferences or to unsubscribe: https://lists.gnucash.org/mailman/listinfo/gnucash-user

[GNC] Strange Error Message

2022-08-12 Thread Robert Simmons
If I use the process payment feature on an invoice to a customer, and then go to the checking account the payment was processed to, and then select the row for that payment that was created by the process payment process, then right click and "Edit Payment", there is an error popup: "You have no v

Re: [GNC] Possible Bug in Credit Note Display

2022-08-11 Thread Robert Simmons
> do you need me to file it? I don't have an account. Can you file it? ___ gnucash-user mailing list gnucash-user@gnucash.org To update your subscription preferences or to unsubscribe: https://lists.gnucash.org/mailman/listinfo/gnucash-user - Please

[GNC] Unit Tests

2022-08-11 Thread Robert Simmons
Looking at the code repo I see a directory of unit tests, but it doesn't look like it has actual unit tests. Do you all do continuous integration somewhere and have unit tests? When a software defect is identified and fixed, do you create a unit test based on the fix? __

[GNC] Found Another Potential Bug

2022-08-11 Thread Robert Simmons
This time in the Find function in the GUI. Here are the steps to reproduce: 1. Create a fresh GnuCash file of SQLite3 type. 2. Create a new company named "Acme" 3. Create a second new company called "The Empire" 4. Create a new job named "Build Deathstar" and set the owner information to "The Empi

Re: [GNC] Another Potential Software Defect

2022-08-10 Thread Robert Simmons
Also, if you're doing everything in JupyterLab like I am, you can use: %load_ext wurlitzer in the cell to suppress everything from C/C++ in that particular cell. https://pypi.org/project/wurlitzer/ ___ gnucash-user mailing list gnucash-user@gnucash.org

Re: [GNC] Another Potential Software Defect

2022-08-10 Thread Robert Simmons
The following is, of course, not recommended. Those errors are pretty difficult to suppress because they're coming from C/C++ stdout. If you want to hide them, contextlib.suppress and contextlib.redirect_stdout both do not work. However, there is a python package called wurlitzer that does the tric

Re: [GNC] How To Get Job Object?

2022-08-10 Thread Robert Simmons
gnucash.Query() looks like the real winner of the swiss army knife function. Replacements for direct SQL queries. This one replaces SELECT max(id) FROM jobs def get_job_maxid(): query = gnucash.Query() query.search_for('gncJob') query.set_book(book) job_ids = list() for result

Re: [GNC] How To Get Job Object?

2022-08-10 Thread Robert Simmons
When I'm done with all this, I'm going to contribute new example scripts. The current documentation for the Python bindings is very excellent. It's some of the best documentation I've ever seen. It's a pleasure to use and saves a ton of time. Here is the only way that I can find of getting from ze

[GNC] How To Get Job Object?

2022-08-10 Thread Robert Simmons
I have created a number of Jobs. Now I want to associate an invoice with one of the jobs. I can see there is a function "book.JobLookup()" but the argument this takes is GncGUID. I don't know how to create this GUID object, and the only way I can see to get the GUID is to just do a SQL query direct

[GNC] Another Potential Software Defect

2022-08-10 Thread Robert Simmons
Lets see if I can go two for two: Steps to reproduce (using a sqlite file): 1. Run code snippet below. 2. Observe raised exception " [GncSqlColumnTableEntryImpl::add_to_query()] Invalid owner type: 0" import gnucash import gnucash.gnucash_business s = gnucash.Session('sqlite3://test.gnucash', g

Re: [GNC] Possible Bug in Credit Note Display

2022-08-10 Thread Robert Simmons
No Bugzilla account. Github account, but it looks like you all only handle PRs there, not issues. On Wed, Aug 10, 2022 at 4:54 PM Adrien Monteleone < adrien.montele...@lusfiber.net> wrote: > Indeed, I just created a test book and created a new Vendor Credit and I > can reproduce. > > Congratulati

Re: [GNC] Possible Bug in Credit Note Display

2022-08-10 Thread Robert Simmons
> I cannot duplicate this on v4.11 running on BigSur. This happens in macOS and in Linux. Here are the steps to reproduce. You will need at least one vendor existing to do this. If you have no vendors, create one called "Acme". 1. Business menu > Vendor > New Bill... 2. Type: Credit Note 3. Vendo

[GNC] Possible Bug in Credit Note Display

2022-08-10 Thread Robert Simmons
In the Entries part of an open credit note tab, the row focus can be assigned by clicking on a row. This changes the selected row from green to yellow. Also, it changes the value in the Subtotal column to zero. This appears to just be a software defect in the display: there are no changes made to t

Re: [GNC] How to Return a GDate?

2022-08-08 Thread Robert Simmons
> GDates are provided by GLib Thanks! ___ gnucash-user mailing list gnucash-user@gnucash.org To update your subscription preferences or to unsubscribe: https://lists.gnucash.org/mailman/listinfo/gnucash-user - Please remember to CC this list on all y

[GNC] How to Return a GDate?

2022-08-08 Thread Robert Simmons
Following the documentation: https://code.gnucash.org/docs/MAINT/gncEntry_8h.html When creating an Entry (for a Bill or Invoice), the date is to be set using a GDate: "DEPRECATED - use gncEntrySetDateGDate() instead!" I see a number of functions that return an existing GDate, so something like th

[GNC] Incrementing Counters Saga Continues

2022-08-08 Thread Robert Simmons
In the theme of "the code is the documentation" I've found a method that is almost what I need to increment a counter, but it doesn't look fully implemented. >From the site-packages directory of the Python bindings directory, running a grep for "increment" shows one line that is interesting. gnuc

Re: [GNC] gncJobNextID in gncJob.c not in gncJob.h

2022-08-08 Thread Robert Simmons
That makes sense. So, performance would not be an argument for SQL and against a graph database. ___ gnucash-user mailing list gnucash-user@gnucash.org To update your subscription preferences or to unsubscribe: https://lists.gnucash.org/mailman/listinfo/g

Re: [GNC] gncJobNextID in gncJob.c not in gncJob.h

2022-08-08 Thread Robert Simmons
> Accounting systems primarily perform the same operation on large numbers of data elements. I wish I had time to devote to this. I use graph databases in many of the other systems that I develop. This would be a great pivot point on which to create a new open source project and see which paradigm

Re: [GNC] gncJobNextID in gncJob.c not in gncJob.h

2022-08-08 Thread Robert Simmons
> we should consider changing the license to GPL-Affero to preclude someone using GnuCash in a non-Free software-as-a-service scheme That is a consideration. When I hit the point of needing to write quite a lot of code to get GnuCash to do exactly what I want, I looked into other projects. I took

Re: [GNC] gncJobNextID in gncJob.c not in gncJob.h

2022-08-08 Thread Robert Simmons
Another observation: the current GnuCash mixes data and display layers. For a new system, I would suggest separating everything completely. Have a database and lib layer that interacts with the database. Then expose the lib to C, Python, C++, Rust, Go, whatever. You can then have a REST layer buil

Re: [GNC] gncJobNextID in gncJob.c not in gncJob.h

2022-08-08 Thread Robert Simmons
Understood. After looking under the hood a good bit as well as thinking about the problems of accounting and databases in general I have a side question: If you're working on a rewrite of some kind, why not use a graph database as the back end rather than SQL? The reason is that a graph database

Re: [GNC] gncJobNextID in gncJob.c not in gncJob.h

2022-08-08 Thread Robert Simmons
> unless your script is going to create jobs and immediately exit Yes. I see no other way to do this other than directly changing the database. There is nothing in the Python bindings that can do it. I'm keeping a count "job_num" that I'm using with "str(job_num).zfill(6)" to make it look correct

Re: [GNC] gncJobNextID in gncJob.c not in gncJob.h

2022-08-08 Thread Robert Simmons
is going to create jobs and immediately exit. The engine loads > the database into memory once at the beginning of the session and doesn't > read it again, so any changes you make direct to the database like that are > invisible to the current session. > > Regards, > Jo

Re: [GNC] gncJobNextID in gncJob.c not in gncJob.h

2022-08-07 Thread Robert Simmons
Little error there. I improved the query while writing: "This sets the Job ID counter to 3, but you would change that 3 to whatever the ID you want." should be "This increments the Job ID to the next" ___ gnucash-user mailing list gnucash-user@gnucash.org

Re: [GNC] gncJobNextID in gncJob.c not in gncJob.h

2022-08-07 Thread Robert Simmons
I have a workaround. Here's the Python for anyone who needs it. This sets the Job ID counter to 3, but you would change that 3 to whatever the ID you want. import pathlib import sqlite3 target = pathlib.Path('test.gnucash') con = sqlite3.connect(target) cur = con.cursor() cur.execute('UPDATE slo

[GNC] gncJobNextID in gncJob.c not in gncJob.h

2022-08-07 Thread Robert Simmons
I think I have tracked down the issue with Job ID incrementation. The Python bindings are built from the header files using SWIG, if I understand correctly. Looking at the file libgnucash/engine/gncJob.c I can see the function: gchar *gncJobNextID (QofBook *book) { return qof_book_increment_a

[GNC] Next Job ID

2022-08-07 Thread Robert Simmons
What is the correct function to use to increment the Job ID using Python bindings? There are a set of functions like book.CustomerNextID() which increment the other IDs, but there isn't an equivalent for Jobs. Also, when creating a job via gnucash.gnucash_business.Job the ID is not incremented aut

Re: [GNC] Build From Source Near Impossible

2022-08-06 Thread Robert Simmons
First of all, Impish is already EOL. You will need to use a flavor of 22.04 LTS for the following. The documentation for how to build GnuCash is confusing and not all in one place. The following begins with a fresh install of Lubuntu 22.04 LTS. I use Vagrant so that everything is deterministically

Re: [GNC] Next Job ID

2022-08-05 Thread Robert Simmons
Cut and paste error on my part. The line that causes the warning is the following (the vendor version of the line works without warning). job = gnucash.gnucash_business.Job(book, '1', customer, 'test') On Fri, Aug 5, 2022 at 11:59 PM Robert Simmons wrote: > Another Job

Re: [GNC] Next Job ID

2022-08-05 Thread Robert Simmons
ryImpl::add_to_query()] Invalid owner type: 0 What would be causing this, and is there a way to fix it? On Fri, Aug 5, 2022 at 9:06 PM Robert Simmons wrote: > In the Python bindings, I can see the methods that return the next > available ID for most objects. But I am having trouble find

[GNC] Next Job ID

2022-08-05 Thread Robert Simmons
In the Python bindings, I can see the methods that return the next available ID for most objects. But I am having trouble finding one for Jobs. I have read the help output from help(gnucash.gnucash_core_c). To create a new Customer, for example, I'm using the following: cust = gnucash.gnucash_busi

Re: [GNC] Linked Documents on Import

2022-07-25 Thread Robert Simmons
e from under GnuCash. > That is completely not supported and you may destroy your data. > -derek > Sent using my mobile device. Please excuse any typos. > > On July 25, 2022 7:42:04 AM Robert Simmons wrote: > > This seems to do the trick. Not sure if I'm doing something terrible he

Re: [GNC] Linked Documents on Import

2022-07-25 Thread Robert Simmons
I've run this after an import of 19 bills. The "Business Linked Documents" function in the UI is able to successfully run the "Reload and Locate Linked Documents" for all linked documents including the ones created using the kludge. Navigating to each individual bill and clicking on the document li

Re: [GNC] Linked Documents on Import

2022-07-25 Thread Robert Simmons
#x27;, 'memo_posted': '', 'accu_splits': ''}] doclinks = { '01': { 'doclink': 'Path/To/Some1.pdf' }, '02': { 'doclink': 'Path/To/Some2.pdf' } } db_path =

Re: [GNC] Linked Documents on Import

2022-07-24 Thread Robert Simmons
OMG, you're forgetting X and will blow up Y if you try this." On Sun, Jul 24, 2022 at 7:10 PM Geoff wrote: > Hi Robert > > > Is there a way to include the document URI in the import CSV? > > I don't believe so. > > > could probably reverse engineer the dat

[GNC] Linked Documents on Import

2022-07-24 Thread Robert Simmons
Please forgive me if this is the wrong place to ask this question. I searched the list and did not see this discussed, so if it was discussed, also please forgive my searching mistake. I have built a Jupyter notebook that parses incoming bills in various forms (some are PDF, some are CSV, and some