Bläddra i källkod

Merge tag 'hotfix_1250' into develop

hotfix_1250
feature/souke
Guillaume Bourgeois 1 år sedan
förälder
incheckning
5df1672f63
3 ändrade filer med 7 tillägg och 6 borttagningar
  1. +5
    -4
      backend/controllers/UserController.php
  2. +1
    -1
      common/logic/Payment/Model/CreditHistorySearch.php
  3. +1
    -1
      common/logic/User/UserProducer/Service/UserProducerBuilder.php

+ 5
- 4
backend/controllers/UserController.php Visa fil

@@ -390,8 +390,9 @@ class UserController extends BackendController
*/
public function actionCredit(int $id)
{
$user = User::find()->with('userProducer')->where(['id' => $id])->one();
$userProducer = UserProducer::findOne(['id_user' => $id, 'id_producer' => GlobalParam::getCurrentProducerId()]);
$userManager = $this->getUserManager();
$user = $userManager->findOneUserById($id);
$userProducer = UserProducer::findOne(['id_user' => $id, 'id_producer' => $this->getProducerCurrent()->id]);

if (($userProducer) || $this->isUserCurrentAdmin()) {

@@ -401,14 +402,14 @@ class UserController extends BackendController
$creditForm->save();

$creditForm = new CreditForm;
$user = $userManager->findOneUserById($id);
}

$history = Payment::find()
->with(['order', 'userAction'])
->where([
'id_user' => $user->id,
'id_producer' => GlobalParam::getCurrentProducerId(),
'mean_payment' => MeanPayment::CREDIT
'id_producer' => $this->getProducerCurrent()->id,
])
->orderBy('date DESC')
->all();

+ 1
- 1
common/logic/Payment/Model/CreditHistorySearch.php Visa fil

@@ -66,7 +66,7 @@ class CreditHistorySearch extends Payment
->innerJoinWith($optionsSearch['join_with'], true)
->where([
'payment.id_producer' => GlobalParam::getCurrentProducerId(),
'payment.mean_payment' => MeanPayment::CREDIT
//'payment.mean_payment' => MeanPayment::CREDIT
])
->orderBy('id DESC')
;

+ 1
- 1
common/logic/User/UserProducer/Service/UserProducerBuilder.php Visa fil

@@ -64,7 +64,7 @@ class UserProducerBuilder extends AbstractBuilder

public function updateCredit(Payment $payment): void
{
if($this->paymentSolver->isMeanPaymentCredit($payment) && $payment->user) {
if($payment->user) {
$userProducer = $this->userProducerRepository->findOneUserProducer($payment->user);

if ($userProducer) {

Laddar…
Avbryt
Spara