Our default currency is USD, with two decimal places.

A lot of our customers purchase in JPY, which is set in Currencies to (currently) have a conversion factor of 111.11419678.

That means that if something costs $1.00 and the user elects to be paying in JPY, they will see an amount of ¥111.

If we create a coupon in the amount of $2.70, it should display and calculate as ¥300 ($2.70 x 111.11 etc.).

Instead, it displays and calculates as ¥333.

After playing with this for a while, it seems that the problem is that ot_coupon.php rounds the coupon amount using the target currency's number of decimals, and then multiplies by the conversion factor. It should multiply first and round second.

So in the case above, it was first rounding $2.70 to $3.00 (applying the Japanese 0-decimals to the rounding) and THEN multiplying by the conversion factor to get ¥333 instead of the ¥300 it should have been getting.

This can be demonstrated by changing the coupon amounts. In our case, we were getting coupon results of ¥222, ¥333, ¥444, etc. because it would round our USD coupons to $2.00, $3.00, or $4.00 before converting them.

=======================
=======================

The quick and dirty fix (we're have coupons in customer hands) was to replace the $currencyDecimalPlaces variable with "2" in the switch/case section around line 399.

From this: ==============================================
case 'F': // amount Off
$od_amount['total'] = zen_round(($coupon->fields['coupon_amount'] > $orderTotalDetails['orderTotal'] ? $orderTotalDetails['orderTotal'] : $coupon->fields['coupon_amount']) * ($orderTotalDetails['orderTotal']>0), $currencyDecimalPlaces);
$od_amount['type'] = $coupon->fields['coupon_type']; // amount off 'F' or amount off and free shipping 'O'
$ratio = $od_amount['total']/$orderTotalDetails['orderTotal'];
break;

To this: ================================================
case 'F': // amount Off ---- modified rounding
$od_amount['total'] = zen_round(($coupon->fields['coupon_amount'] > $orderTotalDetails['orderTotal'] ? $orderTotalDetails['orderTotal'] : $coupon->fields['coupon_amount']) * ($orderTotalDetails['orderTotal']>0), 2);
$od_amount['type'] = $coupon->fields['coupon_type']; // amount off 'F' or amount off and free shipping 'O'
$ratio = $od_amount['total']/$orderTotalDetails['orderTotal'];
break;

=======================
=======================

That doesn't really address the underlying issue, but for our narrow case now, our coupons are calculating properly in secondary currencies.