Przeglądaj źródła

Crédit : traductions

feature/export_comptable
Guillaume 4 lat temu
rodzic
commit
f51ecf03c8
3 zmienionych plików z 17 dodań i 3 usunięć
  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 Wyświetl plik

@@ -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 Wyświetl plik

@@ -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 Wyświetl plik

@@ -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) ;
}

Ładowanie…
Anuluj
Zapisz