Open samuelsov opened 11 months ago
Problem: the contribution status is not pushed in Quickbooks
Can you elaborate on this workflow and your expectations.
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 ?
@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. https://github.com/agileware/au.com.agileware.civiquickbooks/compare/master...darrick:au.com.agileware.civiquickbooks:v2.9.4#
@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 wantcivicrm_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.
@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
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:
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.
Here is the current workflow:
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 ?