add discount to product sell js

This commit is contained in:
2015-10-21 07:46:15 +02:00
parent f2e30779f0
commit 4e04425403
9 changed files with 63 additions and 10 deletions

View File

@@ -65,7 +65,7 @@ class DiscountController extends Controller
$model->status = Discount::STATUS_ACTIVE;
if ($model->load(Yii::$app->request->post()) && $model->save()) {
return $this->redirect(['view', 'id' => $model->id_warehouse]);
return $this->redirect(['view', 'id' => $model->id_discount]);
} else {
return $this->render('create', [
'model' => $model,
@@ -84,7 +84,7 @@ class DiscountController extends Controller
$model = $this->findModel($id);
if ($model->load(Yii::$app->request->post()) && $model->save()) {
return $this->redirect(['view', 'id' => $model->id_warehouse]);
return $this->redirect(['view', 'id' => $model->id_discount]);
} else {
return $this->render('update', [
'model' => $model,