OpenESignForms / openesignforms

Open eSignForms is the first open source SaaS web contracting platform
https://open.esignforms.com
107 stars 50 forks source link

Decimal field using percent format does not render decimal positions in reports #171

Closed OpenESignForms closed 8 years ago

OpenESignForms commented 8 years ago

A decimal field using a percent format like 19.34% works fine in a document, but in the report, it only appears as 19%, even though both the report and the document are using the same decimal format.

OpenESignForms commented 8 years ago

The money/decimal fields for reports are stored in the table esf_tran_report_field_numeric, which was defined as 15 digits and having 2 decimal points. For traditional decimal/money, this was adequate to have 2 decimal points precision, but when the decimal is used for percentages, and we allow up to 2 decimal points in a percentage, we actually need a precision of 4 decimal digits. Altered the table to be NUMERIC(17,4) instead of NUMERIC(15,2).