Cross Referencing QuoteWerks Quote, Order and Invoice Numbers

We’ve been asked several times by clients how to cross-reference the Quote, Order and Invoice numbers that are processed through QuoteWerks. While you can get the Converted Ref in QuoteWerks (so the Order or Quote an Invoice was Converted from or the Quote and Order came from) there’s no a way within the reporting to get all three numbers together.

However, if you’re feeling adventurous and would like to do a report in Excel with the QuoteWerks database as a remote data source, then try copy/pasting the following query in. It should return you all Invoice Document Numbers with the relevant Quote and/or Order Numbers.

We hope this is of use,

Steve and the Hilltops IT QuoteWerks team.

SELECT ISNULL(DHQ.DocNo, ‘None’) AS [Quote Ref], DHO.DocNo AS [Order Ref], DHI.DocNo AS [Invoice Ref]
FROM QuoteWerks.dbo.DocumentHeaders AS DHI WITH (NOLOCK)
INNER JOIN QuoteWerks.dbo.DocumentHeaders AS DHO WITH (NOLOCK)
ON (DHI.DocNo = DHO.ConvertedRef)
LEFT JOIN QuoteWerks.dbo.DocumentHeaders AS DHQ WITH (NOLOCK)
ON (DHO.DocNo = DHQ.ConvertedRef)
WHERE (DHI.DocType = ‘INVOICE’)
AND (DHO.DocType = ‘ORDER’)
AND ((DHQ.DocType = ‘QUOTE’) OR (DHQ.DocType IS NULL))
UNION
SELECT ISNULL(DHQ.DocNo, ‘None’) AS [Quote Ref], ‘None’ AS [Order Ref], DHI.DocNo AS [Invoice Ref]
FROM QuoteWerks.dbo.DocumentHeaders AS DHI WITH (NOLOCK)
LEFT JOIN QuoteWerks.dbo.DocumentHeaders AS DHQ WITH (NOLOCK)
ON (DHI.DocNo = DHQ.ConvertedRef)
WHERE (DHI.DocType = ‘INVOICE’)
AND ((DHQ.DocType = ‘QUOTE’) OR (DHQ.DocType IS NULL))

Related Stories

See all

Copying the QuoteWerks QuoteValet URL to the Windows clipboard

Jan 31, 2019

The script below provides a way to quickly and easily copy the QuoteValet document URL for the current open document in QuoteWerks to the Windows clipboard. This can then be pasted into an email or other document to send to your customer. To implement the script, we suggest copy/pasting the below code into a text […]

READ MORE

User is already logged into QuoteWerks message

Jun 18, 2015

This is a fairly rare issue when working with newer versions of QuoteWerks, but it can be very frustrating when it does occur! The issue may occur if a User’s system crashed or they switched off their PC without first logging out of QuoteWerks and requires you to manually delete the “.lck” file associated with […]

READ MORE

QuoteWerks F2 lookup and double click does not work

May 19, 2015

This is another reasonable common query that our clients have which is usually due to the particular User’s Preference settings that is logged in on a particular workstation. Furthermore it will usually affect the User on any workstation that they try and if they log in as a.n.other User then QuoteWerks will probably behave as expected. Ref. […]

READ MORE