public function actionSaleInvoiceItem($sale_id, $employee_id)
 {
     if (Yii::app()->user->checkAccess('report.index')) {
         $model = new SaleItem('search');
         $model->unsetAttributes();
         // clear any default values
         $payment = new SalePayment('search');
         //$payment->unsetAttributes();
         //$employee=Employee::model()->findByPk((int)$employee_id);
         //$cashier=$employee->first_name . ' ' . $employee->last_name;
         if (isset($_GET['SaleItem'])) {
             $model->attributes = $_GET['SaleItem'];
         }
         if (Yii::app()->request->isAjaxRequest) {
             Yii::app()->clientScript->scriptMap['*.js'] = false;
             //Yii::app()->clientScript->scriptMap['*.css'] = false;
             if (isset($_GET['ajax']) && $_GET['ajax'] == 'sale-item-grid') {
                 $this->render('sale_item', array('model' => $model, 'payment' => $payment, 'sale_id' => $sale_id, 'employee_id' => $employee_id));
             } else {
                 echo CJSON::encode(array('status' => 'render', 'div' => $this->renderPartial('sale_item', array('model' => $model, 'payment' => $payment, 'sale_id' => $sale_id, 'employee_id' => $employee_id), true, true)));
                 Yii::app()->end();
             }
         } else {
             $this->render('sale_item', array('model' => $model));
         }
     } else {
         throw new CHttpException(403, 'You are not authorized to perform this action');
     }
 }