/**
  * Lists all OrderStatus models.
  * @return mixed
  */
 public function actionIndex()
 {
     $dataProvider = new ActiveDataProvider(['query' => OrderStatus::find()]);
     return $this->render('index', ['dataProvider' => $dataProvider]);
 }
 /**
  * @inheritdoc
  */
 public function rules()
 {
     return [[['store_id', 'order_status_id', 'payment_status_id', 'shipping_method_id', 'payment_method_id'], 'default'], ['store_id', 'default', 'value' => Yii::$app->settings->get('orderDefaults.store_id')], ['order_status_id', 'default', 'value' => Yii::$app->settings->get('orderDefaults.order_status_id')], ['payment_status_id', 'default', 'value' => Yii::$app->settings->get('orderDefaults.payment_status_id')], ['shipping_method_id', 'default', 'value' => Yii::$app->settings->get('orderDefaults.shipping_method_id')], ['payment_method_id', 'default', 'value' => Yii::$app->settings->get('orderDefaults.PaymentMethod')], [['store_id', 'invoice_no'], 'required', 'on' => ['create', 'safeEdit']], ['store_id', 'in', 'range' => Store::find()->select('store_id')->asArray()->column()], ['payment_method_id', 'in', 'range' => PaymentMethod::find()->select('payment_method_id')->asArray()->column()], ['order_status_id', 'in', 'range' => OrderStatus::find()->select('order_status_id')->asArray()->column()], ['payment_status_id', 'in', 'range' => PaymentStatus::find()->select('payment_status_id')->asArray()->column()], ['shipping_method_id', 'in', 'range' => ShippingMethod::find()->select('shipping_method_id')->asArray()->column()], ['payment_method_id', 'in', 'range' => PaymentMethod::find()->select('payment_method_id')->asArray()->column()], [['order_status_id', 'create_by', 'status'], 'integer'], [['payment_text', 'shipping_text', 'comment'], 'string'], [['purchase_price', 'shipping_price', 'total_price', 'sale_price'], 'number'], [['create_time', 'update_time'], 'safe'], [['invoice_no'], 'string', 'max' => 128], [['shipping_tracking'], 'string', 'max' => 256], [['ip'], 'string', 'max' => 40], [['user_agent'], 'string', 'max' => 255]];
 }