[GNC] previous issue with gnucash-cli on macOS
gnucash at kcburns.com
gnucash at kcburns.com
Tue Dec 31 16:02:04 EST 2024
Sherlock, I don't care whether I user a URI with a scheme, I just want
something that works.
Ken
kcburns at Mac001 ~ % /Applications/GnuCash.app/Contents/MacOS/gnucash-cli
-Q get
file:///Users/kcburns/GnuCash/KCBurns.gnucash
Application Path /Applications/GnuCash.app/Contents/MacOS/gnucash-cli
Missing data file parameter
gnucash-cli [options] [datafile] - GnuCash, accounting for personal and
small business finance:
Common Options:
-h [ --help ] Show this help message
-v [ --version ] Show GnuCash version
--debug Enable debugging mode: provide deep detail in the
logs.
This is equivalent to: --log "=info" --log
"qof=info"
--log "gnc=info"
--extra Enable extra/development/debugging features.
--log arg Log level overrides, of the form
"modulename={debug,info,warn,crit,error}"
Examples: "--log qof=debug" or "--log
gnc.backend.file.sx=info"
This can be invoked multiple times.
--paths Show paths
--logto arg File to log into; defaults to
"/tmp/gnucash.trace";
can be "stderr" or "stdout".
Price Quotes Retrieval Options:
-Q [ --quotes ] arg Execute price quote related commands. The
following
commands are supported.
info: Show Finance::Quote version and
exposed quote
sources.
get: Fetch current quotes for all foreign
currencies and stocks in the given
GnuCash
datafile.
dump: Fetch current quotes for specified
currencies
or stocks from a specified namespace
and print
the results to the console.
This must be followed with a source
and one or
more symbols, unless the source is
"currency"
in which case it must be followed with
two or
more symbols, the first of which is the
currency in which exchange rates for
the rest
will be quoted.
--namespace arg Regular expression determining which namespace
commodities will be retrieved for when using
the get
command
-V [ --verbose ] When using the dump command list all of the
parameters
Finance::Quote returns for the symbol instead
of the
ones that Gnucash requires.
Report Generation Options:
-R [ --report ] arg Execute report related commands. The following
commands are supported.
list: Lists available reports.
show: Describe the options modified in the
named
report. A datafile may be specified to
describe some saved options.
run: Run the named report in the given GnuCash
datafile.
--name arg Name of the report to run
--export-type arg Specify export type
--output-file arg Output file for report
zsh: no such file or directory:
file:///Users/kcburns/GnuCash/KCBurns.gnucash
kcburns at Mac001 ~ %
>
> Ken,
>
> If you insist on using a URI with a scheme, try:
>
> /Applications/GnuCash.app/Contents/MacOS/gnucash-cli -Q get
> file:///Users/kcburns/GnuCash/KCBurns.gnucash
>
> Note: Three slashes after file:
>
> Regards,
>
> Sherlock
>
>
> On 12/30/24 7:07 PM, Sherlock wrote:
>> Ken,
>>
>> Try:
>>
>> /Applications/GnuCash.app/Contents/MacOS/gnucash-cli -Q get /Users/
>> kcburns/GnuCash/KCBurns.gnucash
>>
>> Regards,
>>
>> Sherlock
>>
>>
>> On 12/30/24 6:14 PM, gnucash at kcburns.com wrote:
>>> I am using zsh and default XML storage.
>>>
>>> Last login: Mon Dec 30 20:33:37 on ttys001
>>> kcburns at Mac001 ~ % ls /Users/kcburns/GnuCash/KCBurns.gnucash
>>> /Users/kcburns/GnuCash/KCBurns.gnucash
>>>
>>> kcburns at Mac001 ~ %
>>> kcburns at Mac001 ~ % /Applications/GnuCash.app/Contents/macOS/gnucash-
>>> cli -Q get file:/Users/kcburns/GnuCash/KCBurns.gnucash
>>> Application Path /Applications/GnuCash.app/Contents/macOS/gnucash-cli
>>> * 20:42:44? WARN <gnc.engine> failed to load gncmod-backend-dbi from
>>> relative path
>>> * 20:42:44 ERROR <gnc.engine> required library gncmod-backend-dbi not
>>> found.
>>> * 20:42:44? WARN <gnc.engine> failed to load gncmod-backend-xml from
>>> relative path
>>> * 20:42:44 ERROR <gnc.engine> required library gncmod-backend-xml not
>>> found.
>>> * 20:42:44 ERROR <GLib-GIO> g_settings_schema_source_lookup: assertion
>>> 'source != NULL' failed
>>> * 20:42:44 ERROR <GLib-GIO> g_settings_new_full: assertion 'schema !=
>>> NULL' failed
>>> * 20:42:44? WARN <gnc.app-utils.gsettings>
>>> [gnc_gsettings_get_settings_obj()] Ignoring attempt to access unknown
>>> gsettings schema org.gnucash.GnuCash.general
>>> zsh: segmentation fault /Applications/GnuCash.app/Contents/macOS/
>>> gnucash-cli -Q get
>>>
>>> kcburns at Mac001 ~ %
>>> kcburns at Mac001 ~ % /Applications/GnuCash.app/Contents/MacOS/gnucash-
>>> cli -Q get file:/Users/kcburns/GnuCash/KCBurns.gnucash
>>> Application Path /Applications/GnuCash.app/Contents/MacOS/gnucash-cli
>>> * 20:43:22? WARN <gnc.backend.dbi>
>>> [GncDbiBackend<DbType::DBI_SQLITE>::session_begin()] Sqlite3 file
>>> file:/ Users/kcburns/GnuCash/KCBurns.gnucash not found
>>> * 20:43:22 ERROR <gnc.gui> [cleanup_and_exit_with_failure()] Session
>>> Error: Sqlite3 file file:/Users/kcburns/GnuCash/KCBurns.gnucash not found
>>>
>>> kcburns at Mac001 ~ %
>>> kcburns at Mac001 ~ % /Applications/GnuCash.app/Contents/MacOS/gnucash-
>>> cli -Q get file://Users/kcburns/GnuCash/KCBurns.gnucash
>>> Application Path /Applications/GnuCash.app/Contents/MacOS/gnucash-cli
>>> * 20:44:08? WARN <gnc.core-utils> create new file /Users/kcburns/
>>> Library/Application Support/GnuCash/data/
>>> Users_kcburns_GnuCash_KCBurns.gnucash
>>> * 20:44:08? WARN <gnc.core-utils> create new file /Users/kcburns/
>>> Library/Application Support/GnuCash/data/
>>> Users_kcburns_GnuCash_KCBurns.gnucash
>>> * 20:44:08? WARN <gnc.backend.dbi>
>>> [GncDbiBackend<DbType::DBI_SQLITE>::session_begin()] Sqlite3 file /
>>> Users/kcburns/Library/Application Support/GnuCash/data/
>>> Users_kcburns_GnuCash_KCBurns.gnucash not found
>>> * 20:44:08 ERROR <gnc.gui> [cleanup_and_exit_with_failure()] Session
>>> Error: Sqlite3 file /Users/kcburns/Library/Application Support/
>>> GnuCash/ data/Users_kcburns_GnuCash_KCBurns.gnucash not found
>>> kcburns at Mac001 ~ %
>>>
>>>
>>> I am not clear whether the second / ahead of the path to my data file
>>> should be there.
>>>
>>>
>>> Thanks,
>>>
>>> Ken
>
>
> ------------------------------
>
> Message: 7
> Date: Tue, 31 Dec 2024 10:52:24 +0100
> From: Axel Essbaum <axel at essbaum.com>
> To: gnucash-user at gnucash.org
> Cc: Ted Rubin <tedboscorubin at icloud.com>
> Subject: Re: [GNC] [SPAM] Re: Font size change
> Message-ID: <8B2F5AC3-6C0A-41D6-BA5F-D6A032C61328 at essbaum.com>
> Content-Type: text/plain; charset=utf-8
>
>
> I just went through this. Be aware that the path in the link John sent points to the wrong place.
>
> You need to create the following file:
>
> ~/Library/Application Support/GnuCash/gtk-3.0.css
>
> Which should contain something(s) like this:
>
> * {font: 13px Lucida Grande, sans-serif;}
>
> The online documentation wrongly directs you to create ~/Library/Application Support/GnuCash/config/gtk-3.0/gtk-3.0.css.
>
> Good luck,
>
> - Axel
>
> ?
> Axel Essbaum
> axel at essbaum.com <mailto:axel at essbaum.com>
>
>
>> On 31 Dec 2024, at 04:34, John Ralls <jralls at ceridwen.us> wrote:
>>
>> Maybe. The stylesheets only work on reports and you sort of implied that you?re trying to change the font size in the UI.
>>
>> For a discussion about how t change the fonts in the UI see https://wiki.gnucash.org/wiki/Gtk3.
>>
>> Regards,
>> John Ralls
>>
>>
>>> On Dec 30, 2024, at 18:02, Ted Rubin via gnucash-user <gnucash-user at gnucash.org> wrote:
>>>
>>> Greetings
>>>
>>> I?m having an issue with GNU Cash on my Apple Silicon machine. GNU Cash version:
>>>
>>> Version: 5.10
>>> Build ID: 5.10+(2024-12-14)
>>>
>>> The main issue is I can?t get the font size to actually reflect in the program.
>>>
>>> Example
>>>
>>> I go to Edit> Style Sheets > default
>>>
>>> <Screenshot 2024-12-30 at 7.56.23?PM.png>
>>>
>>> However, when I restart GNUcash, no changes take effect. Am I missing something, or is there a specific CSS file I need to edit?
>>>
>>> Thanks
>>>
>>> Ted_______________________________________________
>>> gnucash-user mailing list
>>> gnucash-user at 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 this by using Reply-To-List or Reply-All.
>> _______________________________________________
>> gnucash-user mailing list
>> gnucash-user at 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 this by using Reply-To-List or Reply-All.
>
>
> ------------------------------
>
> Message: 8
> Date: Tue, 31 Dec 2024 11:17:49 +0100
> From: Geert Janssens <geert.gnucash at kobaltwit.be>
> To: gnucash-user at gnucash.org
> Cc: Jim DeLaHunt <list+gnucash at jdlh.com>
> Subject: Re: [GNC] Why did "Assign as payment?" remove splits and
> notes from my payment transaction?
> Message-ID: <9757139.V6nBDHxoPA at legolas.kobaltwit.lan>
> Content-Type: text/plain; charset="utf-8"
>
> Op maandag 30 december 2024 22:45:09 Midden-Europese standaardtijd schreef Jim
> DeLaHunt:
>>> When you assign payment to the invoice, the existing transaction will
>>> be overwritten with an entry in the account payable, and the split
>>> will apply automatically in the AP.
>> This certainly matches what I observe in my GnuCash book, but it
>> certainly is not what I want to happen. Can you point me to further
>> documentation about what GnuCash intends to do when I assign a
>> transaction as payment? Or, can you point me to which parts of the code
>> I should read?
>>
> The payment management logic in the business features is limited in what it can do.
> Basically it can only handle pre-existing transactions with a single split outside of the AR or
> AP accounts.
>
> If there are more it will choose one (using some very simple heuristics) and discard the
> others. It will also discard the pre-existing AR or AP splits and replace them with whatever
> you select in the payment dialog (though it will use the AR or AP splits to pre-select
> documents and pre-payments in the payment window if it can).
>
> The use case this was written for is the most simple case of importing payment data from
> your bank account and later linking this with one or more invoices.
>
> The use case of payment charges was never considered unfortunately.
>
> It's been a while so I have to think really hard why I chose to discard all splits except that
> one - or more precisely why I chose not to change that behavior when I was working on
> the business code.
>
> I believe the reason is the payment window has no way to visualize multiple non AR/AP
> splits so it can not reliably display such a pre-existing transaction.
>
> What it can represent is any AR/AP split that links to an invoice or pre-/overpayment from
> the selected customer and one transfer split (the "bank" account split). Every aspect of it
> can also be modified: which invoices are being (partially or over-)paid, what is the total
> amount of the payment, and what is the transfer account.
>
> Having more than one transfer split would result in a incomplete and possibly misleading
> representation of the transaction in the current payment window and would lead to
> ambiguity when making changes.
>
> For example the value in the Payment field, should that represent the invoice amount
> being paid (meaning the sum of the money you actually received and the service charge)
> or just the amount of money you received ? What if you need to change that value for
> some reason, would that change reflect only a change in money received or also an
> increase in service charge ? So would that affect the amount of invoice being paid for or
> not ? As the service charge is not visible in the dialog, you can't disambiguate that. To
> avoid this ambiguity I chose to only work with a single non-AR/AP split. In hindsight it
> would have been much nicer to warn the user about this. I know the code does in some
> scenarios, but this one was seemingly skipped.
>
> To really support your use case, the gui should be extended to be able to show all non-AR/
> AP splits. I did consider that, but it was more work than I could do at the time.
>
>> This also does not match what I took from the documentation. The GnuCash
>>
>> manual, section 7.6. "Process Invoice Payment", says:
>>> There is an alternative way of assigning a payment to (one or more)
>>> invoices where the payment transaction already exists?. This can best
>>> be done starting from the asset account register holding the imported
>>> payment transaction (like your bank account). In that account, select
>>> the payment, right-click ([two-finger]-click for |macOS|) and choose
>>> *Assign as payment...*. The payment window will pop-up, partly filled
>>> in with the information from the transaction. Fill in the missing
>>> information like the proper customer and invoice to complete the payment.
>> This does not mention that the payment transaction will get rewritten,
>> and splits will get discarded.
>>
> True, though it doesn't mention all data from the existing transaction will be kept either :(
> I agree this could do with a better warning.
>
>> It occurs to me that one workaround is that I enter the payment
>> transaction as if there were no service charges. Then I assign the
>> transaction as payment for the invoice, letting GnuCash rewrite it. Then
>> I modify the transaction to add the service charge and reduce the amount
>> deposited in my bank account.
>>
> That is probably the easiest way to work around this. A slight variation is to enter the
> payment transaction with only the amount you really received, then assign the transaction
> as partial payment (the exact same process as in your suggestion, only with a lower
> payment amount) and then afterwards add the service charge and increase the AR split
> amount to match your invoice total.
>
>> Also, you advise:
>>> You should create your three-split transactions in your invoice?
>> I am a bit surprised by this. Do you mean that I should I should list
>> the service charge from my payment processor as a credit in the invoice,
>> where the customer will see it? It seems to me that my customer won't
>> care, and does not need to know, details about the terms and feed of my
>> payment processor.
>>
> I agree that's not what you would want.
>
>> Implicit answers to my questions:
>>> Q1. Is this the expected behaviour?
>> Apparently "yes".
> Yes. I explained above why that is so - a technical limitation as a result of design choices
> from the past.
>
>>> Q2. What does the "Assign as payment" of a payment transaction to an
>>> invoice actually do? The GnuCash manual, section 7.6. "Process
>>> Invoice Payment", says what steps to take to perform an assignment,
> ------------------------------
>
> Message: 9
> Date: Tue, 31 Dec 2024 16:48:34 +0100
> From: Geert Janssens <geert.gnucash at kobaltwit.be>
> To: gnucash-user at gnucash.org
> Cc: Jim DeLaHunt <list+gnucash at jdlh.com>
> Subject: Re: [GNC] Why did "Assign as payment?" remove splits and
> notes from my payment transaction?
> Message-ID: <2423704.sy0gbHreEd at legolas.kobaltwit.lan>
> Content-Type: text/plain; charset="utf-8"
>
> Op dinsdag 31 december 2024 11:17:49 Midden-Europese standaardtijd schreef Geert
> Janssens:
>> The other option I would have suggested is to work with two payment
>> transactions rather than one transaction with multiple splits. One payment
>> transaction representing the money you actually received and one payment
>> transaction representing the service charge. Unfortunately you can't create
>> a payment transaction that transfers to an expense account (for no other
>> reason than the expense accounts are not shown in the list of transfer
>> accounts in the payment window). So even in this case you would have to do
>> some post-processing. I'll describe the steps anyway in case you prefer
>> this way of working:
>>
>>
>> 1. as in the other scenario, import the Paypal transactions as simple
>> two-split transactions, only representing the money you effectively
>> receive.
>>
>>
>> 2. again use Assign as payment to assign this transaction without
>> modification to the invoice as partial payment.
>>
>>
>> 3. Next, create a new payment for this invoice using Process Payment for the
>> amount of the service charge. Now it would have been nice to be able to
>> select an expense account directly but that's not possible via the payment
>> window. So instead choose an arbitrary account you can select and complete
>> this payment.
>>
>>
>> 4. Open this new payment in a register and change the arbitrary account into
>> the proper expense account.
>>
>>
>> That as well should mark your invoice as fully paid.
> I have pushed a change to gnucash this afternoon that will let you select an expense
> account as transfer account. So the second scenario should become easier to apply
> starting with gnucash 5.11
>
> Regards,
>
> Geert
>
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
>
> gnucash-user mailing list
> gnucash-user at 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 this by using Reply-To-List or Reply-All.
>
>
> ------------------------------
>
> End of gnucash-user Digest, Vol 261, Issue 57
> *********************************************
More information about the gnucash-user
mailing list