- Code: Select all
[ExpSign] = 1 AND [AccClass] = 0 AND [IsEnabled] = 1 AND [PostingAcc] = 1 AND [DistributionAcc] = 0
[ExpSign] = 1 AND [AccClass] = 0 AND [IsEnabled] = 1 AND [PostingAcc] = 1 AND [DistributionAcc] = 0
select GL_Ledger.AccountNo, GL_Ledger.Description, GL_Ledger.ExpSign, GL_Ledger.AccClass, GL_Category.AccType, GL_Category.Description Category
FROM GL_Ledger
JOIN GL_Category ON GL_Category.GLCategoryID = GL_Ledger.GLCategoryID
WHERE GL_Ledger.AccClass = 0 --Normal = 0, RetainedEarnings = 1, Bank = 2, CreditorsControl = 3, DebtorsControl = 4, InventoryControl = 5
AND GL_Ledger.ExpSign = 1 -- Debit = 0, Credit = 1
AND GL_Ledger.IsEnabled = 1 -- Duh
AND GL_Ledger.PostingAcc = 1 -- Duh
AND GL_Category.AccType = 0 -- ProfitAndLoss = 0, BalanceSheet = 1
Mike.Sheen wrote:If you're wanting to come up with a query for the user to select an account, is there any reason why you wouldn't want the user to select a distribution account?
Return to Technical and or Programming
Users browsing this forum: No registered users and 7 guests