Skip to content

Kaustav/add tax to line items

Kaustav Banerjee requested to merge kaustav/add_tax_to_line_items into billing-v1

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

  1. Login to stage billing django admin. The assignee can create an admin account for you if not already present.
  2. 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)
  3. Ping the assignee to generate a new invoice for this hourly rate from the django shell.
  4. Go to the invoices page and verify that a new invoice has been generated.
  5. Click on Click here to see JIRA worklogs link in the invoice to check the hours considered for this invoice.
  6. Verify that the total invoice amount matches with (hours * rate) + (default tax)% value.
  7. 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.
  8. 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.
  9. Verify that the total invoice amount in the invoices page has been correctly updated.
  10. Select the checkmark of the new invoice and select Regenerate Selected Invoice from the actions drop-down above and click on Go.
  11. Once the invoices page refreshes, click on Click here to see PDF link on the invoice.
  12. Verify that the line items along with the correct Tax components are present in the invoice PDF.
  13. 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

Merge request reports