Issue on Single Purchase of $1,000 or greater
Permalink Browser Info Environment
Hello,
I have found a bug with the module and patched it, but there are still a couple issues that are related to the same thing and should probably be taken care of without workarounds.
1) on view.purchase.amount.php within the elements folder, on line 21 you are using echo number_format($controller->paymentAmount,2). What occurs is that the number format breaks at the , so if you put anything > 1000 it truncates it to 2.00 or 3.00. Therefore, the total label next to the submit button shows 1.00 instead of $1000.00. All I did was remove the number_format from the input so it reads $controller->paymentAmount and it fixed the issue.
2) On the Add/Edit block the same issue occurs. If you enter a single purchase, submit the 1000.00 value it saves the value of 1000.00 as 1,000.00. Once I go to edit the total, after it is 1,000 it resets the total to 1.00 as it breaks at the comma.
Let us know if this helps resolve an issue and if there is a release that will occur in the future that corrects my temporary workaround.
Thanks,
Informatics Inc.
I have found a bug with the module and patched it, but there are still a couple issues that are related to the same thing and should probably be taken care of without workarounds.
1) on view.purchase.amount.php within the elements folder, on line 21 you are using echo number_format($controller->paymentAmount,2). What occurs is that the number format breaks at the , so if you put anything > 1000 it truncates it to 2.00 or 3.00. Therefore, the total label next to the submit button shows 1.00 instead of $1000.00. All I did was remove the number_format from the input so it reads $controller->paymentAmount and it fixed the issue.
2) On the Add/Edit block the same issue occurs. If you enter a single purchase, submit the 1000.00 value it saves the value of 1000.00 as 1,000.00. Once I go to edit the total, after it is 1,000 it resets the total to 1.00 as it breaks at the comma.
Let us know if this helps resolve an issue and if there is a release that will occur in the future that corrects my temporary workaround.
Thanks,
Informatics Inc.
Type: | Discussion |
---|---|
Status: | In Progress |
On the Add/Edit popover, another option would be to add number validation so even if it does get changed to 1,000.00 it won't let you submit the value.
Any feedback on this issue? Understanding our support is past the window, it is still in your best interest to fix this issue as it persists still within your module.
Thanks,
Informatics Inc.
Thanks,
Informatics Inc.