uawdijnntqw1x1x1
IP : 216.73.216.28
Hostname : toronto-dev2
Kernel : Linux toronto-dev2 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64
Disable Function : None :)
OS : Linux
PATH:
/
srv
/
users
/
craft4
/
apps
/
craft4-newsite-space
/
vendor
/
craftcms
/
commerce
/
src
/
.
/
stats
/
TotalRevenue.php
/
/
<?php /** * @link https://craftcms.com/ * @copyright Copyright (c) Pixel & Tonic, Inc. * @license https://craftcms.github.io/license/ */ namespace craft\commerce\stats; use craft\commerce\base\Stat; use yii\db\Expression; /** * Total Revenue Stat * * @author Pixel & Tonic, Inc. <support@pixelandtonic.com> * @since 3.0 */ class TotalRevenue extends Stat { /** * @since 4.1.0 */ public const TYPE_TOTAL = 'total'; /** * @since 4.1.0 */ public const TYPE_TOTAL_PAID = 'totalPaid'; /** * @var string * @since 4.1.0 */ public string $type = self::TYPE_TOTAL; /** * @inheritdoc */ protected string $_handle = 'totalRevenue'; /** * @inheritDoc */ public function getData(): ?array { return $this->_createChartQuery( [ new Expression(sprintf('SUM([[%s]]) as revenue', $this->type)), new Expression('COUNT([[orders.id]]) as count'), ], [ 'revenue' => 0, 'count' => 0, ] ); } }
/srv/users/craft4/apps/craft4-newsite-space/vendor/craftcms/commerce/src/./stats/TotalRevenue.php