MIFOSX-541: add application process around savings accounts.
This commit is contained in:
+13
-13
@@ -4,20 +4,20 @@ import org.mifosplatform.organisation.monetary.domain.MonetaryCurrency;
|
||||
|
||||
public class MonetaryCurrencyBuilder {
|
||||
|
||||
private String code = "XOF";
|
||||
private int digitsAfterDecimal = 0;
|
||||
private String code = "XOF";
|
||||
private int digitsAfterDecimal = 0;
|
||||
|
||||
public MonetaryCurrency build() {
|
||||
return new MonetaryCurrency(code, digitsAfterDecimal);
|
||||
}
|
||||
public MonetaryCurrency build() {
|
||||
return new MonetaryCurrency(code, digitsAfterDecimal);
|
||||
}
|
||||
|
||||
public MonetaryCurrencyBuilder withCode(String withCode) {
|
||||
this.code = withCode;
|
||||
return this;
|
||||
}
|
||||
public MonetaryCurrencyBuilder withCode(final String withCode) {
|
||||
this.code = withCode;
|
||||
return this;
|
||||
}
|
||||
|
||||
public MonetaryCurrencyBuilder withDigitsAfterDecimal(int withDigitsAfterDecimal) {
|
||||
this.digitsAfterDecimal = withDigitsAfterDecimal;
|
||||
return this;
|
||||
}
|
||||
public MonetaryCurrencyBuilder withDigitsAfterDecimal(final int withDigitsAfterDecimal) {
|
||||
this.digitsAfterDecimal = withDigitsAfterDecimal;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
+15
-15
@@ -7,20 +7,20 @@ import org.mifosplatform.organisation.monetary.domain.Money;
|
||||
|
||||
public class MoneyBuilder {
|
||||
|
||||
private MonetaryCurrency currencyDetail = new MonetaryCurrencyBuilder().build();
|
||||
private BigDecimal newAmount = BigDecimal.ZERO;
|
||||
|
||||
public Money build() {
|
||||
return Money.of(currencyDetail, newAmount);
|
||||
}
|
||||
private MonetaryCurrency currencyDetail = new MonetaryCurrencyBuilder().build();
|
||||
private BigDecimal newAmount = BigDecimal.ZERO;
|
||||
|
||||
public MoneyBuilder with(MonetaryCurrency withDetail) {
|
||||
this.currencyDetail = withDetail;
|
||||
return this;
|
||||
}
|
||||
|
||||
public MoneyBuilder with(String withAmount) {
|
||||
this.newAmount = BigDecimal.valueOf(Double.valueOf(withAmount));
|
||||
return this;
|
||||
}
|
||||
public Money build() {
|
||||
return Money.of(currencyDetail, newAmount);
|
||||
}
|
||||
|
||||
public MoneyBuilder with(final MonetaryCurrency withDetail) {
|
||||
this.currencyDetail = withDetail;
|
||||
return this;
|
||||
}
|
||||
|
||||
public MoneyBuilder with(final String withAmount) {
|
||||
this.newAmount = BigDecimal.valueOf(Double.valueOf(withAmount));
|
||||
return this;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user