Tax calculation through X++


Method 1:

void clicked()
{
real tax1;
;
    super();
 tax1 = Tax::calcTaxAmount(Salesline.TaxGroup, Salesline.TaxItemGroup, Systemdateget(), Salesline.CurrencyCode, Salesline.LineAmount, TaxModuleType::Sales);

info(strfmt("%1", tax1));
}

------------------------------------------------------------------------------------------------------------

Method 2:

void clicked()
{
TaxOnItem                       TaxOnItem;
TaxGroupData                    TaxGroupData, TaxGroupData_1;
real                            TaxAmount = 0, TaxAmount_1 = 0;
TaxValue                        TaxValue = 0, TaxValue_1 = 0;
;
   
    super();

    if(Salesline.TaxItemGroup && Salesline.TaxGroup && Salesline.LineAmount != 0)
    {
        while select TaxOnItem
             where TaxOnItem.TaxItemGroup == salesline.TaxItemGroup
             {
              if(TaxOnItem)
              {
             while select TaxGroupData
                  where TaxGroupData.TaxGroup == Salesline.TaxGroup
&& TaxGroupData.TaxCode  == TaxOnItem.TaxCode
                   {
                   if(TaxGroupData)
                   {
                    TaxValue  =  TaxData::find(TaxOnItem.TaxCode, Systemdateget(), 0).TaxValue;
                    TaxValue_1  += TaxValue;
                    TaxAmount = (Salesline.LineAmount * TaxValue)/100;
                    TaxAmount_1 += TaxAmount;
                   }
                   }
              }
              }
               info(strfmt("%1", TaxAmount_1));
        }
}

13 comments:

  1. Hello, I want to find calculated sales tax and actual sales tax on purchline. how to do that?

    ReplyDelete
  2. Hi Jeremy,
    Thanks! Keep visiting for more threads :)

    ReplyDelete
  3. Thank you a lot for providing individuals with a very spectacular possibility to read critical reviews from this site.company formation services india

    ReplyDelete
  4. So great work for informing us of the possibilities and following a certain path.
    VAT Return Services in Westminster

    ReplyDelete
  5. I can see that you are an expert at your field! I am launching a website soon, and your information will be very useful for me.. Thanks for all your help and wishing you all the success in your business. ettevõtte kustutamine

    ReplyDelete
  6. This is a wonderful post,.I am very happy to read this article..thanks for giving us this useful information.. Read here and know all the VAT Registration Service .

    dubai vat registration

    ReplyDelete
  7. When your website or blog goes live for the first time, it is exciting. That is until you realize no one but you and your.
    presales

    ReplyDelete
  8. I think this is an informative post and it is very useful and knowledgeable. Read here and know all the VAT Registration Service .

    vat registration

    ReplyDelete
  9. Very useful Post and it is very useful and knowledgeable. UAE vat registration a VAT and Tax Consulting firm in the UAE.

    vat registration uae

    ReplyDelete
  10. Nice blog post so thanks a lot for sharing this great blog post.. keep more post for sharing.. have a nice day.
    Study Permit Visa for Canada

    ReplyDelete
  11. Thanks for sharing information on tax calculator . we are Simplifysors, one of the best online tax calculatorin India. The Simplifysors Tax Calculator is a simple web application that estimates your taxes based on your income.

    ReplyDelete
  12. It’s not my first time to visit this web site, i am visiting this web site dailly and get pleasant data from here everyday. Body building Product Review

    ReplyDelete

Powered by Blogger.