Przeglądaj źródła

Divers mineurs

develop
Guillaume Bourgeois 11 miesięcy temu
rodzic
commit
4025a5b89a
2 zmienionych plików z 17 dodań i 1 usunięć
  1. +12
    -0
      Repository/Config/TaxRateStore.php
  2. +5
    -1
      Solver/Address/AddressSolver.php

+ 12
- 0
Repository/Config/TaxRateStore.php Wyświetl plik

@@ -48,4 +48,16 @@ class TaxRateStore extends AbstractStore

return $taxRatesList;
}

public function getAsFormChoices($query = null): array
{
$taxRateArray = $this->createDefaultQuery($query)->find();
$taxRateChoices = [];

foreach($taxRateArray as $taxRate) {
$taxRateChoices[$taxRate->getTitle()] = $taxRate->getId();
}

return $taxRateChoices;
}
}

+ 5
- 1
Solver/Address/AddressSolver.php Wyświetl plik

@@ -13,8 +13,12 @@ class AddressSolver
return $address->getAddress() . ' - ' . $address->getZip() . ' ' . $address->getCity();
}

public function getSummary(AddressInterface $address, $withTitle = true): string
public function getSummary(AddressInterface $address = null, $withTitle = true): string
{
if(is_null($address)) {
return 'Adresse non définie';
}

$html = '';

if ($address->getTitle() && $withTitle) {

Ładowanie…
Anuluj
Zapisz