Reference to the purchase invoice

Hi everyone !!!

How can I get the sales invoice reference in a custom doctype.
That is, refer to the sales invoice from the secondary table Purchase Taxes and Charges.

Could anyone help me please.