run po report from deafferents screen
Mon Mar 03 2025 11:14:41 GMT+0000 (Coordinated Universal Time)
Saved by
@MinaTimo
public class NW_POController extends SrsReportRunController
{
protected void preRunModifyContract()
{
NW_GeneralContract contract;
VendPurchOrderJour table;
PurchTable PO;
if(!this.parmArgs().record())
throw error("@SYS26348");
else
{
if(this.parmArgs().record().TableId == tableNum(VendPurchOrderJour))
table = this.parmArgs().record();
if(this.parmArgs().record().TableId == tableNum(PurchTable))
PO = this.parmArgs().record();
}
if (table)
{
contract = this.parmReportContract().parmRdpContract() as NW_GeneralContract;
if (table)
contract.parmRecordId(table.RecId);
}
if (PO)
{
contract = this.parmReportContract().parmRdpContract() as NW_GeneralContract;
if (PO)
contract.parmRecordId(PO.RecId);
}
}
//------------------
//-- DP calss
public void processReport()
{
NW_GeneralContract contract;
VendPurchOrderJour VendPurchOrderJour;
PurchTable PurchTable;
PurchLine PurchLine;
VendTable VendTable;
PurchTotals purchTotals;
HcmWorker HcmWorker;
PurchRFQReplyLinePurchLine Reply;
TaxItemGroupHeading TaxItemGroup;
TaxOnItem TaxOnItem;
contract = this.parmDataContract() as NW_GeneralContract;
select VendPurchOrderJour where VendPurchOrderJour.RecId==contract.parmRecordId();
select PurchTable where PurchTable.PurchId == VendPurchOrderJour.PurchId;
if(!VendPurchOrderJour)
select PurchTable where PurchTable.RecId==contract.parmRecordId();
...
content_copyCOPY
Comments