We're updating the issue view to help you get more done. 

Customer Bad Debt, Initial Balance archetypes missing nonNegative assertions

Description

The Customer Bad Debt (act.customerAccountBadDebt) and Initial Balance (act.customerAccountInitialBalance) archetypes are missing nonNegative assertions on the amount and tax nodes.
This enables users to enter a negative amount which is invalid for the purpose of balance calculations.
The archetypes should have:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 <node name="amount" path="/total" type="org.openvpms.component.business.domain.im.datatypes.quantity.Money" minCardinality="1" defaultValue="'0.0'"> <assertion name="nonNegative"> <errorMessage>Value must be >= 0.0</errorMessage> </assertion> </node> <node name="tax" path="/taxAmount" type="org.openvpms.component.business.domain.im.datatypes.quantity.Money" minCardinality="1" defaultValue="'0.0'" readOnly="true"> <assertion name="nonNegative"> <errorMessage>Value must be >= 0.0</errorMessage> </assertion> </node>

Any Customer Bad Debt or Initial Balance created with a negative value will need to be removed manually via mysql.

Environment

None

Status

Assignee

Tim Anderson

Reporter

Tim Anderson

Labels

None

Components

Fix versions

Affects versions

1.9
1.8

Priority

Minor