I try to make a report where I need a table with sales invoices and in the same row date and amount of receipts. If I write a code:
Code |
---|
SEL ECT ReceiptLineItems.Ref, ReceiptLineItems.Payment, ReceiptLineItems.Ref.Date, SalesInvoice.Ref AS Ref1 FR OM Document.Receipt.LineItems AS ReceiptLineItems LEFT JOIN Document.SalesInvoice AS SalesInvoice ON ReceiptLineItems.Document = SalesInvoice.Ref |
I get all Lines of receipt to the salesinvoice, also Lines to another salesinvoice, if the sales invoice was "mentioned" in the document receipt.
Where can be an error?