@moatless/bookkeeping 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/utils/templates.js +9 -28
- package/package.json +1 -1
package/dist/utils/templates.js
CHANGED
|
@@ -15,14 +15,9 @@ This is an accounting data repository for {{COMPANY_NAME}} (Swedish company), st
|
|
|
15
15
|
│ ├── entry.yaml
|
|
16
16
|
│ └── *.pdf # Supporting documents
|
|
17
17
|
│
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
│ ├── documents.yaml
|
|
21
|
-
│ └── *.pdf
|
|
22
|
-
└── drafts/ # Documents with entries, ready to post
|
|
23
|
-
└── [DATE]-[NAME]/ # e.g., "2025-12-24-anthropic"
|
|
18
|
+
└── inbox/ # Raw incoming documents (no entry yet)
|
|
19
|
+
└── [DATE]-[NAME]/
|
|
24
20
|
├── documents.yaml
|
|
25
|
-
├── entry.yaml
|
|
26
21
|
└── *.pdf
|
|
27
22
|
\`\`\`
|
|
28
23
|
|
|
@@ -36,10 +31,10 @@ npx ledgit-cli sync-journal # Sync journal entries from accounting prov
|
|
|
36
31
|
npx ledgit-cli sync-inbox # Download inbox files from accounting provider
|
|
37
32
|
npx ledgit-cli company-info # Display company information
|
|
38
33
|
|
|
39
|
-
# Create journal entries
|
|
34
|
+
# Create journal entries (entry number auto-detected, git branch created if on main)
|
|
40
35
|
npx ledgit-cli create-entry --path <inbox-dir-or-file> \\
|
|
41
36
|
--tax-code <code> --base-account <acc> --balancing-account <acc> \\
|
|
42
|
-
--series <A-K>
|
|
37
|
+
--series <A-K>
|
|
43
38
|
|
|
44
39
|
# For raw files (not from inbox), also provide:
|
|
45
40
|
# --description "Vendor name" --document-date 2025-01-15 --amount 1234.50
|
|
@@ -70,9 +65,11 @@ npx ledgit-cli update # Update AGENTS.md to latest version
|
|
|
70
65
|
## Workflow Overview
|
|
71
66
|
|
|
72
67
|
\`\`\`
|
|
73
|
-
inbox/ → (create-entry) →
|
|
68
|
+
inbox/ → (create-entry) → journal-entries/ → (git review & commit) → (sync-journal) → Provider
|
|
74
69
|
\`\`\`
|
|
75
70
|
|
|
71
|
+
When you run \`create-entry\` on main branch, a new git branch is automatically created (e.g., \`book/V-189-2025-10-15-anthropic\`). Review changes with \`git diff\`, commit, and sync to provider.
|
|
72
|
+
|
|
76
73
|
## Bookkeeping New Entries
|
|
77
74
|
|
|
78
75
|
**Important:** Always ask the user for clarification if anything is unclear about the transaction before creating an entry.
|
|
@@ -84,12 +81,12 @@ To create a journal entry from an inbox document:
|
|
|
84
81
|
- \`documentDate\`: Invoice/receipt date (YYYY-MM-DD)
|
|
85
82
|
- \`description\`: Vendor or document name
|
|
86
83
|
- \`totalAmount\`: With \`amount\` (string) and \`currency\` (e.g., EUR, SEK)
|
|
87
|
-
3. **Look for similar entries** - Search \`journal-entries/\`
|
|
84
|
+
3. **Look for similar entries** - Search \`journal-entries/\` for entries from the same vendor or similar transaction types to learn which accounts and tax codes were used previously
|
|
88
85
|
4. **Check accounts** - Review \`accounts.yaml\` for appropriate expense/revenue accounts
|
|
89
86
|
5. **Determine tax code** - Based on vendor location and transaction type (see Tax Codes below). Explain your reasoning and describe the tax code meaning to the user
|
|
90
87
|
6. **Ask for confirmation** - Before creating, confirm with the user: vendor, amount, accounts (with names), and tax code (with description)
|
|
91
88
|
7. **Create entry** - Run \`npx ledgit-cli create-entry\` with the appropriate parameters
|
|
92
|
-
8. **
|
|
89
|
+
8. **Review and sync** - The entry is created in \`journal-entries/\`. Review with \`git diff\`, commit, and run \`npx ledgit-cli sync-journal\` to post to {{PROVIDER}}
|
|
93
90
|
|
|
94
91
|
To discard unwanted inbox items:
|
|
95
92
|
\`\`\`bash
|
|
@@ -97,22 +94,6 @@ npx ledgit-cli discard inbox/2025-01-15-spam-document
|
|
|
97
94
|
\`\`\`
|
|
98
95
|
This removes the directory and marks the item for deletion from the provider on next sync.
|
|
99
96
|
|
|
100
|
-
## Posting Entries
|
|
101
|
-
|
|
102
|
-
**Important:** Moving entries to \`journal-entries/\` posts them to the real ledger. Always confirm with the user before posting.
|
|
103
|
-
|
|
104
|
-
When the user confirms draft entries are ready to post:
|
|
105
|
-
|
|
106
|
-
1. **Determine entry number** - Check existing entries in \`journal-entries/FY-YYYY/\` for the series to find the next available number
|
|
107
|
-
2. **Move to journal-entries** - Rename the draft directory to the proper format:
|
|
108
|
-
\`\`\`
|
|
109
|
-
drafts/2025-01-15-anthropic/
|
|
110
|
-
→ journal-entries/FY-2025/A-042-2025-01-15-anthropic/
|
|
111
|
-
\`\`\`
|
|
112
|
-
Format: \`{SERIES}-{NUM}-{DATE}-{DESC}/\`
|
|
113
|
-
3. **Update entry.yaml** - Ensure \`entryNumber\` matches the directory and \`status\` is set appropriately
|
|
114
|
-
4. **Sync to provider** - Run \`npx ledgit-cli sync-journal\` to post the entries to {{PROVIDER}}
|
|
115
|
-
|
|
116
97
|
## Tax Codes
|
|
117
98
|
|
|
118
99
|
### Common Tax Code Patterns
|