Define currency global
djmj opened this issue · 2 comments
djmj commented
It feels a little cumbersome to repeat the same code in many places (item, sum, tax) like:
final MonetarySummation sum = new MonetarySummation();
sum.setLineTotal(new Amount(lineTotal, CurrencyCode.EUR));
sum.setChargeTotal(new Amount(chargeTotal, CurrencyCode.EUR));
This approach would reduce code and make it more readable:
final MonetarySummation sum = new MonetarySummation(CurrencyCode.EUR);
sum.setLineTotal(lineTotal);
sum.setChargeTotal(chargeTotal);
Defining the currency on Invoice level would be the most elegant solution.
Vad1mo commented
This would break the API, but its a nice concept.
Before approving the change, We need to make sure that an Invoice must have only one currency.
This would be something for 2.0
stale commented
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.