Add locking day in payment term

I want to make a field called Locking Day just like the name of credit days in the payment term and I want to do the calculation in it in such a way that if we put 10 credit days and 7 days in Locking Day, then if I set the credit limit as 10 days. And if I have transacted which party and I have not paid even 7 days after 10 days then the transaction of that party is to be locked then how can I calculate it?