Skip to content

Commit 7fc3485

Browse files
committed
codinguser#876 - Set amount to 0 if text field is empty
1 parent eb0f00d commit 7fc3485

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Diff for: app/src/main/java/org/gnucash/android/ui/transaction/TransactionFormFragment.java

+12
Original file line numberDiff line numberDiff line change
@@ -869,6 +869,18 @@ private List<Split> extractSplitsFromView() {
869869

870870
BigDecimal amountBigD = mAmountEditText.getValue();
871871

872+
if (amountBigD != null) {
873+
// Amount is null
874+
875+
// RAF
876+
877+
} else {
878+
// Amount is not null
879+
880+
// init to 0
881+
amountBigD=new BigDecimal(0);
882+
}
883+
872884
String baseCurrencyCode = mTransactionsDbAdapter.getAccountCurrencyCode(mAccountUID);
873885

874886
// Store signed amount

0 commit comments

Comments
 (0)