Member Login

Username
Password
Forget Password
New Sign Up
Search Forum

Buy Support
Incidents

If you can't find your answer in the FREE PUBLIC QDeveloper Forum, require URGENT Priority Support, or you need to send us private or confidential information:

Click Here
If you can't login and post questions or you are having trouble viewing forum posts:
Click Here
Callback
Support

If you live in USA, UK, Canada, Australia or New Zealand, you can leave us details on your question and request us to call you back and discuss them with you personally  (charges apply).

Click Here
 
Buy Support
Incidents
If you can't find your answer in the FREE PUBLIC QDeveloper Forum, require URGENT Priority Support, or you need to send us private or confidential information:
Click Here

Forum : Best method to confirm INVOICE INSERT was error free?Search Forum

Forum Home > QODBC - ODBC Driver for QuickBooks > QODBC v7 Forum

 New Topic 
 
 Post Reply 
[1]  
 Best method to confirm INVOICE INSERT was error free? 
 Author   Message 
  jrademan 
  
 Group: Members 
 Posts: 29 
 Joined: 2007-01-27 
 Profile
 Posted : 2007-01-30 08:30:55
I have many invoice with anything between 5 and 100 lines.
Using a batch method to insert the invoices what would be the best way to confirm that an invoice was written successfully with all lines and totals 100% correct?

I am thinking of a query to confirm totals  and compare to our inhouse system etc...
Is there a better way? if not what fields are critical fields to check?

thanks

Johan 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2007-01-30 09:12:57

We are currently working on a new stored procedure called "sp_lastinsertdata" which will return all the lines of an invoice from QuickBooks if you do:

sp_lastinsertdata InvoiceLine

after your last inset for each invoice. This will allow you to check the contents of the invoice, but more importantly, you will be returned all the values QuickBooks adds like TimeCreated, TimeModified, Sequence etc. that will allow you to mirror the complete transaction in your external system (if required).

 

  Top 
  jrademan 
  
 Group: Members 
 Posts: 29 
 Joined: 2007-01-27 
 Profile
 Posted : 2007-01-30 09:30:04
Hi Tom,

In the meantime what would be a good method?
Am hoping to go live in the next day or so.

Store TxnId for each insert and then run a query straight after to see if data similiar?

thanks

Johan 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2007-01-30 09:46:18

If you are creating invoices by just using InvoiceLine inserts without using group items, run:

SP_LASTINSERTID invoiceline

and grab the TxnID and do:

select Top 1 TxnID, InvoiceLineTxnLineId, InvoiceLineSeqNo from InvoiceLine
where TxnID='5D43-1197768681' order by InvoiceLineSeqNo Desc

Otherwise, if you do invoice group items you will need to do something like this:

select Top 1 TxnID, InvoiceLineTxnLineId, InvoiceLineSeqNo from invoiceline
where TxnID='5D43-1197768681' and InvoiceLineTxnLineId is not null
order by InvoiceLineSeqNo Desc

but if you are the only one creating invoices at the time, simply jump the gun by just doing:

select Top 1 TxnID, InvoiceLineTxnLineId, InvoiceLineSeqNo from invoiceline
where InvoiceLineTxnLineId is not null
order by TimeModified DESC, InvoiceLineSeqNo Desc

BTW: You can leave out the null test if you don't use Itemgroups.

 

  Top 
 New Topic 
 
 Post Reply 
[1]  

Jump to