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
|
|
table/field links/relationships |
Author |
Message |
|
Posted : 2009-02-06 09:05:07 |
where do i find the chart that shows what fields in table-A are linked to table-B.......
i already have the table/field schema, but it only shows fieldnames, sizes, etc.. no relationship info.
|
|
|
|
Tom |
|
Group | : Administrator |
Posts | : 5510 |
Joined | : 2006-02-17 |
|
Profile |
|
Posted : 2009-02-06 15:30:54 |
See: Where are the schema rules for using QODBC? How do I use sp_columns? The RELATES_TO column when using sp_columns tablename shows the relationships.
However, QuickBooks is a flat table with #hashed columns and QODBC sends a XML request to QuickBooks that returns a XML document, so the QODBC tables are virtual only! So don't get all database crazy here.
This provides some inslight to where things are in the virtual tables: What are the table relationships used in sp_report reports?
Hey, but doesn't mean you can't do crazy stuff like this:
SELECT InvoiceLine."TxnDate", InvoiceLine."RefNumber", InvoiceLine."ShipAddressAddr1", InvoiceLine."ShipAddressCity", InvoiceLine."ShipAddressState", InvoiceLine."ShipAddressPostalCode", InvoiceLine."PONumber", InvoiceLine."SalesRepRefFullName", InvoiceLine."ShipDate", InvoiceLine."InvoiceLineItemRefFullName", InvoiceLine."InvoiceLineDesc", InvoiceLine."InvoiceLineQuantity", InvoiceLine."InvoiceLineRate", InvoiceLine."InvoiceLineInvoiced", Customer."FullName", Customer."BillAddressCity", Customer."BillAddressState", Customer."Phone", Customer."Contact", Customer."CustomerTypeRefFullName", ItemInventory."AverageCost", ItemInventory."CustomFieldAffilLicensingGroup", ItemInventory."CustomFieldBarCode", ItemInventory."CustomFieldCategory", ItemInventory."CustomFieldSize", ItemInventory."CustomFieldState", SalesOrderLinkedTxn."TxnDate", SalesOrderLinkedTxn."RefNumber" FROM (("InvoiceLine" LEFT OUTER JOIN "Customer" ON "InvoiceLine"."CustomerRefListID"="Customer"."ListID") LEFT OUTER JOIN "ItemInventory" ON "InvoiceLine"."InvoiceLineItemRefListID"="ItemInventory"."ListID") LEFT OUTER JOIN "SalesOrderLinkedTxn" ON "InvoiceLine"."TxnID"="SalesOrderLinkedTxn"."LinkedTxnTxnID"
but you need to know what you are doing. |
|
|
|
|
Posted : 2009-02-07 02:55:42 |
duhhhh. i see the field now called 'relates-to'. thanks for pointing it out.
but, i dont see the link fields i expected would exist:
eg// if an invoice was generated via an estimate(or multiple estimates), each of the 'invoiceline' records should be stroing some kind of link back to the 'estimateline' record that it is based on. othrwise, how can the NEXT progress invoice know how much more is left to be billed out?
|
|
|
|
|
Posted : 2009-02-07 06:37:24 |
thanks for pointing out that column, i totally missed it!
BUT, i still cant see the links i'm looking for:
specifically, when a progress invoice is generated from one or more estimates. i have to assume those invoiceline records and estimateline records are linked somehow, but none of the fields in 'related-to' seem to show that relationship. ________________________________________________________________________________
*i need to generate a report showing (for each item), the total estimate, invoiced-to-date, retainage held, retainage-paidout, current-%-being-invoiced, current-retainage, etc....
side notes: QB seems to like to generate retainage as a single line per invoice. since not all items are lienable, we have to generate the retainage amounts per service-item. so we're attempting various workarounds for this.
the other workaround, is that the 'customer invoice' typically should not show each and every service-item. they are grouped into unique item codes for each customer as they like to see it presented. |
|
|
|
Tom |
|
Group | : Administrator |
Posts | : 5510 |
Joined | : 2006-02-17 |
|
Profile |
|
Posted : 2009-02-07 09:52:17 |
|
|
|
|