What are the relations between Purch table and Accounting Distribution table?
*This post is locked for comments

What are the relations between Purch table and Accounting Distribution table?
*This post is locked for comments
Hi,
Please use the following code/job to get the data and let me know if anything is missing.
static void AXC_AccountDist(Args _args)
{
AccountingDistribution AccountingDistribution;
PurchTable purchtable;
AccountingDistributionTemplate AccountingDistributionTemplate;
SourceDocumentHeader SourceDocumentHeader;
SourceDocumentLine SourceDocumentLine;
CompanyInfo CompanyInfo;
while select AccountingDistribution
join CompanyInfo
where AccountingDistribution.AccountingLegalEntity == CompanyInfo.RecId
join SourceDocumentHeader
where AccountingDistribution.SourceDocumentHeader == SourceDocumentHeader.RecId
join SourceDocumentLine
where AccountingDistribution.SourceDocumentLine == SourceDocumentLine.RecId
join purchTable
where PurchTable.SourceDocumentHeader == SourceDocumentHeader.RecId
&& PurchTable.SourceDocumentLine == SourceDocumentLine.RecId
{
info(strfmt("PurchId: %1", purchtable.purchId));
}
}
Hi,
Also you can check standard method updateDistribution of class PurchTableType(Called from method updateFromPurchLines on table PurchTable) and method isPartiallyDistributed of table PurchTable for reference.
Thanks, Chaitanya
Thanks, Chaitanya
Regards,
John