conversion stuff is now handled by the module
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
syntax = "proto3";
|
||||
package komp_ac.accounting;
|
||||
|
||||
import "exchange_rates.proto";
|
||||
import "common.proto";
|
||||
|
||||
// Mutable informational journals. A journal may contain only debits, only
|
||||
// credits, or any non-zero balance. Balance is reported but never enforced.
|
||||
@@ -170,9 +170,9 @@ message JournalLineInput {
|
||||
string account = 2;
|
||||
string amount = 3;
|
||||
string description = 4;
|
||||
// Empty uses the profile provider's previous publication. Set this per line when the
|
||||
// accountant needs a different rule, a saved custom rate, or a one-off rate.
|
||||
optional komp_ac.exchange_rates.ExchangeRateSelection exchange_rate_selection = 5;
|
||||
// Omit to use the selected conversion module's posting policy.
|
||||
// Explicit options are interpreted only by their named module.
|
||||
optional komp_ac.common.CurrencyConversionOptions conversion_options = 5;
|
||||
}
|
||||
|
||||
message CloseJournalRequest {
|
||||
@@ -325,6 +325,7 @@ message JournalLine {
|
||||
string original_amount = 16;
|
||||
string original_currency = 17;
|
||||
int64 conversion_evidence_id = 18;
|
||||
int64 conversion_table_definition_id = 19;
|
||||
}
|
||||
|
||||
message Journal {
|
||||
|
||||
@@ -9,3 +9,9 @@ message CountResponse {
|
||||
message PositionRequest {
|
||||
int64 position = 1;
|
||||
}
|
||||
|
||||
// Options interpreted only by the named currency-conversion module.
|
||||
message CurrencyConversionOptions {
|
||||
string module_id = 1;
|
||||
string options_json = 2;
|
||||
}
|
||||
|
||||
@@ -3,7 +3,6 @@ syntax = "proto3";
|
||||
package komp_ac.tables_data;
|
||||
|
||||
import "common.proto";
|
||||
import "exchange_rates.proto";
|
||||
import "google/protobuf/struct.proto";
|
||||
|
||||
// Read and write row data for user-defined tables inside profiles (schemas).
|
||||
@@ -166,7 +165,7 @@ map<string, google.protobuf.Value> data = 3;
|
||||
|
||||
message PostAccountingTableDataRequest {
|
||||
PostTableDataRequest row = 1;
|
||||
komp_ac.exchange_rates.ExchangeRateSelection exchange_rate_selection = 2;
|
||||
komp_ac.common.CurrencyConversionOptions conversion_options = 2;
|
||||
}
|
||||
|
||||
// Insert response.
|
||||
@@ -272,7 +271,7 @@ message PutTableDataRequest {
|
||||
|
||||
message PutAccountingTableDataRequest {
|
||||
PutTableDataRequest update = 1;
|
||||
komp_ac.exchange_rates.ExchangeRateSelection exchange_rate_selection = 2;
|
||||
komp_ac.common.CurrencyConversionOptions conversion_options = 2;
|
||||
bool confirmed = 3;
|
||||
repeated string expected_affected_profiles = 4;
|
||||
}
|
||||
|
||||
Binary file not shown.
@@ -72,11 +72,11 @@ pub struct JournalLineInput {
|
||||
pub amount: ::prost::alloc::string::String,
|
||||
#[prost(string, tag = "4")]
|
||||
pub description: ::prost::alloc::string::String,
|
||||
/// Empty uses the profile provider's previous publication. Set this per line when the
|
||||
/// accountant needs a different rule, a saved custom rate, or a one-off rate.
|
||||
/// Omit to use the selected conversion module's posting policy.
|
||||
/// Explicit options are interpreted only by their named module.
|
||||
#[prost(message, optional, tag = "5")]
|
||||
pub exchange_rate_selection: ::core::option::Option<
|
||||
super::exchange_rates::ExchangeRateSelection,
|
||||
pub conversion_options: ::core::option::Option<
|
||||
super::common::CurrencyConversionOptions,
|
||||
>,
|
||||
}
|
||||
#[derive(serde::Serialize, serde::Deserialize)]
|
||||
@@ -314,6 +314,8 @@ pub struct JournalLine {
|
||||
pub original_currency: ::prost::alloc::string::String,
|
||||
#[prost(int64, tag = "18")]
|
||||
pub conversion_evidence_id: i64,
|
||||
#[prost(int64, tag = "19")]
|
||||
pub conversion_table_definition_id: i64,
|
||||
}
|
||||
#[derive(serde::Serialize, serde::Deserialize)]
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
|
||||
@@ -14,3 +14,12 @@ pub struct PositionRequest {
|
||||
#[prost(int64, tag = "1")]
|
||||
pub position: i64,
|
||||
}
|
||||
/// Options interpreted only by the named currency-conversion module.
|
||||
#[derive(serde::Serialize, serde::Deserialize)]
|
||||
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
|
||||
pub struct CurrencyConversionOptions {
|
||||
#[prost(string, tag = "1")]
|
||||
pub module_id: ::prost::alloc::string::String,
|
||||
#[prost(string, tag = "2")]
|
||||
pub options_json: ::prost::alloc::string::String,
|
||||
}
|
||||
|
||||
@@ -54,8 +54,8 @@ pub struct PostAccountingTableDataRequest {
|
||||
#[prost(message, optional, tag = "1")]
|
||||
pub row: ::core::option::Option<PostTableDataRequest>,
|
||||
#[prost(message, optional, tag = "2")]
|
||||
pub exchange_rate_selection: ::core::option::Option<
|
||||
super::exchange_rates::ExchangeRateSelection,
|
||||
pub conversion_options: ::core::option::Option<
|
||||
super::common::CurrencyConversionOptions,
|
||||
>,
|
||||
}
|
||||
/// Insert response.
|
||||
@@ -187,8 +187,8 @@ pub struct PutAccountingTableDataRequest {
|
||||
#[prost(message, optional, tag = "1")]
|
||||
pub update: ::core::option::Option<PutTableDataRequest>,
|
||||
#[prost(message, optional, tag = "2")]
|
||||
pub exchange_rate_selection: ::core::option::Option<
|
||||
super::exchange_rates::ExchangeRateSelection,
|
||||
pub conversion_options: ::core::option::Option<
|
||||
super::common::CurrencyConversionOptions,
|
||||
>,
|
||||
#[prost(bool, tag = "3")]
|
||||
pub confirmed: bool,
|
||||
|
||||
2
server
2
server
Submodule server updated: 1da33d6562...f00542d009
Reference in New Issue
Block a user