Patch (to be ported)
Project:
Commerce Receipt
Component:
Code
Priority:
Minor
Category:
Bug report
Assigned:
Reporter:
Created:
11 Apr 2013 at 16:01 UTC
Updated:
11 Apr 2013 at 16:10 UTC
Thank you for this module!
There is a bug in file commerce_receipt.tokens.inc at line 145:
$decimal = (is_float($amount_formatted)) ? substr($amount_formatted, strpos($amount_formatted,'.')+1) : '';
For values like this "xxxx.4" it returns 4 instead of 40. It must look like this:
$decimal = round($amount_formatted - floor($amount_formatted), 2)*100;