Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A suggestion for pulling Bank Transactions #17

Open
kenwest opened this issue Jun 18, 2015 · 2 comments
Open

A suggestion for pulling Bank Transactions #17

kenwest opened this issue Jun 18, 2015 · 2 comments

Comments

@kenwest
Copy link
Contributor

kenwest commented Jun 18, 2015

Eileen,

I'd appreciate your thoughts on pulling Bank Transactions.

End date

One good reason for not pulling BTs is they can disappear - a Xero user could do a Bank Statement reconciliation and then later undo it, and redo it. This could result in hanging Contributions in CiviCRM with no corresponding BTs in Xero.

My assumption, though, is that after a period of time a BT would become static and no further changes would occur (with rare exceptions). Let's say that period is 2 business days after the BT is last modified (eg, assume that a BT created on Day 1 can be replaced on Day 1 or Day 2 but not Day 3).

The pull for BTs could work like that for Invoices except with an extra parameter 'end_date'. The parameters for the job would be something like ...

plugin=xero
start_date=midnight 5 days ago
end_date=midnight 3 days ago

... and the job would pick up BTs modified at least 5 days ago, but not in the last 3 days ('midnight 3 days ago' covers the case where a BT created on Friday morning might be replaced any time up to Monday afternoon).

Corollary - having both Bank Transactions and Invoices in the civicrm_accounts_invoice table

It seems Bank Transactions and Invoices might run into each other here. Would setting ...

connector_id=1

... help?

@eileenmcnaughton
Copy link
Owner

I'll take a read of this & mull it in a bit - but one quick question - are you using bank transactions or just invoices? (most of our customers just do invoices but a recent one wanted bank transactions so it's pretty new)

@kenwest
Copy link
Contributor Author

kenwest commented Jun 18, 2015

We use Invoices if the transaction originates in CiviCRM (eg, credit card payment, online contribution using the 'pay later' option.) We use Bank Transactions for transactions that don't (eg, regular EFT payment) so we can take advantage of Xero's Bank Statement matching rules.

In lieu of a BT pull, our proposal is to export BTs from Xero as a report, import them into CiviCRM, and set a custom field "Suppress Xero Invoice" to "Yes". Our Invoice push hook prevents Contributions with that field set from being pushed to Xero.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants