Tuesday, 16 July 2013

contact information (vend and purch)

while select PurchTable{
// if(purchTable.PurchId == VendPurchOrderJourloc.PurchaseOrderId)
purchID = VendPurchOrderJour::findbyPurchaseOrderId(PurchPurchaseOrderHeader.PurchaseOrderId).PurchId;
PurchRecid = purchTable::find(purchID).RecId;
// c = purchTable::find(purchID).OrderAccount;
PurchDim = purchTable::find(purchID).DefaultDimension;
// TableId = PurchReqLine::findByPurchId(purchID).PurchReqTable;
// c = PurchReqTable::find(TableId).PurchReqId;
// PurchPurchaseOrderHeader.PurchReqId = c;
select VendTable where VendTable.AccountNum == purchTable::find(purchID).OrderAccount;//purchTable.OrderAccount;
select DirPartyTable where DirPartyTable.RecId == VendTable.Party;
while select DirPartyLocation where DirPartyLocation.Party == DirPartyTable.RecId
&& DirPartyLocation.IsPrimary == NoYes::Yes
{
while select LogisticsElectronicAddress where LogisticsElectronicAddress.Type == LogisticsElectronicAddressMethodType::Phone
&& LogisticsElectronicAddress.Location == DirPartyLocation.Location
{
purchPurchaseOrderHeader.Phone = LogisticsElectronicAddress.Locator;
}
while select LogisticsElectronicAddress where LogisticsElectronicAddress.Type == LogisticsElectronicAddressMethodType::Email
&& LogisticsElectronicAddress.Location == DirPartyLocation.Location
{
purchPurchaseOrderHeader.Email = LogisticsElectronicAddress.Locator;
}
while select LogisticsElectronicAddress where LogisticsElectronicAddress.Type == LogisticsElectronicAddressMethodType::Fax
&& LogisticsElectronicAddress.Location == DirPartyLocation.Location
{
purchPurchaseOrderHeader.Fax = LogisticsElectronicAddress.Locator;
}
}

No comments:

Post a Comment