This repository has been archived by the owner on Sep 7, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature(template) Add formatting support for numbers and monetary amo…
…unts in templates Signed-off-by: Jerome Simeon <jeromesimeon@me.com>
- Loading branch information
1 parent
8190e2b
commit a39edc2
Showing
9 changed files
with
6,760 additions
and
6,757 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
{ | ||
"$class": "org.accordproject.interests.TemplateModel", | ||
"loanAmount": 100000, | ||
"loanAmount": { "$class": "org.accordproject.money.MonetaryAmount", | ||
"doubleValue" : 100000, | ||
"currencyCode" : "GBP" }, | ||
"rate": 2.5, | ||
"loanDuration": 3 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
This is a fixed interest loan to the amount of {{loanAmount}} | ||
This is a fixed interest loan to the amount of {{loanAmount as "K0,0.0 (CCC)"}} | ||
at the yearly interest rate of {{rate}}% | ||
with a loan term of {{loanDuration}}, | ||
and monthly payments of {{% monetaryAmountFormat(monthlyPaymentFormula(contract.loanAmount,contract.rate,contract.loanDuration), "0,0.0 CCC") %}} | ||
and monthly payments of {{% monthlyPaymentFormula(contract.loanAmount,contract.rate,contract.loanDuration) as "K0,0.0 (CCC)" %}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
4,222 changes: 2,111 additions & 2,111 deletions
4,222
packages/ergo-compiler/extracted/compilercore.js
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters