[GNC] Customizing invoices (Helmut Eller
john
jralls at ceridwen.us
Thu Mar 31 13:16:54 EDT 2022
Adrien,
Sort of. Yes, quantity is a multiplier of a commodity, but the way the commodity is measured affects what are the legitimate fractions the quantity can use. If you sell something by the kilo and have a scale that's accurate to the gram then the fraction for that commodity is 1/1000. If on the other hand you sell it by the pound and have a scale accurate to the 1/10 ounce then the fraction of the commodity is 1/160. If the commodity is labor sold by the hour with 15-minute increments then the fraction is 1/4. As it happens all of those are exactly representable with decimal fractions, but change that labor fraction to minutes (1/60) and it no longer is; same for years with month, week, or day fractions.
Now it turns out that the register used in creating invoices and bills ignores the commodity's fraction and always uses 10^9, so you're right that changing the fraction on the commodity won't help until we get that fixed. I *think* that the 2-decimals issue is a display problem and that the internal numbers aren't being rounded to two decimals, but I've been (and still am) busy with other work and haven't yet tested to find out what's really going on.
Regards,
John Ralls
> On Mar 31, 2022, at 5:57 AM, Adrien Monteleone <adrien.monteleone at lusfiber.net> wrote:
>
> John,
>
> Sorry I guess I misunderstood your suggestion wrong.
>
> What's throwing me off is that setting up a non-currency commodity isn't going to help as I see it. Quantity is not a commodity. It is the multiplier of one.
>
> A line-item on an invoice is always some multiplier of a currency.
>
> The OPs use case is trying to set the multiplier more accurately than 2 decimal places allow. (the invoice lets you do so, but the invoice report doesn't show this precision, though it retains the proper line-item total.)
>
> Regards,
> Adrien
>
> On 3/30/22 8:33 PM, john wrote:
>> Not a currency: Currency smallest fractions are set by law in the currency's issuing country, the ISO4217 committee maintains a list, and GnuCash follows that list. Non-currency commodities are more user-configurable via the Security editor, though you'll make yourself crazy if you set something different from what fraction actually trades for securities. For commodities that aren't securities or currencies it may make sense to set some other fraction, as in the example of the user selling subscriptions denominated in years who wants a fraction of 1/12.
>
> _______________________________________________
> 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
> If you are using Nabble or Gmane, please see https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
> -----
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.
More information about the gnucash-user
mailing list