He owes a debt to the company and he wants to pay it off with the lump sum he receives for retirement
Question

                I owe a debt to the company in which I work, and I know that the lump sum I will receive for retirement is approximately the same amount. Will that be regarded as paying off the loan?.
Praise be to Allah.If the 
    company system will accept paying off the debt with the lump sum paid at 
    retirement, there is nothing wrong with that. You can come to an agreement 
    with the company for that, and you will have paid off your debt thereby.  
But if the 
    due date for paying off the debt comes before you receive the lump sum, it 
    is not permissible for you to delay it unless the company agrees to that. 
    Just establishing your right to the lump sum does not count as paying off 
    the debt, because this money is not handed over unless certain conditions 
    that are well known in companies are met, such as reaching retirement age or 
    leaving work. 
And Allaah knows 
    best.