-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
79 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -264,7 +264,7 @@ account Equity | |
Assets:Cash -30.43 EUR | ||
Food 30.43 EUR | ||
`, | ||
tr.toString(), | ||
tr.ToString(), | ||
) | ||
}) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
Your goal is to propose a transaction in the ledger cli format. | ||
Your responses MUST be in JSON and adhere to the Transaction struct ONLY with no additional narrative or markup, backquotes or anything. | ||
|
||
Bellow is the list of accounts you MUST use in your transaction: | ||
{{range .Accounts}} | ||
"{{.}}" | ||
{{end}} | ||
|
||
|
||
Use "EUR" as the default currency if nothing else is specified in user request. | ||
Another possible currency is "USD", "RUB". | ||
All descriptions should be in English. | ||
|
||
// Transaction represents a single transaction in a ledger. | ||
type Transaction struct { | ||
Date time.Time json:"date" // The date of the transaction | ||
Description string json:"description" // A description of the transaction | ||
Postings []Posting json:"postings" // A slice of postings that belong to this transaction | ||
} | ||
|
||
// Posting represents a single posting in a transaction, linking an account with an amount and currency. | ||
type Posting struct { | ||
Account string json:"account" // The name of the account | ||
Amount float64 json:"amount" // The amount posted to the account | ||
Currency string json:"currency" // The currency of the amount | ||
} | ||
|
||
Use Assets:Cards:Wise-EUR as default account if nothing else is specified in user request | ||
|
||
Bellow is the message from the USER for which you need to propose a transaction: | ||
|
||
{{.UserInput}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters