[BUG]: Invoice views and exports show discount/tax without % or token unit, so percentage and flat values look the same
Maintainers usually reply within 2 days
@Atishyy27 is already working on this.
Since Nov 21, 2026.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 52/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- javascript
- Domain
- full-stack
Research direction
Start by locating the invoice preview, sent and received invoice details, and PDF, CSV, JSON, and bulk export code paths that display discount and tax values. Trace how each path gets the value type and invoice token symbol, then check formatting for percentage, fixed, empty, and older invoices without type fields. Done means all listed views and exports show the appropriate unit, with tests covering those cases.
Written by the indexing model from the issue text.
Description
Bug Description
Description
While creating an invoice, we can set discounts and taxes as either a percentage or a fixed amount.
The calculation works correctly, but when we view the invoice or download it, the discount and tax values are displayed without showing whether they are percentages or fixed amounts.
For example, if two items have a discount of 10, one with a percentage discount and the other with a fixed discount, both are displayed as 10. This can be confusing because the actual calculations are different.
This happens in several places:
- Invoice preview
- Sent invoice details
- Received invoice details
- PDF export
- CSV export
- JSON and bulk export
Steps to Reproduce
Create an invoice with two items.
Set the quantity to 1 and price to 200 for both.
Set a discount of 10 for the first item as a percentage.
Set a discount of 10 for the second item as a fixed amount.
Open the invoice preview or download the PDF/CSV.
Logs and Screenshots
No response
Environment Details
Actual Behavior
Both discounts are displayed as 10, even though one is 10% and the other is a fixed amount.
The same issue happens with taxes. Also, when the tax value is empty and its type is a fixed amount, it is still displayed as 0%.
Expected Behavior
The discount and tax should be displayed according to their selected type.
Percentage: 10%
Fixed amount: 10 USDC
Empty percentage: 0%
Empty fixed amount: 0 USDC
The same formatting should be used everywhere, including invoice previews, invoice details, and exports.
Suggested Solution
We can create a shared helper function to format discounts and taxes based on their type and invoice token symbol.
Then we can use that helper wherever these values are displayed.
We should also add unit tests for percentage values, fixed amounts, empty values, and older invoices that don't have discount or tax type fields.
Impact
Critical - Application is unusable
Code of Conduct
- I have joined the Discord server and will post updates there
- I have searched existing issues to avoid duplicates
- Dominant language
- JavaScript
- Stars
- 13
- Forks
- 62
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 18
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from StabilityNexus/Chainvoice
-
[BUG]: Smart Batch Suggestions ignore active filters and select invoices hidden from the tablePossibly taken @anshulchikhale30-p claimed this 15 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
StabilityNexus/Chainvoice#331 · 1 comment ·
Maintainers usually reply within 2 days
-
[BUG]: Invoices with the same date are sorted out of order (ids compared as strings)Possibly taken @anshulchikhale30-p claimed this 15 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
StabilityNexus/Chainvoice#330 · 1 comment ·
Maintainers usually reply within 2 days
-
[BUG]: Stale token-list requests can overwrite state after switching networksPossibly taken @JANAKIRAM218 claimed this 10 days ago. Openbug enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
StabilityNexus/Chainvoice#325 · 1 comment ·
Maintainers usually reply within 2 days
-
[BUG]: Invoice PDF totals overlap the footer with 10 line itemsMay be free again A pull request for this issue was closed without being merged. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
StabilityNexus/Chainvoice#310 · 4 comments ·
Maintainers usually reply within 2 days
-
[BUG]: Batch invoice summary truncates displayed amount precision to four decimal placesPossibly taken @JANAKIRAM218 claimed this 29 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
StabilityNexus/Chainvoice#294 · 2 comments ·
Maintainers usually reply within 2 days
All issues in StabilityNexus/Chainvoice
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 Under an hour Newbie friendliness 82/100
Leonxlnx/taste-skill#216 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
all-contributors/cli#690 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day