'doList', 'cancel' => 'doBack', 'back' => 'doBack', ); function exec(&$Doc) { $this->Doc = &$Doc; $this->DBObj = SiteMap::getObj('Member/Invoice/Obj.php', isset($_REQUEST['id']) ? $_REQUEST['id'] : null); $data = $this->Doc->MemberAuth->getData(); if (null === $data) { $notFoundView = SiteMap::getObj('NotFound/NotFoundView.php'); $notFoundView->exec($this->Doc); return false; } $this->DBObj->setObjectData($data); $this->DBObj->setFilter(array('id_member' => $data['id'])); parent::exec(); } function _doListBind(&$DB_List) { $DB_List->def_order_by = 'date_due DESC'; $DB_List->insertColLast( 'date_sent', array( 'title' => 'Date Sent', 'order_by' => 'date_sent', 'tpl' => DB_LIST_CELL_DATE, 'params' => array('date_sent'), ) ); $DB_List->insertColLast( 'number', array( 'title' => 'Invoice #', 'order_by' => 'number', 'tpl' => DB_LIST_CELL_TEXT_CENTER, 'params' => array('number'), ) ); $DB_List->insertColLast( 'date_due', array( 'title' => 'Date Due', 'order_by' => 'date_due', 'tpl' => DB_LIST_CELL_DATE, 'params' => array('date_due'), ) ); $DB_List->insertColLast( 'overdue', array( 'title' => 'Overdue', 'order_by' => 'overdue', 'tpl' => SiteMap::getPath('Invoice/tpl/Admin/cells/overdue.tpl'), 'params' => array('overdue'), ) ); $DB_List->insertColLast( 'paid', array( 'title' => 'Payment Status', 'order_by' => 'paid', 'tpl' => SiteMap::getPath('Invoice/tpl/Admin/cells/paid.tpl'), 'params' => array('paid'), ) ); $DB_List->insertColLast( 'amount', array( 'title' => 'Amount', 'order_by' => 'amount', 'tpl' => DB_LIST_CELL_MONEY, 'params' => array('amount'), ) ); $DB_List->insertColLast( 'options', array( 'title' => 'Options', 'tpl' => SiteMap::getPath('Member/tpl/Invoice/cells/options.tpl'), 'params' => array('id'), ) ); $DB_List->bind(); return true; } function doList() { $this->_saveBackUrl(); require_once('class/DB/List/List.php'); $this->DBObj->addFilter(array('paid' => 'n')); $DB_List = new DB_List($this->Doc, $this->DBObj, $this->functionalFields); $DB_List->overrideIpp = 999999; $this->_doListBind($DB_List); $DB_List->tpl = SiteMap::getPath('Member/tpl/Invoice/current-list.tpl'); $DB_List->exec(); $DB_ListPast = new DB_List($this->Doc, $this->DBObj, $this->functionalFields); $this->_doListBind($DB_ListPast); $DB_ListPast->removeCol('overdue'); $this->DBObj->addFilter(array('paid' => 'y')); $DB_ListPast->tpl = SiteMap::getPath('Member/tpl/Invoice/past-list.tpl'); $DB_ListPast->exec(); return true; } }