'Round floats for all `Currency`, `Float`, `Percent` fields for the given doc.
:param doc: Document whose numeric properties are to be rounded.
:param fieldnames: [Optional] List of fields to be rounded.'

def round_floats_in(self, doc, fieldnames=None):

    if (not fieldnames):
        fieldnames = (df.fieldname for df in doc.meta.get(u'fields', {u'fieldtype': [u'in', [u'Currency', u'Float', u'Percent']]}))
    for fieldname in fieldnames:
        doc.set(fieldname, flt(doc.get(fieldname), self.precision(fieldname, doc.parentfield)))
