Use Case: The bank statement might contain some payments, that should NOT AT ALL get into CiviCRM (e.g. salary payments).
Is there an easy way to make the importer plugin skip certain lines?
Best Detlev
Use Case: The bank statement might contain some payments, that should NOT AT ALL get into CiviCRM (e.g. salary payments).
Is there an easy way to make the importer plugin skip certain lines?
Best Detlev
Assuming that you're talking about the CSV importer, there is a configuration option called line_filter
where you can provide a regular expression to skip a line if it doesn't match it. The "line" given to preg_match()
is a standardized csv string. See here.
Additionally, there's also another (and even older) line filter mechanism based on the filter
attribute, see here. However this approach has mostly been abandoned in favour of the more flexible regex
based approach. However, it's still in the code for backwards compatibility, and there are still examples using it, see e.g. here.
Another way of doing this, is to operate with two bank accounts. One that is processed in CiviCRM, and one for transactions that normally shouldn’t be processed in CiviCRM. Only have the first one as bank files, and then you have solve it