Discount dissapear on Sales Invoices After Upgrading from v21.3.55 to v21.4.5 or newer

Hello everyone,

I am experiencing a rather serious issue with the Discount checkbox on sales invoices after upgrading from version 21.3.55 to 21.4.5 or newer.
After the upgrade, the checkbox is no longer checked or visible on invoices created prior to the upgrade. This has effectively hidden the discount data for all my older sales transactions and all the old invoices (it changes the total of the invoice).

Issue Description:

  1. The Discount checkbox is present on the form. So the problem is not that the field is missing entirely.

  2. For all invoices created before the upgrade, the checkbox is now unchecked by default.

  3. To make the discount information reappear, I must open each invoice manually and then re-check the Discount checkbox. Once I do this, the correct discount is displayed.

  4. This same problem does not occur if I stay in version 21.3.55.

The Scale of the Problem:
I have over 10,000 historical invoices affected by this issue. Manually editing and re-checking each one is not a practical solution.

Steps I Have Already Tried:

  • Tested different upgrade paths (e.g., directly to v22.6.1, v25.10.26.3039, v26.5.29.3635). The problem persists in all newer versions I have tried.

  • Confirmed that the Discount column is enabled in the column visibility settings (it is present). This is not a visibility issue, but an issue with the checkbox state for existing records.

  • Searched the forum and found a similar report regarding custom checkboxes (Custom Checkbox Data Disappeared). That user was told the issue was fixed in version 25.10.26.3038, but upgrading to that version did not resolve the problem for my existing invoices.

I am seeking a practical solution to correct this in bulk. Any of the following would be immensely helpful:

  1. A safe method or tool to batch update the checkbox state for thousands of invoices (e.g., using the Batch Recode or Batch Update functions).

  2. A method via the Manager API to enable the discount field for all affected invoices in a single operation.

  3. An official patch or script from the development team to fix this specific upgrade issue.

I would greatly appreciate any guidance or a definitive solution from the community or the developers.

Thank you for your time and assistance.
@lubos

Hello @hrie_filter,

Unfortunately, you are using an obsolete version of Manager. You are thousands of versions behind.

Not that there’s anything wrong doing so, but bug fixes don’t happen retrospectively, unfortunately.

Your options are as follows:

  1. If you have an untouched backup, you can roll back to version 21.3.55,

Or:

  1. Take the time to assess the cumulative changes since then; take two backups, stow one away nicely and use the other one to jump straight to the latest version. This should fix your original issue but may take some getting used to.

Just to save you a little bit of time, the most sigificant changes are:

  1. Having to Recalculate inventory

  2. Upgrade to latest html version which causes viewing problem with OS past their life (e.g. Windows 8 or macOS 12 (Monterey))

  3. Changes to Custom Themes, including phasing out Liquid and prohibiting html injection

This is by no means a complete list of changes, so you still need to do some research and testing but I hope this saves you some time doing so.

Sorry for the previous response.

Anyway, I now understand your position a bit more.

The safest and most efficient method is to enable the Discount Checkbox for all records.

To do this, you can do a Batch Recode on all invoices like so:

If you can reduce the scope by filtering only those invoices that actually contain discount, that would be great, but unfortunately, that cannot be done in Batch Recode screen, so it wouldn’t be as easy or as safe.

Heads up! It seems like you suffered some sort of data loss or corruption at one point or another, so this will enable the discount checkbox but if the discount value is lost somehow, then you might need to search for an uncorrupted backup first, clone it and open it directly using the latest version and try again.