Script not adding fields, will not hold () in script.

Script not adding fields, will not hold () in script.

Below is a script I am trying to use. The purpose of this script is to update an "Inventory" form's "Quantity" field. It will not give me the total of the two stated fields "currentinventory  +  Inventory_to_Add".

When I enter the script via the GUI or free scripting method, Zoho always removes the () from the script. I am no scriptwriter by far, but isn't it supposed to keep the ()? So when i use my "Re-Stock" form, the script adds what I enter to the "Inventory" report but does not ADD them, it only appends it. example: CurrentInventory = 12 + Inventory_to_Add = 12 the "Inventory" report shows "1212" instead of the total of 24.

Please help!


What I woudl like to enter:

currentinventory=input.Inventory.Quantity;
referedproduct = Inventory[ID == input.Inventory];
referedproduct.Quantity=(currentinventory  +  Inventory_to_Add);

What Zoho saves:
currentinventory=input.Inventory.Quantity;
referedproduct = Inventory[ID == input.Inventory];
referedproduct.Quantity=input.Inventory_to_Add + currentinventory;

Travis