accounting kernel3
This commit is contained in:
@@ -10,6 +10,13 @@ service Accounting {
|
||||
// Return journal lines and credits-minus-debits informational balance.
|
||||
rpc GetJournal(GetJournalRequest) returns (Journal);
|
||||
|
||||
// Return the profile-wide count of balanced and unbalanced journals.
|
||||
rpc GetAccountingStatus(GetAccountingStatusRequest) returns (AccountingStatus);
|
||||
|
||||
// Return an oldest-first, paginated queue of unbalanced journals.
|
||||
rpc ListUnbalancedJournals(ListUnbalancedJournalsRequest)
|
||||
returns (ListUnbalancedJournalsResponse);
|
||||
|
||||
// Append one manual debit or credit line to an existing journal.
|
||||
rpc AddJournalLine(AddJournalLineRequest) returns (Journal);
|
||||
|
||||
@@ -39,6 +46,55 @@ message GetJournalRequest {
|
||||
bool include_deleted = 3;
|
||||
}
|
||||
|
||||
message GetAccountingStatusRequest {
|
||||
string profile_name = 1;
|
||||
}
|
||||
|
||||
message AccountingStatus {
|
||||
bool all_journals_balanced = 1;
|
||||
int64 journal_count = 2;
|
||||
int64 balanced_journal_count = 3;
|
||||
int64 unbalanced_journal_count = 4;
|
||||
string calculated_at = 5;
|
||||
}
|
||||
|
||||
message ListUnbalancedJournalsRequest {
|
||||
string profile_name = 1;
|
||||
|
||||
// Zero uses 50. The maximum is 500.
|
||||
int32 page_size = 2;
|
||||
|
||||
// Opaque cursor returned by the previous response. Empty starts at the
|
||||
// oldest unbalanced journal.
|
||||
string page_token = 3;
|
||||
|
||||
// Optional ISO 4217 currency filter. Empty includes every currency.
|
||||
string currency = 4;
|
||||
}
|
||||
|
||||
message UnbalancedJournalSummary {
|
||||
int64 journal_id = 1;
|
||||
string description = 2;
|
||||
string currency = 3;
|
||||
string total_debit = 4;
|
||||
string total_credit = 5;
|
||||
|
||||
// Signed credits-minus-debits difference.
|
||||
string balance = 6;
|
||||
|
||||
// Side and positive amount needed to make the journal balance zero.
|
||||
JournalSide missing_side = 7;
|
||||
string missing_amount = 8;
|
||||
int64 active_line_count = 9;
|
||||
string created_at = 10;
|
||||
}
|
||||
|
||||
message ListUnbalancedJournalsResponse {
|
||||
repeated UnbalancedJournalSummary journals = 1;
|
||||
int64 total_unbalanced_count = 2;
|
||||
string next_page_token = 3;
|
||||
}
|
||||
|
||||
message AddJournalLineRequest {
|
||||
string profile_name = 1;
|
||||
int64 journal_id = 2;
|
||||
|
||||
Reference in New Issue
Block a user