default accounting currency

This commit is contained in:
Priec
2026-09-12 19:33:21 +02:00
parent 017ca87c67
commit 156d1c4464
6 changed files with 62 additions and 41 deletions

View File

@@ -122,6 +122,9 @@ message GetModuleConfigurationRequest {
message SetModuleConfigurationRequest {
ModuleScope scope = 1;
repeated string enabled_modules = 2;
// Initializes an existing profile's bookkeeping currency. Empty leaves it unchanged.
// Global scope and changes to an already configured currency are rejected.
string accounting_currency = 3;
}
message ModuleConfiguration {
@@ -130,6 +133,7 @@ message ModuleConfiguration {
repeated string selected_modules = 3;
repeated string inherited_modules = 4;
repeated string effective_modules = 5;
string accounting_currency = 6;
}
message CreateCustomExchangeRatesTableRequest {
@@ -172,11 +176,11 @@ message PostTableDefinitionRequest {
// Empty means the row is identified by its id alone.
repeated string row_display_columns = 7;
// ISO-4217 currency the profile keeps its accounting in. A profile is one
// accounting entity and keeps one set of books, so this is required only when
// the request creates the profile, and is ignored afterwards. It is unrelated
// to individual MONEY-column currencies: tables may hold money in any currency, and amounts convert
// to this one when they reach the ledger.
// Default ISO-4217 currency for this table's MONEY columns. Explicit column
// currencies take precedence; when omitted, the profile currency is used.
// The resolved default is saved for columns added later. When this request
// creates a profile, it also initializes that profile's bookkeeping currency.
// Supplying a table default never changes an existing profile's currency.
string accounting_currency = 8;
// Initial compiled direct-rate provider. It is enabled for each initial
@@ -187,7 +191,7 @@ message PostTableDefinitionRequest {
repeated string foreign_currencies = 12;
// When true, the table is stored once in the global physical schema and is
// visible from every profile. profile_name and accounting_currency are ignored.
// visible from every profile. profile_name is ignored.
bool global = 9;
// Names for the columns a definition row generates, in place of the ones the
@@ -398,8 +402,8 @@ message ColumnDefinition {
// from quantity-ledger contributions.
bool quantity_ledger = 4;
// Canonical uppercase ISO-4217 currency code. Required for MONEY and forbidden
// for every other field type.
// Canonical uppercase ISO-4217 currency code. MONEY inherits the table/profile
// default when omitted. Forbidden for field types without currency support.
string currency = 5;
// When true, the server rejects omitted or explicitly null values.