
Runner.pages.PageSettings.addPageEvent('Payment of arrears',Runner.pages.constants.PAGE_ADD,"afterPageReady",function(pageObj,proxy,pageid,inlineRow,inlineObject,row){var F1=Runner.getControl(pageid,'type');var F2=Runner.getControl(pageid,'cheque_number');var F3=Runner.getControl(pageid,'cheque_date');F2.makeReadonly();F3.makeReadonly();F1.on('change',function(e)
{if(this.getValue()=='Cash')
{F2.setValue("");F3.setValue("");F2.removeValidation("IsRequired");F3.removeValidation("IsRequired");F2.makeReadonly();F3.makeReadonly();}
else
{F2.makeReadWrite();F3.makeReadWrite();F2.addValidation('IsRequired')
F3.addValidation('IsRequired')}});;});Runner.pages.PageSettings.addPageEvent('Payment of arrears',Runner.pages.constants.PAGE_LIST,"afterPageReady",function(pageObj,proxy,pageid,inlineRow,inlineObject,row){var F1=Runner.getControl(pageid,'type');var F2=Runner.getControl(pageid,'cheque_number');var F3=Runner.getControl(pageid,'cheque_date');F2.makeReadonly();F3.makeReadonly();F1.on('change',function(e)
{if(this.getValue()=='Cash')
{F2.setValue("");F3.setValue("");F2.removeValidation("IsRequired");F3.removeValidation("IsRequired");F2.makeReadonly();F3.makeReadonly();}
else
{F2.makeReadWrite();F3.makeReadWrite();F2.addValidation('IsRequired')
F3.addValidation('IsRequired')}});;});