This commit is contained in:
Filipriec
2026-08-31 21:14:01 +02:00
parent 78db4ee75a
commit 81a41b9b1a
5 changed files with 190 additions and 2 deletions

View File

@@ -63,6 +63,11 @@ service Accounting {
returns (ListAccountingPeriodsResponse);
rpc ListPeriodBalances(ListPeriodBalancesRequest) returns (ListPeriodBalancesResponse);
// Return a predvaha from one closed period's frozen account balances.
// Opening and closing signed balances are presented on their debit or credit
// side, while period turnover retains the journal's debit and credit columns.
rpc GetTrialBalance(GetTrialBalanceRequest) returns (GetTrialBalanceResponse);
// Materialize one row per directly transferable source account in a table
// containing an ACCOUNTING_TRANSFER definition. Source fields are frozen
// accounting facts; target fields start as an unchanged same-path copy and
@@ -437,6 +442,43 @@ message ListPeriodBalancesResponse {
repeated PeriodDenominationBalance denomination_balances = 2;
}
message GetTrialBalanceRequest {
int64 period_id = 1;
}
message TrialBalanceRow {
// Slash-delimited root-to-leaf account path. Rows include both posting
// accounts and consolidated ancestors from the frozen period snapshot.
string account = 1;
uint32 depth = 2;
bool is_summary = 3;
string currency = 4;
string opening_debit = 5;
string opening_credit = 6;
string period_debit = 7;
string period_credit = 8;
string closing_debit = 9;
string closing_credit = 10;
}
message TrialBalanceTotals {
// Totals are calculated from root rows only, because descendant rows are
// already consolidated into their ancestors.
string opening_debit = 1;
string opening_credit = 2;
string period_debit = 3;
string period_credit = 4;
string closing_debit = 5;
string closing_credit = 6;
}
message GetTrialBalanceResponse {
AccountingPeriod period = 1;
string currency = 2;
repeated TrialBalanceRow rows = 3;
TrialBalanceTotals totals = 4;
}
message GenerateAccountingTransferRequest {
string profile_name = 1;
string table_name = 2;