strange issue in customer outstandings

we have a project accounting module in our company 

when we open any job we put the salesmen id in it 

after invoicing the job 


when we take customer outstanding it is taking salesmans code from customer master which is wrong

it should take from invoice transaction 




there are many salesmen dealing with same customer