소스 검색

Crédit : traductions

feature/export_comptable
Guillaume 4 년 전
부모
커밋
f51ecf03c8
3개의 변경된 파일17개의 추가작업 그리고 3개의 파일을 삭제
  1. +5
    -0
      ShopBundle/Model/CreditHistory.php
  2. +5
    -0
      ShopBundle/Resources/translations/lcshop.fr.yaml
  3. +7
    -3
      ShopBundle/Services/CreditUtils.php

+ 5
- 0
ShopBundle/Model/CreditHistory.php 파일 보기

@@ -82,6 +82,11 @@ abstract class CreditHistory extends AbstractEntity implements PayoffInterface
}
}

public function getMeanPaymentInheritedLabel(): string
{
return 'field.default.meanPaymentOptions.'.$this->getMeanPaymentInherited() ;
}

public function getType(): ?string
{
return $this->type;

+ 5
- 0
ShopBundle/Resources/translations/lcshop.fr.yaml 파일 보기

@@ -178,6 +178,11 @@ field:
deliveryTypeOptions:
point-sale: En ambassade
home: À domicile
meanPaymentOptions:
cheque: Chèque
cash: Espèce
transfer: Virement
credit: Compte prépayé
PointSale:
code: Code
codeHelp: Code utilisé pour retrouver l'ambassade dans le tunnel de commande (Non sensible à la casse)

+ 7
- 3
ShopBundle/Services/CreditUtils.php 파일 보기

@@ -58,8 +58,12 @@ class CreditUtils
return $userMerchant ;
}

public function updateCreditActive($user, $merchant = null, $creditActive = true)
public function updateCreditActive($user = null, $merchant = null, $creditActive = true)
{
if(!$user) {
$user = $this->security->getUser() ;
}

$userMerchant = $this->getUserMerchant($user, $merchant) ;
if(!$userMerchant) {
$userMerchant = $this->createUserMerchant($user, $merchant) ;
@@ -73,12 +77,12 @@ class CreditUtils
return $userMerchant ;
}

public function activeCredit($user, $merchant = null)
public function activeCredit($user = null, $merchant = null)
{
return $this->updateCreditActive($user, $merchant, true) ;
}

public function unactiveCredit($user, $merchant = null)
public function unactiveCredit($user = null, $merchant = null)
{
return $this->updateCreditActive($user, $merchant, false) ;
}

Loading…
취소
저장