瀏覽代碼

Merge branch 'develop'

master
Guillaume Bourgeois 10 月之前
父節點
當前提交
52470fe820
共有 2 個檔案被更改,包括 17 行新增1 行删除
  1. +12
    -0
      Repository/Config/TaxRateStore.php
  2. +5
    -1
      Solver/Address/AddressSolver.php

+ 12
- 0
Repository/Config/TaxRateStore.php 查看文件

@@ -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 查看文件

@@ -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) {

Loading…
取消
儲存