When adding or editing a contact with the income field specified to include cents (e.g., 2000.95), the display incorrectly rounds down the value (eg. 2000.99 is displayed as 2000.00) instead of showing the precise amount (eg. 2000.99). The display is expected to retain two decimal places for accuracy.
This bug is classified to have a medium severity because social workers/other users who rely on precise financial information may find it essential to accurately record the income of their clients down to the cents. The lack of precision could lead to potential misinterpretations or data inaccuracies in cases where exact amounts are necessary for assessments or reports.
Suggestion:
Ensure that the income is stored correctly as a floating-point number with 2 decimal places and displayed accurately as a floating-point number with two decimal places
Steps to reproduce:
Run the add or edit command with the income field containing a value with 2 decimal places, where at least one digit after the decimal point is non-zero.
Eg.
edit income/2900.39
add n/John Doe p/98765432 e/johnd@example.com a/311, Clementi Ave 2, #02-25 dob/1999-03-09 pri/HIGH income/2000.99 famsize/3 r/Promises to pay back next week. t/friends t/owesMoney
Expected output: The contact's income should be displayed with the exact decimal value entered
Actual output: Contact's income is displayed with the 2 decimal places rounded down to 0
When adding or editing a contact with the income field specified to include cents (e.g., 2000.95), the display incorrectly rounds down the value (eg. 2000.99 is displayed as 2000.00) instead of showing the precise amount (eg. 2000.99). The display is expected to retain two decimal places for accuracy.
This bug is classified to have a medium severity because social workers/other users who rely on precise financial information may find it essential to accurately record the income of their clients down to the cents. The lack of precision could lead to potential misinterpretations or data inaccuracies in cases where exact amounts are necessary for assessments or reports.
Suggestion: Ensure that the income is stored correctly as a floating-point number with 2 decimal places and displayed accurately as a floating-point number with two decimal places
Steps to reproduce: Run the add or edit command with the income field containing a value with 2 decimal places, where at least one digit after the decimal point is non-zero.
Eg.
edit income/2900.39
add n/John Doe p/98765432 e/johnd@example.com a/311, Clementi Ave 2, #02-25 dob/1999-03-09 pri/HIGH income/2000.99 famsize/3 r/Promises to pay back next week. t/friends t/owesMoney
Expected output: The contact's income should be displayed with the exact decimal value entered
Actual output: Contact's income is displayed with the 2 decimal places rounded down to 0
Labels:
type.FunctionalityBug
severity.Medium
original: kikokidayo/ped#2