-
Notifications
You must be signed in to change notification settings - Fork 302
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
Invoice: Optional payment fields override Quickbooks default handling #603
Comments
Update -- a monkey patch achieves the desired result by stripping the values from the XML payload, but this would not allow the values to be set. Seems we have a larger issue since ROXML sends the entire payload even when attributes are not set. class Quickbooks::Model::Invoice
def to_xml(options={})
f = Nokogiri::XML.fragment(super(options))
f.search("Invoice/AllowOnlinePayment").remove
f.search("Invoice/AllowOnlineCreditCardPayment").remove
f.search("Invoice/AllowOnlineACHPayment").remove
return f
end
end I have not yet found a way to establish some fields as optional, i.e. do not include them in the payload if they are not set. |
Thanks for the feedback @vanboom . It looks like that not setting an attribute results in somewhat undefined behavior. But for these boolean-like attributes it does coalesce down to Are you able to literally specify these attributes as needed? When I need to use these attributes I assume they are default (which does work for me) and when needed I call invoice.allow_online_credit_card_payment = true I see your monkeypatch and that would work. But I am curious: why not just set them to |
@vanboom Er, or |
Hi @ruckus, the theory was that by not setting the optional fields, we would allow Quickbooks to apply their own default value per invoice using the customer defaults. i.e. some customers would have ACH payments enabled, while others may have CC payments enabled, while others would have After some testing with the monkey patch above in place however, it appears that Quickbooks does not appear to apply the customer defaults to invoices created through the API even when we do not send the optional flags. Quickbooks honors the flags if set to true/false, but does not appear to be applying the customer defaults for API created invoices when the optional flags are not sent. This is concerning and I would consider that an issue with Quickbooks - this may take a while to confirm with them! |
@vanboom I see, thanks for the additional info. So if I am understanding your goal is the Setting that attribute in QBO.com for a test customer and then creating an Invoice doesn't seem to toggle those attributes in the QB Invoice form. They appear to be set on/off at a system-wide level. |
@ruckus, I think the settings that are in play are company settings as depicted here: I am not quite sure yet how the chain of settings is applied in Quickbooks. I noticed that we were commanding the |
I have reported this issue to Quickbooks -- it certainly appears that they are not applying the company preferences for ACH and CC payments to the API created invoices. Unfortunately, even though there are separate check boxes for ACH and CC payments in the sales forms -> preferences area, the preferences model only includes one attribute for So the behavior that prompted this issue is a Quickbooks issue, however, I think it is still worth considering whether or not we should be sending optional attributes as |
We have noticed that invoices exported to Quickbooks Online do not follow the default settings to allow online credit card payments. When building invoices, we are not setting these fields, but they appear to be sent over in the payload...
It appears that we are commanding Quickbooks optional fields such as
AllowOnlineCreditCardPayment
which we are never setting on our invoice model. My suggestion would be to not send these optional fields if they are 'nil' to allow Quickbooks default handling to take effect.The text was updated successfully, but these errors were encountered: