on 09-10-2010 12:44 PM
Hi
Please help
I need to create a query that gives all open or partially open deliveries and their outstanding values for which no invoice had been received on a particular date. In B1 I can get a report showing current open delivery notes but I need the equivalent for an earlier date.
Thanks
Adrian Lauchlan
Hi Adrian
here is ur query delivery is raised but invoice has not done
SELECT ODLN.DocNum AS 'Delivery No ', CONVERT(varchar(11), ODLN.DocDate, 103) AS 'Delivery Date',
OINV.DocNum AS 'Invoice No', CONVERT(varchar(11), OINV.DocDate, 103) AS 'Invoice Date',
OINV.DocTotal
FROM
dbo.OINV AS OINV INNER JOIN dbo.INV1 AS INV1 ON OINV.DocEntry = INV1.DocEntry
RIGHT OUTER JOIN dbo.ODLN AS ODLN INNER JOIN dbo.DLN1 AS DLN1 ON
ODLN.DocEntry = DLN1.DocEntry ON INV1.BaseEntry = DLN1.DocEntry AND
INV1.BaseLine = DLN1.LineNum AND INV1.BaseType = DLN1.ObjType
WHERE OINV.DocNum is null
ORDER BY ODLN.DocNum ASC
Regards
Jenny
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Adrian Lauchlan,
What is your definition for no invoice had been received on a particular date ? You may receive A/P invoice from Vendor but not A/R invoice. You send them to customer.
Thanks,
Gordon
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Gordon
The Auditors want a list of open GRPO's on specific dates. I have created the following query:
SELECT T0.[DocNum], T0.[DocStatus], T0.[TaxDate],T0.[DocDate], T0.[DocDueDate], T0.[CardCode], T0.[CardName], T0.[DocTotal], T0.[VatSum],T0.[DocTotal] - T0.[VatSum] as 'Net Total', T0.PaidtoDate FROM OPDN T0 WHERE T0.[TaxDate] <= '[%1]' and (T0.[UpdateDate] > '[%1]' or T0.DocStatus = 'O') ORDER BY T0.[TaxDate]
I can create another column to give the difference between the original total and the PaidtoDate total however this wouldn't identify if this happened after the date entered. When I look at the line data in the GRPO I can't see a date entry for entering the invoice. I suspect I will have to link to the Invoice and then look at the create date for each line
User | Count |
---|---|
99 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.