_getDataObj()->getData('vendorId'))) { $options['vendorAutocompleteTitle'] = VendorAutocompleteAdminObj::getAutocompleteItemTitle($vendorId); } } return $options; } protected function _getEditForm(array $options = []) { $form = parent::_getEditForm($options); $this->injectPaymentInformation($form); return $form; } protected function injectPaymentInformation(Qs_Form $form) { if (!$this->_getDataObj()->getData('transactionId')) { return $this; } /** @var Qs_Form_Decorator_DtDdWrapper $dtDdWrapper */ $dtDdWrapper = $form->getDisplayGroup('submitGroup')->getDecorator('DtDdWrapper'); $dtDdWrapper->setHtmlBeforeElement( Html::renderContainer('dt', 'Payment Information', ['class' => 'form_header']) . Html::renderContainer('dd', $this->renderPaymentInfo()) ); return $this; } protected function _initFromForm(Qs_Form $form) { $data = $form->getValues(); $this->_getDataObj()->initFromForm($data); return $this; } private function renderPaymentInfo() { $item = $this->_getDataObj()->getData(); $item['receiptUrl'] = PdfView::getReceiptUrl($item['id']); $item['tpl'] = 'Payment/transaction-info.tpl'; return $this->_doc->fetchItem($item); } protected function _postInsert() { LibraryMail::sendLibraryUpdatedToUser(LibraryObj::RECORD_TYPE_TAXATION_INVOICE, $this->_getDataObj()->getPrimaryKey()); return parent::_postInsert(); } }