/** * Handles the case when we reach the end of the template numeric slot * * @param characterString Parsed characters containing split amount */ private void handleEndOfTemplateNumericSlot(String characterString, TransactionType splitType) { try { BigDecimal amountBigD = GncXmlHelper.parseSplitAmount(characterString); Money amount = new Money(amountBigD, getCurrencyForAccount(mSplit.getAccountUID())); mSplit.setValue(amount.absolute()); mSplit.setType(splitType); mIgnoreTemplateTransaction = false; // we have successfully parsed an amount } catch (NumberFormatException | ParseException e) { String msg = "Error parsing template credit split amount " + characterString; Log.e(LOG_TAG, msg + "\n" + e.getMessage()); Crashlytics.log(msg); Crashlytics.logException(e); } finally { if (splitType == TransactionType.CREDIT) mInCreditNumericSlot = false; else mInDebitNumericSlot = false; } }