Zoho CRM Deluge - Converting a whole number like 10000 to £100.00
I have written a script that takes data from our payment provider and enters it in to a custom module. The payment provider provides the amount paid data in an unformatted state (for example: £130.00 is sent as 13000). My issue is, when a customer pays £100 for example, the data is sent as 10000. Unfortunately the script I have written doesnt like this and removes all the zeros and returns £1.
I have pasted a snippet of my script below, if someone could help me sort this it would be greatly appreciated
//get raw payment amount and convert to decimal
v_MyString = payment.get("Amount1");
// example: 12000
info v_MyString;
right = v_MyString.right(2);
// returns: 00
left = v_MyString.remove(v_MyString.right(2));
// returns: 120
ChangeAmount = left + "." + right;
// returns: 120.00
PayentStatus = payment.get("Payment_Status");
Thanks in advance!