Tax / Withholding Tax is posted in GL after submitting a purchase invoice

Hello,

Now I have a problem that when I create a purchase invoice and submit, the Tax or withholding Tax will be posted in GL as well. But I’d like to post the tax when I make the payment entry. How can I do this process on ERPNext?

Thank you so much in advance.

Yes. In one country we operate in withholding is registered as of invoice date, in another on payment date. We need to match tax authorities reports.