Completes Phase 1: Beancount patterns adoption
Implements core improvements from Phase 1 of the Beancount patterns adoption: - Uses Decimal for fiat amounts to prevent floating point errors - Adds a meta field to journal entries for a full audit trail - Adds a flag field to journal entries for transaction status - Migrates existing account names to a hierarchical format This commit introduces a database migration to add the `flag` and `meta` columns to the `journal_entries` table. It also includes updates to the models, CRUD operations, and API endpoints to handle the new fields.
This commit is contained in:
parent
35d2057694
commit
1a28ec59eb
7 changed files with 616 additions and 31 deletions
|
|
@ -640,7 +640,7 @@ window.app = Vue.createApp({
|
|||
if (line.debit > 0) {
|
||||
// Check if the account is associated with this user's receivables
|
||||
const account = this.accounts.find(a => a.id === line.account_id)
|
||||
if (account && account.name && account.name.includes('Accounts Receivable') && account.account_type === 'asset') {
|
||||
if (account && account.name && account.name.includes('Assets:Receivable') && account.account_type === 'asset') {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
|
@ -657,7 +657,7 @@ window.app = Vue.createApp({
|
|||
if (line.credit > 0) {
|
||||
// Check if the account is associated with this user's payables
|
||||
const account = this.accounts.find(a => a.id === line.account_id)
|
||||
if (account && account.name && account.name.includes('Accounts Payable') && account.account_type === 'liability') {
|
||||
if (account && account.name && account.name.includes('Liabilities:Payable') && account.account_type === 'liability') {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue