Newbies Lisette Posted August 24, 2021 Newbies Posted August 24, 2021 Existing solution pushing invoices with no sales tax has worked. Now need to push sales tax on some invoices. I've set up an area where we can pull the Sales Tax Groups and get the IDs. Users then select from these groups for projects and invoices. So, I have the QB List ID as well as the Full Name. I've tried following the example in the demo to set the sales tax by both name and List ID. This is the step from the demo. I'm just filling in the related value I have rather than the global field noted below. PCQB_RqAddFieldWithValue( "ItemSalesTaxRef::FullName"; Main::gPush_Invoice CustomerSalesTaxCodeRefFullName) I've got this for both the Invoice as a whole and the line item. The invoice tax step comes just after setting the due date. I get the attached error. What am I doing wrong?
Geoffrey Gerhard Posted August 24, 2021 Posted August 24, 2021 Your example step is passing the ItemSalesTaxRef, and if that step is active, it's NOT the source of this problem. The error message is telling you that the identified element is out of sequence. SalesTaxCodeRef is a component of an InvoiceLine—think "taxable" or "non-taxable" (although the QB defaults are, I think, "tax" and "non") and as such belongs inside an InvoiceLine node. HTH! Geoffrey Gerhard Creative Solutions Incorporated 14000 Creekside Drive Matthews, NC 28105 704.814.6852
Newbies Lisette Posted August 24, 2021 Author Newbies Posted August 24, 2021 Thanks, I'll give that a try in the morning. The demo file shows setting ItemSalesTaxRef as part of the invoice and SalesTaxCodeRef as a part of the line items. If this is sending just tax and non for the line item, how do I associate the proper tax jurisdiction rate with the Invoice? That's what I thought the ItemSalesTaxRef was, and that the SalesTaxCodeRef at the line item would be the tax or non, though I likely have that passing the wrong value. In this instance, we have 5 possible tax jurisdictions with different rates. Thanks again.
Geoffrey Gerhard Posted August 24, 2021 Posted August 24, 2021 It looks like we're saying the same thing, and that your understanding of what should be happening is correct. I suspect that when you look at your script, you'll find that the step that calls... PCQB_RqAddFieldWithValue( "SalesTaxCodeRef::FullName"; "your value here" ) ... precedes the step that calls ... PCQB_RqAddRelatedRecord( "InvoiceLineAdd" ; "" ; "" ) ... and that moving the former below the latter (likely just above the step that calls the "PCQB_RqCloseRelatedRecord" function) will resolve the problem. If not, feel free to post a screenshot of your script. HTH! Geoffrey Gerhard Creative Solutions Incorporated 14000 Creekside Drive Matthews, NC 28105 704.814.6852
Newbies Lisette Posted August 25, 2021 Author Newbies Posted August 25, 2021 Thanks for your help. The issue was that I was entering the tax for the line item after I had closed the line item. Just needed to move the close related record step down below the tax step. Missed it due to the way that line was wrapping in my remote session.
Recommended Posts
This topic is 1177 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now