소스 검색

[Backend] Distribution > création commande : coche Tiller #1054

feature/souke
Guillaume Bourgeois 1 년 전
부모
커밋
c72ace9a26
1개의 변경된 파일7개의 추가작업 그리고 4개의 파일을 삭제
  1. +7
    -4
      common/logic/Order/Order/Repository/OrderRepository.php

+ 7
- 4
common/logic/Order/Order/Repository/OrderRepository.php 파일 보기

@@ -2,6 +2,7 @@

namespace common\logic\Order\Order\Repository;

use common\helpers\MeanPayment;
use common\logic\AbstractRepository;
use common\logic\Distribution\Distribution\Model\Distribution;
use common\logic\Distribution\ProductDistribution\Repository\ProductDistributionRepository;
@@ -313,11 +314,13 @@ class OrderRepository extends AbstractRepository
$creditFunctioning = $this->producerRepository->getPointSaleCreditFunctioning($pointSale);

if ($order->id_user && $this->producerRepository->getConfig('credit') && $pointSale->credit) {
if ($creditFunctioning == Producer::CREDIT_FUNCTIONING_OPTIONAL) {
return 0;
} elseif ($creditFunctioning == Producer::CREDIT_FUNCTIONING_MANDATORY) {
if($order->mean_payment == MeanPayment::CREDIT || $creditFunctioning == Producer::CREDIT_FUNCTIONING_MANDATORY) {
return 1;
} elseif ($creditFunctioning == Producer::CREDIT_FUNCTIONING_USER) {
}
elseif ($creditFunctioning == Producer::CREDIT_FUNCTIONING_OPTIONAL) {
return 0;
}
elseif ($creditFunctioning == Producer::CREDIT_FUNCTIONING_USER) {
$userProducer = UserProducer::searchOne([
'id_user' => $order->id_user,
'id_producer' => $distribution->id_producer

Loading…
취소
저장