From caf44c28dfaf19f6186d166774df8bb33d28d711 Mon Sep 17 00:00:00 2001 From: Priec Date: Tue, 4 Aug 2026 16:03:20 +0200 Subject: [PATCH] move from profile to profile with accounts --- common/proto/accounting.proto | 19 +++++++++++++++++ common/src/proto/descriptor.bin | Bin 139631 -> 141097 bytes common/src/proto/komp_ac.accounting.rs | 27 +++++++++++++++++++++++++ server | 2 +- 4 files changed, 47 insertions(+), 1 deletion(-) diff --git a/common/proto/accounting.proto b/common/proto/accounting.proto index c6af402a..be33939a 100644 --- a/common/proto/accounting.proto +++ b/common/proto/accounting.proto @@ -433,6 +433,25 @@ message OpeningBalanceAccountMapping { string created_by_user_id = 14; } +// A predecessor account still holding value that no mapping carries into the +// target period. Closing the target period drops these balances silently, so +// each one is either an account left to map or one deliberately closed out. +message UnmappedSourceAccount { + int64 source_period_id = 1; + string source_profile_name = 2; + repeated string source_account_segments = 3; + string currency = 4; + // Signed balance uses the debit-positive convention, and is never zero. + string closing_balance = 5; + OpeningBalanceStatus status = 6; +} + message ListOpeningBalanceAccountsResponse { repeated OpeningBalanceAccountMapping mappings = 1; + + // Empty while the target period still inherits every predecessor balance by + // account path. Populated once the period carries balances by explicit + // mapping only, which happens when the predecessor belongs to another + // profile or when the period has at least one mapping of its own. + repeated UnmappedSourceAccount unmapped_source_accounts = 2; } diff --git a/common/src/proto/descriptor.bin b/common/src/proto/descriptor.bin index d894e81fcc8543068c5afcc5c6b940623d586630..e9e23e75a42f2178cb4f94b3c31122d57be909ac 100644 GIT binary patch delta 1422 zcmZuxzi%8x6u#ZJcfOl5`LT(Uv(FLF!HyktSOiFcM4|)~Q9z`~Rw@c>Z*S~dF_~HI z%q1Mn73paf$&G6ys6a{VII>X=3a3Is6i5_lk{*e_fVV&9LL|y>-n{p|`QH2H?_cWQ z|5gX~*UO*a^Y-kIE}OY6?*wtod+TbDg#3CKs)01=iP;&)NiWQHwx6GJrnVoQa{Tnm z*|r1e7iZ_w=QGpk&BpP|{xUlr3Z)~twb2bkAVc1&qO;OiJ60ZlT%7vXSWTP240NlO z{(fRE-Dw{?xt<@am4WkrI_a%;vgn7bH7Gf4=$zC>P_WW17h$FO-o^CNTc!yHNQVoVgbcUdK4$JsxtcRf1(( z)Fu)F`%3iap?EhC1CFL27?cV#@v_q}NRo(ajHFQ%Ln#3FU%y1us$?rIrzy&N(Nsnk9+Pg+Q&_QAhs zA(h&P&O0RwLQlXwQwD)j30f9FsZXF`D?xtw^vp85oj;!19?;|GKE?HDOOj6I3~-=n zpr)T*3)`a(>D|lJm;5e?|20n(X<6vyQ9G(&+j-RP02)>=kJ=r)(u?jMf_uJ9t=4jA ziB~E05YE~`R4MfkaDh#aXj7N`+Eb`J11BHh5?y@?^|x~Yma++s!M&W9B}8u`SP&#g zUB=K{woytQ!^*oBQkOBj{{j2XB|Vm0iXMS`b#B|m8+T$e#C!c{B(jyan`;-hFh(S4 z9V0`FNy-dgbC6ZCJ7kk(jRVtP#ak*K2-;5CO8PbO+J#dlPMSEOJ48PEDi%=~88$JT zl9@M%8X2RX{a{iP;<7099~XDIP;!d~sc3{MvkoJUYLonxndMbZZd9tJk*qCvpiS*#nmQeuT=MBIeC(bbSAB=&JO8(1Whc3b#f&aKD3Z@K7x;~+}{y>)0$sXdHb>_V&z3|lv= zYpilj;o)LpQ4wO>%*?QrnURZ|i, + #[prost(string, tag = "4")] + pub currency: ::prost::alloc::string::String, + /// Signed balance uses the debit-positive convention, and is never zero. + #[prost(string, tag = "5")] + pub closing_balance: ::prost::alloc::string::String, + #[prost(enumeration = "OpeningBalanceStatus", tag = "6")] + pub status: i32, +} #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListOpeningBalanceAccountsResponse { #[prost(message, repeated, tag = "1")] pub mappings: ::prost::alloc::vec::Vec, + /// Empty while the target period still inherits every predecessor balance by + /// account path. Populated once the period carries balances by explicit + /// mapping only, which happens when the predecessor belongs to another + /// profile or when the period has at least one mapping of its own. + #[prost(message, repeated, tag = "2")] + pub unmapped_source_accounts: ::prost::alloc::vec::Vec, } #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[repr(i32)] diff --git a/server b/server index 82402387..45e95554 160000 --- a/server +++ b/server @@ -1 +1 @@ -Subproject commit 8240238732b5487ca9d5ccaad32e3789805a7638 +Subproject commit 45e95554c9a9ba82d6b421bf5599e2a74f966a3e