Contact name , delivery adress

Lasă un comentariu

30 Ianuarie 2015 de liviustoica55


display ContactPersonName contactPersonName()
{
return ContactPerson::name(this.ContactPersonId);
}

=======================================

LogisticsPostalAddress deliveryAddress()
{
return LogisticsPostalAddress::findRecId(this.DeliveryPostalAddress);
}

==========================================

public LogisticsLocationRecId deliveryLocation()
{
return LogisticsPostalAddress::getLocation(this.DeliveryPostalAddress);
}

=================================================

public Phone deliveryPhone()
{
Phone phone;
LogisticsLocationRecId locationRecId;
LogisticsLocation locationChild;
LogisticsElectronicAddress logisticsElectronicAddress;

// First see if a contact person phone number is available
if (this.ContactPersonId)
{
phone = this.contactPerson().phone();
if (phone)
{
return phone;
}
}

// See if a phone number associated with the delivery location is available
locationRecId = this.deliveryLocation();
if (locationRecId)
{ // Find a phone number associated with the postal delivery location
select firstonly TableId from locationChild
where locationChild.ParentLocation == locationRecId
&& locationChild.IsPostalAddress == NoYes::No
join Locator from logisticsElectronicAddress
where logisticsElectronicAddress.Location == locationChild.RecId
&& logisticsElectronicAddress.Type == LogisticsElectronicAddressMethodType::Phone
&& logisticsElectronicAddress.Locator != ”;
phone = logisticsElectronicAddress.Locator;
if (phone)
{
return phone;
}
}

return this.customerPhone();
}

Lasă un răspuns

Completează mai jos detaliile despre tine sau dă clic pe un icon pentru autentificare:

Logo WordPress.com

Comentezi folosind contul tău WordPress.com. Dezautentificare / Schimbă )

Poză Twitter

Comentezi folosind contul tău Twitter. Dezautentificare / Schimbă )

Fotografie Facebook

Comentezi folosind contul tău Facebook. Dezautentificare / Schimbă )

Fotografie Google+

Comentezi folosind contul tău Google+. Dezautentificare / Schimbă )

Conectare la %s

%d blogeri au apreciat asta: