예제 #1
0
 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]);
 }
예제 #2
0
 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]);
 }
예제 #3
0
 public function actionTest()
 {
     $a = new Account();
     $test = $a->getMonSumTCMoneyQuery();
     $test = ArrayHelper::map($a->getReturnDays(), 'id', 'return_day');
     // return $this->render('test',['test'=>$test]);
     // echo DateUtil::getMonthBegin('2015-2');
     // echo '<br/>';
     // echo DateUtil::getMonthEnd('2015-2');
     // for ($y = 2000; $y<2005;$y++)
     // {
     //     for ($m = 1; $m<=12;$m++)
     //     {
     //         echo '<br/>';
     //         echo DateUtil::getCreditMonthBegin("$y-$m",'9');
     //         echo '<br/>';
     //         echo DateUtil::getCreditMonthEnd("$y-$m",'9');
     //     }
     //     echo '<br/>';
     // }
 }
예제 #4
0
 private function pageQuery()
 {
     return Account::find()->where(['ispro' => 0]);
 }
예제 #5
0
 public function actionTest()
 {
     $account = new Account();
     $inAccounts = $account->findAccountBalance();
     var_dump($inAccounts);
 }