Пример #1
0
 /**
  * Deletes an existing Saleorderinvoice model.
  * If deletion is successful, the browser will be redirected to the 'index' page.
  * @param integer $id
  * @return mixed
  */
 public function actionDelete($id)
 {
     if ($this->findModel($id)->delete()) {
         $deldetail = \backend\models\Saleorderinvoiceline::deleteAll('invid = :invid', [':invid' => $id]);
         $deldetail2 = \backend\models\Invoicerefsale::deleteAll('invid = :invid', [':invid' => $id]);
         if ($deldetail) {
             return $this->redirect(['index']);
         }
         return $this->redirect(['index']);
     }
 }