Hi,
On display field used in Forms, there is a "type" "accounting-number"
which is used to format number like 'accounting-number.format' property
configuration (arithmetic.properties) : #,##0.0000;(#,##0.0000).
The proposal is to extend this idea by using a "type" "number" and an
additional attribute called "format-pattern". This field will be used by
form renderer to get the good property. It use FlexibleString to manage
variable in this field and so allow to have different format for the
same column according to some conditions.
example:
<field name="amount"><display type="number"
format-pattern="accounting"/></field>
The "format-pattern" will be stored in the arithmetic.properties.
example:
# the default number format
default.number.format = ##0.00
accounting.number.format = #,##0.0000;(#,##0.0000)
quantity.number.format = ##0.00
integer-quantity.number.format = #0
percentage.number.format = ##.##%
export.number.format = #.00
In ModelFormField.java, the system gets property using
EntityUtilProperties.getPropertyValue to be able to quickly add a new
format.
A JIRA exists on this proposition (opened to soon as Jacques mentionned
) :
https://issues.apache.org/jira/browse/OFBIZ-7532Do think that this proposal is a good one ?
Best regards,
Charles