Set "quantity" on Estimate creation at certain value when Customer custom field value is met

Set "quantity" on Estimate creation at certain value when Customer custom field value is met

Hi, 

I am trying to automatically populate the "quantity" field on an Estimate based on a Custom Field of the Customer.

Quantity field being on the Item Table of the Estimate.

Custom Field: "Contract Client" [Values is Yes / No]

I've written the following custom function:

orgID = organization.get("organization_id").toString();
estimateID = estimate.get("estimate_id").toLong();
quantity = estimate.get("quantity").toDecimal();
customer = estimate.get("customer_name");
customFields = customer.get("custom_fields").toList();
ContractClient = customFields.get("contract_client");
estimateMap = Map();
if(ContractClient.get("value") == "No")
{
quantity = quantity * 4.00;
estimateMap.put(quantity,quantity);
}
result = zoho.books.updateRecord("Estimates",organization,quantity,estimateMap);

I have a workflow rule setup where an estimate is created, and the Customer is non a Contract Client, that this custom function fires.

It's not working though.

I think it might be the custom function that isn't written correctly.
Please help.