Open-source manufacturing ERP, MES and QMS. Quoting, MRP, inventory, shop floor, quality and lot/serial traceability on one Postgres schema, with a REST API and MCP server. Self-host or use Carbon Cloud.
TypeScript ai-agentsbill-of-materialserpinventory-managementleanmanufacturingmanufacturing-execution-systemmcp-servermesmrpopen-source-erppostgresqlproduction-planningqmsquality-management-systemreact-routerself-hostedsupabasetraceabilitytypescript
feat: custom fields for currency form
Brad Barbind689c0ddbf23
diff --git a/apps/carbon/app/modules/accounting/accounting.service.ts b/apps/carbon/app/modules/accounting/accounting.service.tsindex 170a5a331c..442d0f0eb2 100644--- a/apps/carbon/app/modules/accounting/accounting.service.ts+++ b/apps/carbon/app/modules/accounting/accounting.service.ts@@ -756,10 +756,12 @@ export async function upsertCurrency(currency:| (Omit<z.infer<typeof currencyValidator>, "id"> & {createdBy: string;+ customFields?: Json;})| (Omit<z.infer<typeof currencyValidator>, "id"> & {id: string;updatedBy: string;+ customFields?: Json;})) {if (currency.isBaseCurrency) {diff --git a/apps/carbon/app/routes/x+/accounting+/currencies.$currencyId.tsx b/apps/carbon/app/routes/x+/accounting+/currencies.$currencyId.tsxindex 196be853ab..ccf93c45bf 100644--- a/apps/carbon/app/routes/x+/accounting+/currencies.$currencyId.tsx+++ b/apps/carbon/app/routes/x+/accounting+/currencies.$currencyId.tsx@@ -11,6 +11,7 @@ import {} from "~/modules/accounting";import { requirePermissions } from "~/services/auth";import { flash } from "~/services/session.server";+import { getCustomFields, setCustomFields } from "~/utils/form";import { assertIsPost, notFound } from "~/utils/http";import { path } from "~/utils/path";import { error, success } from "~/utils/result";@@ -37,9 +38,8 @@ export async function action({ request }: ActionFunctionArgs) {update: "accounting",});- const validation = await validator(currencyValidator).validate(- await request.formData()- );+ const formData = await request.formData();+ const validation = await validator(currencyValidator).validate(formData);if (validation.error) {return validationError(validation.error);@@ -51,6 +51,7 @@ export async function action({ request }: ActionFunctionArgs) {const updateCurrency = await upsertCurrency(client, {id,...data,+ customFields: setCustomFields(formData),updatedBy: userId,});@@ -81,6 +82,7 @@ export default function EditCurrencysRoute() {exchangeRate: currency?.exchangeRate ?? 1,decimalPlaces: currency?.decimalPlaces ?? 2,isBaseCurrency: currency?.isBaseCurrency ?? false,+ ...getCustomFields(currency?.customFields),};return <CurrencyForm key={initialValues.id} initialValues={initialValues} />;diff --git a/apps/carbon/app/routes/x+/accounting+/currencies.new.tsx b/apps/carbon/app/routes/x+/accounting+/currencies.new.tsxindex fadcb0dfa5..a18475ab48 100644--- a/apps/carbon/app/routes/x+/accounting+/currencies.new.tsx+++ b/apps/carbon/app/routes/x+/accounting+/currencies.new.tsx@@ -8,6 +8,7 @@ import {} from "~/modules/accounting";import { requirePermissions } from "~/services/auth";import { flash } from "~/services/session.server";+import { setCustomFields } from "~/utils/form";import { assertIsPost } from "~/utils/http";import { path } from "~/utils/path";import { error, success } from "~/utils/result";@@ -26,9 +27,8 @@ export async function action({ request }: ActionFunctionArgs) {create: "accounting",});- const validation = await validator(currencyValidator).validate(- await request.formData()- );+ const formData = await request.formData();+ const validation = await validator(currencyValidator).validate(formData);if (validation.error) {return validationError(validation.error);@@ -38,6 +38,7 @@ export async function action({ request }: ActionFunctionArgs) {const insertCurrency = await upsertCurrency(client, {...data,+ customFields: setCustomFields(formData),createdBy: userId,});if (insertCurrency.error) {diff --git a/packages/database/src/types.ts b/packages/database/src/types.tsindex 4f8ee6d300..aabbc37812 100644--- a/packages/database/src/types.ts+++ b/packages/database/src/types.ts@@ -1743,6 +1743,8 @@ export type Database = {Row: {active: booleancode: string+ createdAt: string+ createdBy: stringcustomFields: Json | nulldecimalPlaces: numberexchangeRate: number@@ -1756,6 +1758,8 @@ export type Database = {Insert: {active?: booleancode: string+ createdAt?: string+ createdBy: stringcustomFields?: Json | nulldecimalPlaces?: numberexchangeRate?: number@@ -1769,6 +1773,8 @@ export type Database = {Update: {active?: booleancode?: string+ createdAt?: string+ createdBy?: stringcustomFields?: Json | nulldecimalPlaces?: numberexchangeRate?: numberdiff --git a/packages/database/supabase/functions/lib/types.ts b/packages/database/supabase/functions/lib/types.tsindex 4f8ee6d300..aabbc37812 100644--- a/packages/database/supabase/functions/lib/types.ts+++ b/packages/database/supabase/functions/lib/types.ts@@ -1743,6 +1743,8 @@ export type Database = {Row: {active: booleancode: string+ createdAt: string+ createdBy: stringcustomFields: Json | nulldecimalPlaces: numberexchangeRate: number@@ -1756,6 +1758,8 @@ export type Database = {Insert: {active?: booleancode: string+ createdAt?: string+ createdBy: stringcustomFields?: Json | nulldecimalPlaces?: numberexchangeRate?: number@@ -1769,6 +1773,8 @@ export type Database = {Update: {active?: booleancode?: string+ createdAt?: string+ createdBy?: stringcustomFields?: Json | nulldecimalPlaces?: numberexchangeRate?: numberdiff --git a/packages/database/supabase/migrations/20230330024715_accounts.sql b/packages/database/supabase/migrations/20230330024715_accounts.sqlindex ea3001b5b1..0b72c0b180 100644--- a/packages/database/supabase/migrations/20230330024715_accounts.sql+++ b/packages/database/supabase/migrations/20230330024715_accounts.sql@@ -7,6 +7,8 @@ CREATE TABLE "currency" ("decimalPlaces" INTEGER NOT NULL DEFAULT 2,"isBaseCurrency" BOOLEAN NOT NULL DEFAULT false,"active" BOOLEAN NOT NULL DEFAULT true,+ "createdBy" TEXT NOT NULL,+ "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW(),"updatedBy" TEXT,"updatedAt" TIMESTAMP WITH TIME ZONE,diff --git a/packages/database/supabase/seed.sql b/packages/database/supabase/seed.sqlindex 0450f32454..c6ced2addf 100644--- a/packages/database/supabase/seed.sql+++ b/packages/database/supabase/seed.sql@@ -15,125 +15,125 @@ INSERT INTO "theme" (-- currencies-INSERT INTO "currency" ("name", "code", "symbol", "exchangeRate", "decimalPlaces", "isBaseCurrency")-VALUES ('US Dollar', 'USD', '$', 1, 2, TRUE),- ('Canadian Dollar', 'CAD', 'CA$', 1, 2, FALSE),- ('Euro', 'EUR', '€', 1, 2, FALSE),- ('United Arab Emirates Dirham', 'AED', 'AED', 1, 2, FALSE),- ('Afghan Afghani', 'AFN', 'Af', 1, 0, FALSE),- ('Albanian Lek', 'ALL', 'ALL', 1, 0, FALSE),- ('Armenian Dram', 'AMD', 'AMD', 1, 0, FALSE),- ('Argentine Peso', 'ARS', 'AR$', 1, 2, FALSE),- ('Australian Dollar', 'AUD', 'AU$', 1, 2, FALSE),- ('Azerbaijani Manat', 'AZN', 'man.', 1, 2, FALSE),- ('Bosnia-Herzegovina Convertible Mark', 'BAM', 'KM', 1, 2, FALSE),- ('Bangladeshi Taka', 'BDT', 'Tk', 1, 2, FALSE),- ('Bulgarian Lev', 'BGN', 'BGN', 1, 2, FALSE),- ('Bahraini Dinar', 'BHD', 'BD', 1, 3, FALSE),- ('Burundian Franc', 'BIF', 'FBu', 1, 0, FALSE),- ('Brunei Dollar', 'BND', 'BN$', 1, 2, FALSE),- ('Bolivian Boliviano', 'BOB', 'Bs', 1, 2, FALSE),- ('Brazilian Real', 'BRL', 'R$', 1, 2, FALSE),- ('Botswanan Pula', 'BWP', 'BWP', 1, 2, FALSE),- ('Belarusian Ruble', 'BYN', 'Br', 1, 2, FALSE),- ('Belize Dollar', 'BZD', 'BZ$', 1, 2, FALSE),- ('Congolese Franc', 'CDF', 'CDF', 1, 2, FALSE),- ('Swiss Franc', 'CHF', 'CHF', 1, 2, FALSE),- ('Chilean Peso', 'CLP', 'CL$', 1, 0, FALSE),- ('Chinese Yuan', 'CNY', 'CN¥', 1, 2, FALSE),- ('Colombian Peso', 'COP', 'CO$', 1, 0, FALSE),- ('Costa Rican Colón', 'CRC', '₡', 1, 0, FALSE),- ('Cape Verdean Escudo', 'CVE', 'CV$', 1, 2, FALSE),- ('Czech Republic Koruna', 'CZK', 'Kč', 1, 2, FALSE),- ('Djiboutian Franc', 'DJF', 'Fdj', 1, 0, FALSE),- ('Danish Krone', 'DKK', 'Dkr', 1, 2, FALSE),- ('Dominican Peso', 'DOP', 'RD$', 1, 2, FALSE),- ('Algerian Dinar', 'DZD', 'DA', 1, 2, FALSE),- ('Egyptian Pound', 'EGP', 'EGP', 1, 2, FALSE),- ('Eritrean Nakfa', 'ERN', 'Nfk', 1, 2, FALSE),- ('Ethiopian Birr', 'ETB', 'Br', 1, 2, FALSE),- ('British Pound Sterling', 'GBP', '£', 1, 2, FALSE),- ('Georgian Lari', 'GEL', 'GEL', 1, 2, FALSE),- ('Ghanaian Cedi', 'GHS', 'GH₵', 1, 2, FALSE),- ('Guinean Franc', 'GNF', 'FG', 1, 0, FALSE),- ('Guatemalan Quetzal', 'GTQ', 'GTQ', 1, 2, FALSE),- ('Hong Kong Dollar', 'HKD', 'HK$', 1, 2, FALSE),- ('Honduran Lempira', 'HNL', 'HNL', 1, 2, FALSE),- ('Croatian Kuna', 'HRK', 'kn', 1, 2, FALSE),- ('Hungarian Forint', 'HUF', 'Ft', 1, 0, FALSE),- ('Indonesian Rupiah', 'IDR', 'Rp', 1, 0, FALSE),- ('Israeli New Sheqel', 'ILS', '₪', 1, 2, FALSE),- ('Indian Rupee', 'INR', 'Rs', 1, 2, FALSE),- ('Iraqi Dinar', 'IQD', 'IQD', 1, 0, FALSE),- ('Iranian Rial', 'IRR', 'IRR', 1, 0, FALSE),- ('Icelandic Króna', 'ISK', 'Ikr', 1, 0, FALSE),- ('Jamaican Dollar', 'JMD', 'J$', 1, 2, FALSE),- ('Jordanian Dinar', 'JOD', 'JD', 1, 3, FALSE),- ('Japanese Yen', 'JPY', '¥', 1, 0, FALSE),- ('Kenyan Shilling', 'KES', 'Ksh', 1, 2, FALSE),- ('Cambodian Riel', 'KHR', 'KHR', 1, 2, FALSE),- ('Comorian Franc', 'KMF', 'CF', 1, 0, FALSE),- ('South Korean Won', 'KRW', '₩', 1, 0, FALSE),- ('Kuwaiti Dinar', 'KWD', 'KD', 1, 3, FALSE),- ('Kazakhstani Tenge', 'KZT', 'KZT', 1, 2, FALSE),- ('Lebanese Pound', 'LBP', 'L.L.', 1, 0, FALSE),- ('Sri Lankan Rupee', 'LKR', 'SLRs', 1, 2, FALSE),- ('Lithuanian Litas', 'LTL', 'Lt', 1, 2, FALSE),- ('Latvian Lats', 'LVL', 'Ls', 1, 2, FALSE),- ('Libyan Dinar', 'LYD', 'LD', 1, 3, FALSE),- ('Moroccan Dirham', 'MAD', 'MAD', 1, 2, FALSE),- ('Moldovan Leu', 'MDL', 'MDL', 1, 2, FALSE),- ('Malagasy Ariary', 'MGA', 'MGA', 1, 0, FALSE),- ('Macedonian Denar', 'MKD', 'MKD', 1, 2, FALSE),- ('Myanma Kyat', 'MMK', 'MMK', 1, 0, FALSE),- ('Macanese Pataca', 'MOP', 'MOP$', 1, 2, FALSE),- ('Mauritian Rupee', 'MUR', 'MURs', 1, 0, FALSE),- ('Mexican Peso', 'MXN', 'MX$', 1, 2, FALSE),- ('Malaysian Ringgit', 'MYR', 'RM', 1, 2, FALSE),- ('Mozambican Metical', 'MZN', 'MTn', 1, 2, FALSE),- ('Namibian Dollar', 'NAD', 'N$', 1, 2, FALSE),- ('Nigerian Naira', 'NGN', '₦', 1, 2, FALSE),- ('Nicaraguan Córdoba', 'NIO', 'C$', 1, 2, FALSE),- ('Norwegian Krone', 'NOK', 'Nkr', 1, 2, FALSE),- ('Nepalese Rupee', 'NPR', 'NPRs', 1, 2, FALSE),- ('New Zealand Dollar', 'NZD', 'NZ$', 1, 2, FALSE),- ('Omani Rial', 'OMR', 'OMR', 1, 3, FALSE),- ('Panamanian Balboa', 'PAB', 'B/.', 1, 2, FALSE),- ('Peruvian Nuevo Sol', 'PEN', 'S/.', 1, 2, FALSE),- ('Philippine Peso', 'PHP', '₱', 1, 2, FALSE),- ('Pakistani Rupee', 'PKR', 'PKRs', 1, 0, FALSE),- ('Polish Zloty', 'PLN', 'zł', 1, 2, FALSE),- ('Paraguayan Guarani', 'PYG', '₲', 1, 0, FALSE),- ('Qatari Rial', 'QAR', 'QR', 1, 2, FALSE),- ('Romanian Leu', 'RON', 'RON', 1, 2, FALSE),- ('Serbian Dinar', 'RSD', 'din.', 1, 0, FALSE),- ('Russian Ruble', 'RUB', 'RUB', 1, 2, FALSE),- ('Rwandan Franc', 'RWF', 'RWF', 1, 0, FALSE),- ('Saudi Riyal', 'SAR', 'SR', 1, 2, FALSE),- ('Sudanese Pound', 'SDG', 'SDG', 1, 2, FALSE),- ('Swedish Krona', 'SEK', 'Skr', 1, 2, FALSE),- ('Singapore Dollar', 'SGD', 'S$', 1, 2, FALSE),- ('Somali Shilling', 'SOS', 'Ssh', 1, 0, FALSE),- ('Syrian Pound', 'SYP', 'SY£', 1, 0, FALSE),- ('Thai Baht', 'THB', '฿', 1, 2, FALSE),- ('Tunisian Dinar', 'TND', 'DT', 1, 3, FALSE),- ('Tongan Paʻanga', 'TOP', 'T$', 1, 2, FALSE),- ('Turkish Lira', 'TRY', 'TL', 1, 2, FALSE),- ('Trinidad and Tobago Dollar', 'TTD', 'TT$', 1, 2, FALSE),- ('New Taiwan Dollar', 'TWD', 'NT$', 1, 2, FALSE),- ('Tanzanian Shilling', 'TZS', 'TSh', 1, 0, FALSE),- ('Ukrainian Hryvnia', 'UAH', '₴', 1, 2, FALSE),- ('Ugandan Shilling', 'UGX', 'USh', 1, 0, FALSE),- ('Uruguayan Peso', 'UYU', '$U', 1, 2, FALSE),- ('Uzbekistan Som', 'UZS', 'UZS', 1, 0, FALSE),- ('Venezuelan Bolívar', 'VEF', 'Bs.F.', 1, 2, FALSE),- ('Vietnamese Dong', 'VND', '₫', 1, 0, FALSE),- ('CFA Franc BEAC', 'XAF', 'FCFA', 1, 0, FALSE),- ('CFA Franc BCEAO', 'XOF', 'CFA', 1, 0, FALSE),- ('Yemeni Rial', 'YER', 'YR', 1, 0, FALSE),- ('South African Rand', 'ZAR', 'R', 1, 2, FALSE),- ('Zambian Kwacha', 'ZMK', 'ZK', 1, 0, FALSE),- ('Zimbabwean Dollar', 'ZWL', 'ZWL$', 1, 0, FALSE);+INSERT INTO "currency" ("name", "code", "symbol", "exchangeRate", "decimalPlaces", "isBaseCurrency", "createdBy")+VALUES ('US Dollar', 'USD', '$', 1, 2, TRUE, 'system'),+ ('Canadian Dollar', 'CAD', 'CA$', 1, 2, FALSE, 'system'),+ ('Euro', 'EUR', '€', 1, 2, FALSE, 'system'),+ ('United Arab Emirates Dirham', 'AED', 'AED', 1, 2, FALSE, 'system'),+ ('Afghan Afghani', 'AFN', 'Af', 1, 0, FALSE, 'system'),+ ('Albanian Lek', 'ALL', 'ALL', 1, 0, FALSE, 'system'),+ ('Armenian Dram', 'AMD', 'AMD', 1, 0, FALSE, 'system'),+ ('Argentine Peso', 'ARS', 'AR$', 1, 2, FALSE, 'system'),+ ('Australian Dollar', 'AUD', 'AU$', 1, 2, FALSE, 'system'),+ ('Azerbaijani Manat', 'AZN', 'man.', 1, 2, FALSE, 'system'),+ ('Bosnia-Herzegovina Convertible Mark', 'BAM', 'KM', 1, 2, FALSE, 'system'),+ ('Bangladeshi Taka', 'BDT', 'Tk', 1, 2, FALSE, 'system'),+ ('Bulgarian Lev', 'BGN', 'BGN', 1, 2, FALSE, 'system'),+ ('Bahraini Dinar', 'BHD', 'BD', 1, 3, FALSE, 'system'),+ ('Burundian Franc', 'BIF', 'FBu', 1, 0, FALSE, 'system'),+ ('Brunei Dollar', 'BND', 'BN$', 1, 2, FALSE, 'system'),+ ('Bolivian Boliviano', 'BOB', 'Bs', 1, 2, FALSE, 'system'),+ ('Brazilian Real', 'BRL', 'R$', 1, 2, FALSE, 'system'),+ ('Botswanan Pula', 'BWP', 'BWP', 1, 2, FALSE, 'system'),+ ('Belarusian Ruble', 'BYN', 'Br', 1, 2, FALSE, 'system'),+ ('Belize Dollar', 'BZD', 'BZ$', 1, 2, FALSE, 'system'),+ ('Congolese Franc', 'CDF', 'CDF', 1, 2, FALSE, 'system'),+ ('Swiss Franc', 'CHF', 'CHF', 1, 2, FALSE, 'system'),+ ('Chilean Peso', 'CLP', 'CL$', 1, 0, FALSE, 'system'),+ ('Chinese Yuan', 'CNY', 'CN¥', 1, 2, FALSE, 'system'),+ ('Colombian Peso', 'COP', 'CO$', 1, 0, FALSE, 'system'),+ ('Costa Rican Colón', 'CRC', '₡', 1, 0, FALSE, 'system'),+ ('Cape Verdean Escudo', 'CVE', 'CV$', 1, 2, FALSE, 'system'),+ ('Czech Republic Koruna', 'CZK', 'Kč', 1, 2, FALSE, 'system'),+ ('Djiboutian Franc', 'DJF', 'Fdj', 1, 0, FALSE, 'system'),+ ('Danish Krone', 'DKK', 'Dkr', 1, 2, FALSE, 'system'),+ ('Dominican Peso', 'DOP', 'RD$', 1, 2, FALSE, 'system'),+ ('Algerian Dinar', 'DZD', 'DA', 1, 2, FALSE, 'system'),+ ('Egyptian Pound', 'EGP', 'EGP', 1, 2, FALSE, 'system'),+ ('Eritrean Nakfa', 'ERN', 'Nfk', 1, 2, FALSE, 'system'),+ ('Ethiopian Birr', 'ETB', 'Br', 1, 2, FALSE, 'system'),+ ('British Pound Sterling', 'GBP', '£', 1, 2, FALSE, 'system'),+ ('Georgian Lari', 'GEL', 'GEL', 1, 2, FALSE, 'system'),+ ('Ghanaian Cedi', 'GHS', 'GH₵', 1, 2, FALSE, 'system'),+ ('Guinean Franc', 'GNF', 'FG', 1, 0, FALSE, 'system'),+ ('Guatemalan Quetzal', 'GTQ', 'GTQ', 1, 2, FALSE, 'system'),+ ('Hong Kong Dollar', 'HKD', 'HK$', 1, 2, FALSE, 'system'),+ ('Honduran Lempira', 'HNL', 'HNL', 1, 2, FALSE, 'system'),+ ('Croatian Kuna', 'HRK', 'kn', 1, 2, FALSE, 'system'),+ ('Hungarian Forint', 'HUF', 'Ft', 1, 0, FALSE, 'system'),+ ('Indonesian Rupiah', 'IDR', 'Rp', 1, 0, FALSE, 'system'),+ ('Israeli New Sheqel', 'ILS', '₪', 1, 2, FALSE, 'system'),+ ('Indian Rupee', 'INR', 'Rs', 1, 2, FALSE, 'system'),+ ('Iraqi Dinar', 'IQD', 'IQD', 1, 0, FALSE, 'system'),+ ('Iranian Rial', 'IRR', 'IRR', 1, 0, FALSE, 'system'),+ ('Icelandic Króna', 'ISK', 'Ikr', 1, 0, FALSE, 'system'),+ ('Jamaican Dollar', 'JMD', 'J$', 1, 2, FALSE, 'system'),+ ('Jordanian Dinar', 'JOD', 'JD', 1, 3, FALSE, 'system'),+ ('Japanese Yen', 'JPY', '¥', 1, 0, FALSE, 'system'),+ ('Kenyan Shilling', 'KES', 'Ksh', 1, 2, FALSE, 'system'),+ ('Cambodian Riel', 'KHR', 'KHR', 1, 2, FALSE, 'system'),+ ('Comorian Franc', 'KMF', 'CF', 1, 0, FALSE, 'system'),+ ('South Korean Won', 'KRW', '₩', 1, 0, FALSE, 'system'),+ ('Kuwaiti Dinar', 'KWD', 'KD', 1, 3, FALSE, 'system'),+ ('Kazakhstani Tenge', 'KZT', 'KZT', 1, 2, FALSE, 'system'),+ ('Lebanese Pound', 'LBP', 'L.L.', 1, 0, FALSE, 'system'),+ ('Sri Lankan Rupee', 'LKR', 'SLRs', 1, 2, FALSE, 'system'),+ ('Lithuanian Litas', 'LTL', 'Lt', 1, 2, FALSE, 'system'),+ ('Latvian Lats', 'LVL', 'Ls', 1, 2, FALSE, 'system'),+ ('Libyan Dinar', 'LYD', 'LD', 1, 3, FALSE, 'system'),+ ('Moroccan Dirham', 'MAD', 'MAD', 1, 2, FALSE, 'system'),+ ('Moldovan Leu', 'MDL', 'MDL', 1, 2, FALSE, 'system'),+ ('Malagasy Ariary', 'MGA', 'MGA', 1, 0, FALSE, 'system'),+ ('Macedonian Denar', 'MKD', 'MKD', 1, 2, FALSE, 'system'),+ ('Myanma Kyat', 'MMK', 'MMK', 1, 0, FALSE, 'system'),+ ('Macanese Pataca', 'MOP', 'MOP$', 1, 2, FALSE, 'system'),+ ('Mauritian Rupee', 'MUR', 'MURs', 1, 0, FALSE, 'system'),+ ('Mexican Peso', 'MXN', 'MX$', 1, 2, FALSE, 'system'),+ ('Malaysian Ringgit', 'MYR', 'RM', 1, 2, FALSE, 'system'),+ ('Mozambican Metical', 'MZN', 'MTn', 1, 2, FALSE, 'system'),+ ('Namibian Dollar', 'NAD', 'N$', 1, 2, FALSE, 'system'),+ ('Nigerian Naira', 'NGN', '₦', 1, 2, FALSE, 'system'),+ ('Nicaraguan Córdoba', 'NIO', 'C$', 1, 2, FALSE, 'system'),+ ('Norwegian Krone', 'NOK', 'Nkr', 1, 2, FALSE, 'system'),+ ('Nepalese Rupee', 'NPR', 'NPRs', 1, 2, FALSE, 'system'),+ ('New Zealand Dollar', 'NZD', 'NZ$', 1, 2, FALSE, 'system'),+ ('Omani Rial', 'OMR', 'OMR', 1, 3, FALSE, 'system'),+ ('Panamanian Balboa', 'PAB', 'B/.', 1, 2, FALSE, 'system'),+ ('Peruvian Nuevo Sol', 'PEN', 'S/.', 1, 2, FALSE, 'system'),+ ('Philippine Peso', 'PHP', '₱', 1, 2, FALSE, 'system'),+ ('Pakistani Rupee', 'PKR', 'PKRs', 1, 0, FALSE, 'system'),+ ('Polish Zloty', 'PLN', 'zł', 1, 2, FALSE, 'system'),+ ('Paraguayan Guarani', 'PYG', '₲', 1, 0, FALSE, 'system'),+ ('Qatari Rial', 'QAR', 'QR', 1, 2, FALSE, 'system'),+ ('Romanian Leu', 'RON', 'RON', 1, 2, FALSE, 'system'),+ ('Serbian Dinar', 'RSD', 'din.', 1, 0, FALSE, 'system'),+ ('Russian Ruble', 'RUB', 'RUB', 1, 2, FALSE, 'system'),+ ('Rwandan Franc', 'RWF', 'RWF', 1, 0, FALSE, 'system'),+ ('Saudi Riyal', 'SAR', 'SR', 1, 2, FALSE, 'system'),+ ('Sudanese Pound', 'SDG', 'SDG', 1, 2, FALSE, 'system'),+ ('Swedish Krona', 'SEK', 'Skr', 1, 2, FALSE, 'system'),+ ('Singapore Dollar', 'SGD', 'S$', 1, 2, FALSE, 'system'),+ ('Somali Shilling', 'SOS', 'Ssh', 1, 0, FALSE, 'system'),+ ('Syrian Pound', 'SYP', 'SY£', 1, 0, FALSE, 'system'),+ ('Thai Baht', 'THB', '฿', 1, 2, FALSE, 'system'),+ ('Tunisian Dinar', 'TND', 'DT', 1, 3, FALSE, 'system'),+ ('Tongan Paʻanga', 'TOP', 'T$', 1, 2, FALSE, 'system'),+ ('Turkish Lira', 'TRY', 'TL', 1, 2, FALSE, 'system'),+ ('Trinidad and Tobago Dollar', 'TTD', 'TT$', 1, 2, FALSE, 'system'),+ ('New Taiwan Dollar', 'TWD', 'NT$', 1, 2, FALSE, 'system'),+ ('Tanzanian Shilling', 'TZS', 'TSh', 1, 0, FALSE, 'system'),+ ('Ukrainian Hryvnia', 'UAH', '₴', 1, 2, FALSE, 'system'),+ ('Ugandan Shilling', 'UGX', 'USh', 1, 0, FALSE, 'system'),+ ('Uruguayan Peso', 'UYU', '$U', 1, 2, FALSE, 'system'),+ ('Uzbekistan Som', 'UZS', 'UZS', 1, 0, FALSE, 'system'),+ ('Venezuelan Bolívar', 'VEF', 'Bs.F.', 1, 2, FALSE, 'system'),+ ('Vietnamese Dong', 'VND', '₫', 1, 0, FALSE, 'system'),+ ('CFA Franc BEAC', 'XAF', 'FCFA', 1, 0, FALSE, 'system'),+ ('CFA Franc BCEAO', 'XOF', 'CFA', 1, 0, FALSE, 'system'),+ ('Yemeni Rial', 'YER', 'YR', 1, 0, FALSE, 'system'),+ ('South African Rand', 'ZAR', 'R', 1, 2, FALSE, 'system'),+ ('Zambian Kwacha', 'ZMK', 'ZK', 1, 0, FALSE, 'system'),+ ('Zimbabwean Dollar', 'ZWL', 'ZWL$', 1, 0, FALSE, 'system');-- attribute types