function addOGTAPF() {
	if(getExperimentInfo('nooftargets') > 64)
	{
		return;
	}
	var title = "TaqMan<sup>&reg;</sup>&nbsp;OpenArray<sup>&reg;</sup>&nbsp;Genotyping Genetic Barcode Panel";
	var isQuant = getExperimentInfo('openarrayinstrument') == "QuantStudio" ? true : false;
	var isNTCycler = getExperimentInfo('openarrayinstrument') == "NTCycler" ? true : false;
		
	var formatObj1 = isQuant ? findApproximateOpenQuantGenoTapRecords(getExperimentInfo('nooftargets')) : findApproximateOpenGenoTapRecords(getExperimentInfo('nooftargets'));
	var formatObj = findApproximateOpenGenoTapRecords(getExperimentInfo('nooftargets'));
	
	var formats = isQuant ? formatObj1.get('concatenate') : formatObj1.get('productname');
	var formatqnt = formats.replace("TaqMan OpenArray","TaqMan® OpenArray®");
	var format = formatqnt.replace("QuantStudio TM","QuantStudio™");

	var partNo = formatObj1.get('partnumber');
	var noofgenes = formatObj.get('no of targets');
	var reqnoofunits = Math.ceil((getExperimentInfo('noofsamples')
			* getExperimentInfo('noofsubarrays') / formatObj
			.get('no of samples')));
	var noofunits = reqnoofunits < formatObj.get('min') ? formatObj.get('min')
			: reqnoofunits;
	var min = formatObj.get('min');
	var isMin = (min == 1 ? 1 : (Math.ceil(reqnoofunits) < min ? 0 : 1));
    var noofreactions = noofgenes * getExperimentInfo('noofsamples')
			* getExperimentInfo('noofreplicates');
	var mvolume = noofreactions * formatObj.get('master mix needed per unit');
	var mmxObj = genoMasterMix.findRecord("productname","TaqMan OpenArray Genotyping Master Mix");
	var mastermix = mmxObj.get('productname');
	mastermix = mastermix.replace("TaqMan OpenArray","TaqMan® OpenArray®");
	var mmxPartNumber = mmxObj.get('partnumber');
	var masterperc = (Ext.get('masterperc').dom.value).split('%')[0];
	var accessperc = (Ext.get('accessoriesperc').dom.value).split('%')[0];
	var volumeDiscount = 0;
   /*
	var discObj = tsstable.findRecord('product', formatObj.get('productname'));
 
	var discUnits = noofunits > 84 ? 84 : noofunits;

	volumeDiscount = discObj.discounts().findRecord('volume', discUnits, 0,
			false, false, true).get('value');
   */
    volumeDiscount = 0; 
	/*
	var pricePerUnit = (isQuant ? (formatObj1.get('Pricing or Min Order')/formatObj1.get('min')) : (pricelist.findRecord('partnumber', partNo)
			.regions().findRecord('region', region + "-" + currency).get('price')));
	var price = (isQuant ? (formatObj1.get('Pricing or Min Order')/formatObj1.get('min')) : (pricelist.findRecord('partnumber', partNo)
			.regions().findRecord('region', region + "-" + currency).get('price')))
			* noofunits;
	*/
   var pricePerUnit = ((pricelist.findRecord('partnumber', partNo)
			.regions().findRecord('region', region + "-" + currency).get('price')));
	var price = ((pricelist.findRecord('partnumber', partNo)
			.regions().findRecord('region', region + "-" + currency).get('price')))
			* noofunits;
		
	var openarrayperc = parseFloat((Ext.get('openarrayperc').dom.value).split('%')[0]);
	var assaysCostWithVolDisc = price - (volumeDiscount+openarrayperc / 100 * price);
	var openArray384Obj = accessories.findRecord('product', 'OpenArray 384-well Sample Plates');
	var acc1PartNumber = openArray384Obj.get('partnumber');
	var openArray384WellSamplePlatesUnits = Math.ceil(formatObj
			.get('sampleplates')
			* reqnoofunits) < openArray384Obj.get('min') ? openArray384Obj.get(
					'min') : Math.ceil(formatObj
			.get('open array sample plates per unit')
			* reqnoofunits);
	var openArray384WellSamplePlatesCost = pricelist.findRecord('partnumber', acc1PartNumber)
	.regions().findRecord('region', region + "-" + currency).get('price')
			* openArray384WellSamplePlatesUnits ;
	
	var opeArrayAccuObj = accessories.findRecord('product', 'OpenArray AccuFill System Tips');
	var acc2PartNumber = opeArrayAccuObj.get('partnumber');

	// Commented on 05-03-2015 by Lini instruction
	//var openArrayAccuFillSystemTipsUnits = Math.ceil((formatObj.get('open array tips per unit')	* reqnoofunits) % 10);
	var openArrayAccuFillSystemTipsperPrice = pricelist.findRecord('partnumber', acc2PartNumber).regions().findRecord('region', region + "-" + currency).get('price');
	var openArrayAccuFillSystemTipsUnits = Math.ceil((1.25 * reqnoofunits) / 10);

	var openArrayAccuFillSystemTipsCost = pricelist.findRecord('partnumber', acc2PartNumber)
	.regions().findRecord('region', region + "-" + currency).get('price')
			* openArrayAccuFillSystemTipsUnits;
	
	var openArrayAccu10Obj = accessories.findRecord('product', 'OpenArray AccuFill System Tips, 10 Pack');
	var acc3PartNumber = openArrayAccu10Obj.get('partnumber');
	
	// Commented on 05-03-2015 by Lini instruction
	//var openArrayAccuFillSystemTips10Units = Math.floor((formatObj.get('open array tips per unit') * reqnoofunits) / 10);
	var  openArrayAccuFillSystemTips10PackperPrice = pricelist.findRecord('partnumber', acc3PartNumber).regions().findRecord('region', region + "-" + currency).get('price');
	var openArrayAccuFillSystemTips10Units = Math.floor(((1.25 * reqnoofunits) / 10)/10);
	var openArrayAccuFillSystemTips10PackUnits = openArrayAccuFillSystemTips10Units;
	
	var openArrayAccuFillSystemTips10Cost = pricelist.findRecord('partnumber', acc3PartNumber)
	.regions().findRecord('region', region + "-" + currency).get('price')
			* openArrayAccuFillSystemTips10Units;

	/*
		- Starts at New added code for Combination.
		- Here to get the single and 10 pack combination ob box for Accufill
	*/
	var openArrayAccuFillSystemTipsTotalUnits =Math.ceil((1.25 * reqnoofunits) / 10);
	var accFill10PackUnit = ((1.25 * reqnoofunits) / 10)/10;
	var accFill1PackUnit = (1.25 * reqnoofunits) / 10;
		
	if(accFill10PackUnit >= 1){
		if((openArrayAccuFillSystemTipsTotalUnits % 10) != 0){
			var accuFill_10Temp = openArrayAccuFillSystemTips10PackUnits - 1;
			var accuFill_rem_1packTemp = openArrayAccuFillSystemTipsTotalUnits - (accuFill_10Temp * 10);
			var accuFill_1packTemp = Math.ceil(accuFill_rem_1packTemp);
			
			openArrayAccuFillSystemTipsUnits = accuFill_1packTemp;
			openArrayAccuFillSystemTips10PackUnits = accuFill_10Temp;
			
			openArrayAccuFillSystemTipsCost = openArrayAccuFillSystemTipsperPrice * openArrayAccuFillSystemTipsUnits;
			openArrayAccuFillSystemTips10PackCost = openArrayAccuFillSystemTips10PackperPrice * openArrayAccuFillSystemTips10PackUnits;
		}else{
			openArrayAccuFillSystemTipsUnits = 0;
			openArrayAccuFillSystemTipsCost = 0;
			openArrayAccuFillSystemTips10PackCost = openArrayAccuFillSystemTips10PackperPrice * openArrayAccuFillSystemTips10PackUnits;
		}
	}else{
		openArrayAccuFillSystemTips10PackUnits = 0;
		openArrayAccuFillSystemTips10PackCost = 0;
		openArrayAccuFillSystemTipsCost = openArrayAccuFillSystemTipsperPrice * openArrayAccuFillSystemTipsUnits;
	
	}
	//End of the Combination code.
	
	if (getExperimentInfo('nooftargets') <= 32) {
		var masterMixUnits = Math.ceil(((reqnoofunits * 0.62500)/10));
	}else
	{
		var masterMixUnits = Math.ceil(((reqnoofunits * 0.31250)/10));
	}
	

	var masterMixCostPerUnit = pricelist.findRecord('partnumber', mmxPartNumber)
	.regions().findRecord('region', region + "-" + currency).get('price');

	var masterMixCost = masterMixCostPerUnit * masterMixUnits;
   
	var masterMixCostWithDisc = masterMixCostPerUnit * masterMixUnits
			* (1 - (masterperc / 100));
	var openArray384WellSamplePlatesCostWithDisc = openArray384WellSamplePlatesCost * (1 - (accessperc / 100));
	var openArrayAccuFillSystemTips10CostWithDisc = openArrayAccuFillSystemTips10Cost * (1 - (accessperc / 100));
	var openArrayAccuFillSystemTipsCostWithDisc	  = openArrayAccuFillSystemTipsCost * (1 - (accessperc / 100));	
	var accessoriescost = openArrayAccuFillSystemTipsCostWithDisc + openArrayAccuFillSystemTips10CostWithDisc
			+ openArray384WellSamplePlatesCostWithDisc;

	var masterMixCostPerReaction = masterMixCostWithDisc / noofreactions;
	var totalAccessoriescost = accessoriescost;

	var accessoriesCostPerReaction = totalAccessoriescost / noofreactions;

	var assayCostPerReaction = assaysCostWithVolDisc / noofreactions;

	var totalCostPerReaction = masterMixCostPerReaction + assayCostPerReaction
			+ accessoriesCostPerReaction;

	var totalCostPreDisc = accessoriescost + masterMixCost + price;

	// var openarraycost = formatObj.

	var totalCost = totalAccessoriescost + masterMixCostWithDisc
			+ assaysCostWithVolDisc;

    
	var totalDiscount = 100 - (totalCost * 100 / totalCostPreDisc);

	var assayCostPerSample = assaysCostWithVolDisc
			/ getExperimentInfo('noofsamples');
	var acc1CostPerSample = openArray384WellSamplePlatesCostWithDisc
			/ getExperimentInfo('noofsamples');
	var acc2CostPerSample = openArrayAccuFillSystemTipsCostWithDisc
			/ getExperimentInfo('noofsamples');
	var acc3CostPerSample = openArrayAccuFillSystemTips10CostWithDisc
	/ getExperimentInfo('noofsamples');
	
	var accessoriesCostPerSample = acc1CostPerSample + acc2CostPerSample + acc3CostPerSample;
	var mmixCostPerSample = masterMixCostWithDisc / getExperimentInfo('noofsamples');

	var totalCostPerSample = assayCostPerSample + acc1CostPerSample
			+ acc2CostPerSample + acc3CostPerSample + mmixCostPerSample;
	var partNumber = formatObj.get('partnumber');
	
	var productUrl = producturls.findRecord('partNumber', partNumber).get('productURL');
			
	var noOfHours = 0;
	var oType = getExperimentInfo('openarrayinstrument') == "QuantStudio" ? "GenotypingQS" : "GenotypingNT";
	
	var tRec = openarrayruntimes.findRecord('type', oType);
	noOfHours = Math.ceil(Math.ceil((reqnoofunits) / tRec.get('noofplatesperrun')) * tRec.get('totalmin') /60);
	
	/* FixedOpenArrayAccessories - Started */
	var realtimePCRname = "";
	var accessory4partnumber = "";
	var openarrayrealtimepcraccessorieskitunits = 0;
	var openarrayrpcraccesskitunitprice =  0;
	var openarrayrealtimepcraccessorieskitcost = 0;
	var accessoriesdisc = 0;
	var fixedOpenArrayAcesstCost = 0;
	var fixOArrayPCRPrperRec = 0;
	var fixOArrayPCRPrperSmp = 0;
	
	if( FixedOpenArrayAccessories.findRecord('Application', getExperimentInfo('type'), 0) != null && (isQuant || isNTCycler) ){
		if(FixedOpenArrayAccessories.findRecord('part number', partNo) != null){
				
			var fixedOpenArrayAcessObj = FixedOpenArrayAccessories.findRecord('part number', partNo);
			if(isNTCycler){
				var realtimePCRname = "TaqMan® OpenArray® Genotyping Accessories Kit";
				var accessory4partnumber = 4404572;
			}else{
				var realtimePCRname = "TaqMan® OpenArray® Real-Time PCR Accessories Kit";
				//var accessory4partnumber = 4453975;
				var accessory4partnumber = 4469576;
			}
			var openarrayrealtimepcraccessorieskitunits = Math.ceil( noofunits / 10 );
			var openarrayrpcraccesskitunitprice =  pricelist.findRecord('partnumber', accessory4partnumber)
	.regions().findRecord('region', region + "-" + currency).get('price');
			var openarrayrealtimepcraccessorieskitcost = openarrayrpcraccesskitunitprice * openarrayrealtimepcraccessorieskitunits;
			var accessoriesdisc = (Ext.get('accessoriesperc').dom.value).split('%')[0];
			var fixedOpenArrayAcesstCost = (openarrayrealtimepcraccessorieskitcost * (1 - (accessoriesdisc / 100)));
			var fixOArrayPCRPrperRxn = openarrayrealtimepcraccessorieskitcost / (noofreactions);
			var fixOArrayPCRPrperSmp = (openarrayrealtimepcraccessorieskitcost * (1 - (accessoriesdisc / 100))) / (getExperimentInfo('noofsamples'));
			
		}
	}
	totalCostPerSample = totalCostPerSample + fixOArrayPCRPrperSmp;
	totalCost = totalCost + fixedOpenArrayAcesstCost;
	totalCostPerReaction = totalCostPerReaction + fixOArrayPCRPrperRxn;
	/*FixedOpenArrayAccessories - End*/
	
	var imageType = "";
	if(isNTCycler){
		imageType = "openarray-ntcycler-fixed";
	}
	
	outputList.add({
				pno : 98,
				title : title,
				partnumber : partNo,
				format : format,
				noofunits : noofunits,
				noofreactions : noofreactions,
				mastermix : mastermix,
				mnoofunits : masterMixUnits,
				totalcost : roundNumber(totalCost, 2),
				volumediscount : volumeDiscount,
				mvolumediscount : 0,
				mastermixdisc : masterperc,
				accessoriesdisc : accessperc,
				assayscost : roundNumber(price, 2),
				assayscostperunit : roundNumber(pricePerUnit, 2),
				assayscostwithvoldisc : roundNumber(assaysCostWithVolDisc, 2),
				mastermixvol : 0,
				mastermixcostperunit : masterMixCostPerUnit,
				mastermixcostwithvoldisc : masterMixCost,
				mastermixcostwithdisc : roundNumber(masterMixCostWithDisc, 2),
				mastermixcost : masterMixCost,
				noofhours : noOfHours,
				assaycostperreaction : roundNumber(assayCostPerReaction, 2),
				mastermixcostperreaction : roundNumber(masterMixCostPerReaction, 2),
				accessoriescostperreaction : roundNumber(accessoriesCostPerReaction, 2),
				optimizationcostperreaction : 0,
				totalcostperreaction : roundNumber(totalCostPerReaction, 2),
				producturl : '',
				openarray384wellsampleplatescost : openArray384WellSamplePlatesCost,
				openarrayaccufillsystemtipscost : openArrayAccuFillSystemTipsCost,
				openarrayaccufillsystemtipsunits : openArrayAccuFillSystemTipsUnits,
				openarrayaccufillsystemtips10packunits : openArrayAccuFillSystemTips10Units,
				openarrayaccufillsystemtips10packcost : openArrayAccuFillSystemTips10Cost,
				openarray384wellsampleplatesunits : openArray384WellSamplePlatesUnits,
				mastermixunits : masterMixUnits,
				totalcostpersample : roundNumber(totalCostPerSample, 2),
				accessoriescost : roundNumber(accessoriescost, 2),
				accessoriescostwithdisc : roundNumber(totalAccessoriescost, 2),
				assaycostpersample : roundNumber(assayCostPerSample, 2),
				accessoriescostpersample : roundNumber(accessoriesCostPerSample, 2),
				mmxcostpersample : roundNumber(mmixCostPerSample, 2),
				totalcostpredisc : roundNumber(totalCostPreDisc, 2),
				totaldiscount : roundNumber(totalDiscount, 2),
				accessory1partnumber : acc1PartNumber,
				accessory2partnumber : acc2PartNumber,
				accessory3partnumber : acc3PartNumber,
				mastermixpartnumber : mmxPartNumber,
				reqnoofunits : reqnoofunits,
				type : 'openarray-fixed',
				min : min,
				ismin : isMin,
				realtimePCRname : realtimePCRname,
				accessory4partnumber :accessory4partnumber,
				openarrayrealtimepcraccessorieskitunits : openarrayrealtimepcraccessorieskitunits,
				openarrayrpcraccesskitunitprice : openarrayrpcraccesskitunitprice,
				openarrayrealtimepcraccessorieskitcost : openarrayrealtimepcraccessorieskitcost,
				imageType:imageType,
				fnName:'addOGTAPF'
			});

}
function addOGTAPFS() {
	if(getExperimentInfo('nooftargets') > 64)
	{
		return;
	}
	if(getExperimentInfo('nooftargets') <= 32)
	{
	var title = "TaqMan<sup>&reg;</sup>&nbsp;OpenArray<sup>&reg;</sup>&nbsp;Genotyping Genetic Barcode Panel";
	var isQuant = getExperimentInfo('openarrayinstrument') == "QuantStudio" ? true : false;
	var isNTCycler = getExperimentInfo('openarrayinstrument') == "NTCycler" ? true : false;
	
	var formatObj1 = isQuant ? findApproximateOpenQuantGenoTapRecordsA(getExperimentInfo('nooftargets')) : findApproximateOpenGenoTapRecordsA(getExperimentInfo('nooftargets'));
	var formatObj = findApproximateOpenGenoTapRecordsA(getExperimentInfo('nooftargets'));

	var formats = isQuant ? formatObj1.get('concatenate') : formatObj1.get('productname');
	var formatqnt = formats.replace("TaqMan OpenArray","TaqMan® OpenArray®");
	var format = formatqnt.replace("QuantStudio TM","QuantStudio™");

	var partNo = formatObj1.get('partnumber');
	var noofgenes = formatObj.get('no of targets');
	var reqnoofunits = Math.ceil((getExperimentInfo('noofsamples') * getExperimentInfo('noofsubarrays') / formatObj.get('no of samples')));
	var noofunits = reqnoofunits < formatObj.get('min') ? formatObj.get('min')
			: reqnoofunits;
	var min = formatObj.get('min');
	var isMin = (min == 1 ? 1 : (Math.ceil(reqnoofunits) < min ? 0 : 1));
    var noofreactions = noofgenes * getExperimentInfo('noofsamples')
			* getExperimentInfo('noofreplicates');
	var mvolume = noofreactions * formatObj.get('master mix needed per unit');
	var mmxObj = genoMasterMix.findRecord("productname","TaqMan OpenArray Genotyping Master Mix");
	var mastermix = mmxObj.get('productname');
	mastermix = mastermix.replace("TaqMan OpenArray","TaqMan® OpenArray®");
	var mmxPartNumber = mmxObj.get('partnumber');
	var masterperc = (Ext.get('masterperc').dom.value).split('%')[0];
	var accessperc = (Ext.get('accessoriesperc').dom.value).split('%')[0];
	var volumeDiscount = 0;
   /*
	var discObj = tsstable.findRecord('product', formatObj.get('productname'));
 
	var discUnits = noofunits > 84 ? 84 : noofunits;

	volumeDiscount = discObj.discounts().findRecord('volume', discUnits, 0,
			false, false, true).get('value');
   */
    volumeDiscount = 0; 
	var pricePerUnit = ((pricelist.findRecord('partnumber', partNo)
			.regions().findRecord('region', region + "-" + currency).get('price')));
	var price = ((pricelist.findRecord('partnumber', partNo)
			.regions().findRecord('region', region + "-" + currency).get('price')))
			* noofunits;
	var openarrayperc = parseFloat((Ext.get('openarrayperc').dom.value).split('%')[0]);
	var assaysCostWithVolDisc = price - (volumeDiscount+openarrayperc / 100 * price);
	var openArray384Obj = accessories.findRecord('product', 'OpenArray 384-well Sample Plates');
	var acc1PartNumber = openArray384Obj.get('partnumber');
	var openArray384WellSamplePlatesUnits = Math.ceil(formatObj
			.get('sampleplates')
			* reqnoofunits) < openArray384Obj.get('min') ? openArray384Obj.get(
					'min') : Math.ceil(formatObj
			.get('open array sample plates per unit')
			* reqnoofunits);
	var openArray384WellSamplePlatesCost = pricelist.findRecord('partnumber', acc1PartNumber)
	.regions().findRecord('region', region + "-" + currency).get('price')
			* openArray384WellSamplePlatesUnits ;
	
 
	var opeArrayAccuObj = accessories.findRecord('product', 'OpenArray AccuFill System Tips');
	var acc2PartNumber = opeArrayAccuObj.get('partnumber');

	// Commented on 05-03-2015 by Lini instruction
	//var openArrayAccuFillSystemTipsUnits = Math.ceil((formatObj.get('open array tips per unit')	* reqnoofunits) % 10);
	var openArrayAccuFillSystemTipsperPrice = pricelist.findRecord('partnumber', acc2PartNumber).regions().findRecord('region', region + "-" + currency).get('price');
	var openArrayAccuFillSystemTipsUnits = Math.ceil((1.25 * reqnoofunits) / 10);

	var openArrayAccuFillSystemTipsCost = pricelist.findRecord('partnumber', acc2PartNumber)
	.regions().findRecord('region', region + "-" + currency).get('price')
			* openArrayAccuFillSystemTipsUnits;
	
	var openArrayAccu10Obj = accessories.findRecord('product', 'OpenArray AccuFill System Tips, 10 Pack');
	var acc3PartNumber = openArrayAccu10Obj.get('partnumber');
	
	// Commented on 05-03-2015 by Lini instruction
	//var openArrayAccuFillSystemTips10Units = Math.floor((formatObj.get('open array tips per unit') * reqnoofunits) / 10);
	var  openArrayAccuFillSystemTips10PackperPrice = pricelist.findRecord('partnumber', acc3PartNumber).regions().findRecord('region', region + "-" + currency).get('price');
	var openArrayAccuFillSystemTips10Units = Math.floor(((1.25 * reqnoofunits) / 10)/10);
	var openArrayAccuFillSystemTips10PackUnits = openArrayAccuFillSystemTips10Units;
	var openArrayAccuFillSystemTips10Cost = pricelist.findRecord('partnumber', acc3PartNumber)
	.regions().findRecord('region', region + "-" + currency).get('price')
			* openArrayAccuFillSystemTips10Units;
	
	/*
		- Starts at New added code for Combination.
		- Here to get the single and 10 pack combination ob box for Accufill
	*/
	var openArrayAccuFillSystemTipsTotalUnits =Math.ceil((1.25 * reqnoofunits) / 10);
	var accFill10PackUnit = ((1.25 * reqnoofunits) / 10)/10;
	var accFill1PackUnit = (1.25 * reqnoofunits) / 10;
		
	if(accFill10PackUnit >= 1){
		if((openArrayAccuFillSystemTipsTotalUnits % 10) != 0){
			var accuFill_10Temp = openArrayAccuFillSystemTips10PackUnits - 1;
			var accuFill_rem_1packTemp = openArrayAccuFillSystemTipsTotalUnits - (accuFill_10Temp * 10);
			var accuFill_1packTemp = Math.ceil(accuFill_rem_1packTemp);
			
			openArrayAccuFillSystemTipsUnits = accuFill_1packTemp;
			openArrayAccuFillSystemTips10PackUnits = accuFill_10Temp;
			
			openArrayAccuFillSystemTipsCost = openArrayAccuFillSystemTipsperPrice * openArrayAccuFillSystemTipsUnits;
			openArrayAccuFillSystemTips10PackCost = openArrayAccuFillSystemTips10PackperPrice * openArrayAccuFillSystemTips10PackUnits;
		}else{
			openArrayAccuFillSystemTipsUnits = 0;
			openArrayAccuFillSystemTipsCost = 0;
			openArrayAccuFillSystemTips10PackCost = openArrayAccuFillSystemTips10PackperPrice * openArrayAccuFillSystemTips10PackUnits;
		}
	}else{
		openArrayAccuFillSystemTips10PackUnits = 0;
		openArrayAccuFillSystemTips10PackCost = 0;
		openArrayAccuFillSystemTipsCost = openArrayAccuFillSystemTipsperPrice * openArrayAccuFillSystemTipsUnits;
	
	}
	//End of the Combination code.

	if (getExperimentInfo('nooftargets') <= 32) {
		var masterMixUnits = Math.ceil((reqnoofunits * 0.62500)/10);
	}else
	{
		var masterMixUnits = Math.ceil((reqnoofunits * 0.31250)/10);
	}	

	var masterMixCostPerUnit = pricelist.findRecord('partnumber', mmxPartNumber)
	.regions().findRecord('region', region + "-" + currency).get('price');

	var masterMixCost = masterMixCostPerUnit * masterMixUnits;
   
	var masterMixCostWithDisc = masterMixCostPerUnit * masterMixUnits
			* (1 - (masterperc / 100));
	var openArray384WellSamplePlatesCostWithDisc = openArray384WellSamplePlatesCost * (1 - (accessperc / 100));
	var openArrayAccuFillSystemTips10CostWithDisc = openArrayAccuFillSystemTips10Cost * (1 - (accessperc / 100));
	var openArrayAccuFillSystemTipsCostWithDisc	  = openArrayAccuFillSystemTipsCost * (1 - (accessperc / 100));	
	var accessoriescost = openArrayAccuFillSystemTipsCostWithDisc + openArrayAccuFillSystemTips10CostWithDisc
			+ openArray384WellSamplePlatesCostWithDisc;

	var masterMixCostPerReaction = masterMixCostWithDisc / noofreactions;
	var totalAccessoriescost = accessoriescost;

	var accessoriesCostPerReaction = totalAccessoriescost / noofreactions;

	var assayCostPerReaction = assaysCostWithVolDisc / noofreactions;

	var totalCostPerReaction = masterMixCostPerReaction + assayCostPerReaction
			+ accessoriesCostPerReaction;

	var totalCostPreDisc = accessoriescost + masterMixCost + price;

	// var openarraycost = formatObj.

	var totalCost = totalAccessoriescost + masterMixCostWithDisc
			+ assaysCostWithVolDisc;

    
	var totalDiscount = 100 - (totalCost * 100 / totalCostPreDisc);

	var assayCostPerSample = assaysCostWithVolDisc
			/ getExperimentInfo('noofsamples');
	var acc1CostPerSample = openArray384WellSamplePlatesCostWithDisc
			/ getExperimentInfo('noofsamples');
	var acc2CostPerSample = openArrayAccuFillSystemTipsCostWithDisc
			/ getExperimentInfo('noofsamples');
	var acc3CostPerSample = openArrayAccuFillSystemTips10CostWithDisc
	/ getExperimentInfo('noofsamples');
	var accessoriesCostPerSample = acc1CostPerSample + acc2CostPerSample + acc3CostPerSample;
	var mmixCostPerSample = masterMixCostWithDisc / getExperimentInfo('noofsamples');

	var totalCostPerSample = assayCostPerSample + acc1CostPerSample
			+ acc2CostPerSample + acc3CostPerSample + mmixCostPerSample;
	var partNumber = formatObj.get('partnumber');
	var productUrl = producturls.findRecord('partNumber', partNumber).get(
			'productURL');
		
	var noOfHours = 0;
	var oType = getExperimentInfo('openarrayinstrument') == "QuantStudio" ? "GenotypingQS" : "GenotypingNT";
	
	var tRec = openarrayruntimes.findRecord('type', oType);
	noOfHours = Math.ceil(Math.ceil((reqnoofunits) / tRec.get('noofplatesperrun')) * tRec.get('totalmin') /60);
	
	/* FixedOpenArrayAccessories - Started */
	var realtimePCRname = "";
	var accessory4partnumber = "";
	var openarrayrealtimepcraccessorieskitunits = 0;
	var openarrayrpcraccesskitunitprice =  0;
	var openarrayrealtimepcraccessorieskitcost = 0;
	var accessoriesdisc = 0;
	var fixedOpenArrayAcesstCost = 0;
	var fixOArrayPCRPrperRec = 0;
	var fixOArrayPCRPrperSmp = 0;
	
	if( FixedOpenArrayAccessories.findRecord('Application', getExperimentInfo('type'), 0) != null && (isQuant || isNTCycler) ){
		if(FixedOpenArrayAccessories.findRecord('part number', partNo) != null){
				
			var fixedOpenArrayAcessObj = FixedOpenArrayAccessories.findRecord('part number', partNo);
			if(isNTCycler){
				var realtimePCRname = "TaqMan® OpenArray® Genotyping Accessories Kit";
				var accessory4partnumber = 4404572;
			}else{
			var realtimePCRname = "TaqMan® OpenArray® Real-Time PCR Accessories Kit";
				//var accessory4partnumber = 4453975;
				var accessory4partnumber = 4469576;
			}
			var openarrayrealtimepcraccessorieskitunits = Math.ceil( noofunits / 10 );
			var openarrayrpcraccesskitunitprice =  pricelist.findRecord('partnumber', accessory4partnumber)
	.regions().findRecord('region', region + "-" + currency).get('price');
			var openarrayrealtimepcraccessorieskitcost = openarrayrpcraccesskitunitprice * openarrayrealtimepcraccessorieskitunits;
			var accessoriesdisc = (Ext.get('accessoriesperc').dom.value).split('%')[0];
			var fixedOpenArrayAcesstCost = (openarrayrealtimepcraccessorieskitcost * (1 - (accessoriesdisc / 100)));
			var fixOArrayPCRPrperRxn = openarrayrealtimepcraccessorieskitcost / (noofreactions);
			var fixOArrayPCRPrperSmp = (openarrayrealtimepcraccessorieskitcost * (1 - (accessoriesdisc / 100))) / (getExperimentInfo('noofsamples'));
			
		}
	}
	totalCostPerSample = totalCostPerSample + fixOArrayPCRPrperSmp;
	totalCost = totalCost + fixedOpenArrayAcesstCost;
	totalCostPerReaction = totalCostPerReaction + fixOArrayPCRPrperRxn;
	/*FixedOpenArrayAccessories - End*/
	
	var imageType = "";
	if(isNTCycler){
		imageType = "openarray-ntcycler-fixed";
	}
	
	outputList.add({
				pno : 97,
				title : title,
				partnumber : partNo,
				format : format,
				noofunits : noofunits,
				noofreactions : noofreactions,
				mastermix : mastermix,
				mnoofunits : masterMixUnits,
				totalcost : roundNumber(totalCost, 2),
				volumediscount : volumeDiscount,
				mvolumediscount : 0,
				mastermixdisc : masterperc,
				accessoriesdisc : accessperc,
				assayscost : roundNumber(price, 2),
				assayscostperunit : roundNumber(pricePerUnit, 2),
				assayscostwithvoldisc : roundNumber(assaysCostWithVolDisc, 2),
				mastermixvol : 0,
				mastermixcostperunit : masterMixCostPerUnit,
				mastermixcostwithvoldisc : masterMixCost,
				mastermixcostwithdisc : roundNumber(masterMixCostWithDisc, 2),
				mastermixcost : masterMixCost,
				noofhours : noOfHours,
				assaycostperreaction : roundNumber(assayCostPerReaction, 2),
				mastermixcostperreaction : roundNumber(masterMixCostPerReaction, 2),
				accessoriescostperreaction : roundNumber(accessoriesCostPerReaction, 2),
				optimizationcostperreaction : 0,
				totalcostperreaction : roundNumber(totalCostPerReaction, 2),
				producturl : '',
				openarray384wellsampleplatescost : openArray384WellSamplePlatesCost,
				openarrayaccufillsystemtipscost : openArrayAccuFillSystemTipsCost,
				openarrayaccufillsystemtipsunits : openArrayAccuFillSystemTipsUnits,
				openarrayaccufillsystemtips10packunits : openArrayAccuFillSystemTips10Units,
				openarrayaccufillsystemtips10packcost : openArrayAccuFillSystemTips10Cost,
				openarray384wellsampleplatesunits : openArray384WellSamplePlatesUnits,
				mastermixunits : masterMixUnits,
				totalcostpersample : roundNumber(totalCostPerSample, 2),
				accessoriescost : roundNumber(accessoriescost, 2),
				accessoriescostwithdisc : roundNumber(totalAccessoriescost, 2),
				assaycostpersample : roundNumber(assayCostPerSample, 2),
				accessoriescostpersample : roundNumber(accessoriesCostPerSample, 2),
				mmxcostpersample : roundNumber(mmixCostPerSample, 2),
				totalcostpredisc : roundNumber(totalCostPreDisc, 2),
				totaldiscount : roundNumber(totalDiscount, 2),
				accessory1partnumber : acc1PartNumber,
				accessory2partnumber : acc2PartNumber,
				accessory3partnumber : acc3PartNumber,
				mastermixpartnumber : mmxPartNumber,
				reqnoofunits : reqnoofunits,
				type : 'openarray-fixed',
				min : min,
				ismin : isMin,
				realtimePCRname : realtimePCRname,
				accessory4partnumber :accessory4partnumber,
				openarrayrealtimepcraccessorieskitunits : openarrayrealtimepcraccessorieskitunits,
				openarrayrpcraccesskitunitprice : openarrayrpcraccesskitunitprice,
				openarrayrealtimepcraccessorieskitcost : openarrayrealtimepcraccessorieskitcost,
				imageType:imageType,
				fnName:'addOGTAPFS'
			});
	}	

}
function addOGTAPFSall() {

	if(getExperimentInfo('nooftargets') > 64)
	{
		return;
	}
	if(getExperimentInfo('nooftargets') <= 32)
	{
	var title = "TaqMan<sup>&reg;</sup>&nbsp;OpenArray<sup>&reg;</sup>&nbsp;Genotyping Genetic Barcode Panel";
	var isQuant = getExperimentInfo('openarrayinstrument') == "QuantStudio" ? true : false;
	var isNTCycler = getExperimentInfo('openarrayinstrument') == "NTCycler" ? true : false;
	
	var formatObj1 = isQuant ? findApproximateOpenQuantGenoTapRecordsAll(getExperimentInfo('nooftargets')) : findApproximateOpenGenoTapRecordsAll(getExperimentInfo('nooftargets'));
	var formatObj = findApproximateOpenGenoTapRecordsAll(getExperimentInfo('nooftargets'));

	var formats = isQuant ? formatObj1.get('concatenate') : formatObj1.get('productname');
	var formatqnt = formats.replace("TaqMan OpenArray","TaqMan® OpenArray®");
	var format = formatqnt.replace("QuantStudio TM","QuantStudio™");

	var partNo = formatObj1.get('partnumber');
	
	var noofgenes = formatObj.get('no of targets');
	var reqnoofunits = Math.ceil((getExperimentInfo('noofsamples') * getExperimentInfo('noofsubarrays') / formatObj.get('no of samples')));
	var noofunits = reqnoofunits < formatObj.get('min') ? formatObj.get('min')
			: reqnoofunits;
	var min = formatObj.get('min');
	var isMin = (min == 1 ? 1 : (Math.ceil(reqnoofunits) < min ? 0 : 1));
    var noofreactions = noofgenes * getExperimentInfo('noofsamples')
			* getExperimentInfo('noofreplicates');
	var mvolume = noofreactions * formatObj.get('master mix needed per unit');
	var mmxObj = genoMasterMix.findRecord("productname","TaqMan OpenArray Genotyping Master Mix");

	var mastermix = mmxObj.get('productname');
	mastermix = mastermix.replace("TaqMan OpenArray","TaqMan® OpenArray®");
	var mmxPartNumber = mmxObj.get('partnumber');
	var masterperc = (Ext.get('masterperc').dom.value).split('%')[0];
	var accessperc = (Ext.get('accessoriesperc').dom.value).split('%')[0];
	var volumeDiscount = 0;
   /*
	var discObj = tsstable.findRecord('product', formatObj.get('productname'));
 
	var discUnits = noofunits > 84 ? 84 : noofunits;

	volumeDiscount = discObj.discounts().findRecord('volume', discUnits, 0,
			false, false, true).get('value');
   */
    volumeDiscount = 0; 
	var pricePerUnit = ((pricelist.findRecord('partnumber', partNo)
			.regions().findRecord('region', region + "-" + currency).get('price')));
	var price = ((pricelist.findRecord('partnumber', partNo)
			.regions().findRecord('region', region + "-" + currency).get('price')))
			* noofunits;
	var openarrayperc = parseFloat((Ext.get('openarrayperc').dom.value).split('%')[0]);
	var assaysCostWithVolDisc = price - (volumeDiscount+openarrayperc / 100 * price);
	var openArray384Obj = accessories.findRecord('product', 'OpenArray 384-well Sample Plates');
	var acc1PartNumber = openArray384Obj.get('partnumber');
	var openArray384WellSamplePlatesUnits = Math.ceil(formatObj
			.get('sampleplates')
			* reqnoofunits) < openArray384Obj.get('min') ? openArray384Obj.get(
					'min') : Math.ceil(formatObj
			.get('open array sample plates per unit')
			* reqnoofunits);
	var openArray384WellSamplePlatesCost = pricelist.findRecord('partnumber', acc1PartNumber)
	.regions().findRecord('region', region + "-" + currency).get('price')
			* openArray384WellSamplePlatesUnits;
	
 
	var opeArrayAccuObj = accessories.findRecord('product', 'OpenArray AccuFill System Tips');
	var acc2PartNumber = opeArrayAccuObj.get('partnumber');

	// Commented on 05-03-2015 by Lini instruction
	//var openArrayAccuFillSystemTipsUnits = Math.ceil((formatObj.get('open array tips per unit') * reqnoofunits) % 10);	
	var openArrayAccuFillSystemTipsperPrice = pricelist.findRecord('partnumber', acc2PartNumber).regions().findRecord('region', region + "-" + currency).get('price');
	var openArrayAccuFillSystemTipsUnits = Math.ceil((1.25 * reqnoofunits) / 10);

	var openArrayAccuFillSystemTipsCost = pricelist.findRecord('partnumber', acc2PartNumber)
	.regions().findRecord('region', region + "-" + currency).get('price')
			* openArrayAccuFillSystemTipsUnits;
	
	var openArrayAccu10Obj = accessories.findRecord('product', 'OpenArray AccuFill System Tips, 10 Pack');
	var acc3PartNumber = openArrayAccu10Obj.get('partnumber');
	
	// Commented on 05-03-2015 by Lini instruction
	//var openArrayAccuFillSystemTips10Units = Math.floor((formatObj.get('open array tips per unit') * reqnoofunits) / 10);
	var  openArrayAccuFillSystemTips10PackperPrice = pricelist.findRecord('partnumber', acc3PartNumber).regions().findRecord('region', region + "-" + currency).get('price');
	var openArrayAccuFillSystemTips10Units = Math.floor(((1.25 * reqnoofunits) / 10)/10);
	var openArrayAccuFillSystemTips10PackUnits = openArrayAccuFillSystemTips10Units;
	
	var openArrayAccuFillSystemTips10Cost = pricelist.findRecord('partnumber', acc3PartNumber)
	.regions().findRecord('region', region + "-" + currency).get('price')
			* openArrayAccuFillSystemTips10Units ;
	var masterMixUnits = Math.ceil((reqnoofunits * 0.31250)/10);
	
	/*
		- Starts at New added code for Combination.
		- Here to get the single and 10 pack combination ob box for Accufill
	*/
	var openArrayAccuFillSystemTipsTotalUnits =Math.ceil((1.25 * reqnoofunits) / 10);
	var accFill10PackUnit = ((1.25 * reqnoofunits) / 10)/10;
	var accFill1PackUnit = (1.25 * reqnoofunits) / 10;
		
	if(accFill10PackUnit >= 1){
		if((openArrayAccuFillSystemTipsTotalUnits % 10) != 0){
			var accuFill_10Temp = openArrayAccuFillSystemTips10PackUnits - 1;
			var accuFill_rem_1packTemp = openArrayAccuFillSystemTipsTotalUnits - (accuFill_10Temp * 10);
			var accuFill_1packTemp = Math.ceil(accuFill_rem_1packTemp);
			
			openArrayAccuFillSystemTipsUnits = accuFill_1packTemp;
			openArrayAccuFillSystemTips10PackUnits = accuFill_10Temp;
			
			openArrayAccuFillSystemTipsCost = openArrayAccuFillSystemTipsperPrice * openArrayAccuFillSystemTipsUnits;
			openArrayAccuFillSystemTips10PackCost = openArrayAccuFillSystemTips10PackperPrice * openArrayAccuFillSystemTips10PackUnits;
		}else{
			openArrayAccuFillSystemTipsUnits = 0;
			openArrayAccuFillSystemTipsCost = 0;
			openArrayAccuFillSystemTips10PackCost = openArrayAccuFillSystemTips10PackperPrice * openArrayAccuFillSystemTips10PackUnits;
		}
	}else{
		openArrayAccuFillSystemTips10PackUnits = 0;
		openArrayAccuFillSystemTips10PackCost = 0;
		openArrayAccuFillSystemTipsCost = openArrayAccuFillSystemTipsperPrice * openArrayAccuFillSystemTipsUnits;
	
	}
	//End of the Combination code.
	
	var masterMixCostPerUnit = pricelist.findRecord('partnumber', mmxPartNumber)
	.regions().findRecord('region', region + "-" + currency).get('price');

	var masterMixCost = masterMixCostPerUnit * masterMixUnits;
   
	var masterMixCostWithDisc = masterMixCostPerUnit * masterMixUnits
			* (1 - (masterperc / 100));
	var openArray384WellSamplePlatesCostWithDisc = openArray384WellSamplePlatesCost * (1 - (accessperc / 100));
	var openArrayAccuFillSystemTips10CostWithDisc = openArrayAccuFillSystemTips10Cost * (1 - (accessperc / 100));
	var openArrayAccuFillSystemTipsCostWithDisc	  = openArrayAccuFillSystemTipsCost * (1 - (accessperc / 100));	
	var accessoriescost = openArrayAccuFillSystemTipsCostWithDisc + openArrayAccuFillSystemTips10CostWithDisc
			+ openArray384WellSamplePlatesCostWithDisc;

	var masterMixCostPerReaction = masterMixCostWithDisc / noofreactions;
	var totalAccessoriescost = accessoriescost;

	var accessoriesCostPerReaction = totalAccessoriescost / noofreactions;

	var assayCostPerReaction = assaysCostWithVolDisc / noofreactions;

	var totalCostPerReaction = masterMixCostPerReaction + assayCostPerReaction
			+ accessoriesCostPerReaction;

	var totalCostPreDisc = accessoriescost + masterMixCost + price;

	// var openarraycost = formatObj.

	var totalCost = totalAccessoriescost + masterMixCostWithDisc
			+ assaysCostWithVolDisc;

    
	var totalDiscount = 100 - (totalCost * 100 / totalCostPreDisc);

	var assayCostPerSample = assaysCostWithVolDisc
			/ getExperimentInfo('noofsamples');
	var acc1CostPerSample = openArray384WellSamplePlatesCostWithDisc
			/ getExperimentInfo('noofsamples');
	var acc2CostPerSample = openArrayAccuFillSystemTipsCostWithDisc
			/ getExperimentInfo('noofsamples');
	var acc3CostPerSample = openArrayAccuFillSystemTips10CostWithDisc
	/ getExperimentInfo('noofsamples');
	var accessoriesCostPerSample = acc1CostPerSample + acc2CostPerSample + acc3CostPerSample;
	var mmixCostPerSample = masterMixCostWithDisc / getExperimentInfo('noofsamples');

	var totalCostPerSample = assayCostPerSample + acc1CostPerSample
			+ acc2CostPerSample + acc3CostPerSample + mmixCostPerSample;
	var partNumber = formatObj.get('partnumber');
	var productUrl = producturls.findRecord('partNumber', partNumber).get(
			'productURL');
		
	var noOfHours = 0;
	var oType = getExperimentInfo('openarrayinstrument') == "QuantStudio" ? "GenotypingQS" : "GenotypingNT";
	
	var tRec = openarrayruntimes.findRecord('type', oType);
	noOfHours = Math.ceil(Math.ceil((reqnoofunits) / tRec.get('noofplatesperrun')) * tRec.get('totalmin') /60);
	
	/* FixedOpenArrayAccessories - Started */
	var realtimePCRname = "";
	var accessory4partnumber = "";
	var openarrayrealtimepcraccessorieskitunits = 0;
	var openarrayrpcraccesskitunitprice =  0;
	var openarrayrealtimepcraccessorieskitcost = 0;
	var accessoriesdisc = 0;
	var fixedOpenArrayAcesstCost = 0;
	var fixOArrayPCRPrperRec = 0;
	var fixOArrayPCRPrperSmp = 0;
	
	if( FixedOpenArrayAccessories.findRecord('Application', getExperimentInfo('type'), 0) != null && (isQuant || isNTCycler) ){
		if(FixedOpenArrayAccessories.findRecord('part number', partNo) != null){
				
			var fixedOpenArrayAcessObj = FixedOpenArrayAccessories.findRecord('part number', partNo);
			if(isNTCycler){
				var realtimePCRname = "TaqMan® OpenArray® Genotyping Accessories Kit";
				var accessory4partnumber = 4404572;
			}else{
			var realtimePCRname = "TaqMan® OpenArray® Real-Time PCR Accessories Kit";
				//var accessory4partnumber = 4453975;
				var accessory4partnumber = 4469576;
			}
			var openarrayrealtimepcraccessorieskitunits = Math.ceil( noofunits / 10 );
			var openarrayrpcraccesskitunitprice =  pricelist.findRecord('partnumber', accessory4partnumber)
	.regions().findRecord('region', region + "-" + currency).get('price');
			var openarrayrealtimepcraccessorieskitcost = openarrayrpcraccesskitunitprice * openarrayrealtimepcraccessorieskitunits;
			var accessoriesdisc = (Ext.get('accessoriesperc').dom.value).split('%')[0];
			var fixedOpenArrayAcesstCost = (openarrayrealtimepcraccessorieskitcost * (1 - (accessoriesdisc / 100)));
			var fixOArrayPCRPrperRxn = openarrayrealtimepcraccessorieskitcost / (noofreactions);
			var fixOArrayPCRPrperSmp = (openarrayrealtimepcraccessorieskitcost * (1 - (accessoriesdisc / 100))) / (getExperimentInfo('noofsamples'));
			
		}
	}
	totalCostPerSample = totalCostPerSample + fixOArrayPCRPrperSmp;
	totalCost = totalCost + fixedOpenArrayAcesstCost;
	totalCostPerReaction = totalCostPerReaction + fixOArrayPCRPrperRxn;
	/*FixedOpenArrayAccessories - End*/
	
	var imageType = "";
	if(isNTCycler){
		imageType = "openarray-ntcycler-fixed";
	}
	
	outputList.add({
				pno : 100,
				title : title,
				partnumber : partNo,
				format : format,
				noofunits : noofunits,
				noofreactions : noofreactions,
				mastermix : mastermix,
				mnoofunits : masterMixUnits,
				totalcost : roundNumber(totalCost, 2),
				volumediscount : volumeDiscount,
				mvolumediscount : 0,
				mastermixdisc : masterperc,
				accessoriesdisc : accessperc,
				assayscost : roundNumber(price, 2),
				assayscostperunit : roundNumber(pricePerUnit, 2),
				assayscostwithvoldisc : roundNumber(assaysCostWithVolDisc, 2),
				mastermixvol : 0,
				mastermixcostperunit : masterMixCostPerUnit,
				mastermixcostwithvoldisc : masterMixCost,
				mastermixcostwithdisc : roundNumber(masterMixCostWithDisc, 2),
				mastermixcost : masterMixCost,
				noofhours : noOfHours,
				assaycostperreaction : roundNumber(assayCostPerReaction, 2),
				mastermixcostperreaction : roundNumber(masterMixCostPerReaction, 2),
				accessoriescostperreaction : roundNumber(accessoriesCostPerReaction, 2),
				optimizationcostperreaction : 0,
				totalcostperreaction : roundNumber(totalCostPerReaction, 2),
				producturl : '',
				openarray384wellsampleplatescost : openArray384WellSamplePlatesCost,
				openarrayaccufillsystemtipscost : openArrayAccuFillSystemTipsCost,
				openarrayaccufillsystemtipsunits : openArrayAccuFillSystemTipsUnits,
				openarrayaccufillsystemtips10packunits : openArrayAccuFillSystemTips10Units,
				openarrayaccufillsystemtips10packcost : openArrayAccuFillSystemTips10Cost,
				openarray384wellsampleplatesunits : openArray384WellSamplePlatesUnits,
				mastermixunits : masterMixUnits,
				totalcostpersample : roundNumber(totalCostPerSample, 2),
				accessoriescost : roundNumber(accessoriescost, 2),
				accessoriescostwithdisc : roundNumber(totalAccessoriescost, 2),
				assaycostpersample : roundNumber(assayCostPerSample, 2),
				accessoriescostpersample : roundNumber(accessoriesCostPerSample, 2),
				mmxcostpersample : roundNumber(mmixCostPerSample, 2),
				totalcostpredisc : roundNumber(totalCostPreDisc, 2),
				totaldiscount : roundNumber(totalDiscount, 2),
				accessory1partnumber : acc1PartNumber,
				accessory2partnumber : acc2PartNumber,
				accessory3partnumber : acc3PartNumber,
				mastermixpartnumber : mmxPartNumber,
				reqnoofunits : reqnoofunits,
				type : 'openarray-fixed',
				min : min,
				ismin : isMin,
				realtimePCRname : realtimePCRname,
				accessory4partnumber :accessory4partnumber,
				openarrayrealtimepcraccessorieskitunits : openarrayrealtimepcraccessorieskitunits,
				openarrayrpcraccesskitunitprice : openarrayrpcraccesskitunitprice,
				openarrayrealtimepcraccessorieskitcost : openarrayrealtimepcraccessorieskitcost,
				imageType:imageType,
				fnName:'addOGTAPFSall'
			});
	}	

}

function findApproximateOpenGenoTapRecords(value) {
	
	
	var record = null;
	var name = "TaqMan OpenArray Genotyping Genetic Barcode Panel";
	var prevRecord = null;
	if (value <= 32) {
		return genoTypeTubes.findRecord('productname', name + ' 32A');
	} else if (value <= 64) {
		return genoTypeTubes.findRecord('productname', name + ' 64');
	} else {
		genoTypeTubes.each(function(e) {
			if (e.get('productname').indexOf(name) != -1
					&& e.get('no of targets') == value) {
				record = e;
				return false;
			} else if (e.get('productname').indexOf(name) != -1
					&& e.get('no of targets') > value) {
				if (prevRecord != null && prevRecord >= value)
					record = prevRecord;
				else
					record = e;
				return false;
			}
			prevRecord = e;
		});
		return record;
	}
}
function findApproximateOpenGenoTapRecordsA(value) {
	var record = null;
	var name = "TaqMan OpenArray Genotyping Genetic Barcode Panel";
	var prevRecord = null;
	if (value <= 32) {
		return genoTypeTubes.findRecord('productname', name + ' 32B');
	} else if (value <= 64) {
		return genoTypeTubes.findRecord('productname', name + ' 64');
	} else {
		genoTypeTubes.each(function(e) {
			if (e.get('productname').indexOf(name) != -1
					&& e.get('no of targets') == value) {
				record = e;
				return false;
			} else if (e.get('productname').indexOf(name) != -1
					&& e.get('no of targets') > value) {
				if (prevRecord != null && prevRecord >= value)
					record = prevRecord;
				else
					record = e;
				return false;
			}
			prevRecord = e;
		});
		return record;
	}
}
function findApproximateOpenGenoTapRecordsAll(value) {
	var record = null;
	var name = "TaqMan OpenArray Genotyping Genetic Barcode Panel";
	var prevRecord = null;
	if (value <= 32) {
		return genoTypeTubes.findRecord('productname', name + ' 64');
	} else {
		genoTypeTubes.each(function(e) {
			if (e.get('productname').indexOf(name) != -1
					&& e.get('no of targets') == value) {
				record = e;
				return false;
			} else if (e.get('productname').indexOf(name) != -1
					&& e.get('no of targets') > value) {
				if (prevRecord != null && prevRecord >= value)
					record = prevRecord;
				else
					record = e;
				return false;
			}
			prevRecord = e;
		});
		return record;
	}
}

function findApproximateOpenQuantGenoTapRecords(value) {
	
	var record = null;
	var name = "TaqMan OpenArray Genotyping Genetic Barcode Panel";
	var prevRecord = null;
	if (value <= 32) {
		return quantstudio.findRecord('concatenate', name + ' 32A QuantStudio TM 12K Flex');
	} else if (value <= 64) {
		
		return quantstudio.findRecord('concatenate', name + ' 64 QuantStudio TM 12K Flex');
	} else {
		quantstudio.each(function(e) {
			if (e.get('concatenate').indexOf(name) != -1
					&& e.get('number of Assays or Plate') == value) {
				record = e;
				return false;
			} else if (e.get('concatenate').indexOf(name) != -1
					&& e.get('number of Assays or Plate') > value) {
				if (prevRecord != null && prevRecord >= value)
					record = prevRecord;
				else
					record = e;
				return false;
			}
			else if (e.get('concatenate').indexOf(name) != -1) {
				prevRecord = e;
			}
		});
		return record;
	}
}
function findApproximateOpenQuantGenoTapRecordsA(value) {
	var record = null;
	var name = "TaqMan OpenArray Genotyping Genetic Barcode Panel";
	var prevRecord = null;
	if (value <= 32) {
		return quantstudio.findRecord('concatenate', name + ' 32B QuantStudio TM 12K Flex');
	} else if (value <= 64) {
		return quantstudio.findRecord('concatenate', name + ' 64 QuantStudio TM 12K Flex');
	} else {
		quantstudio.each(function(e) {
			if (e.get('concatenate').indexOf(name) != -1
					&& e.get('number of Assays or Plate') == value) {
				record = e;
				return false;
			} else if (e.get('concatenate').indexOf(name) != -1
					&& e.get('number of Assays or Plate') > value) {
				if (prevRecord != null && prevRecord >= value)
					record = prevRecord;
				else
					record = e;
				return false;
			}
			else if (e.get('concatenate').indexOf(name) != -1) {
				prevRecord = e;
			}
		});
		return record;
	}
}
function findApproximateOpenQuantGenoTapRecordsAll(value) {
	var record = null;
	var name = "TaqMan OpenArray Genotyping Genetic Barcode Panel";
	var prevRecord = null;
	
	if (value <= 32) {
		return quantstudio.findRecord('concatenate', name + ' 64 QuantStudio TM 12K Flex');
	} else {
		quantstudio.each(function(e) {
			if (e.get('concatenate').indexOf(name) != -1
					&& e.get('number of Assays or Plate') == value) {
				record = e;
				return false;
			} else if (e.get('concatenate').indexOf(name) != -1
					&& e.get('number of Assays or Plate') > value) {
				if (prevRecord != null && prevRecord >= value)
					record = prevRecord;
				else
					record = e;
				return false;
			}
			else if (e.get('concatenate').indexOf(name) != -1) {
				prevRecord = e;
			}
		});
		return record;
	}
}