private OffhireManagementSystemEntityDetail mapOffhireDataDetailToOffhireManagementSystemEntityDetail(OffhireService.OffhireDataItem dataItem, long companyId, VesselInCompany vesselInCompany)
        {
            Good good = mapOffhireDataGoodToOffhireSystemEntity(dataItem.FuelType, companyId);

            if (good == null)
            {
                //It must be logged that the specified good was not found.
                return null;
            }

            GoodUnit goodUnit = mapOffhireDataMeasureUnitToOffhireSystemEntityMeasureUnit(good, dataItem.UnitTypeCode);

            if (goodUnit == null)
            {
                //It must be logged that the specified good unit was not found.

                return null;
            }

            var detail = new OffhireManagementSystemEntityDetail
                  {
                      Good = good,
                      Unit = goodUnit,
                      Tank = vesselInCompany.Tanks[0],
                      QuantityAmount = dataItem.Quantity
                  };

            return detail;
        }
 //================================================================================
 private OffhirePreparedDataDetail convertDetailToPreparedDataDetail(OffhireManagementSystemEntityDetail finalizedOffhireDetail)
 {
     return new OffhirePreparedDataDetail()
     {
         Good = finalizedOffhireDetail.Good,
         Quantity = finalizedOffhireDetail.QuantityAmount,
         Unit = finalizedOffhireDetail.Unit,
         Tank = finalizedOffhireDetail.Tank
     };
 }