Thursday 28 September 2017

Get vendor's and customer's GST number in AX 2012 R3

Hi guys,
IN GST era, It is very common term GST. So here I'm discussing how to get vendor's GST number in X++ AX 2012 R3 and It is very simple to refer below sample code.

 And similarly, you can get Customer's GST number and sometimes we get requirement from client to print warehouse or Company GST number so just refer this below job and modify as per the requirement.

Static void   getVendorGST(AccountNum     _accountNum)
{
    VendTable           vendTable;
    DirPartyTable       dirPartyTable;
    LogisticsLocation   logisticsLocation;
    TaxInformation_IN   taxInformation_IN;

    select vendTable where vendTable.AccountNum == _accountNum
        join dirPartyTable
            where dirPartyTable.RecId == vendTable.Party
        join logisticsLocation
            where logisticsLocation.RecId == dirPartyTable.PrimaryAddressLocation;


    taxInformation_IN   = TaxInformation_IN::findDefaultbyLocation(logisticsLocation.RecId);
    return TaxRegistrationNumbers_IN::find(taxInformation_IN.GSTIN).RegistrationNumber;
}

Happy DAxing......

No comments:

Post a Comment

Import General journal from excel in D365 F&O

 Hi Guys, Import General journal from excel in D365 F&O Code:  using System.IO; using OfficeOpenXml; using OfficeOpenXml.ExcelPackage; u...