Finalize purchase order

Hi All.

I need to Finalize the list purchase orders given in the excel sheet. Anyone have code or class which is being used to finalize the purchase order?

What exactly do you mean by “to finalize”? The logic behind “Finalize” button?