Пример #1
0
 /**
  * @param \Generated\Shared\Transfer\InvoiceTransfer $invoiceTransfer
  * @throws \Propel\Runtime\Exception\PropelException
  *
  * @return void
  */
 protected function writeInvoiceItems(InvoiceTransfer $invoiceTransfer)
 {
     foreach ($invoiceTransfer->getItems() as $invoiceItemTransfer) {
         $invoiceItem = $this->queryContainer->createInvoiceItemEntity();
         $invoiceItem->fromArray($invoiceItemTransfer->toArray());
         $invoiceItem->setFkInvoice($invoiceTransfer->getIdInvoice());
         $invoiceItem->save();
         $idInvoiceItem = $invoiceItem->getIdInvoiceItem();
         $invoiceItemTransfer->setIdInvoiceItem($idInvoiceItem);
     }
 }