コード例 #1
0
ファイル: Item.php プロジェクト: agitation/order-bundle
 public function fill($item)
 {
     parent::fill($item);
     $this->id = $item->getFullCode();
     $this->price = 0;
     $this->fillStatus($item);
     foreach ($item->getPrices()->getValues() as $price) {
         $this->price += $price->getAmount();
     }
 }
コード例 #2
0
ファイル: Payment.php プロジェクト: agitation/order-bundle
 public function fill($payment)
 {
     parent::fill($payment);
     $this->fillStatus($payment);
     $this->id = $payment->getFullCode();
     $this->price = $this->createObject("common.v1/Money");
     $this->price->set("amount", $payment->getAmount());
     $this->price->set("currency", $payment->getCurrency()->getId());
     $timezone = $this->settingService->getValueOf("agit.timezone");
     $created = clone $payment->getCreated();
     $created->setTimezone(new DateTimeZone($timezone));
     $this->created = $this->createObject("common.v1/DateTime", $created);
 }