diff --git a/client b/client index 8605da5..4a6fba3 160000 --- a/client +++ b/client @@ -1 +1 @@ -Subproject commit 8605da5f4869ab05d91b389e69f7f4719ce6e4e1 +Subproject commit 4a6fba395ae266e7ad8f4ffeeb959b6d91309eee diff --git a/common/proto/table_definition.proto b/common/proto/table_definition.proto index 19361bf..11eb568 100644 --- a/common/proto/table_definition.proto +++ b/common/proto/table_definition.proto @@ -55,6 +55,10 @@ message TableLink { // Otherwise the column allows NULL. // Duplicate links to the same target table in one request are rejected. bool required = 2; + + // User-defined column read from this linked row as the journal account. + // Exactly one required link must set this when the table contains ACCOUNTING. + string account_value_column = 3; } // Defines the input for creating a new table definition. diff --git a/common/src/proto/descriptor.bin b/common/src/proto/descriptor.bin index 8673c3a..fc0fd3c 100644 Binary files a/common/src/proto/descriptor.bin and b/common/src/proto/descriptor.bin differ diff --git a/common/src/proto/komp_ac.table_definition.rs b/common/src/proto/komp_ac.table_definition.rs index 0dbd787..49308ec 100644 --- a/common/src/proto/komp_ac.table_definition.rs +++ b/common/src/proto/komp_ac.table_definition.rs @@ -13,6 +13,10 @@ pub struct TableLink { /// Duplicate links to the same target table in one request are rejected. #[prost(bool, tag = "2")] pub required: bool, + /// User-defined column read from this linked row as the journal account. + /// Exactly one required link must set this when the table contains ACCOUNTING. + #[prost(string, tag = "3")] + pub account_value_column: ::prost::alloc::string::String, } /// Defines the input for creating a new table definition. #[derive(serde::Serialize, serde::Deserialize)] diff --git a/graphs/src/pages/add_table/state.rs b/graphs/src/pages/add_table/state.rs index 3fda684..2d2b795 100644 --- a/graphs/src/pages/add_table/state.rs +++ b/graphs/src/pages/add_table/state.rs @@ -93,6 +93,7 @@ impl CreateTableForm { .map(|linked_table_name| TableLink { linked_table_name, required: true, + account_value_column: String::new(), }) .collect::>(); links.extend( @@ -101,6 +102,7 @@ impl CreateTableForm { .map(|linked_table_name| TableLink { linked_table_name, required: false, + account_value_column: String::new(), }), ); diff --git a/server b/server index 01ce5a6..2b4dfbf 160000 --- a/server +++ b/server @@ -1 +1 @@ -Subproject commit 01ce5a63b7ffd8ccc6336cb508364e69c4d6b40b +Subproject commit 2b4dfbf8ffc96bb697cd28feff1d47afbb8996e2