diff --git a/client b/client index 087f2af..1abb27e 160000 --- a/client +++ b/client @@ -1 +1 @@ -Subproject commit 087f2afaa3bb0fd961327ccbfa9037446e4cdc7c +Subproject commit 1abb27eecc7ed286594120fec03a0c90034422fd diff --git a/common/proto/accounting.proto b/common/proto/accounting.proto index 0eca8bd..1b39258 100644 --- a/common/proto/accounting.proto +++ b/common/proto/accounting.proto @@ -181,7 +181,7 @@ message JournalLine { string source_table_name = 10; int64 source_record_id = 11; int64 source_row_revision = 12; - int64 posting_script_id = 13; + reserved 13; } message Journal { diff --git a/common/proto/table_definition.proto b/common/proto/table_definition.proto index a674534..bfbb251 100644 --- a/common/proto/table_definition.proto +++ b/common/proto/table_definition.proto @@ -170,6 +170,8 @@ message ColumnDefinition { // PHONE (international or national phone number; generates extension/type/country/calling-code companions) // TIME (timezone-free time of day) // MONEY (= unconstrained NUMERIC; currency comes from the table) + // ACCOUNTING (creates the schema-managed name, debit, and credit columns; + // one stored row contributes one line to the profile journal) // INT // BIGINT // DATE diff --git a/common/proto/table_script.proto b/common/proto/table_script.proto index bab64a0..241c403 100644 --- a/common/proto/table_script.proto +++ b/common/proto/table_script.proto @@ -172,14 +172,14 @@ message StoredTableScript { } message ScriptDependency { + reserved 4; + // Logical table name referenced by the script. string target_table = 1; // Normalized dependency kind, such as column_access or related_aggregate. string dependency_type = 2; // Logical column name. Empty for aggregates that operate on rows only. string column = 3; - // Deprecated legacy field. Raw SQL dependencies are no longer produced. - string query_fragment = 4; // Aggregate operation name, such as sum, count_rows, or exists; empty for // column_access dependencies. string operation = 5; diff --git a/common/proto/tables_data.proto b/common/proto/tables_data.proto index 2cb57bf..b70fd7b 100644 --- a/common/proto/tables_data.proto +++ b/common/proto/tables_data.proto @@ -121,11 +121,7 @@ message PostTableDataRequest { // - Some application-specific validations may apply (e.g., max length for // certain fields like "telefon") map data = 3; - - // Optional. Existing journal that receives the posting generated for this row. - // Required when the table has an active after-insert posting script and rejected - // when the table has no active posting script. - optional int64 journal_id = 4; + reserved 4; } // Insert response. @@ -150,9 +146,7 @@ message PostTableDataResponse { message PostTableDataBulkRow { // Required. Same data payload as PostTableDataRequest.data. map data = 1; - - // Optional. Existing journal that receives the posting generated for this row. - optional int64 journal_id = 2; + reserved 2; } // Bulk insert request. diff --git a/common/src/proto/descriptor.bin b/common/src/proto/descriptor.bin index 2a2ab42..1ade128 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.accounting.rs b/common/src/proto/komp_ac.accounting.rs index 11eedb9..45b31e1 100644 --- a/common/src/proto/komp_ac.accounting.rs +++ b/common/src/proto/komp_ac.accounting.rs @@ -202,8 +202,6 @@ pub struct JournalLine { pub source_record_id: i64, #[prost(int64, tag = "12")] pub source_row_revision: i64, - #[prost(int64, tag = "13")] - pub posting_script_id: i64, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct Journal { diff --git a/common/src/proto/komp_ac.table_definition.rs b/common/src/proto/komp_ac.table_definition.rs index ca30eae..2d7d071 100644 --- a/common/src/proto/komp_ac.table_definition.rs +++ b/common/src/proto/komp_ac.table_definition.rs @@ -141,6 +141,8 @@ pub struct ColumnDefinition { /// PHONE (international or national phone number; generates extension/type/country/calling-code companions) /// TIME (timezone-free time of day) /// MONEY (= unconstrained NUMERIC; currency comes from the table) + /// ACCOUNTING (creates the schema-managed name, debit, and credit columns; + /// one stored row contributes one line to the profile journal) /// INT /// BIGINT /// DATE diff --git a/common/src/proto/komp_ac.table_script.rs b/common/src/proto/komp_ac.table_script.rs index 1a4bb75..3574612 100644 --- a/common/src/proto/komp_ac.table_script.rs +++ b/common/src/proto/komp_ac.table_script.rs @@ -123,9 +123,6 @@ pub struct ScriptDependency { /// Logical column name. Empty for aggregates that operate on rows only. #[prost(string, tag = "3")] pub column: ::prost::alloc::string::String, - /// Deprecated legacy field. Raw SQL dependencies are no longer produced. - #[prost(string, tag = "4")] - pub query_fragment: ::prost::alloc::string::String, /// Aggregate operation name, such as sum, count_rows, or exists; empty for /// column_access dependencies. #[prost(string, tag = "5")] diff --git a/common/src/proto/komp_ac.tables_data.rs b/common/src/proto/komp_ac.tables_data.rs index a77bc59..0bf47fa 100644 --- a/common/src/proto/komp_ac.tables_data.rs +++ b/common/src/proto/komp_ac.tables_data.rs @@ -45,11 +45,6 @@ pub struct PostTableDataRequest { ::prost::alloc::string::String, ::prost_types::Value, >, - /// Optional. Existing journal that receives the posting generated for this row. - /// Required when the table has an active after-insert posting script and rejected - /// when the table has no active posting script. - #[prost(int64, optional, tag = "4")] - pub journal_id: ::core::option::Option, } /// Insert response. #[derive(Clone, PartialEq, ::prost::Message)] @@ -79,9 +74,6 @@ pub struct PostTableDataBulkRow { ::prost::alloc::string::String, ::prost_types::Value, >, - /// Optional. Existing journal that receives the posting generated for this row. - #[prost(int64, optional, tag = "2")] - pub journal_id: ::core::option::Option, } /// Bulk insert request. #[derive(Clone, PartialEq, ::prost::Message)] diff --git a/graphs/src/pages/add_table/state.rs b/graphs/src/pages/add_table/state.rs index 8a23f8f..d6fe457 100644 --- a/graphs/src/pages/add_table/state.rs +++ b/graphs/src/pages/add_table/state.rs @@ -104,9 +104,10 @@ impl CreateTableForm { }), ); - let has_money = columns - .iter() - .any(|column| column.field_type.eq_ignore_ascii_case("money")); + let has_money = columns.iter().any(|column| { + column.field_type.eq_ignore_ascii_case("money") + || column.field_type.eq_ignore_ascii_case("accounting") + }); let base_currency = self.base_currency.trim().to_ascii_uppercase(); if has_money && base_currency.is_empty() { return Err("A base currency is required when a MONEY column is used.".to_string()); diff --git a/graphs/src/pages/import_export/import/logic.rs b/graphs/src/pages/import_export/import/logic.rs index 17dbdc6..6d1fac1 100644 --- a/graphs/src/pages/import_export/import/logic.rs +++ b/graphs/src/pages/import_export/import/logic.rs @@ -184,7 +184,6 @@ fn row_for_table(table: &ImportTable, positions: &[(usize, String)], row: &[Stri } Ok(PostTableDataBulkRow { data, - journal_id: None, }) } diff --git a/server b/server index e52b2ab..549f26d 160000 --- a/server +++ b/server @@ -1 +1 @@ -Subproject commit e52b2ab6e45571abfd515af1e3a891cc5128c42c +Subproject commit 549f26df7026d5beb7a7af553143fad9b6b5de38 diff --git a/tui-canvas b/tui-canvas index 2a1849f..3ecc28e 160000 --- a/tui-canvas +++ b/tui-canvas @@ -1 +1 @@ -Subproject commit 2a1849fb95d9c942fac4eecf7a260b46a92d3020 +Subproject commit 3ecc28ee1184ff86e64116a4f4531e536a320722 diff --git a/tui-pages b/tui-pages index 76e6d56..17601d9 160000 --- a/tui-pages +++ b/tui-pages @@ -1 +1 @@ -Subproject commit 76e6d5688fd43a81b72557013d2a0410e240ff23 +Subproject commit 17601d9c456bde89478c86990cc815e07e869c2d