...
   IF "Prepmt. Line Amount" >"Line Amount" THEN
    FIELDERROR("Prepmt. Line Amount",STRSUBSTNO(Text043,"Line Amount"));
  IF "System-Created Entry" THEN
    FIELDERROR("Prepmt. Line Amount",STRSUBSTNO(Text045,0));
  IF Quantity <> 0 THEN
// Delete the following lines.                                                                  
    VALIDATE("Prepayment %",ROUND("Prepmt. Line Amount" /
        ("Line Amount" * (Quantity - "Quantity Invoiced") / Quantity) * 100,0.00001))
  ELSE
    VALIDATE("Prepayment %",ROUND("Prepmt. Line Amount" * 100 / "Line Amount",0.00001));
// End of the deleted lines.  
...
...
   IF "Prepmt. Line Amount" > "Line Amount" THEN
    FIELDERROR("Prepmt. Line Amount",STRSUBSTNO(Text043,"Line Amount"));
  IF "System-Created Entry" THEN
    FIELDERROR("Prepmt. Line Amount",STRSUBSTNO(Text045,0));
  IF Quantity <> 0 THEN
// Add the following lines.                                                                  
    VALIDATE("Prepayment %","Prepmt. Line Amount" /
        ("Line Amount" * (Quantity - "Quantity Invoiced") / Quantity) * 100)                                                                    
  ELSE                                                                    
    VALIDATE("Prepayment %","Prepmt. Line Amount" * 100 / "Line Amount");
// End of the added lines. 
...