Tolerance Script

Hello

can you help me out in writing script code for restrict PO Tolerance for 5%!!