if ($cp > 0) { $sValues = "'',{$tax_fee_id},'{$complex_tfoid}',\n '{$com_var}',now()"; } else { $tp = mysql_query("select * from ebpls_buss_taxfeeother\n\t \t\t\twhere taxfeeid='{$complex_tfoid}'"); //source $co = mysql_fetch_assoc($tp); $tfoid = $co[tfo_id]; $taxtype = $co[taxtype]; $tp = mysql_query("select * from ebpls_buss_taxfeeother\n\t \t\t\twhere natureid='{$natureid}' and\n\t \t\t\ttfo_id='{$tfoid}' and taxtype='{$taxtype}'"); $co = mysql_fetch_assoc($tp); $ntaxid = $co[taxfeeid]; $sValues = "'',{$tax_fee_id},'{$ntaxid}',\n '{$com_var}',now()"; } $nFormula->InsertNewComplex($sValues); } } } } elseif ($Indicator == 3) { //go go power ranger $nRange = new TaxFee(); $sValues = "'',{$natureid}, {$tfotype}, {$Basis},\n {$Indicator},'','{$AmountFormula}',now(),\n {$TaxType},'{$uom}',{$MinAmount}"; $nRange->InsertNewTaxFee($sValues); $tax_fee_id = $nRange->outid; $loop = 0; while ($loop < $howmanyrange) { $sValues = "'',{$tax_fee_id},'{$rlow[$loop]}','{$rhigh[$loop]}',\n '{$rvalue[$loop]}',now()"; $nRange->InsertNewRange($sValues); $loop++; } } }