-
Notifications
You must be signed in to change notification settings - Fork 652
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
受注編集の画面で、金額にエラーがあると、課税区分のカッコ内が表示されなくなる 不具合の修正 #5761
Conversation
@maianhtu010596 |
Codecov Report
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. @@ Coverage Diff @@
## 4.2 #5761 +/- ##
============================================
+ Coverage 82.54% 82.55% +0.01%
- Complexity 6422 6425 +3
============================================
Files 475 475
Lines 25849 25855 +6
============================================
+ Hits 21337 21345 +8
+ Misses 4512 4510 -2
Flags with carried forward coverage won't be shown. Click here to find out more.
|
@maianhtu010596 |
@chihiro-adachi @kiy0taka |
@@ -221,6 +221,12 @@ public function index(Request $request, RouterInterface $router, $id = null) | |||
|
|||
$form->handleRequest($request); | |||
$purchaseContext = new PurchaseContext($OriginOrder, $OriginOrder->getCustomer()); | |||
|
|||
foreach ($TargetOrder->getOrderItems() as $orderItem) { | |||
if($orderItem->getTaxDisplayType() == null){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shinya
if($orderItem->getTaxDisplayType() == null){
↓
if ($orderItem->getTaxDisplayType() == null) {
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
修正しました
) { | ||
$this->entityManager = $entityManager; | ||
$this->taxRuleRepository = $taxRuleRepository; | ||
$this->taxRuleService = $taxRuleService; | ||
$this->orderHelper = $orderHelper; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shinya
phpstanの指摘修正お願いします。
あと空白ずれてる?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ズレ直しておきました
@@ -77,7 +80,7 @@ public function process(ItemHolderInterface $itemHolder, PurchaseContext $contex | |||
$item->setTaxType($this->getTaxType($OrderItemType)); | |||
} | |||
if (!$item->getTaxDisplayType()) { | |||
$item->setTaxDisplayType($this->getTaxDisplayType($OrderItemType)); | |||
$item->setTaxDisplayType($this->orderHelper->getTaxDisplayType($OrderItemType)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shinya
phpstanの指摘修正お願いします。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
メンバ変数の宣言が漏れている、という指摘であってますでしょうか?
そちら反映いたしました(認識違いあればおっしゃってください。)
* | ||
* @param $OrderItemType | ||
* | ||
* @return TaxType |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TaxType -> TaxDisplayType
*/ | ||
protected function getTaxDisplayType($OrderItemType) | ||
{ | ||
if ($OrderItemType instanceof OrderItemType) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
処理内容はそのまま記述するのではなく、orderHelperに移譲してください。
return $this->orderHelper->getTaxDisplayType($OrderItemType)
* - ポイント値引き: 税込 | ||
* | ||
* @param $OrderItemType | ||
* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
deprecatedのアノテーションを追加お願いします。
以下のように記載いただければ。
@deprecated OrderHelper::getTaxDisplayTypeを使用してください
概要(Overview・Refs Issue)
以下のissueの対応です。
#5753 受注編集の画面で、金額にエラーがあると、課税区分のカッコ内が表示されなくなる
問題を修正した後の結果は次のようになります。
方針(Policy)
実装に関する補足(Appendix)
テスト(Test)
相談(Discussion)
マイナーバージョン互換性保持のための制限事項チェックリスト
レビュワー確認項目