Проанализируй код 
    public BalanceTransferDto update(BalanceTransfer bt, AccDetailDTO accDetailDTO, BalanceTransferDto btDto) {
        LocalDate now = LocalDate.now(Constants.MOSCOW);

        if (Objects.isNull(btDto)) {
            btDto = new BalanceTransferDto();
            btDto.setBalanceTransferSegmentDebt(new SegmentDebtDto());
        }
        if (Objects.nonNull(bt) &&
            Stream.of(bt.getCreditLimit(), bt.getBalanceTransferLedgerSum(), bt.getBalanceTransferAvailableSum(),
                    bt.getBalanceTransferLimit(), bt.getGracePayoffSum(), bt.getBalanceTransferEndDate(),
                    bt.getGracePeriodBTStartDate(), bt.getGracePeriodBTEndDate(), bt.getGracePeriodCancel(),
                    bt.getGracePeriodBTFactEndDate())
                .noneMatch(Objects::nonNull)) {
            btDto.setBtStatus(null);
        }

        if (Objects.nonNull(bt)) {
            var btEndDate = bt.getBalanceTransferEndDate();

            if (Objects.nonNull(btEndDate)) {
                var ledgerSumCompare = (Objects.nonNull(bt.getBalanceTransferLedgerSum())) ?
                        BigDecimal.ZERO.compareTo(bt.getBalanceTransferLedgerSum()) :
                        null;

                if (btEndDate.isEqual(now) || btEndDate.isAfter(now)) {
                    btDto.setBtStatus(ACTIVE.getStatusDto());
                } else {

                    if (Objects.isNull(ledgerSumCompare) ||
                            ledgerSumCompare == 0) {
                        btDto.setBtStatus(NOT_USED.getStatusDto());
                    } else {
                        if (ledgerSumCompare > 0 && !bt.getGracePeriodBTEndDate().isBefore(now) &&
                                (Objects.isNull(bt.getGracePeriodBTFactEndDate()) || bt.getGracePeriodBTFactEndDate().isAfter(now))) {
                            btDto.setBtStatus(USED_GP_ACTIVE.getStatusDto());
                        } else {
                            if (ledgerSumCompare > 0 &&
                                    (bt.getGracePeriodBTEndDate().isBefore(now) || !bt.getGracePeriodBTFactEndDate().isAfter(now)))
                                btDto.setBtStatus(USED_GP_OVERDUE.getStatusDto());
                        }
                    }
                }
            } else {
                btDto.setBtStatus(ViewPaymentStatusType.NOT_CONNECTED.getStatusDto());
            }

            LocalDate graceEndDate = getGraceEndDate(accDetailDTO);
            btDto.getBalanceTransferSegmentDebt().setGraceEndDate(graceEndDate);

            if (Objects.isNull(btDto.getBalanceTransferSegmentDebt().getInterestFreeAmount())) {
                btDto.getBalanceTransferSegmentDebt().setInterestFreeAmount(BigDecimal.ZERO);
            }

            updateInterestFreePeriodStatus(bt, btDto, now);
            btDto.getBalanceTransferSegmentDebt().setPercentAvailableLimitAmount(getPercent(absValue(bt.getBalanceTransferLimit()), absValue(bt.getCreditLimit()), 2));
            btDto.getBalanceTransferSegmentDebt().setInterestFreePeriod(200L);
            calcPeriodBalanceTransferSegmentDebt(btDto.getBalanceTransferSegmentDebt());
        } else {
            btDto.setBtStatus(NOT_CONNECTED.getStatusDto());
            btDto.getBalanceTransferSegmentDebt().setDaysAvailableInterestFreePeriod(0L);
        }
        btDto.getBalanceTransferSegmentDebt().setRate(BigDecimal.valueOf(39.9));

        return btDto;
    }