I want to sum up a Calculated column to display in a table in a Web Part. I previously had the same code operating off of a non-calculated column with no issues. But now I want to operate off of a Calculated Column that sums a few costs into a Total Cost and then use CAMLQuery to display the total sum of all Total Cost Columns. What in this code is breaking between Calculated column and Currency column?
function GetBilling() {
var billingTotal = 0;
$().SPServices({
operation: "GetListItems",
async: false,
listName: "AS400 Billing",
CAMLViewFields: "<ViewFields><FieldRef Name='TotalSellCalc' /></ViewFields>",
completefunc: function (xData, Status) {
$(xData.responseXML).SPFilterNode("z:row").each(function() {
//var liHtml = "<li>" + $(this).attr("ows_Title") + "</li>";
//$("#rbs_as400total").append(liHtml);
var returnedValue = $(this).attr("ows_TotalSellCalc")
returnedValue = CleanUpNumber(returnedValue);
billingTotal += returnedValue;
});
}
});
$("#rbs_as400total").text('$' + billingTotal.toLocaleString());
}