public function actionAdmin()
 {
     $model = new Payment('search');
     $model->unsetAttributes();
     if (isset($_GET['Payment'])) {
         $model->setAttributes($_GET['Payment']);
     }
     $this->render('admin', array('model' => $model));
 }
Beispiel #2
0
 /**
  * Manages all models.
  */
 public function actionAdmin()
 {
     $model = new Payment();
     $model->unsetAttributes();
     // clear any default values
     if (isset($_GET['Payment'])) {
         $model->attributes = $_GET['Payment'];
     }
     $this->render('admin', array('model' => $model));
 }
 public function actionIndex()
 {
     $model = new Payment('search');
     $model->unsetAttributes();
     // clear any default values
     if (isset($_GET['Payment'])) {
         $model->attributes = $_GET['Payment'];
     }
     $this->render('index', ['model' => $model]);
 }
        public function actionCustomerdatewisepayments()
{
            $model = new Payment( 'search' );
            $model->unsetAttributes();  // clear any default values
            if ( isset( $_GET['Payment'] ) )
                $model->attributes = $_GET['Payment'];

            $this->render( 'customerdatewisepayments', array(
                'model' => $model,
            ) );
}
 public function actionView()
 {
     $model = new Payment('search');
     $model->unsetAttributes();
     if (Yii::app()->request->isAjaxRequest) {
         $params = Yii::app()->request->getParam('Payment');
         $model->setAttributes($params);
         Yii::app()->user->setState('PaymentFilterState', $params);
         $test = '=);';
     }
     $data = $model->getTotalData();
     $data = array('in' => array('sum' => empty($data) ? 0 : $data[0]['s'], 'count' => empty($data) ? 0 : $data[0]['ctn']), 'out' => array('sum' => empty($data) ? 0 : $data[1]['s'], 'count' => empty($data) ? 0 : $data[1]['ctn']));
     $this->render('admin', array('model' => $model, 'data' => $data, 'test' => $test));
 }
 public function renderPCTypeDashboard()
 {
     $ordertask =new Ordertask('search');
     $ordertask->unsetAttributes();  // clear any default values
     
     $milestone =new Milestone('search');
     $milestone->unsetAttributes();  // clear any default values
     
     $orderlistLookup = Yii::app()->controller->getOrdersLookup();
     if(!empty($orderlistLookup))
     {
         $tmp = array_keys($orderlistLookup);
         $ordertask->order_id = $tmp[0];
         $milestone->order_id = $tmp[0];
     }
     if(isset($_GET['Ordertask']))
         $ordertask->attributes=$_GET['Ordertask'];
     
     if(isset($_GET['Milestone']))
         $milestone->attributes=$_GET['Milestone'];
     
     $payinmodel =new Payment('search');
     $payinmodel->unsetAttributes();  // clear any default values
     if(isset($_GET['Payment']))
         $payinmodel->attributes=$_GET['Payment'];
     
     $totalAR = 0;
     $totalAP = 0;
     $totalCash = 0;
     $accountchart = $this->getAccountChart($totalAR, $totalAP, $totalCash);
     $mschart = $this->getMSTaskChart($milestone->order_id);
     $this->render( $this->getView('index','index'),
                     array(
                         'ordertask' => $ordertask,
                         'milestone'=>$milestone,
                         'orderlistLookup' => $orderlistLookup,
                         'accountchart' => $accountchart,
                         'mschart' => $mschart,
                         'payinmodel'=>$payinmodel,
                         'totalAR' => $totalAR,
                         'totalAP' => $totalAP,
                         'totalCash' => $totalCash,
                         )
                 );
 }
Beispiel #7
0
 /**
  * Lists all models.
  */
 public function actionIndex()
 {
     $model = new Payment('search');
     $model->unsetAttributes();
     // clear any default values
     if (Yii::app()->user->role == 'manager') {
         $model->findAll(array('condition' => 'manager_id = ' . Yii::app()->user->id));
     }
     if (isset($_GET['Payment'])) {
         $model->attributes = $_GET['Payment'];
         //print_r ( $model -> attributes );
     }
     $this->render('admin', array('model' => $model));
 }
 public function commonAdmint($partyrole)
 {
     $model = new Payment( 'search' );
     $model->unsetAttributes();  // clear any default values
     if ( isset( $_GET['Payment'] ) )
         $model->attributes = $_GET['Payment'];
     //$model->party_id = $partyrole;
     
     $this->render( 'admin', array(
         'model' => $model,
     ) );
 }