add discount to product sell js
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user