Purchase invoice tax error

Hi, I have a problem with version 12 of the erpnext. I would like to know where is the function that recalculates the values ​​of the childtable taxes in the purchase invoice, since this is giving me problems with the code that I am changing