|
@@ -145,7 +145,7 @@ discard block |
|
|
block discarded – undo |
|
145
|
145
|
$app = $this->app; |
|
146
|
146
|
// XXX price を priceIncTax にセットし直す |
|
147
|
147
|
// ShipmentItem::getTotalPrice でもやっているので、どこか一箇所にまとめたい |
|
148
|
|
- $builder->addEventListener(FormEvents::POST_SUBMIT, function (FormEvent $event) use ($app) { |
|
|
148
|
+ $builder->addEventListener(FormEvents::POST_SUBMIT, function(FormEvent $event) use ($app) { |
|
149
|
149
|
/** @var \Eccube\Entity\ShipmentItem $ShipmentItem */ |
|
150
|
150
|
$ShipmentItem = $event->getData(); |
|
151
|
151
|
$TaxDisplayType = $ShipmentItem->getTaxDisplayType(); |
|
@@ -163,7 +163,7 @@ discard block |
|
|
block discarded – undo |
|
163
|
163
|
|
|
164
|
164
|
$event->setData($ShipmentItem); |
|
165
|
165
|
}); |
|
166
|
|
- $builder->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) use ($app) { |
|
|
166
|
+ $builder->addEventListener(FormEvents::PRE_SUBMIT, function(FormEvent $event) use ($app) { |
|
167
|
167
|
// モーダルからのPOST時に、金額等をセットする. |
|
168
|
168
|
if ('modal' === $app['request_stack']->getCurrentRequest()->get('modal')) { |
|
169
|
169
|
$data = $event->getData(); |
|
@@ -233,17 +233,13 @@ discard block |
|
|
block discarded – undo |
|
233
|
233
|
$data['product_name'] = $Product->getName(); |
|
234
|
234
|
$data['product_code'] = $ProductClass->getCode(); |
|
235
|
235
|
$data['class_name1'] = $ProductClass->hasClassCategory1() ? |
|
236
|
|
- $ProductClass->getClassCategory1()->getClassName() : |
|
237
|
|
- null; |
|
|
236
|
+ $ProductClass->getClassCategory1()->getClassName() : null; |
|
238
|
237
|
$data['class_name2'] = $ProductClass->hasClassCategory2() ? |
|
239
|
|
- $ProductClass->getClassCategory2()->getClassName() : |
|
240
|
|
- null; |
|
|
238
|
+ $ProductClass->getClassCategory2()->getClassName() : null; |
|
241
|
239
|
$data['class_category_name1'] = $ProductClass->hasClassCategory1() ? |
|
242
|
|
- $ProductClass->getClassCategory1()->getName() : |
|
243
|
|
- null; |
|
|
240
|
+ $ProductClass->getClassCategory1()->getName() : null; |
|
244
|
241
|
$data['class_category_name2'] = $ProductClass->hasClassCategory2() ? |
|
245
|
|
- $ProductClass->getClassCategory2()->getName() : |
|
246
|
|
- null; |
|
|
242
|
+ $ProductClass->getClassCategory2()->getName() : null; |
|
247
|
243
|
$data['price'] = $ProductClass->getPrice02(); |
|
248
|
244
|
$data['quantity'] = empty($data['quantity']) ? 1 : $data['quantity']; |
|
249
|
245
|
$data['tax_type'] = TaxType::TAXATION; |