counter number format not used in tax invoice (solved)
Geert Janssens
geert.gnucash at kobaltwit.be
Fri Jan 19 13:00:59 EST 2018
Op donderdag 18 januari 2018 19:37:11 CET schreef Paul de Vries:
> > (...)
> >
> > It sounds like the format you're using is either invalid, or you didn't
> > assign it correctly. What do your invoices say for the Invoice ID when
> > you create them in the dialog?
>
> in the dialog for creating a new invoice the number field is blank which
> would default to the next sequential number in the specified format.
>
> with format '%04d' in the invoice it shows as '000001'.
>
> where can i find the format specification for mac? it is a bsd unix.
>
> SOLVED:
>
> in old mails i see that 'G_INT64_FORMAT' should be used. looking in the
> sources i saw only 'G_GINT64_FORMAT'. in glib for osx there is this
> fragment:
>
> +#ifdef __LP64__
> +#define G_GINT64_MODIFIER "l"
> +#define G_GINT64_FORMAT "li"
> +#define G_GUINT64_FORMAT "lu"
> +#else
> +#define G_GINT64_MODIFIER "ll"
> +#define G_GINT64_FORMAT "lli"
> +#define G_GUINT64_FORMAT "llu"
> +#endif
>
> and surprise surprise 'F2018-%04li' shows as 'F2018-0001'.
>
> i wonder why 'li' works and 'ld' doesn't.
>
> thanks for your help!
> -paul.
li works because it represents an integral number.
ld does not work because it represents a decimal number. Telling gnucash to
expect a decimal number here wouldn't make sense, so number formats with such
a format specifier are rejected. I wish gnucash would give a better hint as to
whether the format passed in by the user is accepable or not. We're sometimes
rather poor at guiding feedback :(
Geert
More information about the gnucash-user
mailing list