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 تعليقًا:

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

    ردحذف
  2. Hi Jeremy,
    Thanks! Keep visiting for more threads :)

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

    ردحذف
  4. So great work for informing us of the possibilities and following a certain path.
    VAT Return Services in Westminster

    ردحذف
  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

    ردحذف
  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

    ردحذف
  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

    ردحذف
  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

    ردحذف
  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

    ردحذف
  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

    ردحذف
  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.

    ردحذف
  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

    ردحذف
  13. Thank your for this piece of code! It was very helpful. Greetings.

    ردحذف
  14. GaliResult ने आज मेरी सोच बदल दी।
    अब मैं सिर्फ नंबर नहीं लगाता, ट्रेंड्स देखता हूं, मार्केट समझता हूं। और यही है
    sattaking
    की असली ताकत।

    ردحذف

DeepSeek-R1: The AI Revolution Everyone’s Talking About!

  In the ever-evolving world of artificial intelligence, a new player has emerged, challenging the giants and rewriting the rules of innovat...

يتم التشغيل بواسطة Blogger.