Пример #1
0
 /**
  * @param \Generated\Shared\Transfer\InvoiceTransfer $invoiceTransfer
  * @throws \Propel\Runtime\Exception\PropelException
  *
  * @return void
  */
 protected function writeInvoiceTaxItems(InvoiceTransfer $invoiceTransfer)
 {
     foreach ($invoiceTransfer->getTaxes() as $tax) {
         $invoiceTax = $this->queryContainer->createInvoiceTaxEntity();
         $invoiceTax->fromArray($tax->toArray());
         $invoiceTax->setFkInvoice($invoiceTransfer->getIdInvoice());
         $invoiceTax->save();
     }
 }
Пример #2
0
 /**
  * @throws \Propel\Runtime\Exception\PropelException
  * @return array
  */
 public function getInvoiceTypes()
 {
     return $this->invoiceQueryContainer->queryInvoiceTypes()->select([PavInvoiceTypeTableMap::COL_ID_INVOICE_TYPE, PavInvoiceTypeTableMap::COL_TYPE_NAME])->find()->toKeyValue(PavInvoiceTypeTableMap::COL_ID_INVOICE_TYPE, PavInvoiceTypeTableMap::COL_TYPE_NAME);
 }