Friday, 15 September 2023

Get default ledger dimension from posting profile:

Get default ledger dimension from posting profile: 
 


public static LedgerDimensionAccount getDefaultLedgerDimensionFromPostingProfile(PurchLine _purchLine)

    {

        InventPostingAccountItemLedgerDimensionParameters   inventPostingAccountItemLedgerDimensionParameters;


        inventPostingAccountItemLedgerDimensionParameters =

            InventPostingAccountItemLedgerDimensionParameters::newFromParameters(

                InventAccountType::PurchConsump,

                _purchLine.ItemId,

                _purchLine.inventTable().itemGroupId(),

                _purchLine.ProcurementCategory,

                _purchLine.VendAccount,

                VendTable::find(_purchLine.VendAccount).VendGroup,

                _purchLine.TaxGroup);


        return InventPosting::accountItemLedgerDimensionFromParameters(inventPostingAccountItemLedgerDimensionParameters);

    }


}

No comments:

Post a Comment