code: @Override
    public final void makeFirstPrepareForSave(final Map<String, Object> pAddParam,
      final ManufacturingProcess pEntity,
        final IRequestData pRequestData) throws Exception {
      if (pEntity.getItsQuantity().doubleValue() == 0) {
        throw new ExceptionWithCode(ExceptionWithCode.WRONG_PARAMETER,
          "Quantity is 0! " + pAddParam.get("user"));
      }
      pEntity.setInvItem(getSrvOrm()
        .retrieveEntity(pAddParam, pEntity.getInvItem()));
      if (!InvItem.WORK_IN_PROGRESS_ID.equals(pEntity.getInvItem().getItsType()
        .getItsId())) {
        throw new ExceptionWithCode(ExceptionWithCode.WRONG_PARAMETER,
          "type_must_be_work_in_progress");
      }
      if (pEntity.getReversedId() != null) {
        pEntity.setIsComplete(true);
        pEntity.setTheRest(BigDecimal.ZERO);
      } else {
        pEntity.setTheRest(pEntity.getItsQuantity());
      }
      //rounding:
      pEntity.setItsQuantity(pEntity.getItsQuantity().setScale(
        getSrvAccSettings().lazyGetAccSettings(pAddParam)
          .getQuantityPrecision(), getSrvAccSettings()
            .lazyGetAccSettings(pAddParam).getRoundingMode()));
      pEntity.setItsCost(pEntity.getItsTotal().divide(
        pEntity.getItsQuantity(), getSrvAccSettings()
          .lazyGetAccSettings(pAddParam).getCostPrecision(),
            getSrvAccSettings().lazyGetAccSettings(pAddParam).getRoundingMode()));
    }
docs: <p>Make save preparations before insert/update block if it's need.</p>
  @param pAddParam additional param
  @param pEntity entity
  @param pRequestData Request Data
  @throws Exception - an exception