docs: public Map<UUID, BigDecimal> computeItemAdjustments(final String invoiceId,
                                                          final List<Tag> invoicesTags,
                                                          final EntitySqlDaoWrapperFactory entitySqlDaoWrapperFactory,
                                                          final Map<UUID, BigDecimal> invoiceItemIdsWithNullAmounts,
                                                          final InternalTenantContext context) throws InvoiceApiException {
          // Populate the missing amounts for individual items, if needed
          final Map<UUID, BigDecimal> outputItemIdsWithAmounts = new HashMap<UUID, BigDecimal>();
          // Retrieve invoice before the Refund
          final InvoiceModelDao invoice = entitySqlDaoWrapperFactory.become(InvoiceSqlDao.class).getById(invoiceId, context);
          if (invoice != null) {
              populateChildren(invoice, invoicesTags, entitySqlDaoWrapperFactory, context);
          } else {
              throw new IllegalStateException("Invoice shouldn't be null for id " + invoiceId);
          }
  
          //
          // If we have an item amount, we 'd like to use it, but we need to check first that it is lesser or equal than maximum allowed
          //If, not we compute maximum value we can adjust per item
          for (final UUID invoiceItemId : invoiceItemIdsWithNullAmounts.keySet()) {
              final List<InvoiceItemModelDao> adjustedOrRepairedItems = entitySqlDaoWrapperFactory.become(InvoiceItemSqlDao.class).getAdjustedOrRepairedInvoiceItemsByLinkedId(invoiceItemId.toString(), context);
              computeItemAdjustmentsForTargetInvoiceItem(getInvoiceItemForId(invoice, invoiceItemId), adjustedOrRepairedItems, invoiceItemIdsWithNullAmounts, outputItemIdsWithAmounts);
          }
          return outputItemIdsWithAmounts;
      }