2016-11-30 56 views
0

我在嘗試插入發票時遇到了問題。 我在VB Demo應用程序中運行這些查詢,並且都有錯誤。Quickbooks - 麻煩QODBC SQL

有什麼想法?

查詢1

insert into invoiceline 
(CustomerRefFullName,RefNumber,InvoiceLineSerialNumber,InvoiceLineDesc,FQSaveToCache) 
values 
('Esteban Inc.','98908','1','line 1',1) 
--- 
insert into invoice 
(CustomerRefFullName,ARAccountRefListID,TemplateRefFullName,RefNumber,TermsRefFullName,TxnDate,DueDate, 
"BillAddressAddr1", "BillAddressAddr2", "BillAddressAddr3", "BillAddressCity", "BillAddressState", "BillAddressPostalCode", "BillAddressCountry", 
"CustomerSalesTaxCodeRefFullName", "ItemSalesTaxRefFullName","IsPending","IsToBePrinted") 
values 
('Esteban Inc.','80000029-1478460828' ,'Time & Expense Invoice','98908','Net 30',{d'2016-10-31'},{d'2016-11-30'}, 
'Esteban Inc.','Project: TEST','Street 0001 - Dpto H','Rosario', 'Santa Fe', '2000','Argentina', 
'Non','NY - Monroe County',0,1) 

錯誤

enter image description here

查詢2

INSERT INTO "InvoiceLine" ("InvoiceLineItemRefListID", "InvoiceLineSalesTaxCodeRefListID", 
"InvoiceLineType", "InvoiceLineQuantity", 
"InvoiceLineRate", "InvoiceLineAmount", 
"InvoiceLineDesc", 
"InvoiceLineClassRefListID", "FQSaveToCache") 
VALUES (null,'80000002-1478214656', 
'Item', 0.75, 
125, 93.75, 
'10/26/2016 - Regular - Dario Diaz (0.75 hours) // Q4 2016 Retainer - October Retainer Work - Reviewing issue with pdf''s media type with Ale, testing in dev.', 
'80000001-1478457400', 1) 

INSERT INTO "Invoice" ("CustomerRefListID", "ARAccountRefListID", "TemplateRefListID", 
"TxnDate" ,"RefNumber", "BillAddressAddr1", 
"BillAddressAddr2", "BillAddressAddr3", "BillAddressCity", 
"BillAddressState", "BillAddressPostalCode", "BillAddressCountry", 
"IsPending", "IsToBePrinted", "TermsRefListID", 
"DueDate", "CustomerSalesTaxCodeRefListID") 
VALUES ('80000002-1478457181', '80000029-1478460828', '8000000B-1478214656', 
{d'2016-08-23'}, '102400', 'Some Client', 
'Project: Some Client - Q4 2016 Retainer', '190A Street', 'Rochester', 
'NY', '14625', 'USA', 
0, 1, '80000006-1478214663', 
{d'2016-11-30'}, '80000001-1478214656') 

錯誤

enter image description here

提前感謝!

Esteban.-

+0

是你試圖創建一個沒有物品的invoiceline?我注意到你已經指定了InvoiceLineSalesTaxCodeRefListID和item type = Item,但是你沒有指定InvoiceLineItemRefListID。您是否可以通過QuickBooks應用程序(GUI)創建相同的記錄。 ? –

+0

查詢1:我認爲您可能沒有在QuickBooks中啓用高級庫存。由於您在SQL語句中是SerialNumber,所以需要預先盤存。 –

回答

1

問題1:我想你可能不會在你的QuickBooks啓用先進的庫存。由於您在SQL語句中是SerialNumber,所以需要預先盤存。

查詢2:從查詢中,我發現您在InvoiceLineItemRefListID字段中插入了空值。您需要在InvoiceLineItemRefListID字段中插入一個有效值。

請參閱下文提到的文章創建發票使用QODBC: http://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2389/0/how-to-create-invoices-using-qodbc

- 拉金德拉Dewani

支持主管,QODBC & QODBC-POS

FLEXquarters.com有限公司