When are the advance payments done against a Purchase order (PO)? And where can we configure it and how is it calculated?

Suggestions:
Advance can be paid on the below stages against a PO. This can be configured /selected in the payment terms tab of the same Purchase order(PO)
1) Order Confirmation: Release advance when the PO is confirmed
2) On Receipt: Release advance when the material is received and the 3) Goods Inward Memo (GIM) is prepared
4) On QC Approval: Release advance when the material passes QC checks at the delivery location
5) Retention Amount: Whether this advance is paid as a retention amount

The method in which the advance amount will be calculated.is as below:
1) % of base: Calculate the advance amount payable as a percentage of the base amount,
i.e. the pure PO value net of Tax
2)% of net: Calculate the advance amount payable as a percentage of the net amount
3)Fixed Amount: Whether a fixed amount is payable as advance irrespective of the PO value