public DimensionValue getDimValue(int _index, DimensionDefault _defaultDim)
{
// #DocumationGL // List that matches the GL Export
container dimAttrList = ['BPCTrialBalance', 'Customer', 'Department', 'Employee', 'IntercompanyCode', 'Project','ServiceCategory'];
Name dimAttribName = conPeek(dimAttrList, _index);
DimensionAttributeValueSet DimensionAttributeValueSet;
DimensionAttributeValueSetItem DimensionAttributeValueSetItem;
DimensionAttributeValue DimensionAttributeValue;
DimensionAttribute DimensionAttribute;
;
select RecId from DimensionAttributeValueSet
where DimensionAttributeValueSet.RecId == _defaultDim
join DisplayValue from DimensionAttributeValueSetItem
where DimensionAttributeValueSetItem.DimensionAttributeValueSet == DimensionAttributeValueSet.RecId
join RecId from DimensionAttributeValue
where DimensionAttributeValue.RecId == DimensionAttributeValueSetItem.DimensionAttributeValue
join RecId from DimensionAttribute
where DimensionAttribute.RecId == DimensionAttributeValue.DimensionAttribute
&& DimensionAttribute.Name == dimAttribName;
return DimensionAttributeValueSetItem.DisplayValue;
}
display DimensionValue dimTrialBalance(ProjPostTransViewGL _projPostTransView)
{
ProjJournalTrans projJournalTrans;
ProjCostTrans projCostTrans;
container conDim;
switch (_projPostTransView.ProjTransType)
{
case ProjTransType::Item:
case ProjTransType::Hour:
case ProjTransType::Revenue:
case ProjTransType::OnAccount:
select DefaultDimension
from projJournalTrans
where projJournalTrans.TransId == _projPostTransView.TransId;
return this.getDimValue(1,projJournalTrans.DefaultDimension);
case ProjTransType::Cost:
select DefaultDimension
from projCostTrans
where projCostTrans.TransId == _projPostTransView.TransId;
return this.getDimValue(1,projCostTrans.DefaultDimension);
default :
return '';
}
}