Open Franklin0702 opened 4 years ago
When you submit or revert an invoice with some item with 0% tax, the invoice doesn't update the status.
1. Create a tax with 0%.
2. Create an Invoice, add an item and select this tax.
3. Save the Invoice and submit it, then you will get the following error in the console:
The error is occurs because in applyFormula method inside document.js, there's not a validation to prevent null values, look at the image below:
To fix this I added the next lines:
Greetings,
THIS HAS AFFECTED IN FRAPPE BOOKS
Problem:
When you submit or revert an invoice with some item with 0% tax, the invoice doesn't update the status.
Steps to reproduce:
1. Create a tax with 0%.![image](https://user-images.githubusercontent.com/19265450/74992859-aceaa680-541f-11ea-8e86-72e73697c578.png)
2. Create an Invoice, add an item and select this tax.![image](https://user-images.githubusercontent.com/19265450/74992943-e8857080-541f-11ea-8f98-568130d65325.png)
3. Save the Invoice and submit it, then you will get the following error in the console:
![image](https://user-images.githubusercontent.com/19265450/74993443-5aaa8500-5421-11ea-90fa-a1b03320e8c9.png)
What I have done:
The error is occurs because in applyFormula method inside document.js, there's not a validation to prevent null values, look at the image below:![image](https://user-images.githubusercontent.com/19265450/74993492-92b1c800-5421-11ea-8757-adc7ce17a5d2.png)
To fix this I added the next lines:![image](https://user-images.githubusercontent.com/19265450/74993543-abba7900-5421-11ea-8660-c93159f837e0.png)
Greetings,