Skip to content

[Bug]: Incorrect SetCurrentKey in CalcSalesTaxAmountLine procedure (Sales Tax Calculate codeunit 398) #29922

@dx4-kw

Description

@dx4-kw

Describe the issue

New procedure for version 28 code places the CalcSalesTaxAmountLine in Codeunit 398 "Sales Tax Calculate" (used to be in "Sales Tax Amount Line Calc" codeunit).

Line 158 TaxAreaLine.SetCurrentKey("Tax Area", "Calculation Order"); appears to be the incorrect record variable. The line beneath leads me to believe the correct record variable should be TaxAreaLine2

Expected behavior

Expect to calculate taxes in correct calculation order. Based on primary key, the calculation order will not be taken into account. Will provide incorrect results for jurisdictions with tax-on-tax calculations (i.e. Quebec, CA)

Steps to reproduce

Was not tested at my end.

Create a posting to a jurisdiction with tax-on-tax, such as Quebec, CA, where the jurisdiction setup is in different order than the Calculation Order.

Additional context

No response

I will provide a fix for a bug

  • I will provide a fix for a bug

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions