/**
  * Updates an existing Saleorderinvoice model.
  * If update is successful, the browser will be redirected to the 'view' page.
  * @param integer $id
  * @return mixed
  */
 public function actionUpdateline()
 {
     if (\Yii::$app->request->isAjax) {
         $id = \Yii::$app->request->post('recid');
         $qty = \Yii::$app->request->post('qty');
         $model = \backend\models\Saleorderinvoiceline::findOne(['recid' => $id]);
         // $model->unitprice = $model->unitprice * $qty;
         $model->invoiceqty = $qty;
         $model->totalamount = $model->unitprice * $qty;
         if ($model->save()) {
             return "ok";
         } else {
             return "no";
         }
     }
 }