Bug
Problem with the price2num() function
Lang configuration (ES_ar)
SeparatorDecimal=,
SeparatorThousand=.
Scale barcode:
2002100002753
Takepos barcode ruler
other:2+ref:4+qu:3+qd:3+other:1
The problem is here:
in the price2mun() function:
if ($option == 2 && $thousand == '.' && preg_match('/\.(\d\d\d)$/', (string) $amount)) { // It means the . is used as a thousand separator and string come from input data, so 1.123 is 1123
$amount = str_replace($thousand, '', $amount);
}
$amount = 0.275 (this comes from takepos ajax)
$options = 2
$thousand = "."
When it goes through here, it converts $amount to "0275" and then ends up being an integer of 275
Dolibarr Version
No response
Environment PHP
No response
Environment Database
No response
Steps to reproduce the behavior and expected behavior
No response
Attached files
No response
Bug
Problem with the price2num() function
Lang configuration (ES_ar)
SeparatorDecimal=,
SeparatorThousand=.
Scale barcode:
2002100002753
Takepos barcode ruler
other:2+ref:4+qu:3+qd:3+other:1
The problem is here:
in the price2mun() function:
$amount = 0.275 (this comes from takepos ajax)
$options = 2
$thousand = "."
When it goes through here, it converts $amount to "0275" and then ends up being an integer of 275
Dolibarr Version
No response
Environment PHP
No response
Environment Database
No response
Steps to reproduce the behavior and expected behavior
No response
Attached files
No response