For
perfect Filtration:
Declaration:
boolean ok = true;
boolean InsertFlag = True;
;
At the end of the DP class:
InsertFlag
= true;
if(FromDate != dateNull())
{
if(FromDate >=
VendPackingSlipJour.DeliveryDate)
insertFlag = false;
}
if(ToDate != dateNull())
{
if(ToDate <=
VendPackingSlipJour.DeliveryDate)
insertFlag = false;
}
if(GRNNumber != "")
{
if(GRNNumber
!=VendPackingSlipJour.packingslipid)
insertFlag = false;
}
if(InsertFlag == true)
materialReceipt.insert();
}
Process Report :
SysEntryPointAttribute(false)
]
public void
processReport()
{
Query query;
QueryRun
queryRun;
PurchTable
purchTable;
CreatedDateTime
_GRNDate,_DeliveryDate;
VendGroup
VendGroup;
VendTable VendTable;
VendPackingSlipJour
VendPackingSlipJour;
query = this.parmQuery();
queryRun
= new QueryRun(this.parmQuery());
this.getReportParameters();
if(PONo)
query.dataSourceTable(tablenum(purchTable)).addRange(fieldnum(purchTable, PurchId)).value(PONo);
if(_ProjID)
query.dataSourceTable(tablenum(purchTable)).addRange(fieldnum(purchTable, ProjId)).value(_ProjID);
QueryRun = new QueryRun(query);
this.getReportParameters();
while
(queryRun.next())
{
PurchTable = queryRun.get(tableNum(PurchTable));
this.insertITLTLMaterialReceiptRegisterTmp(PurchTable);
}
}
No comments:
Post a Comment