Location: PHPKode > projects > Neobill > NeoBill0.5.6/manager/pages/OutstandingInvoicesPage.class.php
<?php
/**
 * OutstandingInvoicesPage.class.php
 *
 * This file contains the definition for the Outstanding Invoices Page class
 *
 * @package Pages
 * @author John Diamond <hide@address.com>
 * @copyright John Diamond <hide@address.com>
 * @license http://www.opensource.org/licenses/gpl-license.php GNU Public License
 */

// Include the parent class
require_once BASE_PATH . "include/SolidStatePage.class.php";

/**
 * OutstandingInvoicesPage
 *
 * Display a table of outstanding invoices.
 *
 * @package Pages
 * @author John Diamond <hide@address.com>
 */
class OutstandingInvoicesPage extends SolidStatePage {
	/**
	 * Action
	 *
	 * Actions handled by this page:
	 *   none
	 *
	 * @param string $action_name Action
	 */
	function action( $action_name ) {
		switch ( $action_name ) {
			case "outstanding_invoices_action":
			// Create a new invoice
				$this->gotoPage( "accounts_add_invoice" );
				break;

			case "search_outstanding_invoices":
				$this->searchTable( "outstanding_invoices", "invoices", $this->post );
				break;

			default:
				// No matching action, refer to base class
				parent::action( $action_name );
		}
	}

	/**
	 * Initialize Outstanding Invoices Page
	 */
	public function init() {
		parent::init();

		// Tell the orders table widget to only show "pending" orders
		$widget = $this->forms['outstanding_invoices']->getField( "invoices" )->getWidget();
		$widget->setOutstanding( "Yes" );
	}
}
?>
Return current item: Neobill