Comments (3)
If your data does not contain any transactions, then no transactions will be created during parsing. New transactions are only created when encountering tag :61:
(which your data does not have). So if you set the scope to models.Transaction
, the data cannot be recorded as there is not Transaction
object to hold the data.
You could leave the scope to the default (models.Transactions
) and then the Transactions
object that the parse()
function returns will contain the last value found in the balance tags. Which will work if you only have 1 block. But if you have more blocks, you will only keep the last block info.
from mt940.
I'm not entirely sure I understand the question to be honest. But I'll try to explain the working of the library a bit.
The scope
decides whether a tag is part of the Tranasaction
or Transactions
(plural). If it's a transaction
scoped item it will be different for each transaction, if it's a transactions
scoped item it will stay the same between transactions.
Line 102 in 4ea8674
If needed, you can override this attribute: some_tag.scope = models.Transaction
from mt940.
Thanks for your reply @wolph.
What if a MT940 doesn't have any transactions, but just statement/account/balance information?
Here's an example document (I have kept only the tags in the sequence they show up)
:20:
:25:
:28:
:60F:
:62F:
:64:
-
from mt940.
Related Issues (20)
- Parsing transactions : key 64 HOT 8
- Multiple accounts in one file HOT 7
- Parser doesn't show running balance or opening/closing balance at transaction level HOT 2
- Status and Fund code , when Currency ends with a D HOT 2
- Getting only single account data instead of multiple accounts HOT 1
- Non-numeric statement number HOT 2
- Exporting to tabular format HOT 1
- cannot run for citibank? HOT 1
- Single "account_identification" field HOT 2
- Statement line is parsed incorrectly for customer/bank reference HOT 2
- MT940 Issues parsing with :61: HOT 4
- AttributeError: module 'mt940' has no attribute 'parse' HOT 5
- Transaction Reference Number is not returned by the parser HOT 5
- Missing essential documentation for Transaction fields. HOT 2
- Dropping Transaction Data? HOT 1
- First intermediate_opening_balance line missing HOT 5
- AttributeError: 'NoneType' object has no attribute 'encoding' HOT 1
- Minor parsing errors
- New transaction is only created on `:61:` tag (statement) and not `:20:` tag (transaction reference number)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mt940.