Purchase Invoice (Is Return/ Debit Note) Bug

1. Incorrect Tax Calculation:

When we create a purchase invoice with is return check box as true the tax amount gets round up and it’s not round off; whereas when we create a regular purchase invoice without is return =1 then it calculates correctly.

Case 1: Purchase Invoice (Is return =0)
I have created a purchase invoice with the amount of INR 8.5 and added 5% TAX, The Tax amount 0.43 which is correct.

Case 2: Purchase Invoice (Is return =1)
I have created a purchase invoice with the amount of INR 8.5 and added 5% TAX, The Tax amount 0.42 which is incorrect. However, before saving it shows 0.43 and once we save it changes to 0.42 again.

2. Uniqueness Check Fails into Is Return=1 in the purchase invoice. ERPNext is not checking the uniqueness of the supplier invoice if the document is the debit note; whereas in a regular Purchase Invoice, it works fine.

Can anyone please suggest what to do in these cases?

PS: I am using version-13 stable release.