Bug Description
When creating an invoice, entering values where Discount is greater than Qty × Unit Price can produce a negative line amount in the UI. In this state, invoice creation behavior is inconsistent and users do not get clear validation feedback.
This should be prevented with proper validation and standardized toast feedback.
Steps to Reproduce
- Go to Dashboard → Create Invoice
- Add an item:
- Description: Test
- Qty: 10
- Unit Price: 10
- Discount: 1000
- Tax: 0
- Observe the line amount display
- Try clicking Create Invoice
Expected Behavior
- Negative amounts should never be accepted.
- Users should see a clear toast/form validation message explaining what is wrong.
- Invoice creation should be blocked until values are valid.
- Total amount due should remain consistent with line-item validation.
Actual Behavior
- UI can show a negative line amount in this scenario.
- Validation feedback is unclear/inconsistent for invalid negative amount states.
- Invalid data may proceed further than expected in the create flow.
Logs and Screenshots
Environment Details
- OS: Windows 11
- Browser: Chrome
- Network: Any supported chain
- Wallet: Metamask
Impact
High - Major feature is broken
Code of Conduct
Bug Description
When creating an invoice, entering values where Discount is greater than Qty × Unit Price can produce a negative line amount in the UI. In this state, invoice creation behavior is inconsistent and users do not get clear validation feedback.
This should be prevented with proper validation and standardized toast feedback.
Steps to Reproduce
Expected Behavior
Actual Behavior
Logs and Screenshots
Environment Details
Impact
High - Major feature is broken
Code of Conduct