Skip to content
This repository was archived by the owner on Aug 16, 2022. It is now read-only.
This repository was archived by the owner on Aug 16, 2022. It is now read-only.

Document.js do not verify the value of this[table.fieldname] before use it in applyFormula method.  #112

@Franklin0702

Description

@Franklin0702

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

2. Create an Invoice, add an item and select this tax.
image

3. Save the Invoice and submit it, then you will get the following error in the console:
image
image
image

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

To fix this I added the next lines:
image

Greetings,

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions