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));
        }
}

15 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. Those rules moreover attempted to wind up plainly a decent approach to perceive that other individuals online have the indistinguishable enthusiasm like mine to get a handle on incredible arrangement more around this conditioncloud accounting in dubai

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

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

    ReplyDelete
  6. 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
  7. 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
  8. 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
  9. 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
  10. 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
  11. 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
  12. 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
  13. 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.