Not Working - Update record using deluge

Not Working - Update record using deluge

I have created a function which checks date greater than 31st March'21 and if true, sums the values
I am trying to update the sum value in a currency field i created but it is not updating for whatever reasons, 
Help :D


sum = 30;
Custom_date = '31-Mar-2021';
if(CORR1Date > Custom_date)
{
sum = sum + CORR1Amt;
}
if(CORR2Date > Custom_date)
{
sum = sum + CORR2Amt;
}
if(CORR3Date > Custom_date)
{
sum = sum + CORR3Amt;
}

update = zoho.crm.updateRecord("Deals",potid,{"CORtotal":sum});