code explanation

Hi Friends,

can anyone help me to get the explanation of below code.

Item - OnAfterGetRecord()

Saleamnt :=0;
PrevQty :=0;
CurrentQty :=0;
TranEntry.RESET;
TranEntry.SETCURRENTKEY(
“Division Code”,“Item Category Code”,“Product Group Code”,“Item No.”,Date,“Store No.”,“Item Sub Group Code”,
“Mem No.”,“Flight No.”);
TranEntry.SETRANGE(“Item No.”,“No.”);
TranEntry.SETFILTER(“Store No.”,GETFILTER(“Store Filter”));
TranEntry.SETFILTER(Date,GETFILTER(“Date Filter”));
TranEntry.SETFILTER(“Item Sub Group Code”,“Airline Filter”);
TranEntry.CALCSUMS(“Net Amount”);
CurrentQty :=-TranEntry.“Net Amount”;

PrevStartdate := CALCDATE(’-1Y’,Item.GETRANGEMIN(“Date Filter”));
PrevEnddate :=CALCDATE(’-1Y’,Item.GETRANGEMAX(“Date Filter”));

TranEntry.RESET;
TranEntry.SETCURRENTKEY(
“Division Code”,“Item Category Code”,“Product Group Code”,“Item No.”,Date,“Store No.”,“Item Sub Group Code”,
“Mem No.”,“Flight No.”);
TranEntry.SETRANGE(“Item No.”,“No.”);
TranEntry.SETFILTER(“Store No.”,GETFILTER(“Store Filter”));
TranEntry.SETRANGE(Date,PrevStartdate,PrevEnddate );
TranEntry.SETFILTER(“Item Sub Group Code”,“Airline Filter”);
TranEntry.CALCSUMS(“Net Amount”);
PrevQty :=-TranEntry.“Net Amount”;

IF PrevQty+CurrentQty=0 THEN
CurrReport.SKIP;

Welcome to DUG!!!

Have you try to debug the code ?

I suggest you turn on debugger and check step by step how the code works.