diff --git a/common/proto/accounting.proto b/common/proto/accounting.proto index 64ec40d..7165cdb 100644 --- a/common/proto/accounting.proto +++ b/common/proto/accounting.proto @@ -111,6 +111,13 @@ message PostJournalRequest { // creating. Must be empty when appending. Rejected when it falls at or before // the latest closed or approved accounting boundary for the profile. string accounting_date = 7; + + // Convert this posting with the profile's own rate for the publication date + // instead of the ECB reference rate. False, the default, always uses ECB, even + // where a custom rate for that date exists. True requires one to have been + // entered: a missing rate is refused rather than silently converted at the + // official rate. Ignored when nothing needs converting. + bool use_custom_rate = 8; } message JournalLineInput { diff --git a/common/proto/ecb.proto b/common/proto/ecb.proto index 25279d3..7c8e34b 100644 --- a/common/proto/ecb.proto +++ b/common/proto/ecb.proto @@ -37,10 +37,14 @@ message PreviewEcbConversionRequest { // conversion_context: transaction, statement, or decisive date. string anchor_date = 4; - // Required. Profile whose custom exchange rate table is consulted before the - // ECB observations, so the preview matches what posting into that profile - // would do. + // Required. Profile whose rates apply. Only consulted when use_custom_rate is + // set, but always required so a preview names the books it describes. string profile_name = 5; + + // Preview the profile's own rate for the publication date rather than the ECB + // reference rate. Must match what the posting will ask for, or the preview + // describes a conversion that will not happen. + bool use_custom_rate = 6; } // The conversion and immutable local ECB observation that would be used now. diff --git a/common/src/proto/descriptor.bin b/common/src/proto/descriptor.bin index 0e288a4..c57fd5a 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 c038859..37e659e 100644 --- a/common/src/proto/komp_ac.accounting.rs +++ b/common/src/proto/komp_ac.accounting.rs @@ -28,6 +28,13 @@ pub struct PostJournalRequest { /// the latest closed or approved accounting boundary for the profile. #[prost(string, tag = "7")] pub accounting_date: ::prost::alloc::string::String, + /// Convert this posting with the profile's own rate for the publication date + /// instead of the ECB reference rate. False, the default, always uses ECB, even + /// where a custom rate for that date exists. True requires one to have been + /// entered: a missing rate is refused rather than silently converted at the + /// official rate. Ignored when nothing needs converting. + #[prost(bool, tag = "8")] + pub use_custom_rate: bool, } #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct JournalLineInput { diff --git a/common/src/proto/komp_ac.ecb.rs b/common/src/proto/komp_ac.ecb.rs index 82349c5..dc18e28 100644 --- a/common/src/proto/komp_ac.ecb.rs +++ b/common/src/proto/komp_ac.ecb.rs @@ -13,11 +13,15 @@ pub struct PreviewEcbConversionRequest { /// conversion_context: transaction, statement, or decisive date. #[prost(string, tag = "4")] pub anchor_date: ::prost::alloc::string::String, - /// Required. Profile whose custom exchange rate table is consulted before the - /// ECB observations, so the preview matches what posting into that profile - /// would do. + /// Required. Profile whose rates apply. Only consulted when use_custom_rate is + /// set, but always required so a preview names the books it describes. #[prost(string, tag = "5")] pub profile_name: ::prost::alloc::string::String, + /// Preview the profile's own rate for the publication date rather than the ECB + /// reference rate. Must match what the posting will ask for, or the preview + /// describes a conversion that will not happen. + #[prost(bool, tag = "6")] + pub use_custom_rate: bool, } /// The conversion and immutable local ECB observation that would be used now. /// No rounding is performed and no conversion evidence is persisted. diff --git a/server b/server index 4be8e7b..bb6fe4b 160000 --- a/server +++ b/server @@ -1 +1 @@ -Subproject commit 4be8e7b0a4e95e48220442717c20adfc51518fb6 +Subproject commit bb6fe4b65f508873ac73844017b44d1db25c8f9d