code: public final void useMaterial(final Map<String, Object> pAddParam,
      final Manufacture pEntity)
      throws Exception {
      //draw product in process from manufacturing process
      pEntity.getManufacturingProcess().setTheRest(pEntity
        .getManufacturingProcess().getTheRest()
          .subtract(pEntity.getItsQuantity()));
      getSrvOrm().updateEntity(pAddParam, pEntity.getManufacturingProcess());
      UseMaterialEntry die = new UseMaterialEntry();
      die.setItsDate(pEntity.getItsDate());
      die.setIdDatabaseBirth(getSrvOrm().getIdDatabase());
      die.setSourceType(pEntity.getManufacturingProcess().constTypeCode());
      die.setSourceId(pEntity.getManufacturingProcess().getItsId());
      die.setDrawingType(pEntity.constTypeCode());
      die.setDrawingId(pEntity.getItsId());
      die.setDrawingOwnerId(null);
      die.setDrawingOwnerType(null);
      die.setSourceOwnerId(null);
      die.setSourceOwnerType(null);
      die.setItsQuantity(pEntity.getItsQuantity());
      die.setItsCost(pEntity.getItsCost());
      die.setInvItem(pEntity.getManufacturingProcess().getInvItem());
      die.setUnitOfMeasure(pEntity.getManufacturingProcess().getUnitOfMeasure());
      die.setItsTotal(pEntity.getItsTotal());
      String langDef = (String) pAddParam.get("langDef");
      DateFormat dateFormat = DateFormat.getDateTimeInstance(
        DateFormat.MEDIUM, DateFormat.SHORT, new Locale(langDef));
      die.setDescription(makeDescription(pEntity, langDef, dateFormat));
      getSrvOrm().insertEntity(pAddParam, die);
      die.setIsNew(false);
    }
docs: <p>Make use material.</p>
  @param pAddParam additional param
  @param pEntity Manufacture
  @throws Exception - an exception