class PMECustomerAgingReportDP
{
/// <summary>
///
/// </summary>
/// <param name="args"></param>
[PostHandlerFor(classStr(PMECustAgingReportDp), methodStr(PMECustAgingReportDp, processReport))]
public static void PMECustAgingReportDp_Post_processReport(XppPrePostArgs args)
{
PMECustAgingReportDp dpInstance = args.getThis() as PMECustAgingReportDp;
CustAgingReportTmp tmpTable = dpInstance.getCustAgingReportTmp();
//DefaultDimensionView DefaultDimensionView;
ttsbegin;
while select forupdate tmpTable
{
CustTrans custTrans;
select firstonly custTrans
where custTrans.Voucher == tmpTable.Voucher;
if (tmpTable.Voucher != "")
{
DimensionAttributeValueSetItemView dimensionAttributeValueSetItemView;
DimensionAttribute location = DimensionAttribute::findByName("Location");
select DisplayValue from dimensionAttributeValueSetItemView
where dimensionAttributeValueSetItemView.DimensionAttributeValueSet == custTrans.DefaultDimension
&& dimensionAttributeValueSetItemView.DimensionAttribute == location.RecId;
tmpTable.Location = dimensionAttributeValueSetItemView.DISPLAYVALUE;
tmpTable.update();
}
}
ttscommit;
}
}
No comments:
Post a Comment