コード例 #1
0
ファイル: PISignaturePage.php プロジェクト: phpsmith/IS4C
 private function stockLookup()
 {
     $equity = new EquityLiveBalanceModel($this->connection);
     $equity->whichDB($this->config->get('TRANS_DB'));
     $equity->memnum($this->id);
     if ($equity->load()) {
         return array($equity->payments(), $equity->startdate());
     } else {
         return array(0, date('Y-m-d'));
     }
 }
コード例 #2
0
 function recreate_views($con)
 {
     $db_name = $this->config->get('TRANS_DB');
     $con->query("DROP VIEW ar_history_today", $db_name);
     $model = new ArHistoryTodayModel($con);
     $model->createIfNeeded($db_name);
     $con->query("DROP VIEW ar_history_today_sum", $db_name);
     $model = new ArHistoryTodaySumModel($con);
     $model->createIfNeeded($db_name);
     $con->query("DROP VIEW ar_live_balance", $db_name);
     $model = new ArLiveBalanceModel($con);
     $model->addExtraDB($this->config->get('OP_DB'));
     $model->createIfNeeded($db_name);
     $con->query("DROP VIEW stockSumToday", $db_name);
     $model = new StockSumTodayModel($con);
     $model->createIfNeeded($db_name);
     $con->query("DROP VIEW equity_live_balance", $db_name);
     $model = new EquityLiveBalanceModel($con);
     $model->addExtraDB($this->config->get('OP_DB'));
     $model->createIfNeeded($db_name);
 }