basic/_protected/controllers/FileInfoController.php
/**
     * Displays a single FileInfo model.
     * @param integer $id
     * @return mixed
     * @throws NotFoundHttpException if the model cannot be found
     */
Displays a single FileInfo model.
@param integer $id
@return mixed
@throws NotFoundHttpException if the model cannot be found
Displays a single FileInfo model . @param integer $id @return mixed @throws NotFoundHttpException if the model cannot be found
public function actionView($id)
    {
        $model = new FileInfo();
        $allDebet = Document::find()->where(['file_id' => $id])->sum('detail_debet');
        $allKredit = Document::find()->where(['file_id' => $id])->sum('detail_kredit');
        $lastInserted = FileInfo::find()->where(['id' => $id])->one();
        $getCompanyINN = Company::find()->where(['inn' => $lastInserted->company_inn])->one();
        $getAfterDeposit = $lastInserted->depozitAfter;
        $getBeforeDeposit = AccountNumber::find()->where(['account_number' => $lastInserted->company_account])->one();
        $get_company_name = $getCompanyINN->name;
        $company = Company::find()->where(['id' => $id])->one();
        $document = Document::find()->where(['file_id' => $id])->all();
        $doc = Document::find()->one();
        return $this->render('view', [
            'model' => $this->findModel($id),
            'company' => $company,
            'get_company_name' => $get_company_name,
            'document' => $document,
            'debet' => $debet,
            'allDebet' => $allDebet,
            'allKredit' => $allKredit,
            'getBeforeDeposit' => $getBeforeDeposit,
        ]);
    }
public function actionView ( $ id ) { $ model = new FileInfo ( ) ; $ allDebet = Document :: find ( ) -> where ( [ 'file_id' => $ id ] ) -> sum ( 'detail_debet' ) ; $ allKredit = Document :: find ( ) -> where ( [ 'file_id' => $ id ] ) -> sum ( 'detail_kredit' ) ; $ lastInserted = FileInfo :: find ( ) -> where ( [ 'id' => $ id ] ) -> one ( ) ; $ getCompanyINN = Company :: find ( ) -> where ( [ 'inn' => $ lastInserted -> company_inn ] ) -> one ( ) ; $ getAfterDeposit = $ lastInserted -> depozitAfter ; $ getBeforeDeposit = AccountNumber :: find ( ) -> where ( [ 'account_number' => $ lastInserted -> company_account ] ) -> one ( ) ; $ get_company_name = $ getCompanyINN -> name ; $ company = Company :: find ( ) -> where ( [ 'id' => $ id ] ) -> one ( ) ; $ document = Document :: find ( ) -> where ( [ 'file_id' => $ id ] ) -> all ( ) ; $ doc = Document :: find ( ) -> one ( ) ; return $ this -> render ( 'view' , [ 'model' => $ this -> findModel ( $ id ) , 'company' => $ company , 'get_company_name' => $ get_company_name , 'document' => $ document , 'debet' => $ debet , 'allDebet' => $ allDebet , 'allKredit' => $ allKredit , 'getBeforeDeposit' => $ getBeforeDeposit , ] ) ; }
Displays a single FileInfo model.
Displays a single FileInfo model .
//        $model->depozitBefore = $getBeforeDeposit->stock; //        $model->save(false); //        begin Hujjat ichini ko`rish uchun //             $debet = $doc->sum('detail_debet'); //        $cost = $silka->sum('click'); //        end Hujjat ichini ko`rish uchun // 'getAfterDeposit' => $getAfterDeposit,