At the time of invoice posting, from where does the AR account get populated?

Explanation:
As per system functionality at the time of invoice posting the code for the accounts receivables(AR) gets populated from customer master, if this is left blank, AR account code from the item series master is used.
Note: Accounts receivables(AR) should be present in account master