| @@ -42,9 +42,9 @@ | ||
| 42 | 42 | $base_unit_name = null |
| 43 | 43 | ) { |
| 44 | 44 | return strtr( $text, array( |
| 45 | 45 | '{tp_quantity}' => $quantity, |
| 46 | - '{tp_discount}' => $discount, | |
| 46 | + '{tp_discount}' => ( !is_null( $discount ) ? round( (float) $discount, \TierPricingTable\PricingTable::discountDecimals( (float) $discount ) ) : $discount ), | |
| 47 | 47 | '{tp_rounded_discount}' => ( !is_null( $discount ) ? round( $discount ) : 0 ), |
| 48 | 48 | '{tp_base_unit_name}' => $base_unit_name, |
| 49 | 49 | ) ); |
| 50 | 50 | } |