docs: @Override
    public final List<List<Object>> retrieveData(
      final Map<String, Object> pReqVars) throws Exception {
      AccSettings as = this.srvAccSettings.lazyGetAccSettings(pReqVars);
      List<List<Object>> result = new ArrayList<List<Object>>();
      Long priceCategoryId = (Long) pReqVars.get("priceCategoryId");
      BigDecimal unavailablePrice = null;
      if (pReqVars.get("unavailablePrice") != null) {
        unavailablePrice = (BigDecimal) pReqVars.get("unavailablePrice");
      }
      BigDecimal optimisticQuantity = null;
      if (pReqVars.get("optimisticQuantity") != null) {
        optimisticQuantity = (BigDecimal) pReqVars.get("optimisticQuantity");
      }
      Set<String> ndFlPg = new HashSet<String>();
      ndFlPg.add("item");
      ndFlPg.add("itsPrice");
      Set<String> ndFlIdNm = new HashSet<String>();
      ndFlIdNm.add("itsId");
      ndFlIdNm.add("itsName");
      pReqVars.put("PriceGoodsitemdeepLevel", 3);
      pReqVars.put("PriceGoodsneededFields", ndFlPg);
      pReqVars.put("InvItemCategoryneededFields", ndFlIdNm);
      pReqVars.put("UnitOfMeasureneededFields", ndFlIdNm);
      List<PriceGoods> gpl = getSrvOrm().retrieveListWithConditions(pReqVars,
        PriceGoods.class, "where PRICECATEGORY=" + priceCategoryId);
      pReqVars.remove("PriceGoodsitemdeepLevel");
      pReqVars.remove("PriceGoodsneededFields");
      pReqVars.remove("InvItemCategoryneededFields");
      pReqVars.remove("UnitOfMeasureneededFields");
      pReqVars.put("WarehouseSiteneededFields", ndFlIdNm);
      pReqVars.put("WarehouseneededFields", ndFlIdNm);
      List<WarehouseSite> allPlaces = getSrvOrm()
        .retrieveList(pReqVars, WarehouseSite.class);
      pReqVars.remove("WarehouseSiteneededFields");
      pReqVars.remove("WarehouseneededFields");
      ndFlIdNm.add("itsPercentage");
      pReqVars.put("TaxneededFields", ndFlIdNm);
      List<InvItemTaxCategoryLine> allTaxCatsLns = getSrvOrm()
        .retrieveList(pReqVars, InvItemTaxCategoryLine.class);
      pReqVars.remove("TaxneededFields");
      List<Tax> usedTaxes = new ArrayList<Tax>();
      List<InvItemTaxCategory> usedTaxCats = new ArrayList<InvItemTaxCategory>();
      for (InvItemTaxCategoryLine tcl : allTaxCatsLns) {
        boolean txListed = false;
        for (Tax tx : usedTaxes) {
          if (tx.getItsId().equals(tcl.getTax().getItsId())) {
            txListed = true;
            break;
          }
        }
        if (!txListed) {
          usedTaxes.add(tcl.getTax());
          tcl.getTax().setItsPercentage(tcl.getItsPercentage());
        }
        int tci = -1;
        for (InvItemTaxCategory tc : usedTaxCats) {
          if (tc.getItsId().equals(tcl.getItsOwner().getItsId())) {
            tci = usedTaxCats.indexOf(tc);
            break;
          }
        }
        if (tci == -1) {
          usedTaxCats.add(tcl.getItsOwner());
          tcl.getItsOwner().setTaxes(new ArrayList<InvItemTaxCategoryLine>());
          tcl.getItsOwner().getTaxes().add(tcl);
        } else {
          usedTaxCats.get(tci).getTaxes().add(tcl);
        }
      }
      Collections.sort(usedTaxes, new CmprHasIdLong<Tax>());
      Collections.sort(usedTaxCats, new CmprHasIdLong<InvItemTaxCategory>());
      boolean isOnlyTax = true;
      for (InvItemTaxCategory txc : usedTaxCats) {
        if (txc.getTaxes().size() > 1) {
          isOnlyTax = false;
          break;
        }
      }
      String queryRests = "select INVITEM,  sum(THEREST) as THEREST,"
    + " min(WAREHOUSESITE) as WAREHOUSESITE from WAREHOUSEREST group by INVITEM;";
      List<WarehouseRestLineSm> whRests = new ArrayList<WarehouseRestLineSm>();
      IRecordSet<RS> recordSet = null;
      try {
        recordSet = getSrvDatabase().retrieveRecords(queryRests);
        if (recordSet.moveToFirst()) {
          do {
            WarehouseRestLineSm wrl = new WarehouseRestLineSm();
            whRests.add(wrl);
            wrl.setInvItemId(recordSet.getLong("INVITEM"));
            wrl.setSiteId(recordSet.getLong("WAREHOUSESITE"));
            Double theRset = recordSet.getDouble("THEREST");
            wrl.setTheRest(BigDecimal.valueOf(theRset));
          } while (recordSet.moveToNext());
        }
      } finally {
        if (recordSet != null) {
          recordSet.close();
        }
      }
      BigDecimal bd1d2 = new BigDecimal("1.2");
      BigDecimal bd100 = new BigDecimal("100");
      for (PriceGoods pg : gpl) {
        List<Object> row = new ArrayList<Object>();
        result.add(row);
        row.add(pg.getItem());
        row.add(pg.getItsPrice());
        row.add(pg.getItsPrice().divide(bd1d2, 2, RoundingMode.HALF_UP));
        BigDecimal quantity;
        Boolean isAvailable;
        WarehouseSite ws = null;
        if (unavailablePrice != null
          && pg.getItsPrice().compareTo(unavailablePrice) == 0) {
          quantity = BigDecimal.ZERO;
          isAvailable = Boolean.FALSE;
        } else {
          WarehouseRestLineSm wr = findRest(pg.getItem().getItsId(), whRests);
          if (wr != null) {
            quantity = wr.getTheRest();
            isAvailable = Boolean.TRUE;
            ws = findSite(wr.getSiteId(), allPlaces);
          } else {
            if (optimisticQuantity == null) {
              quantity = BigDecimal.ZERO;
              isAvailable = Boolean.FALSE;
            } else {
              quantity = optimisticQuantity;
              isAvailable = Boolean.TRUE;
            }
          }
        }
        row.add(quantity);
        row.add(isAvailable);
        row.add(ws);
        if (pg.getItem().getTaxCategory() != null) {
          for (InvItemTaxCategory txc : usedTaxCats) {
            if (txc.getItsId().equals(pg.getItem()
              .getTaxCategory().getItsId())) {
              //tax category with tax lines:
              pg.getItem().setTaxCategory(txc);
              break;
            }
          }
        }
        if (isOnlyTax) {
          TaxWr onlyTax = new TaxWr();
          if (pg.getItem().getTaxCategory() != null) {
            onlyTax.setTax(pg.getItem().getTaxCategory().getTaxes()
              .get(0).getTax());
            onlyTax.setIsUsed(true);
            onlyTax.setRate(onlyTax.getTax().getItsPercentage()
              .divide(bd100, as.getTaxPrecision() + 2, RoundingMode.HALF_UP));
          }
          row.add(onlyTax);
        } else { //multiply taxes case:
          TaxCategoryWr taxCat = new TaxCategoryWr();
          if (pg.getItem().getTaxCategory() != null) {
            taxCat.setTaxCategory(pg.getItem().getTaxCategory());
            taxCat.setIsUsed(true);
            for (InvItemTaxCategoryLine tl : taxCat.getTaxCategory().getTaxes()) {
              taxCat.setAggrPercent(taxCat.getAggrPercent()
                .add(tl.getItsPercentage()));
            }
            taxCat.setAggrRate(taxCat.getAggrPercent()
              .divide(bd100, as.getTaxPrecision() + 2, RoundingMode.HALF_UP));
          }
          row.add(taxCat);
          for (Tax tx : usedTaxes) {
            TaxWr txWr = new TaxWr();
            if (pg.getItem().getTaxCategory() != null) {
              for (InvItemTaxCategoryLine tl : pg.getItem()
                .getTaxCategory().getTaxes()) {
                if (tl.getTax().getItsId().equals(tx.getItsId())) {
                  txWr.setTax(tl.getTax());
                  txWr.setIsUsed(true);
                  txWr.setRate(txWr.getTax().getItsPercentage().divide(bd100,
                    as.getTaxPrecision() + 2, RoundingMode.HALF_UP));
                  break;
                }
              }
            }
            row.add(txWr);
          }
          for (InvItemTaxCategory txc : usedTaxCats) {
            TaxCategoryWr txCtWr = new TaxCategoryWr();
            if (pg.getItem().getTaxCategory() != null && txc.getItsId()
              .equals(pg.getItem().getTaxCategory().getItsId())) {
              txCtWr.setTaxCategory(txc);
              txCtWr.setIsUsed(true);
              for (InvItemTaxCategoryLine tl : txCtWr
                .getTaxCategory().getTaxes()) {
                txCtWr.setAggrPercent(txCtWr.getAggrPercent()
                  .add(tl.getItsPercentage()));
              }
              txCtWr.setAggrRate(txCtWr.getAggrPercent().divide(bd100,
                as.getTaxPrecision() + 2, RoundingMode.HALF_UP));
            }
            row.add(txCtWr);
          }
        }
      }
      return result;
    }