All pastes #386749 Raw Edit

Untitled

public text v1 · immutable
·published 2007-03-08 21:26 UTC
rendered paste body
//markupvalue is a percent which gets divided by 100 (float), single precision is fine
int markupValue = 10;
Number nmarkupValue = new Float(markupValue/100f);

Double cost = NumberFormat.getCurrencyInstance().parse(p).doubleValue();
Double realPrice = (cost*nmarkupValue.doubleValue())+cost;
DecimalFormat df = new DecimalFormat("0.00");
String mstr[] = {mdl,"","",desc,df.format(cost),df.format(realPrice)};