/** * @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(); } }
/** * @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); }