conversions7

This commit is contained in:
Filipriec
2026-08-23 22:28:53 +02:00
parent 6666f7a5b1
commit 8dacb981bf
15 changed files with 75 additions and 47 deletions

View File

@@ -22,6 +22,10 @@ message ExchangeRateSelection {
optional string specific_rate_date = 3;
optional string manual_foreign_units = 4;
string reason = 5;
// Omit to use the profile's current default source for the currency.
// An explicit different source must be enabled for the same direct pair and
// is recorded as an audited per-event override.
optional string rate_source_id = 6;
}
service ExchangeRateService {
@@ -31,7 +35,7 @@ service ExchangeRateService {
returns (ListConversionEvidenceResponse);
rpc GetProfileExchangeRateSettings(GetProfileExchangeRateSettingsRequest)
returns (ProfileExchangeRateSettings);
rpc AddProfileForeignCurrency(AddProfileForeignCurrencyRequest)
rpc AddProfileCurrencySource(AddProfileCurrencySourceRequest)
returns (ProfileForeignCurrency);
}
@@ -121,6 +125,12 @@ message GetProfileExchangeRateSettingsRequest { string profile_name = 1; }
message ProfileForeignCurrency {
string currency = 1;
string default_source_id = 2;
repeated ProfileCurrencySource sources = 3;
}
message ProfileCurrencySource {
string source_id = 1;
bool coverage_complete = 2;
optional string verified_from_date = 3;
optional string verified_through_date = 4;
@@ -129,11 +139,13 @@ message ProfileForeignCurrency {
message ProfileExchangeRateSettings {
string profile_name = 1;
string accounting_currency = 2;
string rate_source_id = 3;
repeated string enabled_source_ids = 3;
repeated ProfileForeignCurrency foreign_currencies = 4;
}
message AddProfileForeignCurrencyRequest {
message AddProfileCurrencySourceRequest {
string profile_name = 1;
string currency = 2;
string source_id = 3;
bool make_default = 4;
}