Our company used PO tracker to record the receipts of inventory from foreign vendors before we turned to Purple just recently. I found that the exchange gain or loss acccount is not the actual gain or loss. For example, we received goods from Europe in May, the exchange rate is 1.5495, the invoice amount is euro 104413.81, we record 0.5495x104413.81=57375.39 as exhange gain, this is not actual ex gain because PO tracker has no foreign currency function. and this gain should not show up in income statement in May, June until it is paid in July. We paid this invoice in July, when the exhange rate is 1.4374276, so the actual gain should be (1.5495-1.4374)*104413.81=11704.79 and should show up in July income statement. right? But after I post the payment, the G/L entry is:

DR accounts payable 148998.71
CR BANK 150087.29

DR SALES 45673.48
CR EXHANGE GAIN OR LOSS 44584.90

104413.81*1.4270(the rate when the invoice generated from PO tracker)
150087.29-104413.81=45673.48

I don't know why debit sales, which makes sale number incorrect. Also where is the amount of 44584.90 from cause it is not the amount we entered as we received the inventory in May, which is 57375.39. and this amount shows up in May income statement.
It looks reasonable if we debit exhange gain or loss account instead of sales when we actually paid the invoice,credit it when we received the inventory in May and the difference will be the actual exhange gain or loss. and the actual gain will only show up in the income statement of the month the invoice was paid. Now my July income statement shows that exhang gain or loss is 44584.90 which is not true. How can I adjust my exhange gain or loss GL account? Thanks a lot.