SELECT FIRSTFAST AccountNum, AmountCur, AmountMST, dataAreaId, DueDate, RecId, recVersion, RefRecId, TransDate
FROM CustTransOpen(CustTransOpen) JOIN Invoice, TransType, TransDate, AmountCur, AccountNum, Voucher, CollectionLetterCode
FROM CustTrans(CustTrans) ON CustTransOpen.AccountNum = CustTrans.AccountNum AND CustTransOpen.RefRecId = CustTrans.RecId AND ((TransType = 36)
OR (TransType = 2) OR (TransType = 6) OR (TransType = 8) OR (TransType = 7) OR (TransType = 13) OR (TransType = 1)) AND ((AmountCur>=0))
JOIN AccountNum, Party, Currency FROM CustTable(CustTable) ON CustTrans.AccountNum = CustTable.AccountNum
JOIN * FROM CustInvoiceJour(CustInvoiceJour_CN)
ON CustTrans.Invoice = CustInvoiceJour.InvoiceId AND CustTrans.AccountNum = CustInvoiceJour.InvoiceAccount
AND CustTrans.TransDate = CustInvoiceJour.InvoiceDate AND CustTrans.Voucher = CustInvoiceJour.LedgerVoucher
留言评论
暂无留言