3 +--------------------------------------------------------------------+
4 | CiviCRM version 4.7 |
5 +--------------------------------------------------------------------+
6 | Copyright CiviCRM LLC (c) 2004-2015 |
7 +--------------------------------------------------------------------+
8 | This file is a part of CiviCRM. |
10 | CiviCRM is free software; you can copy, modify, and distribute it |
11 | under the terms of the GNU Affero General Public License |
12 | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
14 | CiviCRM is distributed in the hope that it will be useful, but |
15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
17 | See the GNU Affero General Public License for more details. |
19 | You should have received a copy of the GNU Affero General Public |
20 | License and the CiviCRM Licensing Exception along |
21 | with this program; if not, contact CiviCRM LLC |
22 | at info[AT]civicrm[DOT]org. If you have questions about the |
23 | GNU Affero General Public License or the licensing of CiviCRM, |
24 | see the CiviCRM license FAQ at http://civicrm.org/licensing |
25 +--------------------------------------------------------------------+
31 * @copyright CiviCRM LLC (c) 2004-2015
38 * Page for displaying list of financial batches
40 class CRM_Financial_Page_BatchTransaction
extends CRM_Core_Page_Basic
{
42 * The action links that we need to display for the browse screen.
46 static $_links = NULL;
49 static $_columnHeader = NULL;
50 static $_returnvalues = NULL;
58 public function getBAOName() {
59 return 'CRM_Batch_BAO_Batch';
66 * (reference) of action links
68 public function &links() {
69 if (!(self
::$_links)) {
70 self
::$_links = array(
73 'url' => 'civicrm/contact/view/contribution',
74 'qs' => 'reset=1&id=%%contid%%&cid=%%cid%%&action=view&context=contribution&selectedChild=contribute',
75 'title' => ts('View Contribution'),
78 'name' => ts('Remove'),
79 'title' => ts('Remove Transaction'),
80 'extra' => 'onclick = "assignRemove( %%id%%,\'' . 'remove' . '\' );"',
90 * This method is called after the page is created. It checks for the
91 * type of action and executes that action.
92 * Finally it calls the parent's run method.
96 public function run() {
97 // get the requested action
98 $action = CRM_Utils_Request
::retrieve('action', 'String', $this, FALSE, 'browse'); // default to 'browse'
100 // assign vars to templates
101 $this->assign('action', $action);
103 self
::$_entityID = CRM_Utils_Request
::retrieve('bid', 'Positive');
104 if (isset(self
::$_entityID)) {
105 $statusID = CRM_Core_DAO
::getFieldValue('CRM_Batch_BAO_Batch', self
::$_entityID, 'status_id');
110 'title' => ts('Accounting Batches'),
111 'url' => CRM_Utils_System
::url('civicrm/financial/financialbatches',
112 "reset=1&batchStatus=$statusID"),
116 CRM_Utils_System
::appendBreadCrumb($breadCrumb);
117 $this->edit($action, self
::$_entityID);
118 return parent
::run();
122 * Browse all financial batch transactions.
127 public function browse() {
131 * Get name of edit form.
134 * Classname of edit form.
136 public function editForm() {
137 return 'CRM_Financial_Form_BatchTransaction';
141 * Get edit form name.
146 public function editName() {
158 public function userContext($mode = NULL) {
159 return 'civicrm/batchtransaction';