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

Contribution status update is not pushed to quickbooks #50

Open
samuelsov opened this issue Dec 6, 2023 · 6 comments
Open

Contribution status update is not pushed to quickbooks #50

samuelsov opened this issue Dec 6, 2023 · 6 comments

Comments

@samuelsov
Copy link
Contributor

Here is the current workflow:

  1. we have a pending contribution
  2. it get pushed to Quickbooks
  3. later, the payment is received and the status is updated to completed in CiviCRM

Problem: the contribution status is not pushed in Quickbooks

The other way seems to work: if we complete the payment in Quickbooks, the contribution get completed in CiviCRM.

Before I dig any further into this, is there any specific reason why it works only in one way and not the other ?

@agileware-justin
Copy link
Contributor

Problem: the contribution status is not pushed in Quickbooks

Can you elaborate on this workflow and your expectations.

@samuelsov
Copy link
Contributor Author

When we do a payment by credit card, it is pushed in Quickbooks as an invoice + a payment so the invoice is marked as paid.

When we do a payment by check (pending), it is pushed in Quickbooks as an invoice (no payment).

So my expectation is that adding a payment to a pending contribution in CiviCRM should add a payment in Quickbooks.

I think it would require a call to CRM_Civiquickbooks_Invoice::pushPayments when a payment is added in CiviCRM.

Does that make sense ?

@darrick
Copy link
Contributor

darrick commented Dec 8, 2023

@samuelsov What is pushed depends upon the contribution statuses in the accountsync settings. I think by default it's only "Completed". So, check the account_sync_push_contribution_status setting.

Then check the civicrm_account_invoice table to see if that setting is working. I.e. if Pending isn't in the list then when you create a contribution by check see if the contribution ends up in that table (it shouldn't). But check the contribution you created is in state pending. In my system when I create a contribution by check it's status is completed.

And you're supposed to be able to set the accountsync settings via the quickbooks settings form. But it's currently broken. I'm here because I'm working on a PR for that.

I also added some code for passing the $QBOPayment->DepositToAccountRef and $QBOPayment->PaymentMethodRef into Quickbooks. That may be what you are looking for. As, I recall when I took Credit Cards they ended up in my CC processor account but also the Same happened when I took checks. Which I needed in the Undeposited Funds account on QB. master...darrick:au.com.agileware.civiquickbooks:v2.9.4

@samuelsov
Copy link
Contributor Author

@darrick Thank you but I don't think it's a setting issue:

  • account_sync_push_contribution_status contains status Completed and Pending which is what we want
  • civicrm_account_invoice seems good to me: the contribution in Pending state are correctly pushed to Quickbooks.

I'll check the code regarding pushing DepositToAccountRef and PaymentMethodRef. Not sure this is the crux of the problem though as the pushing of the payment doesn't seems to be triggered in the first hand.

I will do some more testing to see if there is a specific reason payment is not pushed but my feeling is that this use case is simply not implemented yet.

@danielb-dd
Copy link

@samuelsov Did you manage to solve this issue? I am having a similar issue with pending and cancelled statuses not being synced from and to civi

@agileware-fj
Copy link
Contributor

This is not a matter so much that there's an issue with pushing updates through, but that the system is designed to only push new invoices to Quickbooks Online, and receive updates back from it, i.e. changes to existing invoices should be performed directly in QBO:

  1. Create Contribution in CiviCRM
  2. Invoice is created in QBO
  3. Mark Invoice as paid, or voided, in QBO
  4. Contribution is marked accordingly in CiviCRM

Swapping steps 3 & 4 is not supported.

This followed the model that CiviXero set at the time we created this and is the model our clients prefer.

If anyone wants to create a PR to add this as a feature, we'd be happy to review on the proviso that the functionality was opt-in.

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

No branches or pull requests

5 participants