GNOME Bugzilla – Bug 343727
gncCustomer does not have a QOF param for currency
Last modified: 2018-06-29 21:06:49 UTC
Since I suspect that gncCustomer cannot take any other commodity but currency, the QOF param could be of type QOF_STRING.
Created attachment 66677 [details] [review] Added currency param of type QOF_STRING
Hi. I'm not convinced that the currency should return a string, instead of, say, a Currency object. Why do you think it should be a string and not a currency object?
The qofCustomerGetCurrency() and qofCustomerSetCurrency() are used from qof only. There are other functions (something like gncCustomerGetCurrency) that return the gncCommodity object. Also AFAIR the gncCommodity object has serious issues with qof.
How about a compromise. Let's rename it from CUSTOMER_CURRENCY to _CURRENCYSTR or _CURRENCY_STRING or _CURRENCYY_NAME -- something that really tells a programmer that it's the name of the currency, a string, and not the gnc_commodity object. Would that be acceptable to you?
Sure, it seems that CUSTOMER_CURRENCY_STRING will most fully communicate that it is a string :-)
what is the status here?
none. nothing has been applied. I think that I was waiting for a new patch.
If I understand correctly Derek says he is waiting for a patch where the identifier CUSTOMER_CURRENCY is renamed into CUSTOMER_CURRENCY_STRING. Is that everything? Then I could apply this as well.
Christian: Correct.
Why do you need the currency as a string? I agree that the qof interface to gncCustomer does not return the currency, but I think the best solution is for gncCustomer to return a currency, and you can then get the name from the currency.
Closing this bug report as no further information has been provided. Please feel free to reopen this bug if you can provide the information asked for. Thanks!
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=343727. Please update any external references or bookmarks.