Преглед на файлове

Correctifs formulaire de création de document (suite à la création GlobalParam) #166

dev
Guillaume Bourgeois преди 5 години
родител
ревизия
176b66b251
променени са 3 файла, в които са добавени 4 реда и са изтрити 3 реда
  1. +2
    -1
      backend/controllers/DocumentController.php
  2. +1
    -1
      backend/controllers/UserController.php
  3. +1
    -1
      common/models/InvoiceSearch.php

+ 2
- 1
backend/controllers/DocumentController.php Целия файл

@@ -39,6 +39,7 @@
namespace backend\controllers;

use common\models\User ;
use common\helpers\GlobalParam ;

class DocumentController extends BackendController
{
@@ -72,7 +73,7 @@ class DocumentController extends BackendController

if ($model->load(Yii::$app->request->post())) {
$model->id_producer = Producer::getId() ;
$model->id_producer = GlobalParam::getCurrentProducerId() ;
$model->reference = $model->generateReference() ;
if($model->save()) {

+ 1
- 1
backend/controllers/UserController.php Целия файл

@@ -229,7 +229,7 @@ class UserController extends BackendController
$model->setPassword($password);
$model->save() ;
$producer = Producer::getCurrent();
$producer = GlobalParam::getCurrentProducer() ;
Yii::$app->mailer->compose();
$mail = Yii::$app->mailer->compose(
['html' => 'newPasswordUserAdmin-html', 'text' => 'newPasswordUserAdmin-text'], ['user' => $model, 'producer' => $producer, 'password' => $password]

+ 1
- 1
common/models/InvoiceSearch.php Целия файл

@@ -61,7 +61,7 @@ class InvoiceSearch extends Invoice
$query = Invoice::find()
->with($optionsSearch['with'])
->joinWith($optionsSearch['join_with'], true)
->where(['invoice.id_producer' => Producer::getId()])
->where(['invoice.id_producer' => GlobalParam::getCurrentProducerId()])
->orderBy('invoice.reference DESC')
;

Loading…
Отказ
Запис