Purchase invoice currency different than PO currency

In many cases with our suppliers or customers, we raise our quotation or Purchase orders in USD or EUR currency to minimize the impact of local currency devaluation during work execution, with an agreement to pay in equivalent local currency for each payment due at an exchange rate of payment date.

Accordingly, final sales/Purchase invoices or payments issued in a different currency than original Quote/PO, how can we process such cases in ERPNext, as whenever to make a purchase receipt or invoice in local currency, system shows an error stating that Currecy shall be same as PO/Quote. invoices or