For already placed order tax display title should be used from order place time and not from current tax entity

Created on 9 January 2024, 11 months ago

Describe your bug or feature request.

We are using in tax display title also % value, so it is clear for customer how much is the VAT. But after the VAT value was changed, we also changed it in the Display title. All new orders are fine, but all older orders which has already been placed has correct VAT calculation, but the title of the VAT is now not correct as it shows new title with new VAT value.

If a bug, provide steps to reproduce it from a clean install.

  1. Set up commerce with VAT
  2. Place order
  3. Update VAT display title
  4. Check already placed order
  5. You will see new VAT title

Proposed solution:

As commerce is already saving the tax rate entity in table field_data_commerce_order_total in serialized column commerce_order_total_data when the order is placed, we should use as display VAT title for already placed order display title from that serialized array.

πŸ› Bug report
Status

Needs review

Version

1.0

Component

Price

Created by

πŸ‡ΈπŸ‡°Slovakia durifal

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024