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 : How do I change the Income Account for a Stock Item that has already has been invoiced?Search Forum

Forum Home > QODBC - ODBC Driver for QuickBooks > QODBC Frequently Asked Questions

 New Topic 
 
 Post Reply 
 How do I change the Income Account for a Stock Item that has already has been invoiced? 
 Author   Message 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2007-01-18 12:13:48

Let's start by creating a invoice for a stock part called 'Door Frame':

INSERT INTO "InvoiceLine" ("CustomerRefFullName", "RefNumber",
"InvoiceLineItemRefFullName", "InvoiceLineDesc", "InvoiceLineQuantity",
"InvoiceLineRate", "InvoiceLineAmount", "InvoiceLineSalesTaxCodeRefFullName",
"FQSaveToCache") VALUES ('Richman, Karen-2273526', '1001',
'Door Frame', 'standard interior door frame', 3.00000,
150, 450.00, 'Non', 0)

To retrieve the TxnID for the transaction I just created I use the QODBC stored procedure:

SP_LASTINSERTID invoiceline

I can then retrieve the TxnLineID for the invoice line using the TnxID: '5DE5-1197763322':

select TxnID, InvoiceLineTxnLineID, InvoiceLineSeqNo from InvoiceLine
where TxnID='5DE5-1197763322'

The TnxID and TxnLineID for the Invoice line I just created is: 5DE5-1197763322 and 5DE7-1197763322

In QuickBooks a quick report for the invoice I just created shows the income account to be: Construction:Materials

Using the TnxID and TxnLineID for the Invoice line I just created I can change the income account to a new Income Account by using the following UPDATE statement: 

UPDATE InvoiceLine
SET InvoiceLineOverrideItemAccountRefFullName = 'New Income Account'
WHERE TxnID = '5DE5-1197763322' AND InvoiceLineTxnLineID = '5DE7-1197763322'

When I refresh the Quick Report in QuickBooks, it now shows the Income Account as: 'New Income Account':

 

  Top 
 New Topic 
 
 Post Reply 

Jump to