当前位置: 首页>>代码示例>>PHP>>正文


PHP Report::getCurrencyConversionType方法代码示例

本文整理汇总了PHP中Report::getCurrencyConversionType方法的典型用法代码示例。如果您正苦于以下问题:PHP Report::getCurrencyConversionType方法的具体用法?PHP Report::getCurrencyConversionType怎么用?PHP Report::getCurrencyConversionType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Report的用法示例。


在下文中一共展示了Report::getCurrencyConversionType方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: setCommonAttributes

 /**
  * @param ReportWizardForm $formModel
  */
 protected function setCommonAttributes(ReportWizardForm $formModel)
 {
     $formModel->id = $this->report->getId();
     $formModel->description = $this->report->getDescription();
     $formModel->moduleClassName = $this->report->getModuleClassName();
     if ($this->report->getOwner()->id > 0) {
         $formModel->ownerId = (int) $this->report->getOwner()->id;
         $formModel->ownerName = strval($this->report->getOwner());
     }
     $formModel->name = $this->report->getName();
     $formModel->type = $this->report->getType();
     $formModel->filtersStructure = $this->report->getFiltersStructure();
     $formModel->currencyConversionType = $this->report->getCurrencyConversionType();
     $formModel->spotConversionCurrencyCode = $this->report->getSpotConversionCurrencyCode();
     if ($this->report->isNew()) {
         $formModel->setIsNew();
     }
     $formModel->setExplicitReadWriteModelPermissions($this->report->getExplicitReadWriteModelPermissions());
     $formModel->filters = $this->report->getFilters();
     $formModel->orderBys = $this->report->getOrderBys();
     $formModel->groupBys = $this->report->getGroupBys();
     $formModel->displayAttributes = $this->report->getDisplayAttributes();
     $formModel->drillDownDisplayAttributes = $this->report->getDrillDownDisplayAttributes();
     $formModel->chart = $this->report->getChart();
 }
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:28,代码来源:ReportToWizardFormAdapter.php

示例2: formatValue

 /**
  * @param DisplayAttributeForReportForm $displayAttribute
  * @param mixed $value
  * @return mixed
  * @throws NotSupportedException if the currencyConversionType is invalid or null, when the displayAttribute
  * is a currency type
  */
 protected function formatValue(DisplayAttributeForReportForm $displayAttribute, $value)
 {
     if ($displayAttribute->isATypeOfCurrencyValue()) {
         if ($this->report->getCurrencyConversionType() == Report::CURRENCY_CONVERSION_TYPE_ACTUAL) {
             return Yii::app()->numberFormatter->formatDecimal((double) $value);
         } elseif ($this->report->getCurrencyConversionType() == Report::CURRENCY_CONVERSION_TYPE_BASE) {
             return Yii::app()->numberFormatter->formatCurrency((double) $value, Yii::app()->currencyHelper->getBaseCode());
         } elseif ($this->report->getCurrencyConversionType() == Report::CURRENCY_CONVERSION_TYPE_SPOT) {
             return Yii::app()->numberFormatter->formatCurrency((double) $value * $this->report->getFromBaseToSpotRate(), $this->report->getSpotConversionCurrencyCode());
         } else {
             throw new NotSupportedException();
         }
     } elseif ($displayAttribute->getDisplayElementType() == 'Decimal') {
         return Yii::app()->numberFormatter->formatDecimal((double) $value);
     } elseif ($displayAttribute->getDisplayElementType() == 'Integer') {
         return Yii::app()->numberFormatter->formatDecimal((int) $value);
     } elseif ($displayAttribute->getDisplayElementType() == 'Date') {
         return DateTimeUtil::resolveValueForDateLocaleFormattedDisplay($value);
     } elseif ($displayAttribute->getDisplayElementType() == 'DateTime') {
         return DateTimeUtil::convertDbFormattedDateTimeToLocaleFormattedDisplay($value);
     } else {
         return $value;
     }
 }
开发者ID:youprofit,项目名称:Zurmo,代码行数:31,代码来源:ReportDataProviderToAmChartMakerAdapter.php

示例3: makeOrderBysContent

 /**
  * @param RedBeanModelJoinTablesQueryAdapter $joinTablesAdapter
  * @return null|string
  */
 protected function makeOrderBysContent(RedBeanModelJoinTablesQueryAdapter $joinTablesAdapter)
 {
     $builder = new OrderBysReportQueryBuilder($joinTablesAdapter, $this->report->getCurrencyConversionType());
     return $builder->makeQueryContent($this->report->getOrderBys());
 }
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:9,代码来源:ReportDataProvider.php

示例4: resolveReportToSavedReport

 /**
  * @param Report $report
  * @param SavedReport$savedReport
  */
 public static function resolveReportToSavedReport(Report $report, SavedReport $savedReport)
 {
     $savedReport->description = $report->getDescription();
     $savedReport->moduleClassName = $report->getModuleClassName();
     $savedReport->name = $report->getName();
     $savedReport->owner = $report->getOwner();
     $savedReport->type = $report->getType();
     $data = array();
     $data['filtersStructure'] = $report->getFiltersStructure();
     $data['currencyConversionType'] = $report->getCurrencyConversionType();
     $data['spotConversionCurrencyCode'] = $report->getSpotConversionCurrencyCode();
     $data[ComponentForReportForm::TYPE_FILTERS] = self::makeArrayFromComponentFormsAttributesData($report->getFilters());
     $data[ComponentForReportForm::TYPE_ORDER_BYS] = self::makeArrayFromComponentFormsAttributesData($report->getOrderBys());
     $data[ComponentForReportForm::TYPE_GROUP_BYS] = self::makeArrayFromComponentFormsAttributesData($report->getGroupBys());
     $data[ComponentForReportForm::TYPE_DISPLAY_ATTRIBUTES] = self::makeArrayFromComponentFormsAttributesData($report->getDisplayAttributes());
     $data[ComponentForReportForm::TYPE_DRILL_DOWN_DISPLAY_ATTRIBUTES] = self::makeArrayFromComponentFormsAttributesData($report->getDrillDownDisplayAttributes());
     if ($report->getChart()->type != null) {
         $data['chart'] = self::makeArrayFromChartForReportFormAttributesData($report->getChart());
     }
     $savedReport->serializedData = serialize($data);
 }
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:25,代码来源:SavedReportToReportAdapter.php


注:本文中的Report::getCurrencyConversionType方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。