mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-20 09:44:26 +08:00
add comments and format code
This commit is contained in:
@@ -16,6 +16,7 @@ type CSVFileExporter struct {
|
|||||||
const csvHeaderLine = "Time,Type,Category,Sub Category,Account,Amount,Account2,Account2 Amount,Tags,Comment\n"
|
const csvHeaderLine = "Time,Type,Category,Sub Category,Account,Amount,Account2,Account2 Amount,Tags,Comment\n"
|
||||||
const csvDataLineFormat = "%s,%s,%s,%s,%s,%s,%s,%s,%s,%s\n"
|
const csvDataLineFormat = "%s,%s,%s,%s,%s,%s,%s,%s,%s,%s\n"
|
||||||
|
|
||||||
|
// GetOutputContent returns the exported csv data
|
||||||
func (e *CSVFileExporter) GetOutputContent(uid int64, transactions []*models.Transaction, accountMap map[int64]*models.Account, categoryMap map[int64]*models.TransactionCategory, tagMap map[int64]*models.TransactionTag, allTagIndexs map[int64][]int64) ([]byte, error) {
|
func (e *CSVFileExporter) GetOutputContent(uid int64, transactions []*models.Transaction, accountMap map[int64]*models.Account, categoryMap map[int64]*models.TransactionCategory, tagMap map[int64]*models.TransactionTag, allTagIndexs map[int64][]int64) ([]byte, error) {
|
||||||
var ret strings.Builder
|
var ret strings.Builder
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import (
|
|||||||
// ParentAccountCurrencyPlaceholder represents the currency field of parent account stored in database
|
// ParentAccountCurrencyPlaceholder represents the currency field of parent account stored in database
|
||||||
const ParentAccountCurrencyPlaceholder = "---"
|
const ParentAccountCurrencyPlaceholder = "---"
|
||||||
|
|
||||||
// ISO 4217
|
// AllCurrencyNames represents all currency name in ISO 4217
|
||||||
var AllCurrencyNames = map[string]bool{
|
var AllCurrencyNames = map[string]bool{
|
||||||
"AED": true, //UAE Dirham
|
"AED": true, //UAE Dirham
|
||||||
"AFN": true, //Afghani
|
"AFN": true, //Afghani
|
||||||
|
|||||||
Reference in New Issue
Block a user