Skip to content

Commit

Permalink
Merge pull request #5887 from shinya/feature/display-postalcode
Browse files Browse the repository at this point in the history
納品書への郵便番号出力対応
  • Loading branch information
chihiro-adachi authored Dec 7, 2022
2 parents 6021864 + 0f82acb commit 17998d6
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/Eccube/Service/OrderPdfService.php
Original file line number Diff line number Diff line change
Expand Up @@ -299,11 +299,15 @@ protected function renderShopData()
$this->setBasePosition();

// ショップ名
$this->lfText(125, 60, $this->baseInfoRepository->getShopName(), 8, 'B');
$this->lfText(125, 58, $this->baseInfoRepository->getShopName(), 8, 'B');

//郵便番号
$this->lfText(121, 63, "\u{3012}". ' ' . mb_substr($this->baseInfoRepository->getPostalCode(), 0, 3) . ' - ' . mb_substr($this->baseInfoRepository->getPostalCode(), 3, 4), 8);


// 都道府県+所在地
$text = $this->baseInfoRepository->getPref().$this->baseInfoRepository->getAddr01();
$this->lfText(125, 65, $text, 8);
$this->lfText(125, 66, $text, 8);
$this->lfText(125, 69, $this->baseInfoRepository->getAddr02(), 8);

// 電話番号
Expand Down Expand Up @@ -416,6 +420,10 @@ protected function renderOrderData(Shipping $Shipping)

$Order = $Shipping->getOrder();

// 購入者郵便番号(3012は郵便マークのUTFコード)
$text = "\u{3012}" . ' ' . mb_substr($Shipping->getPostalCode(), 0, 3) . ' - ' . mb_substr($Shipping->getPostalCode(), 3, 4);
$this->lfText(22, 43, $text, 10);

// 購入者都道府県+住所1
// $text = $Order->getPref().$Order->getAddr01();
$text = $Shipping->getPref().$Shipping->getAddr01();
Expand Down

0 comments on commit 17998d6

Please sign in to comment.