web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested answer

requirement to override the calculated tax for each proposal line before posting

(0) ShareShare
ReportReport
Posted on by

Hi All,

I have a requirement to override the tax calculate for project proposal at line level. 

below is the code i have tried but it is picking the overall tax calculate for proposal. can anyone guide me here?

public static void main(Args _args)
{
TaxTmpWorkTransForm taxTmpWorkTransForm;
ProjProposalTotals projProposalTotals;
TmpTaxRegulation tmpTaxRegulation;
TmpTaxWorkTrans tmpTaxWorkTrans;
TransDate transDate;
CurrencyExchangeRate exchangeRate;

ProjProposalJour projProposalJour = ProjProposalJour::find('XXXX-000013');
ProjProposalRevenue projproposalrevenue;
projProposalTotals = new ProjProposalTotals(projProposalJour);
projProposalTotals.calc();
taxTmpWorkTransForm = TaxTmpWorkTransForm::construct();
taxTmpWorkTransForm.init();
taxTmpWorkTransForm.parmTaxObject(projProposalTotals.tax());

taxTmpWorkTransForm.parmSourceSingleLine(projProposalTotals.tax().sourceSingleLine(true,true));
taxTmpWorkTransForm.parmAllowSingleLineAdjustment();
while select projproposalrevenue
where projproposalrevenue.ProposalId == projProposalJour.ProposalId
{
taxTmpWorkTransForm.initTax(projProposalTotals.tax(),projproposalrevenue.TableId,projproposalrevenue,tmpTaxRegulation,tmpTaxWorkTrans);

tmpTaxRegulation = taxTmpWorkTransForm.parmTaxRegulation().tmpTaxRegulation();

tmpTaxRegulation.selectForUpdate();
tmpTaxRegulation.OverrideCalculatedTax = true;
tmpTaxRegulation.SourceRegulateAmountCur = 11.83;
tmpTaxRegulation.update();

taxTmpWorkTransForm.applyTaxAdjustments(projproposalrevenue.TableId,projproposalrevenue,projProposalJour.InvoiceDate);
taxTmpWorkTransForm.initTax(projProposalTotals.tax(),projproposalrevenue.TableId,projproposalrevenue,tmpTaxRegulation,tmpTaxWorkTrans);
}

}

I have the same question (0)
  • AshokKumarGuptaEga Profile Picture
    on at
    RE: requirement to override the calculated tax for each proposal line before posting

    Hi Ravish,

    Hope everything is going well and the issue is resolved by now.  If so kindly mark the thread as answered/resolved.

    Best Regards

    Ashok Kumar Gupta Ega

    Sr. T.A, Microsoft

  • AshokKumarGuptaEga Profile Picture
    on at
    RE: requirement to override the calculated tax for each proposal line before posting

    Hi Ravish,

    Trust everything is going well at your side and wish the issue is resolved by now.  If so kindly mark the thread as answered or if you need any further information or assistance feel free to reply back.

    Best Regards

    Ashok Kumar Gupta Ega

    Sr. T.A, Microsoft

  • Community Member Profile Picture
    on at
    RE: requirement to override the calculated tax for each proposal line before posting

    tried that even but no luck. it always overrides the total tax amount for the entire proposal for which we are concerned about the consistency. so we anyhow need to focus on overriding the tax for each line based on calculation.

  • Suggested answer
    Ludwig Reinhard Profile Picture
    Microsoft Employee on at
    RE: requirement to override the calculated tax for each proposal line before posting

    Hi ravishax,

    In the GL parameters there is one that says calculation method.

    Have you set this one to 'line'?

    Before trying to make a code adjustment have a look at this parameter setting and whether it might be able to fix the issue.

    Best regards,

    Ludwig

  • Community Member Profile Picture
    on at
    RE: requirement to override the calculated tax for each proposal line before posting

    Fee will be linked to a project. The external system will consider the gross amount including taxes as $60 & $ 70 respectively.but in D365 we need to customize so that we can override the calculated tax for each line

  • Suggested answer
    Ludwig Reinhard Profile Picture
    Microsoft Employee on at
    RE: requirement to override the calculated tax for each proposal line before posting

    Hi ravishax,

    What kind of fee journal do you refer to?

    Fee journals usually don't link to items and don't know a cost price.

    Can you provide some additional information on your requirement?

    Many thanks,

    Ludwig

  • Community Member Profile Picture
    on at
    RE: requirement to override the calculated tax for each proposal line before posting

    Hi,

    Current scenario is having a fee journal of cost price $54.54 sales price $60 and second fee journal of $63.63 sales price $70 Tax rate is 10% so the calculation is 129.99 at the proposal but to adjust the tax for each line, we need to override the tax for specific to second line instead of 6.36 we need to override the tax to 6.37 for the line.

    P.S - there might be scenario for 100+ lines.so we need to update for specific line calculated tax.

  • Suggested answer
    Ludwig Reinhard Profile Picture
    Microsoft Employee on at
    RE: requirement to override the calculated tax for each proposal line before posting

    Hi,

    Why do you have this requirement?

    Can't this issue be overcome by a different VAT setup?

    Best regards,

    Ludwig

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
CA Neeraj Kumar Profile Picture

CA Neeraj Kumar 2,333

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 846 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 681 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans