When posting intercompany transactions there are different indications on the table level that indicate the record is an intercompany order. For example the field purchTable.interCompanyOriginalSalesId will be populated with the relating sales order number and the interCompanyCompanyId will hold the company in which the transaction orginated from
void postProformaPickListInterCompany()
{
SalesFormLetter SalesFormLetter;
SalesTable findSalesTable;
SalesId salesIdHolder;
str company;
PurchTable purchTable;
;
salesIdHolder = salestable.SalesId;
select firstonly purchTable where purchTable.InterCompanyOriginalSalesId == salesIdHolder;
company = purchTable.InterCompanyCompanyId;
changecompany(company)
{
select firstonly findSalesTable index hint salesIdx where findSalesTable.InterCompanyOriginalSalesId == salesIdHolder;
if(findSalesTable)
{
SalesFormLetter = salesFormLetter::construct(documentStatus::PickingList);
salesFormLetter.update(findSalesTable,
systemdateget(),
SalesUpdate::All,
AccountOrder::None,
NoYes::Yes,
NoYes::Yes,
NoYes::No,
NoYes::No,
connull(),
”);
}
}
No comments:
Post a Comment