mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-15 23:47:33 +08:00
code refactor
This commit is contained in:
@@ -93,7 +93,7 @@ func (c *defaultTransactionDataPlainTextConverter) ParseImportedData(ctx core.Co
|
||||
return nil, nil, nil, nil, nil, nil, err
|
||||
}
|
||||
|
||||
transactionDataTable := datatable.CreateImportedTransactionDataTable(dataTable, ezbookkeepingDataColumnNameMapping)
|
||||
transactionDataTable := datatable.CreateNewImportedTransactionDataTable(dataTable, ezbookkeepingDataColumnNameMapping)
|
||||
|
||||
dataTableImporter := datatable.CreateNewImporter(
|
||||
ezbookkeepingTransactionTypeNameMapping,
|
||||
|
||||
@@ -78,6 +78,11 @@ func (t *defaultPlainTextDataRowIterator) HasNext() bool {
|
||||
return t.currentIndex+1 < len(t.dataTable.allLines)
|
||||
}
|
||||
|
||||
// CurrentRowId returns current index
|
||||
func (t *defaultPlainTextDataRowIterator) CurrentRowId() string {
|
||||
return fmt.Sprintf("line#%d", t.currentIndex)
|
||||
}
|
||||
|
||||
// Next returns the next imported data row
|
||||
func (t *defaultPlainTextDataRowIterator) Next() datatable.ImportedDataRow {
|
||||
if t.currentIndex+1 >= len(t.dataTable.allLines) {
|
||||
|
||||
Reference in New Issue
Block a user