Browse Source

Crédit : traductions

feature/export_comptable
Guillaume 4 years ago
parent
commit
f51ecf03c8
3 changed files with 17 additions and 3 deletions
  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 View File

} }
} }


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

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

+ 5
- 0
ShopBundle/Resources/translations/lcshop.fr.yaml View File

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

+ 7
- 3
ShopBundle/Services/CreditUtils.php View File

return $userMerchant ; 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) ; $userMerchant = $this->getUserMerchant($user, $merchant) ;
if(!$userMerchant) { if(!$userMerchant) {
$userMerchant = $this->createUserMerchant($user, $merchant) ; $userMerchant = $this->createUserMerchant($user, $merchant) ;
return $userMerchant ; return $userMerchant ;
} }


public function activeCredit($user, $merchant = null)
public function activeCredit($user = null, $merchant = null)
{ {
return $this->updateCreditActive($user, $merchant, true) ; 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) ; return $this->updateCreditActive($user, $merchant, false) ;
} }

Loading…
Cancel
Save