report 54082 "AR16.2-DailyCollectionSummary"
{
UsageCategory = ReportsAndAnalysis;
ApplicationArea = All;
DefaultLayout = RDLC;
RDLCLayout = './src/Report/Layout/Rep54082.AR162DailyCollectionSummary(BG).rdl';
Caption = 'Daily Collection Summary(BG)';
dataset
{
dataitem(CustLedgerEntry; "Cust. Ledger Entry")
{
DataItemTableView = sorting("Posting Date") WHERE("Document Type" = FILTER(Payment));
column(Posting_Date; "Posting Date")
{
}
column(NCash; NCash)
{
}
column(NChq; NChq)
{
}
column(ReturnChq; ReturnChq)
{
}
column(DirectDeposit; DirectDeposit)
{
}
column(ReturnDirecDep; ReturnDirecDep)
{
}
column(PdChq; PdChq)
{
}
column(OtherPayment; OtherPayment)
{
}
column(OtherReturns; OtherReturns)
{
}
column(FromDate; FromDate)
{
}
column(ToDate; ToDate)
{
}
//company infromation
column(CompanyName; CompanyInfoRec.Name)
{
}
column(Company_Address; CompanyInfoRec.Address)
{
}
column(Company_Address1; CompanyInfoRec."Address 2")
{
}
trigger OnPreDataItem()
begin
//Filter Using Type Of Payment
CustLedgerEntry.SetFilter("Payment Method Code", '%1|%2|%3', 'CASH', 'CHEQUE', 'CUSDEP');
//Taking Only Payment Details
CustLedgerEntry.SetFilter("Document Type", '%1', "Document Type"::Payment);
//Date Range
if (FromDate <> 0D) and (ToDate <> 0D) then
CustLedgerEntry.SETFILTER("Posting Date", '%1..%2', FromDate, ToDate);
end;
trigger OnAfterGetRecord()
begin
NCash := 0;
NChq := 0;
ReturnChq := 0;
DirectDeposit := 0;
ReturnDirecDep := 0;
OtherPayment := 0;
OtherReturns := 0;
PostingDate := 0D;
GenJournalLine.Reset();
CalcFields("Amount (LCY)");
//Cash Payment
if "Payment Method Code" = 'CASH' then
NCash := "Amount (LCY)"
//Cheque Payment
else
if ("Payment Method Code" = 'CHEQUE') and (Reversed = false) then
NChq := "Amount (LCY)"
//Return Cheque
else
if (("Payment Method Code" = 'CHEQUE') and (Reversed = true)) then
ReturnChq := "Amount (LCY)"
//Direct Deposit
else
if (("Payment Method Code" = 'CUSDEP') OR ("Payment Method Code" = 'DP')) and (Reversed = false) then
DirectDeposit := "Amount (LCY)"
//Return Direct Deposit
else
if (("Payment Method Code" = 'CUSDEP') OR ("Payment Method Code" = 'DP')) and (Reversed = true) then
ReturnDirecDep := "Amount (LCY)"
//Other Returns
else
if Reversed = true then
OtherReturns := "Amount (LCY)"
else
OtherPayment := "Amount (LCY)";
//PDC Cheque(Need To check with gayan)
if PostingDate <> "Posting Date" then begin
PostingDate := "Posting Date";
PdChq := 0;
end;
GenJournalLine.SetRange(GenJournalLine."Posting Date", PostingDate);
//GenJournalLine.SetRange(GenJournalLine."Journal Batch Name", 'DEFAULT');
GenJournalLine.SetRange(GenJournalLine."Journal Template Name", 'PDC');
if GenJournalLine.FindSet() then begin
repeat
PdChq = GenJournalLine."Amount (LCY)";
until GenJournalLine.Next() = 0;
end;
end;
}
}
requestpage
{
layout
{
area(content)
{
group("Posting Date")
{
field("From Date"; FromDate)
{
ApplicationArea = All;
}
field("To Date"; ToDate)
{
ApplicationArea = All;
}
}
}
}
actions
{
area(processing)
{
}
}
}
trigger onprereport()
begin
CompanyInfoRec.Get();
end;
var
CompanyInfoRec: Record "Company Information";
GenJournalLine: Record "Gen. Journal Line";
FromDate: Date;
ToDate: Date;
PostingDate: Date;
NCash: Decimal;
NChq: Decimal;
PdChq: Decimal;
ReturnChq: Decimal;
NetChq: Decimal;
DirectDeposit: Decimal;
ReturnDirecDep: Decimal;
NetDirDep: Decimal;
OtherPayment: Decimal;
OtherReturns: Decimal;
}
values are not assigned to variable "OtherPayment"
*This post is locked for comments

Report
All responses (
Answers (