import transactions from mt940 file

This commit is contained in:
MaysWind
2025-06-20 00:57:07 +08:00
parent 8f0e6ba95a
commit 4a6f7eb43c
20 changed files with 1128 additions and 1 deletions
+43
View File
@@ -0,0 +1,43 @@
package mt
type mtCreditDebitMark string
const (
MT_MARK_CREDIT mtCreditDebitMark = "C"
MT_MARK_DEBIT mtCreditDebitMark = "D"
MT_MARK_REVERSAL_CREDIT mtCreditDebitMark = "RC"
MT_MARK_REVERSAL_DEBIT mtCreditDebitMark = "RD"
)
// mt940Data defines the structure of mt940 data
type mt940Data struct {
StatementReferenceNumber string
RelatedReference string
AccountId string
SequentialNumber string
OpeningBalance *mtBalance
ClosingBalance *mtBalance
ClosingAvailableBalance *mtBalance
Statements []*mtStatement
}
// mtStatement defines the structure of mt940 statement
type mtStatement struct {
ValueDate string
EntryDate string
CreditDebitMark mtCreditDebitMark
FundsCode string
Amount string
TransactionTypeIdentificationCode string
ReferenceForAccountOwner string
ReferenceOfAccountServicingInstitution string
AdditionalInformation []string
}
// mtBalance defines the structure of mt940 balance
type mtBalance struct {
DebitCreditMark mtCreditDebitMark
Date string
Currency string
Amount string
}