本文整理汇总了PHP中General::save方法的典型用法代码示例。如果您正苦于以下问题:PHP General::save方法的具体用法?PHP General::save怎么用?PHP General::save使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类General
的用法示例。
在下文中一共展示了General::save方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: save
/**
* Saves configuration file and invalidates opcache.
*
* @param mixed $data Optional data to be saved, usually array.
* @throws \RuntimeException
*/
public function save($data = null)
{
parent::save($data);
// Invalidate configuration file from the opcache.
if (function_exists('opcache_invalidate')) {
// PHP 5.5.5+
@opcache_invalidate($this->filename);
} elseif (function_exists('apc_invalidate')) {
// APC
@apc_invalidate($this->filename);
}
}
示例2: actionIndex
public function actionIndex()
{
if (isset($_POST["select_leger_items_company_name"]) && $_POST["select_leger_items_company_name"] != "") {
$array_post = $_POST;
$company_id = $_POST["select_leger_items_company_name"];
$selected_item = "";
foreach ($array_post as $key => $value) {
if ($key == 'select_leger_items_company_name') {
continue;
}
$selected_item .= $value . ';';
}
$criteria = new CDbCriteria();
$criteria->addCondition("`company_id` = '" . $company_id + "'");
$item = SelectLedgerItem::model()->find($criteria);
if (!isset($item)) {
$item = new SelectLedgerItem();
$item->Company_id = $company_id;
}
$item->selected_item = $selected_item;
$item->save();
}
$model = new General();
// Uncomment the following line if AJAX validation is needed
// $this->performAjaxValidation($model);
if (isset($_POST['General'])) {
$model->attributes = $_POST['General'];
$model->total_1 = $model->pro_1 + $model->intangible_1 + $model->development_1 + $model->invest_sub_1 + $model->invest_aso_1 + $model->other_1;
$model->total_2 = $model->tradeReceivable + $model->otherReceivable + $model->amountSubsidy + $model->amountAssociated + $model->fixedDeposit + $model->cash_bank;
$model->total_3 = $model->otherPayable + $model->amountOwnSubsidy + $model->amountOwnDirect + $model->purchasePayable + $model->bankOverdraft + $model->taxation;
$model->netcurrentLiabilities = $model->netcurrentLiabilities = $model->tradeReceivable + $model->otherReceivable + $model->amountSubsidy + $model->amountAssociated + $model->fixedDeposit + $model->cash_bank - ($model->otherPayable + $model->amountOwnSubsidy + $model->amountOwnDirect + $model->purchasePayable + $model->bankOverdraft + $model->taxation);
$model->total_4 = $model->pro_1 + $model->intangible_1 + $model->development_1 + $model->invest_sub_1 + $model->invest_aso_1 + $model->other_1 + $model->tradeReceivable + $model->otherReceivable + $model->amountSubsidy + $model->amountAssociated + $model->fixedDeposit + $model->cash_bank - $model->otherPayable - $model->amountOwnSubsidy - $model->amountOwnDirect - $model->purchasePayable - $model->bankOverdraft - $model->taxation;
$model->shareHolderfund = $model->shareCapital + $model->sharePremium + $model->preferenceShare + $model->foreignExchange + $model->AccLost;
$model->total_5 = $model->shareCapital + $model->sharePremium + $model->preferenceShare + $model->foreignExchange + $model->AccLost + $model->preferenceShare1 + $model->minorityInterest;
$model->total_6 = $model->purchasePayable1 + $model->taxLiabilities;
$model->total_7 = $model->shareCapital + $model->sharePremium + $model->preferenceShare + $model->foreignExchange + $model->AccLost + $model->preferenceShare1 + $model->minorityInterest + $model->purchasePayable1 + $model->taxLiabilities;
$model->lossProfitFromOperations = $model->revenue + $model->otherOperatingIncome + $model->directOperatingExpenses + $model->administrationExpenses + $model->otherOperatingExpenses;
$model->lossProfitbeforetaxation = $model->revenue + $model->otherOperatingIncome + $model->directOperatingExpenses + $model->administrationExpenses + $model->otherOperatingExpenses + $model->financeCost + $model->sharedOfLossprofit;
$model->lossProfitaftertaxation = $model->revenue + $model->otherOperatingIncome + $model->directOperatingExpenses + $model->administrationExpenses + $model->otherOperatingExpenses + $model->financeCost + $model->sharedOfLossprofit + $model->taxationFinance;
$model->netlossProfitforthefinancialyear = $model->revenue + $model->otherOperatingIncome + $model->directOperatingExpenses + $model->administrationExpenses + $model->otherOperatingExpenses + $model->financeCost + $model->sharedOfLossprofit + $model->taxationFinance + $model->minoritySharedholder;
if ($model->otherPayable + $model->amountOwnSubsidy + $model->amountOwnDirect + $model->purchasePayable + $model->bankOverdraft + $model->taxation > 0) {
$model->currentRatio = ($model->tradeReceivable + $model->otherReceivable + $model->amountSubsidy + $model->amountAssociated + $model->fixedDeposit + $model->cash_bank) / ($model->otherPayable + $model->amountOwnSubsidy + $model->amountOwnDirect + $model->purchasePayable + $model->bankOverdraft + $model->taxation);
}
if ($model->otherPayable + $model->amountOwnSubsidy + $model->amountOwnDirect + $model->purchasePayable + $model->bankOverdraft + $model->taxation > 0) {
$model->quickRatio = ($model->tradeReceivable + $model->otherReceivable + $model->amountSubsidy + $model->amountAssociated + $model->fixedDeposit + $model->cash_bank - 0 - 0) / ($model->otherPayable + $model->amountOwnSubsidy + $model->amountOwnDirect + $model->purchasePayable + $model->bankOverdraft + $model->taxation);
}
if (($model->shareCapital + $model->sharePremium + $model->preferenceShare + $model->foreignExchange + $model->AccLost) * 100 > 0) {
$model->debtToEquity = ($model->otherPayable + $model->amountOwnSubsidy + $model->amountOwnDirect + $model->purchasePayable + $model->bankOverdraft + $model->taxation + ($model->purchasePayable1 + $model->taxLiabilities)) / ($model->shareCapital + $model->sharePremium + $model->preferenceShare + $model->foreignExchange + $model->AccLost) * 100;
}
if ($model->pro_1 + $model->intangible_1 + $model->development_1 + $model->invest_sub_1 + $model->invest_aso_1 + $model->other_1 + ($model->tradeReceivable + $model->otherReceivable + $model->amountSubsidy + $model->amountAssociated + $model->fixedDeposit + $model->cash_bank) > 0) {
$model->debtTototalassets = ($model->otherPayable + $model->amountOwnSubsidy + $model->amountOwnDirect + $model->purchasePayable + $model->bankOverdraft + $model->taxation + ($model->purchasePayable1 + $model->taxLiabilities)) / ($model->pro_1 + $model->intangible_1 + $model->development_1 + $model->invest_sub_1 + $model->invest_aso_1 + $model->other_1 + ($model->tradeReceivable + $model->otherReceivable + $model->amountSubsidy + $model->amountAssociated + $model->fixedDeposit + $model->cash_bank));
}
if ($model->shareCapital + $model->sharePremium + $model->preferenceShare + $model->foreignExchange + $model->AccLost + $model->preferenceShare1 + $model->minorityInterest > 0) {
$model->totalCapitalisation = ($model->purchasePayable1 + $model->taxLiabilities) / ($model->shareCapital + $model->sharePremium + $model->preferenceShare + $model->foreignExchange + $model->AccLost + $model->preferenceShare1 + $model->minorityInterest);
}
if ($model->financeCost > 0 || $model->financeCost < 0) {
$model->interestCoverage = ($model->revenue + $model->otherOperatingIncome + $model->directOperatingExpenses + $model->administrationExpenses + $model->otherOperatingExpenses + $model->financeCost + $model->sharedOfLossprofit) / $model->financeCost;
}
if ($model->revenue + $model->otherOperatingIncome > 0) {
$model->grossProfitmargin = ($model->revenue + $model->otherOperatingIncome + $model->directOperatingExpenses + $model->administrationExpenses + $model->otherOperatingExpenses) / ($model->revenue + $model->otherOperatingIncome);
}
if ($model->revenue + $model->otherOperatingIncome > 0) {
$model->netProfitMargin = ($model->revenue + $model->otherOperatingIncome + $model->directOperatingExpenses + $model->administrationExpenses + $model->otherOperatingExpenses + $model->financeCost + $model->sharedOfLossprofit + $model->taxationFinance) / ($model->revenue + $model->otherOperatingIncome);
}
if ($model->revenue > 0) {
$model->grossOperatingmargin = ($model->revenue + $model->otherOperatingIncome + $model->directOperatingExpenses + $model->administrationExpenses + $model->otherOperatingExpenses) / $model->revenue;
}
if ($model->revenue > 0) {
$model->netOperatingmargin = ($model->revenue + $model->otherOperatingIncome + $model->directOperatingExpenses + $model->administrationExpenses + $model->otherOperatingExpenses + $model->financeCost + $model->sharedOfLossprofit + $model->financeCost) / $model->revenue;
}
if ($model->shareCapital + $model->sharePremium + $model->preferenceShare + $model->foreignExchange + $model->AccLost > 0) {
$model->returnOnequity = ($model->revenue + $model->otherOperatingIncome + $model->directOperatingExpenses + $model->administrationExpenses + $model->otherOperatingExpenses + $model->financeCost + $model->sharedOfLossprofit + $model->taxationFinance) / ($model->shareCapital + $model->sharePremium + $model->preferenceShare + $model->foreignExchange + $model->AccLost);
}
if ($model->pro_1 + $model->intangible_1 + $model->development_1 + $model->invest_sub_1 + $model->invest_aso_1 + $model->other_1 + ($model->tradeReceivable + $model->otherReceivable + $model->amountSubsidy + $model->amountAssociated + $model->fixedDeposit + $model->cash_bank) > 0) {
$model->returnOnassets = ($model->revenue + $model->otherOperatingIncome + $model->directOperatingExpenses + $model->administrationExpenses + $model->otherOperatingExpenses + $model->financeCost + $model->sharedOfLossprofit + $model->financeCost) / ($model->pro_1 + $model->intangible_1 + $model->development_1 + $model->invest_sub_1 + $model->invest_aso_1 + $model->other_1 + ($model->tradeReceivable + $model->otherReceivable + $model->amountSubsidy + $model->amountAssociated + $model->fixedDeposit + $model->cash_bank));
}
if ($model->shareCapital + $model->sharePremium + $model->preferenceShare + $model->foreignExchange + $model->AccLost + $model->preferenceShare1 + $model->minorityInterest + ($model->purchasePayable1 + $model->taxLiabilities) > 0) {
$model->returnOncapitalemployed = ($model->revenue + $model->otherOperatingIncome + $model->directOperatingExpenses + $model->administrationExpenses + $model->otherOperatingExpenses) / ($model->shareCapital + $model->sharePremium + $model->preferenceShare + $model->foreignExchange + $model->AccLost + $model->preferenceShare1 + $model->minorityInterest + ($model->purchasePayable1 + $model->taxLiabilities));
}
if ($model->shareCapital + $model->sharePremium + $model->preferenceShare + $model->foreignExchange + $model->AccLost + $model->preferenceShare1 + $model->minorityInterest > 0) {
$model->earningPershare = ($model->revenue + $model->otherOperatingIncome + $model->directOperatingExpenses + $model->administrationExpenses + $model->otherOperatingExpenses + $model->financeCost + $model->sharedOfLossprofit) / ($model->shareCapital + $model->sharePremium + $model->preferenceShare + $model->foreignExchange + $model->AccLost + $model->preferenceShare1 + $model->minorityInterest);
}
if ($model->pro_1 + $model->intangible_1 + $model->development_1 + $model->invest_sub_1 + $model->invest_aso_1 + $model->other_1 + ($model->tradeReceivable + $model->otherReceivable + $model->amountSubsidy + $model->amountAssociated + $model->fixedDeposit + $model->cash_bank) > 0) {
$model->totalAssetturnover = $model->revenue / ($model->pro_1 + $model->intangible_1 + $model->development_1 + $model->invest_sub_1 + $model->invest_aso_1 + $model->other_1 + ($model->tradeReceivable + $model->otherReceivable + $model->amountSubsidy + $model->amountAssociated + $model->fixedDeposit + $model->cash_bank));
}
if ($model->pro_1 + $model->intangible_1 + $model->development_1 + $model->invest_sub_1 + $model->invest_aso_1 + $model->other_1 > 0) {
$model->fixedAssetsturnover = $model->revenue / ($model->pro_1 + $model->intangible_1 + $model->development_1 + $model->invest_sub_1 + $model->invest_aso_1 + $model->other_1);
}
if ($model->shareCapital + $model->sharePremium + $model->preferenceShare + $model->foreignExchange + $model->AccLost + $model->preferenceShare1 + $model->minorityInterest > 0) {
$model->gearingRatiodebt = ($model->otherPayable + $model->amountOwnSubsidy + $model->amountOwnDirect + $model->purchasePayable + $model->bankOverdraft + $model->taxation + ($model->purchasePayable1 + $model->taxLiabilities)) / ($model->shareCapital + $model->sharePremium + $model->preferenceShare + $model->foreignExchange + $model->AccLost + $model->preferenceShare1 + $model->minorityInterest);
}
if ($model->otherPayable + $model->amountOwnSubsidy + $model->amountOwnDirect + $model->purchasePayable + $model->bankOverdraft + $model->taxation + ($model->purchasePayable1 + $model->taxLiabilities) + ($model->shareCapital + $model->sharePremium + $model->preferenceShare + $model->foreignExchange + $model->AccLost + $model->preferenceShare1 + $model->minorityInterest) > 0) {
$model->gearingRatiofinance = ($model->otherPayable + $model->amountOwnSubsidy + $model->amountOwnDirect + $model->purchasePayable + $model->bankOverdraft + $model->taxation + ($model->purchasePayable1 + $model->taxLiabilities)) / ($model->otherPayable + $model->amountOwnSubsidy + $model->amountOwnDirect + $model->purchasePayable + $model->bankOverdraft + $model->taxation + ($model->purchasePayable1 + $model->taxLiabilities) + ($model->shareCapital + $model->sharePremium + $model->preferenceShare + $model->foreignExchange + $model->AccLost + $model->preferenceShare1 + $model->minorityInterest));
}
if ($model->financeCost > 0 || $model->financeCost < 0) {
$model->interestCover = ($model->revenue + $model->otherOperatingIncome + $model->directOperatingExpenses + $model->administrationExpenses + $model->otherOperatingExpenses) / -$model->financeCost;
}
if ($model->save()) {
$this->redirect(array('select_general'));
}
//.........这里部分代码省略.........
示例3: actionUpdate
/**
* Updates a particular model.
* If update is successful, the browser will be redirected to the 'view' page.
* @param integer $id the ID of the model to be updated
*/
public function actionUpdate($id)
{
if (isset($_POST["General_company_name"]) && $_POST["General_company_name"] != "") {
$company_id = $_REQUEST["General_company_name"];
$company_name = $_REQUEST["company_name"];
$year = $_REQUEST["year"];
$general = General::model()->findByPk($id);
if (!isset($general)) {
$general = new General();
}
$general->company_id = $company_id;
$general->company_name = $company_name;
$general->year = $year;
$general->save();
$ret = ItemValue::model()->deleteAll("company_id ='" . $company_id . "' and year ='" . $year . "'");
foreach ($_POST as $key => $value) {
if ($key == 'General_company_name' || $key == 'year' || $key == 'company_name') {
continue;
}
if ($value != "") {
$item = new ItemValue();
$it = explode("_", $key);
$item->item_id = $it[1];
$item->value = $value;
$item->company_id = $company_id;
$item->year = $year;
$item->save();
}
}
//$this->redirect(Yii::app()->getBaseUrl().'/index.php/general/admin');
}
$model = $this->loadModel($id);
$items = Yii::app()->db->createCommand("\n select I.id,I.name,IV.value,I.isMandatory \n from tbl_item as I \n inner join tbl_item_value as IV on I.id = IV.item_id \n where IV.company_id='" . $model->company_id . "' \n and IV.year='" . $model->year . "'")->queryAll();
// Uncomment the following line if AJAX validation is needed
// $this->performAjaxValidation($model);
$this->render('update', array('model' => $model, 'items' => $items));
}
示例4: actionSelect_general
public function actionSelect_general()
{
$model = new General();
// Uncomment the following line if AJAX validation is needed
// $this->performAjaxValidation($model);
if (isset($_POST['General'])) {
$model->attributes = $_POST['General'];
$model->total_1 = $model->pro_1 + $model->intangible_1 + $model->development_1 + $model->invest_sub_1 + $model->invest_aso_1 + $model->other_1;
$model->total_2 = $model->tradeReceivable + $model->otherReceivable + $model->amountSubsidy + $model->amountAssociated + $model->fixedDeposit + $model->cash_bank;
$model->total_3 = $model->otherPayable + $model->amountOwnSubsidy + $model->amountOwnDirect + $model->purchasePayable + $model->bankOverdraft + $model->taxation;
$model->netcurrentLiabilities = $model->netcurrentLiabilities = $model->tradeReceivable + $model->otherReceivable + $model->amountSubsidy + $model->amountAssociated + $model->fixedDeposit + $model->cash_bank - ($model->otherPayable + $model->amountOwnSubsidy + $model->amountOwnDirect + $model->purchasePayable + $model->bankOverdraft + $model->taxation);
$model->total_4 = $model->pro_1 + $model->intangible_1 + $model->development_1 + $model->invest_sub_1 + $model->invest_aso_1 + $model->other_1 + $model->tradeReceivable + $model->otherReceivable + $model->amountSubsidy + $model->amountAssociated + $model->fixedDeposit + $model->cash_bank - $model->otherPayable - $model->amountOwnSubsidy - $model->amountOwnDirect - $model->purchasePayable - $model->bankOverdraft - $model->taxation;
$model->shareHolderfund = $model->shareCapital + $model->sharePremium + $model->preferenceShare + $model->foreignExchange + $model->AccLost;
$model->total_5 = $model->shareCapital + $model->sharePremium + $model->preferenceShare + $model->foreignExchange + $model->AccLost + $model->preferenceShare1 + $model->minorityInterest;
$model->total_6 = $model->purchasePayable1 + $model->taxLiabilities;
$model->total_7 = $model->shareCapital + $model->sharePremium + $model->preferenceShare + $model->foreignExchange + $model->AccLost + $model->preferenceShare1 + $model->minorityInterest + $model->purchasePayable1 + $model->taxLiabilities;
$model->lossProfitFromOperations = $model->revenue + $model->otherOperatingIncome + $model->directOperatingExpenses + $model->administrationExpenses + $model->otherOperatingExpenses;
$model->lossProfitbeforetaxation = $model->revenue + $model->otherOperatingIncome + $model->directOperatingExpenses + $model->administrationExpenses + $model->otherOperatingExpenses + $model->financeCost + $model->sharedOfLossprofit;
$model->lossProfitaftertaxation = $model->revenue + $model->otherOperatingIncome + $model->directOperatingExpenses + $model->administrationExpenses + $model->otherOperatingExpenses + $model->financeCost + $model->sharedOfLossprofit + $model->taxationFinance;
$model->netlossProfitforthefinancialyear = $model->revenue + $model->otherOperatingIncome + $model->directOperatingExpenses + $model->administrationExpenses + $model->otherOperatingExpenses + $model->financeCost + $model->sharedOfLossprofit + $model->taxationFinance + $model->minoritySharedholder;
if ($model->otherPayable + $model->amountOwnSubsidy + $model->amountOwnDirect + $model->purchasePayable + $model->bankOverdraft + $model->taxation > 0) {
$model->currentRatio = ($model->tradeReceivable + $model->otherReceivable + $model->amountSubsidy + $model->amountAssociated + $model->fixedDeposit + $model->cash_bank) / ($model->otherPayable + $model->amountOwnSubsidy + $model->amountOwnDirect + $model->purchasePayable + $model->bankOverdraft + $model->taxation);
}
if ($model->otherPayable + $model->amountOwnSubsidy + $model->amountOwnDirect + $model->purchasePayable + $model->bankOverdraft + $model->taxation > 0) {
$model->quickRatio = ($model->tradeReceivable + $model->otherReceivable + $model->amountSubsidy + $model->amountAssociated + $model->fixedDeposit + $model->cash_bank - 0 - 0) / ($model->otherPayable + $model->amountOwnSubsidy + $model->amountOwnDirect + $model->purchasePayable + $model->bankOverdraft + $model->taxation);
}
if (($model->shareCapital + $model->sharePremium + $model->preferenceShare + $model->foreignExchange + $model->AccLost) * 100 > 0) {
$model->debtToEquity = ($model->otherPayable + $model->amountOwnSubsidy + $model->amountOwnDirect + $model->purchasePayable + $model->bankOverdraft + $model->taxation + ($model->purchasePayable1 + $model->taxLiabilities)) / ($model->shareCapital + $model->sharePremium + $model->preferenceShare + $model->foreignExchange + $model->AccLost) * 100;
}
if ($model->pro_1 + $model->intangible_1 + $model->development_1 + $model->invest_sub_1 + $model->invest_aso_1 + $model->other_1 + ($model->tradeReceivable + $model->otherReceivable + $model->amountSubsidy + $model->amountAssociated + $model->fixedDeposit + $model->cash_bank) > 0) {
$model->debtTototalassets = ($model->otherPayable + $model->amountOwnSubsidy + $model->amountOwnDirect + $model->purchasePayable + $model->bankOverdraft + $model->taxation + ($model->purchasePayable1 + $model->taxLiabilities)) / ($model->pro_1 + $model->intangible_1 + $model->development_1 + $model->invest_sub_1 + $model->invest_aso_1 + $model->other_1 + ($model->tradeReceivable + $model->otherReceivable + $model->amountSubsidy + $model->amountAssociated + $model->fixedDeposit + $model->cash_bank));
}
if ($model->shareCapital + $model->sharePremium + $model->preferenceShare + $model->foreignExchange + $model->AccLost + $model->preferenceShare1 + $model->minorityInterest > 0) {
$model->totalCapitalisation = ($model->purchasePayable1 + $model->taxLiabilities) / ($model->shareCapital + $model->sharePremium + $model->preferenceShare + $model->foreignExchange + $model->AccLost + $model->preferenceShare1 + $model->minorityInterest);
}
if ($model->financeCost > 0 || $model->financeCost < 0) {
$model->interestCoverage = ($model->revenue + $model->otherOperatingIncome + $model->directOperatingExpenses + $model->administrationExpenses + $model->otherOperatingExpenses + $model->financeCost + $model->sharedOfLossprofit) / $model->financeCost;
}
if ($model->revenue + $model->otherOperatingIncome > 0) {
$model->grossProfitmargin = ($model->revenue + $model->otherOperatingIncome + $model->directOperatingExpenses + $model->administrationExpenses + $model->otherOperatingExpenses) / ($model->revenue + $model->otherOperatingIncome);
}
if ($model->revenue + $model->otherOperatingIncome > 0) {
$model->netProfitMargin = ($model->revenue + $model->otherOperatingIncome + $model->directOperatingExpenses + $model->administrationExpenses + $model->otherOperatingExpenses + $model->financeCost + $model->sharedOfLossprofit + $model->taxationFinance) / ($model->revenue + $model->otherOperatingIncome);
}
if ($model->revenue > 0) {
$model->grossOperatingmargin = ($model->revenue + $model->otherOperatingIncome + $model->directOperatingExpenses + $model->administrationExpenses + $model->otherOperatingExpenses) / $model->revenue;
}
if ($model->revenue > 0) {
$model->netOperatingmargin = ($model->revenue + $model->otherOperatingIncome + $model->directOperatingExpenses + $model->administrationExpenses + $model->otherOperatingExpenses + $model->financeCost + $model->sharedOfLossprofit + $model->financeCost) / $model->revenue;
}
if ($model->shareCapital + $model->sharePremium + $model->preferenceShare + $model->foreignExchange + $model->AccLost > 0) {
$model->returnOnequity = ($model->revenue + $model->otherOperatingIncome + $model->directOperatingExpenses + $model->administrationExpenses + $model->otherOperatingExpenses + $model->financeCost + $model->sharedOfLossprofit + $model->taxationFinance) / ($model->shareCapital + $model->sharePremium + $model->preferenceShare + $model->foreignExchange + $model->AccLost);
}
if ($model->pro_1 + $model->intangible_1 + $model->development_1 + $model->invest_sub_1 + $model->invest_aso_1 + $model->other_1 + ($model->tradeReceivable + $model->otherReceivable + $model->amountSubsidy + $model->amountAssociated + $model->fixedDeposit + $model->cash_bank) > 0) {
$model->returnOnassets = ($model->revenue + $model->otherOperatingIncome + $model->directOperatingExpenses + $model->administrationExpenses + $model->otherOperatingExpenses + $model->financeCost + $model->sharedOfLossprofit + $model->financeCost) / ($model->pro_1 + $model->intangible_1 + $model->development_1 + $model->invest_sub_1 + $model->invest_aso_1 + $model->other_1 + ($model->tradeReceivable + $model->otherReceivable + $model->amountSubsidy + $model->amountAssociated + $model->fixedDeposit + $model->cash_bank));
}
if ($model->shareCapital + $model->sharePremium + $model->preferenceShare + $model->foreignExchange + $model->AccLost + $model->preferenceShare1 + $model->minorityInterest + ($model->purchasePayable1 + $model->taxLiabilities) > 0) {
$model->returnOncapitalemployed = ($model->revenue + $model->otherOperatingIncome + $model->directOperatingExpenses + $model->administrationExpenses + $model->otherOperatingExpenses) / ($model->shareCapital + $model->sharePremium + $model->preferenceShare + $model->foreignExchange + $model->AccLost + $model->preferenceShare1 + $model->minorityInterest + ($model->purchasePayable1 + $model->taxLiabilities));
}
if ($model->shareCapital + $model->sharePremium + $model->preferenceShare + $model->foreignExchange + $model->AccLost + $model->preferenceShare1 + $model->minorityInterest > 0) {
$model->earningPershare = ($model->revenue + $model->otherOperatingIncome + $model->directOperatingExpenses + $model->administrationExpenses + $model->otherOperatingExpenses + $model->financeCost + $model->sharedOfLossprofit) / ($model->shareCapital + $model->sharePremium + $model->preferenceShare + $model->foreignExchange + $model->AccLost + $model->preferenceShare1 + $model->minorityInterest);
}
if ($model->pro_1 + $model->intangible_1 + $model->development_1 + $model->invest_sub_1 + $model->invest_aso_1 + $model->other_1 + ($model->tradeReceivable + $model->otherReceivable + $model->amountSubsidy + $model->amountAssociated + $model->fixedDeposit + $model->cash_bank) > 0) {
$model->totalAssetturnover = $model->revenue / ($model->pro_1 + $model->intangible_1 + $model->development_1 + $model->invest_sub_1 + $model->invest_aso_1 + $model->other_1 + ($model->tradeReceivable + $model->otherReceivable + $model->amountSubsidy + $model->amountAssociated + $model->fixedDeposit + $model->cash_bank));
}
if ($model->pro_1 + $model->intangible_1 + $model->development_1 + $model->invest_sub_1 + $model->invest_aso_1 + $model->other_1 > 0) {
$model->fixedAssetsturnover = $model->revenue / ($model->pro_1 + $model->intangible_1 + $model->development_1 + $model->invest_sub_1 + $model->invest_aso_1 + $model->other_1);
}
if ($model->shareCapital + $model->sharePremium + $model->preferenceShare + $model->foreignExchange + $model->AccLost + $model->preferenceShare1 + $model->minorityInterest > 0) {
$model->gearingRatiodebt = ($model->otherPayable + $model->amountOwnSubsidy + $model->amountOwnDirect + $model->purchasePayable + $model->bankOverdraft + $model->taxation + ($model->purchasePayable1 + $model->taxLiabilities)) / ($model->shareCapital + $model->sharePremium + $model->preferenceShare + $model->foreignExchange + $model->AccLost + $model->preferenceShare1 + $model->minorityInterest);
}
if ($model->otherPayable + $model->amountOwnSubsidy + $model->amountOwnDirect + $model->purchasePayable + $model->bankOverdraft + $model->taxation + ($model->purchasePayable1 + $model->taxLiabilities) + ($model->shareCapital + $model->sharePremium + $model->preferenceShare + $model->foreignExchange + $model->AccLost + $model->preferenceShare1 + $model->minorityInterest) > 0) {
$model->gearingRatiofinance = ($model->otherPayable + $model->amountOwnSubsidy + $model->amountOwnDirect + $model->purchasePayable + $model->bankOverdraft + $model->taxation + ($model->purchasePayable1 + $model->taxLiabilities)) / ($model->otherPayable + $model->amountOwnSubsidy + $model->amountOwnDirect + $model->purchasePayable + $model->bankOverdraft + $model->taxation + ($model->purchasePayable1 + $model->taxLiabilities) + ($model->shareCapital + $model->sharePremium + $model->preferenceShare + $model->foreignExchange + $model->AccLost + $model->preferenceShare1 + $model->minorityInterest));
}
if ($model->financeCost > 0 || $model->financeCost < 0) {
$model->interestCover = ($model->revenue + $model->otherOperatingIncome + $model->directOperatingExpenses + $model->administrationExpenses + $model->otherOperatingExpenses) / -$model->financeCost;
}
if ($model->save()) {
$this->redirect(array('select_general'));
}
}
$this->render('select_general', array('model' => $model));
}