Dentolize · Invoice Discount Percentage Fix Walkthrough
On this pageWhat changed, in support termsQuestions you should expectTroubleshooting checklistWhat to tell them the fix is not

For Support

What changed, in support terms

On Finances → Invoices, the Discount tile's little percentage now divides by the pre‑discount amount (total + discount) instead of the post‑discount total. The result is a lower, more accurate discount percentage. The money amount is unchanged.

Questions you should expect

"Why did our discount percentage suddenly drop?"

Because it was previously too high. The old calculation divided the discount by the total after the discount was already subtracted, which inflated it. The new number divides by the price before the discount — the correct base. Nothing about the actual discounts changed; the reported percentage is now honest.

Walk them through it with real numbers:

  • Discount given: ₺2,373.25
  • Total after discount: ₺18,301.75
  • Price before discount: ₺20,675.00 (total + discount)
  • Old tile: 2,373.25 ÷ 18,301.75 = 13.0 %
  • New tile: 2,373.25 ÷ 20,675.00 = 11.5 %

"Did my invoice amounts change?"

No. Subtotals, discounts, taxes, and totals on every invoice are untouched. This is a display‑only change to one percentage on the analytics bar. Reassure them that no data was altered or migrated.

"The percentage doesn't match the discount % on my invoice."

Two different bases, and this is expected:

  • The per‑invoice discountPercent uses the pre‑tax subtotal

(discount ÷ subtotal).

  • The analytics tile uses the pre‑discount, tax‑inclusive base

(discount ÷ (total + discount)).

They agree exactly when the invoice has no tax (e.g. VAT‑Exempt invoices). When tax is present, the tile reads slightly lower than the per‑invoice figure. If a customer needs the tile to match the per‑invoice percentage exactly, log it as a product question, not a defect — see For Quality.

"Where is the discount percentage? I don't see it."

  • The tiles only appear after clicking Show Analytics on the invoices screen.
  • The Discount tile only appears when there is at least one discount in the

current view ({discount ? … : null}). If no invoices in scope have a discount, the tile is hidden entirely.

"It shows nothing / a blank percentage."

If there are no non‑balance invoices in scope, the total is zero and the percentage is intentionally blank (the code guards against dividing by zero). Ask them to widen the date range or clear filters.

Troubleshooting checklist

  1. Confirm they're on Finances → Invoices and have clicked Show Analytics.
  2. Confirm at least one invoice in the current filter has a discount.
  3. If the number still looks wrong, capture: the filter/date range, the Total and

Discount amounts shown, and whether the invoices are taxed or VAT‑exempt — then escalate with those figures.

What to tell them the fix is not

  • It is not a change to how discounts are entered or applied.
  • It is not a change to totals, tax, insurance, or payments.
  • It is not retroactive data editing — the screen simply recalculates on load.