Query 3 Customer Sales per Period, source in 29
Source29
src/Layers/W1/BaseApp/Sales/Customer/CustomerSalesPerPeriod.Query.al38 lines, Copyright (c) Microsoft Corporation. MIT
// ------------------------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
// ------------------------------------------------------------------------------------------------
namespace Microsoft.Sales.Customer;
using Microsoft.Sales.Receivables;
/// <summary>
/// Calculates total sales and profit amounts for customers within a specified period.
/// </summary>
query 3 "Customer Sales per Period"
{
QueryType = Normal;
elements
{
dataitem(CustomerLedgerEntry; "Cust. Ledger Entry")
{
SqlJoinType = LeftOuterJoin;
filter(CustomerNo; "Customer No.")
{
}
filter(PostingDate; "Posting Date")
{
}
column(SalesLCY; "Sales (LCY)")
{
method = Sum;
}
column(ProfitLCY; "Profit (LCY)")
{
method = Sum;
}
}
}
}