_messageTemplates[self::MSG_DISPUTED] = 'Your dispute has been sent and is being processed.'; return parent::_init(); } public function exec() { $this->_getDataObj()->setFilter('vendorId', $this->_doc->getAuthData('vendorId')); if (($id = Qs_Request::getGetValue('id'))) { $this->_getDataObj()->setFilter('id', $id); } return parent::exec(); } protected function _addListItem() { $this->_initListRedirection(); $item = $this->_getListItem(); $this->_initListPageNumber($item); if (!empty($item['list'])) { $this->_addVendorInfo(); } $this->_addLinksItem(); $this->_addItem($item); return $this; } protected function _addVendorInfo() { $vendor = $this->_getDataObj()->getVendorModel()->get($this->_doc->getAuthData('vendorId')); $vendor['tpl'] = $this->getTemplate('vendor-info.tpl'); $this->_addItem($vendor); } protected function _doDisputeInvoice() { if (!($data = $this->_getDataObj()->getData())) { $this->_setBackMessage('Invalid Taxation Invoice ID'); $this->_doBack(); } $id = $this->_getDataObj()->getPrimaryKey(); $this->_getDataObj()->markInDispute($id); Mail::sendTaxationInDisputeToAdmin($id); $this->_setBackMessage(self::MSG_DISPUTED); $this->_doBack(); return $this; } }