How can I get the price to display for .000 stocks? example would be that a .0011 stock price displays 0.00

Comments

trader1’s picture

Version: 6.x-1.2 » master
trader1’s picture

Version: master » 6.x-1.2
kbahey’s picture

Version: 6.x-1.2 » 6.x-1.x-dev
Status: Active » Postponed (maintainer needs more info)

In stock.module, change this:

function _decimals($field) {
  return number_format($field, 2);
}

to this:

function _decimals($field) {
  return number_format($field, 4);
}

It would be nice if this is a setting in the module so people can chose how many decimals they want rather than having it hard coded.