|
|
|
|
|
|
|
|
use common\models\Order ; |
|
|
use common\models\Order ; |
|
|
use common\models\User ; |
|
|
use common\models\User ; |
|
|
use common\models\Subscription ; |
|
|
use common\models\Subscription ; |
|
|
|
|
|
use common\helpers\Price ; |
|
|
use DateTime; |
|
|
use DateTime; |
|
|
|
|
|
|
|
|
class DistributionController extends BackendController |
|
|
class DistributionController extends BackendController |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
$json['distribution']['revenues'] = number_format($revenues, 2); |
|
|
|
|
|
|
|
|
$json['distribution']['revenues'] = Price::format($revenues); |
|
|
$json['distribution']['weight'] = number_format($weight, 2); |
|
|
$json['distribution']['weight'] = number_format($weight, 2); |
|
|
|
|
|
|
|
|
// products |
|
|
// products |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
$json['distribution']['potential_revenues'] = $potentialRevenues ; |
|
|
|
|
|
$json['distribution']['potential_weight'] = $potentialWeight ; |
|
|
|
|
|
|
|
|
|
|
|
//die('potential revenues : '.$json['distribution']['potential_revenues']) ; |
|
|
|
|
|
|
|
|
$json['distribution']['potential_revenues'] = Price::format($potentialRevenues) ; |
|
|
|
|
|
$json['distribution']['potential_weight'] = number_format($potentialWeight, 2) ; |
|
|
|
|
|
|
|
|
$json['products'] = $productsArray ; |
|
|
$json['products'] = $productsArray ; |
|
|
|
|
|
|