Kaustav/add tax to line items
Description
This MR adds the ability to add VAT or other tax components to the invoice line items.
The tax components to apply can be globally configured for each hourly rate
. Further, it can also be modified for each invoice line item.
Supporting information
Link to other information about the change, such as Jira issues, GitHub issues, or Discourse discussions. Be sure to check they are publicly readable, or if not, repeat the information here.
Testing instructions
- Login to stage billing django admin. The assignee can create an admin account for you if not already present.
- Click on this hourly rate and check the rate and the tax components already present. (Note: only one of the tax components is set to be applied as default)
- Ping the assignee to generate a new invoice for this hourly rate from the django shell.
- Go to the invoices page and verify that a new invoice has been generated.
- Click on
Click here to see JIRA worklogs
link in the invoice to check the hours considered for this invoice. - Verify that the total invoice amount matches with
(hours * rate) + (default tax)%
value. - Go to the line items page, click on any of the new line items for the new invoice and verify that the default tax component was applied.
- Click on
Add Line Item
button on top right of the line items page and create a new dummy line item of the new invoice along with two tax components. - Verify that the total invoice amount in the invoices page has been correctly updated.
- Select the checkmark of the new invoice and select
Regenerate Selected Invoice
from the actions drop-down above and click onGo
. - Once the invoices page refreshes, click on
Click here to see PDF
link on the invoice. - Verify that the line items along with the correct Tax components are present in the invoice PDF.
- Delete the tax component from any of the existing line item and verify total invoice value is reflecting. Regenerate the PDF and verify the deleted tax component is gone for that line item.
Deadline
"None" if there's no rush, or provide a specific date or event (and reason) if there is one.
Other information
OpenCraft internal link : BB-8211
Edited by Kaustav Banerjee