Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hardcoded Tax Code in Order Processing #10

Open
Shinde-nutan opened this issue Jan 8, 2025 · 1 comment · May be fixed by #17
Open

Hardcoded Tax Code in Order Processing #10

Shinde-nutan opened this issue Jan 8, 2025 · 1 comment · May be fixed by #17
Assignees

Comments

@Shinde-nutan
Copy link
Contributor

The taxCode in the current order processing logic is hardcoded to "AVATAX". This implementation does not allow flexibility for scenarios where different tax codes may be required based on product types or specific business rules.

Context:

  1. Hardcoded Implementation:

    • The tax code is explicitly set to "AVATAX" without any conditional checks:
      processedOrderMap.put("taxCode", "AVATAX")
      
  2. Other Business Scenarios:

    • Certain product types, such as Digital Goods, may require different tax codes (e.g., "-Not Taxable-").
    • New business rules or product-specific requirements could demand dynamic tax code assignment.

Problem:

  • Inflexibility: The hardcoded tax code "AVATAX" cannot handle cases where a different tax code is required.
  • Scalability Issues: Any future changes to tax code requirements will necessitate code modifications, increasing maintenance efforts and risks.
  • Non-Compliant Outputs: Scenarios like Digital Goods may result in incorrect tax code assignments due to the lack of dynamic handling.

Expected Behavior:

  • The taxCode should be determined dynamically based on factors such as:
    • Product type (e.g., Digital Goods vs. physical goods).
    • Other business-defined criteria.
@Shinde-nutan Shinde-nutan self-assigned this Jan 10, 2025
@Shinde-nutan Shinde-nutan linked a pull request Jan 10, 2025 that will close this issue
@dt2patel
Copy link
Contributor

The condition to set AVATAX or -Not Taxable- on an item should be driven based on if that item has any adjustments in the OMS of type TAX. If the order item does not have taxes applied to it in the OMS, then it should be sent as Not Taxable to NS as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants