public function actionStage() { $form = new AccountRecordForm(); $account = new Account(); $inAccounts = $account->findFormListArray(['type_id' => 2]); $outAccounts = $account->findFormListArray(['type_id' => 2]); if (Yii::$app->request->isPost && $form->load(Yii::$app->request->post())) { $feeId = $this->insertFeeRecord($form, FEE); return $this->insertCreditRecord($form, $feeId, 'o', $feeId); } return $this->render('insterStage', ['model' => $form, 'inAccounts' => $inAccounts, 'outAccounts' => $outAccounts, 'type' => '信用卡分期']); }
public function actionInsert($io_type = 0) { $form = new AccountRecordForm(); $account = new Account(); $inAccounts = $account->findFormListArray(['type_id' => 1], -1); $outAccounts = $account->findFormListArray(['type_id' => 1]); if (Yii::$app->request->isPost && $form->load(Yii::$app->request->post())) { return $this->insertRecord($form, $form->io_type); } $form->io_type = $io_type; $typeName = $this->findTypeName($io_type); return $this->render('inserttest', ['model' => $form, 'inAccounts' => $inAccounts, 'outAccounts' => $outAccounts, 'typeName' => $typeName]); }
public function actionRefundout() { $form = new AccountRecordForm(); $person = new Person(); $account = new Account(); $lendRecord = new LendRecord(); $persons = $person->findLendArray(); $me = $account->findFormListArray(['type_id' => 1]); $records = $lendRecord->findLendInfo(key($persons), 2); if (Yii::$app->request->isPost && $form->load(Yii::$app->request->post())) { $id = $this->insertRecord($form, REFUNDOUT); $refundRecord = new RefundRecord(); $errors = $refundRecord->insertRecord($form, $id, REFUNDOUT); } return $this->render('refundout', ['model' => $form, 'persons' => $persons, 'me' => $me, 'type' => '还出', 'records' => $records]); }
public function actionMonthConsume() { $form = new MonthSearchForm(); $years = DateUtil::getYears(); $monthes = DateUtil::getMonthes(); $query = new Account(); $accounts = $query->findFormListArray(['type_id' => 5], -1, '总消费'); if (Yii::$app->request->isPost) { $form->load(Yii::$app->request->post()); $rel['consume'] = $query->findMonthConsumeInfo($form); $ym = $form['ym']; } else { $rel['consume'] = $query->findMonthConsumeInfo(); $ym = DateUtil::getCurrentMonth('ch'); } return $this->render('month/consumeDetail', ['model' => $form, 'years' => $years, 'monthes' => $monthes, 'accounts' => $accounts, 'rel' => $rel, 'ym' => $ym]); }