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
|
|
[QODBC]Invalid operand for operator |
Author |
Message |
|
Posted : 2008-10-10 08:16:41 |
I'm trying to add an invoice to a customer. However I'm getting an Invalid Operand for operator error. I read the other two posts on this issue. One post said that to insert a new invoice all you would need is either the 'CustomerRefFullName or CustomerRefListID', the InvoiceLineItemRef and the Sales Tax Code. I'm not sure what I would need on top of what i have so far to make this work?
INSERT INTO INVOICELINE (CustomerRefFullName, InvoiceLineItemRefFullName, InvoiceLineSalesTaxCodeRefFullName, InvoiceLineQuantity ) Values ('Alex' , 'Floor Plans', 'NON', '1' )
any suggestions thank you |
|
|
|
Tom |
|
Group | : Administrator |
Posts | : 5510 |
Joined | : 2006-02-17 |
|
Profile |
|
Posted : 2008-10-10 08:22:25 |
Well the "Invalid operand for operator" error is because InvoiceLineQuantity is a numeric and not a string:-
INSERT INTO INVOICELINE (CustomerRefFullName, InvoiceLineItemRefFullName, InvoiceLineSalesTaxCodeRefFullName, InvoiceLineQuantity ) Values ('Alex' , 'Floor Plans', 'NON', 1)
See: How do I create Invoices? for more. |
|
|
|
|
Posted : 2009-01-03 08:48:29 |
Same problem "Invalid operand..."
Here is my statement:
INSERT INTO invoiceline (CustomerRefListID, ShipAddressAddr1, ShipAddressAddr2, ShipAddressAddr3, ShipAddressCity, ShipAddressState, ShipAddressPostalCode, InvoiceLineItemRefListID, InvoiceLineQuantity, InvoiceLineAmount, FQSaveToCache) VALUES ('E890000-1071712080','#order.shipfirst# #order.shiplast#','#order.shipaddress1#','#order.shipaddress2#', '#order.shipcity#', '#order.shipstate#', '#order.shipzip#', '15670000-1187098263',1, '#order.price#',0)
Also, when I insert into invoiceline just one item , I do not have to insert again into the invoice table...right? |
|
|
|
Tom |
|
Group | : Administrator |
Posts | : 5510 |
Joined | : 2006-02-17 |
|
Profile |
|
Posted : 2009-01-03 09:04:42 |
Same thing: '#order.price#' should be: #order.price#
If your invoices are simple one liners, then you just need to do one insert into the InvoiceLine table. |
|
|
|
|
Posted : 2009-01-03 10:04:53 |
Query appeared to work without error this time after making the change - but did not post in Quickbooks that I can see.
Is there a field I missed that could have kept it from writing into invoices? |
|
|
|
Tom |
|
Group | : Administrator |
Posts | : 5510 |
Joined | : 2006-02-17 |
|
Profile |
|
Posted : 2009-01-04 11:19:35 |
Check the bottom of the QODBC Messages Log in the QODBC Setup Screen "Messages" tab in case there actually was an error. |
|
|
|
|