First slice: ledger-store (journal+blobs+sqlite) and ledger-mcp (18 tools, receipt policy)
This commit is contained in:
1 parent
3c33c79a75
commit
e313fec903
1 file changed
+3
-3
@@ -100,11 +100,11 @@ impl ChartOfAccounts {
|
|||||||
if self.by_code.contains_key(code) {
|
if self.by_code.contains_key(code) {
|
||||||
return Err(LedgerError::DuplicateAccountCode(code.to_string()));
|
return Err(LedgerError::DuplicateAccountCode(code.to_string()));
|
||||||
}
|
}
|
||||||
if let Some(p) = parent {
|
if let Some(p) = parent
|
||||||
if !self.accounts.contains_key(&p) {
|
&& !self.accounts.contains_key(&p)
|
||||||
|
{
|
||||||
return Err(LedgerError::UnknownParentAccount(p));
|
return Err(LedgerError::UnknownParentAccount(p));
|
||||||
}
|
}
|
||||||
}
|
|
||||||
self.by_code.insert(code.to_string(), id);
|
self.by_code.insert(code.to_string(), id);
|
||||||
self.accounts.insert(
|
self.accounts.insert(
|
||||||
id,
|
id,
|
||||||
|
|||||||
Reference in new issue
Block a user