docs: private String getFormattedAmountByLocaleAndInvoiceCurrency(final BigDecimal amount) {
          final String invoiceCurrencyCode = invoice.getCurrency().toString();
          final CurrencyUnit currencyUnit = CurrencyUnit.of(invoiceCurrencyCode);
  
          final DecimalFormat numberFormatter = (DecimalFormat) DecimalFormat.getCurrencyInstance(locale);
          final DecimalFormatSymbols dfs = numberFormatter.getDecimalFormatSymbols();
          dfs.setInternationalCurrencySymbol(currencyUnit.getCurrencyCode());
  
          try {
              Currency currency = Currency.fromCode(invoiceCurrencyCode);
              dfs.setCurrencySymbol(currency.getSymbol());
          } catch (final IllegalArgumentException e) {
              dfs.setCurrencySymbol(currencyUnit.getSymbol(locale));
          }
  
          numberFormatter.setDecimalFormatSymbols(dfs);
          numberFormatter.setMinimumFractionDigits(currencyUnit.getDefaultFractionDigits());
          numberFormatter.setMaximumFractionDigits(currencyUnit.getDefaultFractionDigits());
  
          return numberFormatter.format(amount.doubleValue());
      }