I just want a simple validation code....

this is my form A named -> ProjInvoiceTable
In this billing rules lines it is showing contract value field , on this field i have to put validation.. (Contract Value Field is coming from PsaContractLineItems-> LineValue)

It is also showing the field Contract value with the sum of all lines of Milestones ..

It is the form ProjFundingSourceDetail and the PO lines is my Customized Tab..
now the thing I want is the sum of this BaseAmount(Coming from table FXProjFundingPOLines) field in POLines Tab must not be greater than the LineValue field of PsaContractLineItems ..
In both tables i.e PsaContractLineItems and FXProjFundingPOLines, common reference is ContractId....
this validation i had to put ...