Database testing · Invoices
GST on ₹99.99 is cut down to 17.99 instead of rounded to 18.00
P2 · MajorExperiencedInvoices
Want to find it yourself first? This page gives away the answer. Play this bug on a fake app screen and see if you can spot it in three tries.
The clue
Work out 18% of 99.99 and round it.
Steps to reproduce
- Add an item priced 99.99
- Check the GST column
Expected result
99.99 × 18% = 17.998, rounded to 18.00
Actual result
17.99 (the extra digits are chopped off)
Why it matters
This is a major (P2) bug. The feature still works in part, but users get wrong information or a broken step, and many will notice. It should be fixed before or soon after release.
Testing tip
Test money with prices like .99 and .995. Truncating instead of rounding leaks paise on every invoice.
How to find bugs like this
Database bugs show up when you look at the tables: duplicate rows, joins that double totals, deleted users still active, values cut short or saved in the wrong type. When you test, try these checks:
- Run the query yourself and count the rows.
- Look for duplicates that differ only in case or spaces.
- Check deleted and archived records.
- Compare stored values with what the user typed.