if ($price){
# in France, the cents separator is the , but sometimes, ppl use a .
# in this case, the price will be x100 when unformatted ! Replace the . by a , to get a proper price calculation
$price =~ s/\./,/ if C4::Context->preference("CurrencyFormat") eq "FR";
$price = Koha::Number::Price->new($price)->unformat;
if ($price){
# in France, the cents separator is the , but sometimes, ppl use a .
# in this case, the price will be x100 when unformatted ! Replace the . by a , to get a proper price calculation
$price =~ s/\./,/ if C4::Context->preference("CurrencyFormat") eq "FR";
$price = Koha::Number::Price->new($price)->unformat;