[SysClientCacheDataMethodAttribute(true)]
display DiscPct displayDiscount(PriceDiscTable _PriceDiscTable)
{
PriceDiscTable _PriceDiscTableDiscount;
select firstOnly _PriceDiscTableDiscount
where
_PriceDiscTableDiscount.AccountRelation == PriceDiscTableDS.AccountRelation
&& _PriceDiscTableDiscount.ItemRelation == PriceDiscTableDS.ItemRelation
&& _PriceDiscTableDiscount.UnitId == PriceDiscTableDS.UnitId
&& _PriceDiscTableDiscount.ToDate >= today()
&& _PriceDiscTableDiscount.relation == PriceType::LineDiscSales;
return _PriceDiscTableDiscount.Percent1;
}