numerus/pkg
jordi fita mas 8dbf8ef2d0 Add currency_pattern to language relation
The design calls for rendering all amounts with their currency symbol,
but golang.org/x/text’s currency package always render the symbol in
front, which is wrong in Catalan and Spanish, and a lot of other
languages.

Consulting the Internet, the most popular package for that is
accounting[0], which is almost as useless because they confuse locale
with the currency’s country of origin’s “usual locale” (e.g., en-US for
USD), which is also wrong: in Catalan i need to write USD prices as
"1.234,56 $" regardless of what Americans do.

With accounting i have the recourse of initializing the struct that
holds all the “locale” information, which is also wrong because i have
to define the decimal and thousands separators, something that depends
only on the locale, next to the currency’s precision, that is
locale-independent.  But, since all CLDR data from golang.org/x/text
is inside an internal package, i can not access it and would need to
define all that information myself, which defeats the purpose of using
an external package.

Since for now i only need the format pattern for currency, i just saved
it into the database of available languages, that i do not expect to
grow too much.

[0]: https://github.com/leekchan/accounting
2023-02-23 12:12:33 +01:00
..
company.go Allow multiple taxes, and even not tax, for products 2023-02-08 13:47:36 +01:00
contacts.go Refactor checking for pgx.ErrNoRows in a function 2023-02-14 12:46:11 +01:00
db.go Properly register array and composite PostgreSQL types with pgtype 2023-02-20 11:42:21 +01:00
form.go Properly register array and composite PostgreSQL types with pgtype 2023-02-20 11:42:21 +01:00
invoices.go Add views to compute taxes and total amount of invoices 2023-02-22 14:39:38 +01:00
locale.go Add currency_pattern to language relation 2023-02-23 12:12:33 +01:00
logger.go Move source file to the root of pkg 2023-01-17 10:40:22 +01:00
login.go Replace default router with github.com/julienschmidt/httprouter 2023-02-03 12:30:56 +01:00
pgtypes.go Properly register array and composite PostgreSQL types with pgtype 2023-02-20 11:42:21 +01:00
products.go Use array_agg to get the taxes for the product’s form 2023-02-14 12:49:29 +01:00
profile.go Allow multiple taxes, and even not tax, for products 2023-02-08 13:47:36 +01:00
recover.go Gofmt recover.go 2023-01-22 20:37:34 +01:00
router.go Add the form to add products to an invoice and create invoices too 2023-02-12 21:06:48 +01:00
template.go Add currency_pattern to language relation 2023-02-23 12:12:33 +01:00