我写了一个函数,它给了我上述错误。我检查了它,但我找不到错误。我写了以下代码
public function calculateTotal():void
{
var len:int=inv_dg.dataProvider.length;
for(var i:int=0;i<len;i++)
{
var dgObj:InvoicePrintRTObject=inv_dg.dataProvider.getItemAt(i) as InvoicePrintRTObject;
var tmp:String=dgObj.quantity.toString();
var tmpqty:Array=tmp.split(",");
var tmpqtytotal:String="";
for(var j:int=0;j<tmpqty.length;j++)
tmpqtytotal+=tmpqty[j];
var tmpLotTot:String=dgObj.lottotal.toString();
var tmpTot:Array=tmpLotTot.split(",");
var tmpLottotal:String="";
for(j:int=0;j<tmpTot.length;j++)
tmpLottotal+=tmpTot[j];
}
totQty.text=""+tmpqtytotal;
totInv.text=""+tmpLottotal;
var cTaxRate=parseInt(ctaxRate.text);
var cTaxAmt=totalInvoice*(cTaxRate/100);
totCTax.text=""+cTaxAmt;
totFinal.text=""+(totalInvoice+cTaxAmt);
}
谁能帮忙