The Court may at any stage of the proceedings allow either party to alter or amend his pleadings in such manner and on such terms as may be just, and all such amendments shall be made as may be necessary for the purpose of determining the real questions in controversy between the parties: Provided that no application for amendment shall be allowed after the trial has commenced, unless the Court comes to the conclusion that in spite of due diligence, the party could not have raised the matter before the commencement of trial.
Bullet Points on Order VI, Rule 17 of CPC:
The Court permits parties to amend pleadings during proceedings to ensure a fair determination of the real issues.
Amendments are allowed on just terms.
After the trial begins, amendments are only allowed if it's proven that the matter couldn't have been raised earlier despite due diligence.