johnuberbacher / invoice-generator

An Invoice creator project built with React. Uses jspdf-react to capture the data from the modal and convert it from canvas -> pdf.
https://invoice-generator-react.netlify.app/
224 stars 164 forks source link

Fix handleCalculateTotal function to correctly calculate totals for multiple items. issue #20 #25

Open DivyarajChudasama opened 2 months ago

DivyarajChudasama commented 2 months ago

Description

This pull request addresses an issue in the handleCalculateTotal function of the InvoiceForm.js file, where the total was not correctly calculated for multiple items. The changes ensure that the subtotal, tax amount, discount amount, and total are computed accurately when there are two or more items in the invoice.

Changes Made

Testing

Additional Notes

Please review the changes and let me know if there are any questions or further adjustments needed. Thank you!

netlify[bot] commented 2 months ago

Deploy Preview for invoice-generator-react ready!

Name Link
Latest commit d8d63c333df837aee34de0d3c06fc8f779243e01
Latest deploy log https://app.netlify.com/sites/invoice-generator-react/deploys/66814d583c5be2000815a63d
Deploy Preview https://deploy-preview-25--invoice-generator-react.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.