Skip to content

Commit ab97483

Browse files
authored
Merge pull request #418 from sernamar/chf-cash-rounding-example
Fix Swiss Francs cash rounding example in user guide
2 parents a61917b + 4bb1736 commit ab97483

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

moneta-core/src/main/asciidoc/userguide.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -552,13 +552,13 @@ MonetaryAmount roundedAmount = amt.with(rounding); // uses Monetary.getRounding(
552552

553553
For Swiss Francs also a corresponding cash rounding is accessible. In Switzerland the smallest minor in cash are
554554
5 Rappen, so everything must be rounded to minors dividable by 5. This rounding can be accessed by setting the
555-
+cashRounding=tru+ property, when accessing a currency rounding for CHF:
555+
+cashRounding=true+ property, when accessing a currency rounding for CHF:
556556

557557
[source,java]
558558
.Access Swiss Francs Cash Rounding
559559
--------------------------------------------
560-
MonetaryRounding rounding = Monetary.getRounding(Monetary.getCurrency("CHF"),
561-
RoundingQueryBuilder.of().set("cashRounding", true).build()
560+
MonetaryRounding rounding = Monetary.getRounding(
561+
RoundingQueryBuilder.of().setCurrency(Monetary.getCurrency("CHF")).set("cashRounding", true).build()
562562
);
563563
MonetaryAmount amt = ...;
564564
MonetaryAmount roundedAmount = amt.with(rounding); // amount rounded in CHF cash rounding

0 commit comments

Comments
 (0)